summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorYe.Li <B37916@freescale.com>2014-06-11 15:34:49 +0800
committerYe Li <ye.li@nxp.com>2017-04-05 14:04:35 +0800
commite1c98a672e50fd0405686b74dad50680a75a8a9f (patch)
tree2c697eef35646c8dff2b26268042554321273cff /arch
parent7b17fcee90936a52318040de8d787c5b9b2debee (diff)
downloadu-boot-imx-e1c98a672e50fd0405686b74dad50680a75a8a9f.zip
u-boot-imx-e1c98a672e50fd0405686b74dad50680a75a8a9f.tar.gz
u-boot-imx-e1c98a672e50fd0405686b74dad50680a75a8a9f.tar.bz2
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 <b20788@freescale.com> Signed-off-by: Ye.Li <B37916@freescale.com> (cherry picked from commit df6ac8531d498021ed379c74fc1847bd2cec7179) Signed-off-by: Peng Fan <Peng.Fan@freescale.com> (cherry picked from commit 4f4ecdbf6fe2673b8ad117df1a4974bdb7e6aa4a)
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/imx-common/Kconfig8
-rw-r--r--arch/arm/imx-common/cpu.c12
2 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/imx-common/Kconfig b/arch/arm/imx-common/Kconfig
index 6e91c7c..c75a38e 100644
--- a/arch/arm/imx-common/Kconfig
+++ b/arch/arm/imx-common/Kconfig
@@ -39,3 +39,11 @@ config SECURE_BOOT
help
This option enables the support for secure boot (HAB).
See doc/README.mxc_hab for more details.
+
+config DBG_MONITOR
+ bool "Enable the AXI debug monitor"
+ depends on ARCH_MX6 || ARCH_MX7
+ help
+ This option enables the debug monitor which prints out last
+ failed AXI access info when system reboot is caused by AXI
+ access failure.
diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c
index b409f84..b857e5e 100644
--- a/arch/arm/imx-common/cpu.c
+++ b/arch/arm/imx-common/cpu.c
@@ -180,6 +180,10 @@ int print_cpuinfo(void)
{
u32 cpurev;
__maybe_unused u32 max_freq;
+#if defined(CONFIG_DBG_MONITOR)
+ struct dbg_monitor_regs *dbg =
+ (struct dbg_monitor_regs *)DEBUG_MONITOR_BASE_ADDR;
+#endif
cpurev = get_cpu_rev();
@@ -236,6 +240,14 @@ int print_cpuinfo(void)
}
#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;
}