diff --git a/drivers/soc/rockchip/rockchip_debug.c b/drivers/soc/rockchip/rockchip_debug.c index 67d14064d1c5..dbc05b9cad27 100644 --- a/drivers/soc/rockchip/rockchip_debug.c +++ b/drivers/soc/rockchip/rockchip_debug.c @@ -79,6 +79,8 @@ #define PMPCSR_LO 0x200 #define PMPCSR_HI 0x204 +#define EDOSLAR 0x300 + #define NUM_CPU_SAMPLES 100 #define NUM_SAMPLES_TO_PRINT 32 @@ -139,6 +141,9 @@ static int rockchip_debug_dump_edpcsr(struct fiq_debugger_output *output) /* Unlock EDLSR.SLK so that EDPCSRhi gets populated */ writel(EDLAR_UNLOCK, base + EDLAR); + /* Disabled os lock */ + writel(0, base + EDOSLAR); + /* Try to read a bunch of times if CPU is actually running */ for (j = 0; j < NUM_CPU_SAMPLES && printed < NUM_SAMPLES_TO_PRINT; j++) { @@ -299,6 +304,9 @@ static int rockchip_panic_notify_edpcsr(struct notifier_block *nb, /* Unlock EDLSR.SLK so that EDPCSRhi gets populated */ writel(EDLAR_UNLOCK, base + EDLAR); + /* Disabled os lock */ + writel(0, base + EDOSLAR); + pr_err("CPU%d online:%d\n", i, cpu_online(i)); /* Try to read a bunch of times if CPU is actually running */ @@ -533,6 +541,8 @@ static int rockchip_hardlock_notify(struct notifier_block *nb, base = rockchip_cpu_debug[cpu]; /* Unlock EDLSR.SLK so that EDPCSRhi gets populated */ writel(EDLAR_UNLOCK, base + EDLAR); + /* Disabled os lock */ + writel(0, base + EDOSLAR); if (sizeof(edpcsr) == 8) edpcsr = ((u64)readl(base + EDPCSR_LO)) | ((u64)readl(base + EDPCSR_HI) << 32);