Skip to content

Commit 70d4c34

Browse files
Sai Prakash Ranjanmathieupoirier
Sai Prakash Ranjan
authored andcommitted
coresight: cpu-debug: Add support for Qualcomm Kryo
Add support for coresight CPU debug module on Qualcomm Kryo CPUs. This patch adds the UCI entries for Kryo CPUs found on MSM8996 which shares the same PIDs as ETMs. Without this, below error is observed on MSM8996: [ 5.429867] OF: graph: no port node found in /soc/debug@3810000 [ 5.429938] coresight-etm4x: probe of 3810000.debug failed with error -22 [ 5.435415] coresight-cpu-debug 3810000.debug: Coresight debug-CPU0 initialized [ 5.446474] OF: graph: no port node found in /soc/debug@3910000 [ 5.448927] coresight-etm4x: probe of 3910000.debug failed with error -22 [ 5.454681] coresight-cpu-debug 3910000.debug: Coresight debug-CPU1 initialized [ 5.487765] OF: graph: no port node found in /soc/debug@3a10000 [ 5.488007] coresight-etm4x: probe of 3a10000.debug failed with error -22 [ 5.493024] coresight-cpu-debug 3a10000.debug: Coresight debug-CPU2 initialized [ 5.501802] OF: graph: no port node found in /soc/debug@3b10000 [ 5.512901] coresight-etm4x: probe of 3b10000.debug failed with error -22 [ 5.513192] coresight-cpu-debug 3b10000.debug: Coresight debug-CPU3 initialized Signed-off-by: Sai Prakash Ranjan <[email protected]> Tested-by: Leo Yan <[email protected]> Signed-off-by: Mathieu Poirier <[email protected]>
1 parent 2caaaca commit 70d4c34

File tree

2 files changed

+21
-22
lines changed

2 files changed

+21
-22
lines changed

drivers/hwtracing/coresight/coresight-cpu-debug.c

+16-17
Original file line numberDiff line numberDiff line change
@@ -646,24 +646,23 @@ static int debug_remove(struct amba_device *adev)
646646
return 0;
647647
}
648648

649+
static const struct amba_cs_uci_id uci_id_debug[] = {
650+
{
651+
/* CPU Debug UCI data */
652+
.devarch = 0x47706a15,
653+
.devarch_mask = 0xfff0ffff,
654+
.devtype = 0x00000015,
655+
}
656+
};
657+
649658
static const struct amba_id debug_ids[] = {
650-
{ /* Debug for Cortex-A53 */
651-
.id = 0x000bbd03,
652-
.mask = 0x000fffff,
653-
},
654-
{ /* Debug for Cortex-A57 */
655-
.id = 0x000bbd07,
656-
.mask = 0x000fffff,
657-
},
658-
{ /* Debug for Cortex-A72 */
659-
.id = 0x000bbd08,
660-
.mask = 0x000fffff,
661-
},
662-
{ /* Debug for Cortex-A73 */
663-
.id = 0x000bbd09,
664-
.mask = 0x000fffff,
665-
},
666-
{ 0, 0 },
659+
CS_AMBA_ID(0x000bbd03), /* Cortex-A53 */
660+
CS_AMBA_ID(0x000bbd07), /* Cortex-A57 */
661+
CS_AMBA_ID(0x000bbd08), /* Cortex-A72 */
662+
CS_AMBA_ID(0x000bbd09), /* Cortex-A73 */
663+
CS_AMBA_UCI_ID(0x000f0205, uci_id_debug), /* Qualcomm Kryo */
664+
CS_AMBA_UCI_ID(0x000f0211, uci_id_debug), /* Qualcomm Kryo */
665+
{},
667666
};
668667

669668
static struct amba_driver debug_driver = {

drivers/hwtracing/coresight/coresight-priv.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,11 @@ static inline int etm_writel_cp14(u32 off, u32 val) { return 0; }
185185
}
186186

187187
/* coresight AMBA ID, full UCI structure: id table entry. */
188-
#define CS_AMBA_UCI_ID(pid, uci_ptr) \
189-
{ \
190-
.id = pid, \
191-
.mask = 0x000fffff, \
192-
.data = uci_ptr \
188+
#define CS_AMBA_UCI_ID(pid, uci_ptr) \
189+
{ \
190+
.id = pid, \
191+
.mask = 0x000fffff, \
192+
.data = (void *)uci_ptr \
193193
}
194194

195195
/* extract the data value from a UCI structure given amba_id pointer. */

0 commit comments

Comments
 (0)