Skip to content

Commit 4e54bc5

Browse files
jiegan0107shashim-quic
authored andcommitted
QCLINUX: qcom-dcc: Add driver support for Data Capture and Compare unit(DCC)
The DCC is a DMA Engine designed to capture and store data during system crash or software triggers. The DCC operates based on user inputs via the debugfs interface. The user gives addresses as inputs and these addresses are stored in the dcc sram. In case of a system crash or a manual software trigger by the user through the debugfs interface, the dcc captures and stores the values at these addresses. This patch contains the driver which has all the methods pertaining to the debugfs interface, auxiliary functions to support all the four fundamental operations of dcc namely read, write, read/modify/write and loop. The probe method here instantiates all the resources necessary for dcc to operate mainly the dedicated dcc sram where it stores the values. The DCC driver can be used for debugging purposes without going for a reboot since it can perform software triggers as well based on user inputs. Also add the documentation for debugfs entries which explains the functionalities of each debugfs file that has been created for dcc. The following is the justification of using debugfs interface over the other alternatives like sysfs/ioctls i) As can be seen from the debugfs attribute descriptions, some of the debugfs attribute files here contains multiple arguments which needs to be accepted from the user. This goes against the design style of sysfs. ii) The user input patterns have been made simple and convenient in this case with the use of debugfs interface as user doesn't need to shuffle between different files to execute one instruction as was the case on using other alternatives. Signed-off-by: Jie Gan <jie.gan@oss.qualcomm.com>
1 parent 0cf570b commit 4e54bc5

3 files changed

Lines changed: 1619 additions & 0 deletions

File tree

drivers/misc/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,14 @@ config QCOM_FASTRPC
310310
applications DSP processor. Say M if you want to enable this
311311
module.
312312

313+
config QCOM_DCC
314+
tristate "Qualcomm Technologies, Inc. Data Capture and Compare (DCC) engine driver"
315+
depends on ARCH_QCOM || COMPILE_TEST
316+
help
317+
This option enables the driver for the Data Capture and Compare engine. DCC
318+
driver provides interfaces to configure DCC block and read back the captured
319+
data from the DCC's internal SRAM. The module name for this is qcom-dcc.
320+
313321
config SGI_GRU
314322
tristate "SGI GRU driver"
315323
depends on X86_UV && SMP

drivers/misc/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,4 @@ obj-$(CONFIG_MCHP_LAN966X_PCI) += lan966x-pci.o
7575
obj-y += keba/
7676
obj-y += amd-sbi/
7777
obj-$(CONFIG_MISC_RP1) += rp1/
78+
obj-$(CONFIG_QCOM_DCC) += qcom-dcc.o

0 commit comments

Comments
 (0)