summaryrefslogtreecommitdiff
path: root/packages/linux/ixp4xx-kernel/2.6.15/96-loft-leds.patch
diff options
context:
space:
mode:
Diffstat (limited to 'packages/linux/ixp4xx-kernel/2.6.15/96-loft-leds.patch')
-rw-r--r--packages/linux/ixp4xx-kernel/2.6.15/96-loft-leds.patch86
1 files changed, 86 insertions, 0 deletions
diff --git a/packages/linux/ixp4xx-kernel/2.6.15/96-loft-leds.patch b/packages/linux/ixp4xx-kernel/2.6.15/96-loft-leds.patch
new file mode 100644
index 0000000000..6098afcf8f
--- /dev/null
+++ b/packages/linux/ixp4xx-kernel/2.6.15/96-loft-leds.patch
@@ -0,0 +1,86 @@
+NEW_LEDS support for the loft board
+
+Signed-off-by: John Bowler <jbowler@acm.org>
+
+--- linux-2.6.15/arch/arm/mach-ixp4xx/ixdp425-setup.c 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.15/arch/arm/mach-ixp4xx/ixdp425-setup.c 1970-01-01 00:00:00.000000000 +0000
+@@ -15,6 +15,7 @@
+ #include <linux/tty.h>
+ #include <linux/serial_8250.h>
+ #include <linux/eeprom.h>
++#include <linux/leds.h>
+
+ #include <asm/types.h>
+ #include <asm/setup.h>
+@@ -200,6 +201,53 @@ MACHINE_END
+ * maybe the ixdp425 too.
+ */
+ #ifdef CONFIG_MACH_LOFT
++#ifdef CONFIG_LEDS_CLASS
++static struct resource loft_led_resources[] = {
++ {
++ .name = "J8:1", /* header */
++ .start = 0,
++ .end = 0,
++ .flags = IXP4XX_GPIO_LOW,
++ },
++ {
++ .name = "J8:3", /* header */
++ .start = 1,
++ .end = 1,
++ .flags = IXP4XX_GPIO_LOW,
++ },
++ {
++ .name = "J8:5", /* header */
++ .start = 2,
++ .end = 2,
++ .flags = IXP4XX_GPIO_LOW,
++ },
++ {
++ .name = "ready", /* green led, also J8 pin 7 */
++ .start = 3,
++ .end = 3,
++ .flags = IXP4XX_GPIO_LOW,
++ },
++ {
++ .name = "J8:9", /* header */
++ .start = 4,
++ .end = 4,
++ .flags = IXP4XX_GPIO_LOW,
++ },
++};
++
++static struct platform_device loft_leds = {
++ .name = "IXP4XX-GPIO-LED",
++ .id = -1,
++ .num_resources = ARRAY_SIZE(loft_led_resources),
++ .resource = loft_led_resources,
++};
++#endif
++
++static struct platform_device *loft_devices[] __initdata = {
++ &ixdp425_i2c_controller,
++ &ixdp425_flash,
++};
++
+ /*
+ * When the EEPROM is added the MAC address are read from it.
+ */
+@@ -244,7 +292,16 @@ static void __init loft_init(void)
+
+ ixp4xx_sys_init();
+
+- platform_add_devices(ixdp425_devices, ARRAY_SIZE(ixdp425_devices));
++ /* Put the UART in first for debugging, don't care if it fails. */
++ (void)platform_device_register(&ixdp425_uart);
++
++ /* These should work... */
++ platform_add_devices(loft_devices, ARRAY_SIZE(loft_devices));
++
++#ifdef CONFIG_LEDS_CLASS
++ /* We don't care if this fails. */
++ (void)platform_device_register(&loft_leds);
++#endif
+ }
+
+ MACHINE_START(LOFT, "Giant Shoulder Inc Loft board")