Skip to contentSkip to conversation

Add QAD, Cti-trigger and Bootconfig support for Data Capture and Compare(DCC)

PATCH New Souradeep Chowdhury 1 participant 4 messages Jan 30, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v3 cover Add QAD, Cti-trigger and Bootconfig support for Data Capture and Compare(DCC)

This patch adds the Bootconfig, QAD and CTI-Trigger support for DCC.

1.Bootconfig

Bootconfig parser has been added to DCC driver so that the register addresses can be configured during boot-time. This is used to debug crashes that can happen during boot-time. The expected format of a bootconfig is as follows:-

dcc_config {
	link_list_<The list number to configure> {
		id = <The list number to configure>
		items =  <Address as same format as dcc separated by '_'>,
	}
}

Example:

dcc_config {
	link_list_6 {
		id = 6
		items = R_0x1781005c_1_apb,
			R_0x1782005c_1_apb
	}
	link_list_5 {
		id = 5
		items = R_0x1784005c_1_apb
	}
}

2.QAD

QAD can be enabled as a part of debugfs file under each individual list folder. QAD is used to specify the access control for DCC configurations, on enabling it the access control to dcc configuration space is restricted. On setting the QAD value, the list gets locked out for a particular component and cannot be used by the rest.

3.CTI-trigger

CTI trigger is used to enable the Cross trigger interface for DCC. On enabling CTI trigger the dcc software trigger can be done by writing to CTI trig-out. Also the hwtrigger debugfs file is created which needs to be disabled for enabling CTI-trigger. Hwtrigger needs to be disabled for components to be able to write to CTI-trig-out.

Changes in V3

*Fixed the module build error in V2 of the patch

Souradeep Chowdhury (3):
soc: qcom: dcc: Add bootconfig support for DCC
soc: qcom: dcc: Add CTI-trigger support for DCC
soc: qcom: dcc: Add QAD support for DCC

 Documentation/ABI/testing/debugfs-driver-dcc |  24 +++
 drivers/soc/qcom/Kconfig                     |   3 +-
 drivers/soc/qcom/dcc.c                       | 290 ++++++++++++++++++++++++++-
 3 files changed, 309 insertions(+), 8 deletions(-)

--
2.7.4

#1 lore raw

PATCH v3 1/3 soc: qcom: dcc: Add bootconfig support for DCC

Add bootconfig parser for DCC which is used to configure addresses in DCC during boot time. This is needed to debug crashes that can happen during boot-time. The expected format of a bootconfig file is as follows:-

dcc_config {
	link_list_<The list number to configure> {
		id = <The list number to configure>
		items =  <Address as same format as dcc separated by '_'>,
	}
}

Example:-

dcc_config {
	link_list_6 {
		id = 6
		items = R_0x1781005c_1_apb,
			R_0x1782005c_1_apb
	}
}
---
 drivers/soc/qcom/Kconfig |  3 +-
 drivers/soc/qcom/dcc.c   | 74 ++++++++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 73 insertions(+), 4 deletions(-)
drivers/soc/qcom/Kconfig +2 -1
index 21c4ce2..d11bda2 100644
@@ -71,8 +71,9 @@ config QCOM_LLCC
 	  Say yes here to enable LLCC slice driver.
 
 config QCOM_DCC
-	tristate "Qualcomm Technologies, Inc. Data Capture and Compare(DCC) engine driver"
+	bool "Qualcomm Technologies, Inc. Data Capture and Compare(DCC) engine driver"
 	depends on ARCH_QCOM || COMPILE_TEST
+	select BOOT_CONFIG
 	help
 	  This option enables driver for Data Capture and Compare engine. DCC
 	  driver provides interface to configure DCC block and read back
drivers/soc/qcom/dcc.c +71 -3

116 lines not on this page · raw message

Signature · 1 line
2.7.4
#2 lore raw

PATCH v3 2/3 soc: qcom: dcc: Add CTI-trigger support for DCC

In reply to Souradeep Chowdhury

CTI trigger is used to enable the Cross trigger interface for DCC. On enabling CTI trigger the dcc software trigger can be done by writing to CTI trig-out. Add the debugfs file ctitrigger which gives the user option to enable ctitrigger for a list. Also add hwtrigger debugfs file which needs to be disabled on enabling the CTI-trigger. Hwtrigger needs to be disabled for components to be able to write to cti-trigout.

---
 Documentation/ABI/testing/debugfs-driver-dcc |  16 +++
 drivers/soc/qcom/dcc.c                       | 148 ++++++++++++++++++++++++++-
 2 files changed, 160 insertions(+), 4 deletions(-)
Documentation/ABI/testing/debugfs-driver-dcc +16 -0
index 27ed591..6f5d965 100644
@@ -125,3 +125,19 @@ Description:
 		on manual or crash induced triggers. Lists must
 		be configured and enabled sequentially, e.g. list
 		2 can only be enabled when list 1 have so.
+
+What:           /sys/kernel/debug/dcc/.../[list-number]/ctitrigger
+Date:           January 2023
+Contact:        Souradeep Chowdhury <[email protected]>
+Description:
+	        This debugfs interface is used for enabling the
+	        ctitrigger. Ctitrigger can be enabled by writing
+	        a '1' to the file.
+
+What:	        /sys/kernel/debug/dcc/.../[list-number]/hwtrigger
+Date:           January 2023
+Contact:        Souradeep Chowdhury <[email protected]>
+Description:
+	        This debugfs interface is used for enabling the
+	        hwtrigger. Hwtrigger can be enabled by writing
+		a '1' to the file.
drivers/soc/qcom/dcc.c +144 -4

205 lines not on this page · raw message

Signature · 1 line
2.7.4
#3 lore raw

PATCH v3 3/3 soc: qcom: dcc: Add QAD support for DCC

In reply to Souradeep Chowdhury

Add QAD debugfs file for DCC which can be used to enable/disable the QAD for a list. QAD is used to specify the access control for DCC configurations, on enabling it the access control to dcc configuration space is restricted. On setting the QAD value, the list gets locked out for a particular component and cannot be used by the rest.

---
 Documentation/ABI/testing/debugfs-driver-dcc |  8 ++++
 drivers/soc/qcom/dcc.c                       | 68 ++++++++++++++++++++++++++++
 2 files changed, 76 insertions(+)
Documentation/ABI/testing/debugfs-driver-dcc +8 -0
index 6f5d965..a3c4657 100644
@@ -141,3 +141,11 @@ Description:
 	        This debugfs interface is used for enabling the
 	        hwtrigger. Hwtrigger can be enabled by writing
 		a '1' to the file.
+
+What:           /sys/kernel/debug/dcc/.../[list-number]/QAD
+Date:           January 2023
+Contact:        Souradeep Chowdhury <[email protected]>
+Description:
+		This debugfs interface is used for enabling the
+		QAD. QAD can be enabled by writing a '1' to the
+		file.
drivers/soc/qcom/dcc.c +68 -0

110 lines not on this page · raw message

Signature · 1 line
2.7.4