summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/imx-common/Kconfig8
-rw-r--r--arch/arm/imx-common/cpu.c12
-rw-r--r--include/configs/mx6sxsabreauto.h2
3 files changed, 22 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;
}
diff --git a/include/configs/mx6sxsabreauto.h b/include/configs/mx6sxsabreauto.h
index ece744b..0f1ce4d 100644
--- a/include/configs/mx6sxsabreauto.h
+++ b/include/configs/mx6sxsabreauto.h
@@ -11,6 +11,8 @@
#include "mx6_common.h"
+#define CONFIG_DBG_MONITOR
+
/* Size of malloc() pool */
#define CONFIG_SYS_MALLOC_LEN (32 * SZ_1M)