soc: qcom: dcc: rewrite description of dcc sysfs files

The description of dcc sysfs files is somewhat confusing and not effective.
Rewrite it to be clear.

While at it, also use literal code block for config sysfs examples and
remove redundant examples that are obvious.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Acked-by: Souradeep Chowdhury <quic_schowdhu@quicinc.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221230135030.17002-3-bagasdotme@gmail.com
This commit is contained in:
Bagas Sanjaya 2022-12-30 20:50:31 +07:00 committed by Bjorn Andersson
parent dc2f5a499d
commit 13763fb955
1 changed files with 76 additions and 66 deletions

View File

@ -3,115 +3,125 @@ Date: December 2022
Contact: Souradeep Chowdhury <quic_schowdhu@quicinc.com> Contact: Souradeep Chowdhury <quic_schowdhu@quicinc.com>
Description: Description:
This file is used to check the status of the dcc This file is used to check the status of the dcc
hardware if it's ready to take the inputs. A 'Y' hardware if it's ready to receive user configurations.
here indicates dcc is in a ready condition. A 'Y' here indicates dcc is ready.
Example:
cat /sys/kernel/debug/dcc/.../ready
What: /sys/kernel/debug/dcc/.../trigger What: /sys/kernel/debug/dcc/.../trigger
Date: December 2022 Date: December 2022
Contact: Souradeep Chowdhury <quic_schowdhu@quicinc.com> Contact: Souradeep Chowdhury <quic_schowdhu@quicinc.com>
Description: Description:
This is the debugfs interface for manual software This is the debugfs interface for manual software
triggers. The user can simply enter a 1 against triggers. The trigger can be invoked by writing '1'
the debugfs file and enable a manual trigger. to the file.
Example:
echo 1 > /sys/kernel/debug/dcc/.../trigger
What: /sys/kernel/debug/dcc/.../config_reset What: /sys/kernel/debug/dcc/.../config_reset
Date: December 2022 Date: December 2022
Contact: Souradeep Chowdhury <quic_schowdhu@quicinc.com> Contact: Souradeep Chowdhury <quic_schowdhu@quicinc.com>
Description: Description:
This file is used to reset the configuration of This file is used to reset the configuration of
a dcc driver to the default configuration. This a dcc driver to the default configuration. When '1'
means that all the previous addresses stored in is written to the file, all the previous addresses
the driver gets removed and user needs to enter stored in the driver gets removed and users need to
the address values from the start. reconfigure addresses again.
Example:
echo 1 > /sys/kernel/debug/dcc/../config_reset
What: /sys/kernel/debug/dcc/.../[list-number]/config What: /sys/kernel/debug/dcc/.../[list-number]/config
Date: December 2022 Date: December 2022
Contact: Souradeep Chowdhury <quic_schowdhu@quicinc.com> Contact: Souradeep Chowdhury <quic_schowdhu@quicinc.com>
Description: Description:
This stores the addresses of the registers which This stores the addresses of the registers which
should be read in case of a hardware crash or can be read in case of a hardware crash or manual
manual software triggers. The addresses entered here software triggers. The input addresses type
are considered under all the 4 types of dcc can be one of following dcc instructions: read,
instructions Read type, Write type, Read Modify Write write, read-write, and loop type. The lists need to
type and Loop type. The lists need to be configured be configured sequentially and not in a overlapping
sequentially and not in a overlapping manner. As an manner; e.g. users can jump to list x only after
example user can jump to list x only after list y is list y is configured and enabled. The input format for
configured and enabled. The format for entering all each type is as follows:
types of instructions are explained in examples as
follows:
i) Read Type Instruction i) Read instruction
echo R <1> <2> <3> >/sys/kernel/debug/dcc/../[list-number]/config ::
1->Address to be considered for reading the value. echo R <addr> <n> <bus> >/sys/kernel/debug/dcc/../[list-number]/config
2->The word count of the addresses, read n words where:
starting from address <1>. Each word is of 32 bits.
If not entered 1 is considered.
3->Can be 'apb' or 'ahb' which indicates if it is apb or ahb <addr>
bus respectively. If not entered ahb is considered. The address to be read.
ii) Write Type Instruction <n>
The addresses word count, starting from address <1>.
Each word is 32 bits (4 bytes). If omitted, defaulted
to 1.
echo W <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config <bus type>
The bus type, which can be either 'apb' or 'ahb'.
The default is 'ahb' if leaved out.
1->Address to be considered for writing the value. ii) Write instruction
2->The value that needs to be written at the location. ::
3->Can be a 'apb' or 'ahb' which indicates if it is apb or ahb echo W <addr> <n> <bus type> > /sys/kernel/debug/dcc/../[list-number]/config
but respectively.
iii) Read Modify Write type instruction where:
echo RW <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config <addr>
The address to be written.
1->The address which needs to be considered for read then write. <n>
The value to be written at <addr>.
2->The value that needs to be written on the address. <bus type>
The bus type, which can be either 'apb' or 'ahb'.
3->The mask of the value to be written. iii) Read-write instruction
iv) Loop Type Instruction ::
echo L <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config echo RW <addr> <n> <mask> > /sys/kernel/debug/dcc/../[list-number]/config
1->The loop count, the number of times the value of the addresses will be where:
captured.
2->The address count, total number of addresses to be entered in this <addr>
instruction. The address to be read and written.
3->The series of addresses to be entered separated by a space like <addr1> <n>
<addr2>... and so on. The value to be written at <addr>.
<mask>
The value mask.
iv) Loop instruction
::
echo L <loop count> <address count> <address>... > /sys/kernel/debug/dcc/../[list-number]/config
where:
<loop count>
Number of iterations
<address count>
total number of addresses to be written
<address>
Space-separated list of addresses.
What: /sys/kernel/debug/dcc/.../[list-number]/enable What: /sys/kernel/debug/dcc/.../[list-number]/enable
Date: December 2022 Date: December 2022
Contact: Souradeep Chowdhury <quic_schowdhu@quicinc.com> Contact: Souradeep Chowdhury <quic_schowdhu@quicinc.com>
Description: Description:
This debugfs interface is used for enabling the This debugfs interface is used for enabling the
the dcc hardware. Enable file is kept under the the dcc hardware. A file named "enable" is in the
directory list number for which the user wants directory list number where users can enable/disable
to enable it. For example if the user wants to the specific list by writing boolean (1 or 0) to the
enable list 1, then he should go for file.
echo 1 > /sys/kernel/debug/dcc/.../1/enable.
On enabling the dcc, all the addresses entered On enabling the dcc, all the addresses specified
by the user for the corresponding list is written by the user for the corresponding list is written
into dcc sram which is read by the dcc hardware into dcc sram which is read by the dcc hardware
on manual or crash induced triggers. Lists should on manual or crash induced triggers. Lists must
be enabled sequentially.For example after configuring be configured and enabled sequentially, e.g. list
addresses for list 1 and enabling it, a user can 2 can only be enabled when list 1 have so.
proceed to enable list 2 or vice versa.
Example:
echo 0 > /sys/kernel/debug/dcc/.../[list-number]/enable
(disable dcc for the corresponding list number)
echo 1 > /sys/kernel/debug/dcc/.../[list-number]/enable
(enable dcc for the corresponding list number)