aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-s3c2440/mach-gta02.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c
index fd746fd1445..c32bb2a9851 100644
--- a/arch/arm/mach-s3c2440/mach-gta02.c
+++ b/arch/arm/mach-s3c2440/mach-gta02.c
@@ -328,6 +328,27 @@ FIQ_HANDLER_ENTRY(256, 512)
FIQ_HANDLER_END()
+/*
+ * this gets called every 1ms when we paniced.
+ */
+
+static long gta02_panic_blink(long count)
+{
+ long delay = 0;
+ static long last_blink;
+ static char led;
+
+ if (count - last_blink < 100) /* 200ms period, fast blink */
+ return 0;
+
+ led ^= 1;
+ s3c2410_gpio_cfgpin(GTA02_GPIO_AUX_LED, S3C2410_GPIO_OUTPUT);
+ neo1973_gpb_setpin(GTA02_GPIO_AUX_LED, led);
+
+ last_blink = count;
+ return delay;
+}
+
/**
* returns PCB revision information in b9,b8 and b2,b1,b0
@@ -1476,6 +1497,9 @@ static void __init gta02_machine_init(void)
{
int rc;
+ /* set the panic callback to make AUX blink fast */
+ panic_blink = gta02_panic_blink;
+
switch (system_rev) {
case GTA02v6_SYSTEM_REV:
/* we need push-pull interrupt from motion sensors */