[Balloon-svn] r478 - balloon/trunk/kernel/2.6.22.2

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: subversion@balloonboard.org
Date:  
To: balloon-svn
Subject: [Balloon-svn] r478 - balloon/trunk/kernel/2.6.22.2
Author: wookey
Date: 2008-05-08 18:18:53 +0100 (Thu, 08 May 2008)
New Revision: 478

Modified:
balloon/trunk/kernel/2.6.22.2/balloon3-leds.patch
Log:
Turn on leds to show idle and heartbeat (on GPIO9 and 10)


Modified: balloon/trunk/kernel/2.6.22.2/balloon3-leds.patch
===================================================================
--- balloon/trunk/kernel/2.6.22.2/balloon3-leds.patch    2008-05-02 11:52:38 UTC (rev 477)
+++ balloon/trunk/kernel/2.6.22.2/balloon3-leds.patch    2008-05-08 17:18:53 UTC (rev 478)
@@ -1,7 +1,7 @@
Index: arch/arm/mach-pxa/Makefile
===================================================================
---- arch/arm/mach-pxa/Makefile.orig    2007-06-28 14:05:07.000000000 +0100
-+++ arch/arm/mach-pxa/Makefile    2007-06-28 21:16:52.000000000 +0100
+--- arch/arm/mach-pxa/Makefile.orig    2008-05-01 15:32:12.000000000 +0100
++++ arch/arm/mach-pxa/Makefile    2008-05-01 15:32:12.000000000 +0100
@@ -24,6 +24,7 @@
led-y := leds.o
led-$(CONFIG_ARCH_LUBBOCK) += leds-lubbock.o
@@ -13,8 +13,8 @@
Index: arch/arm/mach-pxa/leds-balloon3.c
===================================================================
--- /dev/null    1970-01-01 00:00:00.000000000 +0000
-+++ arch/arm/mach-pxa/leds-balloon3.c    2007-06-28 21:16:52.000000000 +0100
-@@ -0,0 +1,134 @@
++++ arch/arm/mach-pxa/leds-balloon3.c    2008-05-06 18:15:28.000000000 +0100
+@@ -0,0 +1,113 @@
+/*
+ * linux/arch/arm/mach-pxa/leds-balloon3.c
+ *
@@ -39,23 +39,11 @@
+
+#include "leds.h"
+
-+#if 0
-+/* 8 discrete leds available for general use: */
-+#define D28            (1 << 0)
-+#define D27            (1 << 1)
-+#define D26            (1 << 2)
-+#define D25            (1 << 3)
-+#define D24            (1 << 4)
-+#define D23            (1 << 5)
-+#define D22            (1 << 6)
-+#define D21            (1 << 7)
-+#endif
+
+#define LED_STATE_ENABLED    1
+#define LED_STATE_CLAIMED    2
+
+static unsigned int led_state;
-+//static unsigned int hw_led_state;
+static char flipflop;
+
+void balloon3_leds_event(led_event_t evt)
@@ -68,7 +56,6 @@
+    switch (evt) {
+
+    case led_start:
-+//        hw_led_state = 0;
+        led_state = LED_STATE_ENABLED;
+        break;
+
@@ -78,12 +65,10 @@
+
+    case led_claim:
+        led_state |= LED_STATE_CLAIMED;
-+//        hw_led_state = 0;
+        break;
+
+    case led_release:
+        led_state &= ~LED_STATE_CLAIMED;
-+//        hw_led_state = 0;
+        break;
+
+#ifdef CONFIG_LEDS_TIMER
@@ -101,12 +86,12 @@
+#ifdef CONFIG_LEDS_CPU
+    case led_idle_start:
+        if (led_state & LED_STATE_ENABLED)
-+         GPCR(BALLOON3_GPIO_LED_IDLE) = GPIO_bit(BALLOON3_GPIO_LED_IDLE);
++         GPCR(BALLOON3_GPIO_LED_IDLE) = ! GPIO_bit(BALLOON3_GPIO_LED_IDLE);
+        break;
+
+    case led_idle_end:
+        if (led_state & LED_STATE_ENABLED)
-+         GPSR(BALLOON3_GPIO_LED_IDLE) = GPIO_bit(BALLOON3_GPIO_LED_IDLE);
++         GPSR(BALLOON3_GPIO_LED_IDLE) = ! GPIO_bit(BALLOON3_GPIO_LED_IDLE);
+        break;
+#endif
+
@@ -140,22 +125,29 @@
+        break;
+    }
+
-+#if 0
-+    if (led_state & LED_STATE_ENABLED)
-+        MST_LEDCTRL = (MST_LEDCTRL | 0xff) & ~hw_led_state;
-+    else
-+        MST_LEDCTRL |= 0xff;
-+#endif
+
+    local_irq_restore(flags);
+}
Index: arch/arm/mach-pxa/leds.h
===================================================================
---- arch/arm/mach-pxa/leds.h.orig    2007-06-28 14:04:50.000000000 +0100
-+++ arch/arm/mach-pxa/leds.h    2007-06-28 21:16:53.000000000 +0100
+--- arch/arm/mach-pxa/leds.h.orig    2008-05-01 15:31:41.000000000 +0100
++++ arch/arm/mach-pxa/leds.h    2008-05-01 15:32:12.000000000 +0100
@@ -10,4 +10,5 @@
extern void idp_leds_event(led_event_t evt);
extern void lubbock_leds_event(led_event_t evt);
extern void mainstone_leds_event(led_event_t evt);
+extern void balloon3_leds_event(led_event_t evt);
extern void trizeps4_leds_event(led_event_t evt);
+Index: arch/arm/mach-pxa/leds.c
+===================================================================
+--- arch/arm/mach-pxa/leds.c.orig    2008-05-06 18:12:46.000000000 +0100
++++ arch/arm/mach-pxa/leds.c    2008-05-06 18:13:09.000000000 +0100
+@@ -26,6 +26,8 @@
+         leds_event = idp_leds_event;
+     if (machine_is_trizeps4())
+         leds_event = trizeps4_leds_event;
++    if (machine_is_balloon3())
++        leds_event = balloon3_leds_event;
+
+     leds_event(led_start);
+     return 0;