summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx233/system-imx233.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx233/system-imx233.c')
-rw-r--r--firmware/target/arm/imx233/system-imx233.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/firmware/target/arm/imx233/system-imx233.c b/firmware/target/arm/imx233/system-imx233.c
index 5fd162a1ca..c6f974b108 100644
--- a/firmware/target/arm/imx233/system-imx233.c
+++ b/firmware/target/arm/imx233/system-imx233.c
@@ -52,15 +52,16 @@
52#define WATCHDOG_HW_DELAY (10 * HZ) 52#define WATCHDOG_HW_DELAY (10 * HZ)
53#define WATCHDOG_SW_DELAY (5 * HZ) 53#define WATCHDOG_SW_DELAY (5 * HZ)
54 54
55void UIE(unsigned int pc, unsigned int num);
56
55static void woof_woof(void) 57static void woof_woof(void)
56{ 58{
57 /* stop hadrware watchdog, we catched the error */ 59 /* stop hardware watchdog, we catched the error */
58 imx233_rtc_enable_watchdog(false); 60 imx233_rtc_enable_watchdog(false);
61 /* recover current PC and trigger abort, so in the hope to get a useful
62 * backtrace */
59 uint32_t pc = HW_DIGCTL_SCRATCH0; 63 uint32_t pc = HW_DIGCTL_SCRATCH0;
60 /* write a "SWI #0xdead" instruction at the faulty instruction so that it 64 UIE(pc, 4);
61 * will trigger a proper backtrace */
62 *(uint32_t *)pc = 0xef00dead;
63 commit_discard_idcache();
64} 65}
65 66
66static void good_dog(void) 67static void good_dog(void)