From df6ac8531d498021ed379c74fc1847bd2cec7179 Mon Sep 17 00:00:00 2001 From: "Ye.Li" Date: Wed, 11 Jun 2014 15:34:49 +0800 Subject: ENGR00315894-55 iMX6SX: add debug monitor support Debug monitor will print out last failed AXI access info when system reboot is caused by AXI access failure, only works when debug monitor is enabled. Enable this module on i.MX6SX. Signed-off-by: Anson Huang Signed-off-by: Ye.Li --- arch/arm/imx-common/cpu.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'arch/arm/imx-common') diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c index 759ae46..c34bed5 100644 --- a/arch/arm/imx-common/cpu.c +++ b/arch/arm/imx-common/cpu.c @@ -128,6 +128,10 @@ const char *get_imx_type(u32 imxtype) int print_cpuinfo(void) { u32 cpurev; +#if defined(CONFIG_DBG_MONITOR) + struct dbg_monitor_regs *dbg = + (struct dbg_monitor_regs *)DEBUG_MONITOR_BASE_ADDR; +#endif cpurev = get_cpu_rev(); @@ -141,6 +145,14 @@ int print_cpuinfo(void) check_cpu_temperature(); #endif +#if defined(CONFIG_DBG_MONITOR) + if (readl(&dbg->snvs_addr)) + printf("DBG snvs regs addr 0x%x, data 0x%x, info 0x%x\n", + readl(&dbg->snvs_addr), + readl(&dbg->snvs_data), + readl(&dbg->snvs_info)); +#endif + printf("Reset cause: %s\n", get_reset_cause()); return 0; } -- cgit v1.1