diff options
author | mirko <mirko@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2008-12-12 00:02:36 +0000 |
---|---|---|
committer | mirko <mirko@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2008-12-12 00:02:36 +0000 |
commit | cc3146824acbf585f487a803b4a2eadf36b9b47d (patch) | |
tree | efab142ef89b35ce42e8a79e028eff15be362af8 /target/linux/s3c24xx/patches/0187-introduce-panic-blink-led-not-using-userspace-omfg.p.patch | |
parent | 22b3854919b7cb44d725eb7a7efd018ad9aec25c (diff) |
add support for target 3c24xx (more known as Openmoko GTA02 "Freerunner") and merge it with the openmoko-target and the work Michael Buesch <mb> did
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13609 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/s3c24xx/patches/0187-introduce-panic-blink-led-not-using-userspace-omfg.p.patch')
-rwxr-xr-x | target/linux/s3c24xx/patches/0187-introduce-panic-blink-led-not-using-userspace-omfg.p.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/target/linux/s3c24xx/patches/0187-introduce-panic-blink-led-not-using-userspace-omfg.p.patch b/target/linux/s3c24xx/patches/0187-introduce-panic-blink-led-not-using-userspace-omfg.p.patch new file mode 100755 index 0000000000..d11f837510 --- /dev/null +++ b/target/linux/s3c24xx/patches/0187-introduce-panic-blink-led-not-using-userspace-omfg.p.patch @@ -0,0 +1,62 @@ +From ff2e0f074f61fded30a44e13b849fe9010ab4148 Mon Sep 17 00:00:00 2001 +From: Andy Green <andy@openmoko.com> +Date: Fri, 25 Jul 2008 23:06:16 +0100 +Subject: [PATCH] introduce-panic-blink-led-not-using-userspace-omfg.patch + +A panic is silent on GTA02, it would be good if we got a little hint +if we are crashing (eg, in suspend / resume) from a panic instead of +a deadlock, etc. On a normal PC i8042 blinks the keyboard lights if +we panic, this patch causes AUX to flash at 5Hz in event of a panic. + +Tested by giving kernel fake root= that didn't exist. + +Signed-off-by: Andy Green <andy@openmoko.com> +--- + arch/arm/mach-s3c2440/mach-gta02.c | 24 ++++++++++++++++++++++++ + 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 fd746fd..c32bb2a 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 */ +-- +1.5.6.3 + |