NEW_LEDS support for the loft board Signed-off-by: John Bowler --- 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 #include #include +#include #include #include @@ -200,6 +201,29 @@ MACHINE_END * maybe the ixdp425 too. */ #ifdef CONFIG_MACH_LOFT +#ifdef CONFIG_LEDS_CLASS +static struct resource loft_led_resources[] = { + { + .name = "ready", /* green led, also J8 pin 7 */ + .start = 3, + .end = 3, + .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 +268,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")