summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/panic.c8
-rw-r--r--firmware/target/arm/system-arm.c7
2 files changed, 15 insertions, 0 deletions
diff --git a/firmware/panic.c b/firmware/panic.c
index 0223dc1..66b9e4d 100644
--- a/firmware/panic.c
+++ b/firmware/panic.c
@@ -30,6 +30,9 @@
#include "led.h"
#include "power.h"
#include "system.h"
+#ifdef HAVE_BACKLIGHT
+#include "backlight-target.h"
+#endif
static char panic_buf[128];
#define LINECHARS (LCD_WIDTH/SYSFONT_WIDTH)
@@ -75,9 +78,14 @@ void panicf( const char *fmt, ...)
#else
/* no LCD */
#endif
+
lcd_update();
DEBUGF("%s", panic_buf);
+#ifdef HAVE_BACKLIGHT
+ _backlight_on();
+#endif
+
set_cpu_frequency(0);
#ifdef HAVE_ATA_POWER_OFF
diff --git a/firmware/target/arm/system-arm.c b/firmware/target/arm/system-arm.c
index 5c5a18c..7d38b17 100644
--- a/firmware/target/arm/system-arm.c
+++ b/firmware/target/arm/system-arm.c
@@ -23,6 +23,9 @@
#include <stdio.h>
#include "lcd.h"
#include "font.h"
+#ifdef HAVE_BACKLIGHT
+#include "backlight-target.h"
+#endif
static const char* const uiename[] = {
"Undefined instruction",
@@ -48,6 +51,10 @@ void __attribute__((noreturn)) UIE(unsigned int pc, unsigned int num)
lcd_puts(0, 1, str);
lcd_update();
+#ifdef HAVE_BACKLIGHT
+ _backlight_on();
+#endif
+
disable_interrupt(IRQ_FIQ_STATUS);
system_exception_wait(); /* If this returns, try to reboot */