summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Kondratiev <[email protected]>2026-02-23 16:54:42 +0200
committerAnup Patel <[email protected]>2026-02-25 18:49:03 +0530
commitd2dd699add0b90782dffee742ed1854f9b1532ad (patch)
treec7bba9e6210b9d8ed91abec757913908ea0760d4
parentea45923765de4145d174b98abc6b945c8407265e (diff)
platform: generic: mips p8700: improve CM access tracing
use function call like format; debug print returning value of the "read" accessor Signed-off-by: Vladimir Kondratiev <[email protected]> Reviewed-by: Anup Patel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
-rw-r--r--platform/generic/include/mips/mips-cm.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/platform/generic/include/mips/mips-cm.h b/platform/generic/include/mips/mips-cm.h
index 419e8407..6985e42b 100644
--- a/platform/generic/include/mips/mips-cm.h
+++ b/platform/generic/include/mips/mips-cm.h
@@ -32,12 +32,14 @@ static inline u##sz read_##unit##_##name(u32 hartid, bool local_p) \
+ (co << CM_BASE_CORE_SHIFT) \
+ off; \
if (DEBUG_CM) \
- sbi_printf("CM READ%d cmd_reg=%lx\n", sz, cmd_reg); \
+ sbi_printf("CM_READ%d(0x%lx) ...\n", sz, cmd_reg); \
if (sz == 32) \
asm volatile("lw %0,0(%1)":"=r"(value):"r"(cmd_reg)); \
else if (sz == 64) \
asm volatile("ld %0,0(%1)":"=r"(value):"r"(cmd_reg)); \
asm volatile("fence"); \
+ if (DEBUG_CM) \
+ sbi_printf("CM_READ%d(0x%lx) -> 0x%lx\n", sz, cmd_reg, (unsigned long)value); \
return value; \
}
@@ -52,7 +54,7 @@ static inline void write_##unit##_##name(u32 hartid, u##sz value, bool local_p)
+ (co << CM_BASE_CORE_SHIFT) \
+ off; \
if (DEBUG_CM) \
- sbi_printf("CM WRITE%d cmd_reg=%lx value=%lx\n", sz, \
+ sbi_printf("CM_WRITE%d(0x%lx, 0x%lx)\n", sz, \
cmd_reg, (unsigned long)value); \
if (sz == 32) \
asm volatile("sw %0,0(%1)"::"r"(value),"r"(cmd_reg)); \