Commit 5265a3052505fae2a212af292412a62b20a16f97
Committed by
Ye Li
1 parent
0864a17afb
Exists in
smarc_8mm-imx_v2018.03_4.14.98_2.0.0_ga
and in
5 other branches
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) (cherry picked from commit e1c98a672e50fd0405686b74dad50680a75a8a9f)
Showing 5 changed files with 38 additions and 0 deletions Side-by-side Diff
arch/arm/include/asm/arch-mx6/imx-regs.h
| ... | ... | @@ -1088,6 +1088,20 @@ |
| 1088 | 1088 | u32 pr; |
| 1089 | 1089 | u32 cnr; |
| 1090 | 1090 | }; |
| 1091 | + | |
| 1092 | +struct dbg_monitor_regs { | |
| 1093 | + u32 ctrl[4]; /* Control */ | |
| 1094 | + u32 master_en[4]; /* Master enable */ | |
| 1095 | + u32 irq[4]; /* IRQ */ | |
| 1096 | + u32 trap_addr_low[4]; /* Trap address low */ | |
| 1097 | + u32 trap_addr_high[4]; /* Trap address high */ | |
| 1098 | + u32 trap_id[4]; /* Trap ID */ | |
| 1099 | + u32 snvs_addr[4]; /* SNVS address */ | |
| 1100 | + u32 snvs_data[4]; /* SNVS data */ | |
| 1101 | + u32 snvs_info[4]; /* SNVS info */ | |
| 1102 | + u32 version[4]; /* Version */ | |
| 1103 | +}; | |
| 1104 | + | |
| 1091 | 1105 | #endif /* __ASSEMBLER__*/ |
| 1092 | 1106 | #endif /* __ASM_ARCH_MX6_IMX_REGS_H__ */ |
arch/arm/mach-imx/Kconfig
| ... | ... | @@ -71,6 +71,14 @@ |
| 71 | 71 | This enables the 'hdmidet' command which detects if an HDMI monitor |
| 72 | 72 | is connected. |
| 73 | 73 | |
| 74 | +config DBG_MONITOR | |
| 75 | + bool "Enable the AXI debug monitor" | |
| 76 | + depends on ARCH_MX6 || ARCH_MX7 | |
| 77 | + help | |
| 78 | + This option enables the debug monitor which prints out last | |
| 79 | + failed AXI access info when system reboot is caused by AXI | |
| 80 | + access failure. | |
| 81 | + | |
| 74 | 82 | config NXP_BOARD_REVISION |
| 75 | 83 | bool "Read NXP board revision from fuses" |
| 76 | 84 | depends on ARCH_MX6 || ARCH_MX7 |
arch/arm/mach-imx/cpu.c
| ... | ... | @@ -188,6 +188,10 @@ |
| 188 | 188 | { |
| 189 | 189 | u32 cpurev; |
| 190 | 190 | __maybe_unused u32 max_freq; |
| 191 | +#if defined(CONFIG_DBG_MONITOR) | |
| 192 | + struct dbg_monitor_regs *dbg = | |
| 193 | + (struct dbg_monitor_regs *)DEBUG_MONITOR_BASE_ADDR; | |
| 194 | +#endif | |
| 191 | 195 | |
| 192 | 196 | cpurev = get_cpu_rev(); |
| 193 | 197 | |
| ... | ... | @@ -242,6 +246,14 @@ |
| 242 | 246 | } else { |
| 243 | 247 | debug(" - invalid sensor device\n"); |
| 244 | 248 | } |
| 249 | +#endif | |
| 250 | + | |
| 251 | +#if defined(CONFIG_DBG_MONITOR) | |
| 252 | + if (readl(&dbg->snvs_addr)) | |
| 253 | + printf("DBG snvs regs addr 0x%x, data 0x%x, info 0x%x\n", | |
| 254 | + readl(&dbg->snvs_addr), | |
| 255 | + readl(&dbg->snvs_data), | |
| 256 | + readl(&dbg->snvs_info)); | |
| 245 | 257 | #endif |
| 246 | 258 | |
| 247 | 259 | printf("Reset cause: %s\n", get_reset_cause()); |
include/configs/mx6sxsabreauto.h
-
mentioned in commit 993963
-
mentioned in commit 993963
-
mentioned in commit 06b0fe
-
mentioned in commit 06b0fe
-
mentioned in commit 06b0fe
-
mentioned in commit 06b0fe
-
mentioned in commit f77885
-
mentioned in commit f77885
-
mentioned in commit 06b0fe
-
mentioned in commit f77885
-
mentioned in commit f77885
-
mentioned in commit f77885
-
mentioned in commit f77885
-
mentioned in commit 00e934
-
mentioned in commit 3b51c3
-
mentioned in commit 00e934
-
mentioned in commit 99b60d