]> git.neil.brown.name Git - history.git/commitdiff
[ARM PATCH] 2010/1: OMAP update 6/6: Add leds support for H2
authorTony Lindgren <tony@com.rmk.(none)>
Sat, 14 Aug 2004 18:51:28 +0000 (19:51 +0100)
committerRussell King <rmk@flint.arm.linux.org.uk>
Sat, 14 Aug 2004 18:51:28 +0000 (19:51 +0100)
Patch from Tony Lindgren

Patch from Kevin Hilman to replace old leds-perseus2.c with
leds-h2p2-debug.c to add leds support for H2.

arch/arm/mach-omap/leds-h2p2-debug.c [new file with mode: 0644]
arch/arm/mach-omap/leds-perseus2.c [deleted file]

diff --git a/arch/arm/mach-omap/leds-h2p2-debug.c b/arch/arm/mach-omap/leds-h2p2-debug.c
new file mode 100644 (file)
index 0000000..8ff27af
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ * linux/arch/arm/mach-omap/leds-h2p2-debug.c
+ *
+ * Copyright 2003 by Texas Instruments Incorporated
+ *
+ */
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/kernel_stat.h>
+#include <linux/sched.h>
+#include <linux/version.h>
+
+#include <asm/io.h>
+#include <asm/hardware.h>
+#include <asm/leds.h>
+#include <asm/system.h>
+
+#include <asm/arch/fpga.h>
+
+#include "leds.h"
+
+void h2p2_dbg_leds_event(led_event_t evt)
+{
+       unsigned long flags;
+       static unsigned long hw_led_state = 0;
+
+       local_irq_save(flags);
+
+       switch (evt) {
+       case led_start:
+               hw_led_state |= H2P2_DBG_FPGA_LED_STARTSTOP;
+               break;
+
+       case led_stop:
+               hw_led_state &= ~H2P2_DBG_FPGA_LED_STARTSTOP;
+               break;
+
+       case led_claim:
+               hw_led_state |= H2P2_DBG_FPGA_LED_CLAIMRELEASE;
+               break;
+
+       case led_release:
+               hw_led_state &= ~H2P2_DBG_FPGA_LED_CLAIMRELEASE;
+               break;
+
+#ifdef CONFIG_LEDS_TIMER
+       case led_timer:
+               /*
+                * Toggle Timer LED
+                */
+               if (hw_led_state & H2P2_DBG_FPGA_LED_TIMER)
+                       hw_led_state &= ~H2P2_DBG_FPGA_LED_TIMER;
+               else
+                       hw_led_state |= H2P2_DBG_FPGA_LED_TIMER;
+               break;
+#endif
+
+#ifdef CONFIG_LEDS_CPU
+       case led_idle_start:
+               hw_led_state |= H2P2_DBG_FPGA_LED_IDLE;
+               break;
+
+       case led_idle_end:
+               hw_led_state &= ~H2P2_DBG_FPGA_LED_IDLE;
+               break;
+#endif
+
+       case led_halted:
+               if (hw_led_state & H2P2_DBG_FPGA_LED_HALTED)
+                       hw_led_state &= ~H2P2_DBG_FPGA_LED_HALTED;
+               else
+                       hw_led_state |= H2P2_DBG_FPGA_LED_HALTED;
+               break;
+
+       case led_green_on:
+               break;
+
+       case led_green_off:
+               break;
+
+       case led_amber_on:
+               break;
+
+       case led_amber_off:
+               break;
+
+       case led_red_on:
+               break;
+
+       case led_red_off:
+               break;
+
+       default:
+               break;
+       }
+
+
+       /*
+        *  Actually burn the LEDs
+        */
+       __raw_writew(~hw_led_state & 0xffff, H2P2_DBG_FPGA_LEDS);
+
+       local_irq_restore(flags);
+}
diff --git a/arch/arm/mach-omap/leds-perseus2.c b/arch/arm/mach-omap/leds-perseus2.c
deleted file mode 100644 (file)
index 8dafc0d..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * linux/arch/arm/mach-omap/leds-perseus2.c
- *
- * Copyright 2003 by Texas Instruments Incorporated
- *
- */
-#include <linux/config.h>
-#include <linux/init.h>
-#include <linux/kernel_stat.h>
-#include <linux/sched.h>
-#include <linux/version.h>
-
-#include <asm/io.h>
-#include <asm/hardware.h>
-#include <asm/leds.h>
-#include <asm/system.h>
-
-#include "leds.h"
-
-void perseus2_leds_event(led_event_t evt)
-{
-       unsigned long flags;
-       static unsigned long hw_led_state = 0;
-
-       local_irq_save(flags);
-
-       switch (evt) {
-       case led_start:
-               hw_led_state |= OMAP730_FPGA_LED_STARTSTOP;
-               break;
-
-       case led_stop:
-               hw_led_state &= ~OMAP730_FPGA_LED_STARTSTOP;
-               break;
-
-       case led_claim:
-               hw_led_state |= OMAP730_FPGA_LED_CLAIMRELEASE;
-               break;
-
-       case led_release:
-               hw_led_state &= ~OMAP730_FPGA_LED_CLAIMRELEASE;
-               break;
-
-#ifdef CONFIG_LEDS_TIMER
-       case led_timer:
-               /*
-                * Toggle Timer LED
-                */
-               if (hw_led_state & OMAP730_FPGA_LED_TIMER)
-                       hw_led_state &= ~OMAP730_FPGA_LED_TIMER;
-               else
-                       hw_led_state |= OMAP730_FPGA_LED_TIMER;
-               break;
-#endif
-
-#ifdef CONFIG_LEDS_CPU
-       case led_idle_start:
-               hw_led_state |= OMAP730_FPGA_LED_IDLE;
-               break;
-
-       case led_idle_end:
-               hw_led_state &= ~OMAP730_FPGA_LED_IDLE;
-               break;
-#endif
-
-       case led_halted:
-               if (hw_led_state & OMAP730_FPGA_LED_HALTED)
-                       hw_led_state &= ~OMAP730_FPGA_LED_HALTED;
-               else
-                       hw_led_state |= OMAP730_FPGA_LED_HALTED;
-               break;
-
-       case led_green_on:
-               break;
-
-       case led_green_off:
-               break;
-
-       case led_amber_on:
-               break;
-
-       case led_amber_off:
-               break;
-
-       case led_red_on:
-               break;
-
-       case led_red_off:
-               break;
-
-       default:
-               break;
-       }
-
-
-       /*
-        *  Actually burn the LEDs
-        */
-       __raw_writew(~hw_led_state & 0xffff, OMAP730_FPGA_LEDS);
-
-       local_irq_restore(flags);
-}