changed Makefile and profiles, added patches for kernel 2.6.24
[openwrt.git] / target / linux / s3c24xx / patches-2.6.24 / 1208-introduce-panic-blink-led-not-using-userspace-omfg.p.patch
1 From 0e049b8ff8ad37e3749121519fe96d357e0754f4 Mon Sep 17 00:00:00 2001
2 From: Andy Green <andy@openmoko.com>
3 Date: Wed, 2 Jul 2008 22:43:20 +0100
4 Subject: [PATCH] introduce-panic-blink-led-not-using-userspace-omfg.patch
5
6 A panic is silent on GTA02, it would be good if we got a little hint
7 if we are crashing (eg, in suspend / resume) from a panic instead of
8 a deadlock, etc. On a normal PC i8042 blinks the keyboard lights if
9 we panic, this patch causes AUX to flash at 5Hz in event of a panic.
10
11 Tested by giving kernel fake root= that didn't exist.
12
13 Signed-off-by: Andy Green <andy@openmoko.com>
14 ---
15 arch/arm/mach-s3c2440/mach-gta02.c | 24 ++++++++++++++++++++++++
16 1 files changed, 24 insertions(+), 0 deletions(-)
17
18 diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c
19 index fd746fd..c32bb2a 100644
20 --- a/arch/arm/mach-s3c2440/mach-gta02.c
21 +++ b/arch/arm/mach-s3c2440/mach-gta02.c
22 @@ -328,6 +328,27 @@ FIQ_HANDLER_ENTRY(256, 512)
23 FIQ_HANDLER_END()
24
25
26 +/*
27 + * this gets called every 1ms when we paniced.
28 + */
29 +
30 +static long gta02_panic_blink(long count)
31 +{
32 + long delay = 0;
33 + static long last_blink;
34 + static char led;
35 +
36 + if (count - last_blink < 100) /* 200ms period, fast blink */
37 + return 0;
38 +
39 + led ^= 1;
40 + s3c2410_gpio_cfgpin(GTA02_GPIO_AUX_LED, S3C2410_GPIO_OUTPUT);
41 + neo1973_gpb_setpin(GTA02_GPIO_AUX_LED, led);
42 +
43 + last_blink = count;
44 + return delay;
45 +}
46 +
47
48 /**
49 * returns PCB revision information in b9,b8 and b2,b1,b0
50 @@ -1476,6 +1497,9 @@ static void __init gta02_machine_init(void)
51 {
52 int rc;
53
54 + /* set the panic callback to make AUX blink fast */
55 + panic_blink = gta02_panic_blink;
56 +
57 switch (system_rev) {
58 case GTA02v6_SYSTEM_REV:
59 /* we need push-pull interrupt from motion sensors */
60 --
61 1.5.6.5
62
This page took 0.047374 seconds and 5 git commands to generate.