From 7e83768e5a1db0d7c7d18e26108ab72ed1480032 Mon Sep 17 00:00:00 2001 From: Mike Fiore Date: Wed, 1 May 2013 14:48:12 -0500 Subject: linux-2.6.39-at91: updated mtocgd patch to enable leds-gpio --- .../mtocgd/linux-2.6.39.4-mach-at91-mtocgd.patch | 112 ++++++++++++--------- 1 file changed, 66 insertions(+), 46 deletions(-) diff --git a/multitech/recipes/linux/linux-2.6.39-at91/mtocgd/linux-2.6.39.4-mach-at91-mtocgd.patch b/multitech/recipes/linux/linux-2.6.39-at91/mtocgd/linux-2.6.39.4-mach-at91-mtocgd.patch index b11d7b0..f109e96 100644 --- a/multitech/recipes/linux/linux-2.6.39-at91/mtocgd/linux-2.6.39.4-mach-at91-mtocgd.patch +++ b/multitech/recipes/linux/linux-2.6.39-at91/mtocgd/linux-2.6.39.4-mach-at91-mtocgd.patch @@ -1,7 +1,7 @@ -Index: linux-2.6.39.4/arch/arm/mach-at91/board-sam9x5cm.c +Index: git/arch/arm/mach-at91/board-sam9x5cm.c =================================================================== ---- linux-2.6.39.4.orig/arch/arm/mach-at91/board-sam9x5cm.c -+++ linux-2.6.39.4/arch/arm/mach-at91/board-sam9x5cm.c +--- git.orig/arch/arm/mach-at91/board-sam9x5cm.c 2013-04-17 17:15:13.000000000 -0500 ++++ git/arch/arm/mach-at91/board-sam9x5cm.c 2013-05-01 14:38:42.704435634 -0500 @@ -18,6 +18,9 @@ #include #include @@ -12,7 +12,7 @@ Index: linux-2.6.39.4/arch/arm/mach-at91/board-sam9x5cm.c #include #include #include -@@ -111,13 +114,48 @@ static struct spi_board_info cm_spi_devi +@@ -111,13 +114,48 @@ */ static struct mtd_partition __initdata cm_nand_partition[] = { { @@ -65,7 +65,7 @@ Index: linux-2.6.39.4/arch/arm/mach-at91/board-sam9x5cm.c .size = MTDPART_SIZ_FULL, }, }; -@@ -135,7 +173,8 @@ static struct atmel_nand_data __initdata +@@ -135,7 +173,8 @@ .enable_pin = AT91_PIN_PD4, .ecc_mode = NAND_ECC_HW, .has_pmecc = 1, @@ -75,7 +75,7 @@ Index: linux-2.6.39.4/arch/arm/mach-at91/board-sam9x5cm.c .pmecc_sector_size = 512, .pmecc_lookup_table_offset = 0x8000, .partition_info = nand_partitions, -@@ -170,7 +209,13 @@ static void __init cm_add_device_nand(vo +@@ -170,7 +209,13 @@ else cm_nand_smc_config.mode |= AT91_SMC_DBW_8; @@ -89,7 +89,7 @@ Index: linux-2.6.39.4/arch/arm/mach-at91/board-sam9x5cm.c if (cm_is_revA()) { cm_nand_data.bus_on_d0 = 1; cm_nand_data.rdy_pin = AT91_PIN_PD6; -@@ -178,6 +223,7 @@ static void __init cm_add_device_nand(vo +@@ -178,6 +223,7 @@ cm_nand_data.bus_on_d0 = 0; cm_nand_data.rdy_pin = AT91_PIN_PD5; } @@ -97,32 +97,52 @@ Index: linux-2.6.39.4/arch/arm/mach-at91/board-sam9x5cm.c /* configure chip-select 3 (NAND) */ sam9_smc_configure(3, &cm_nand_smc_config); -@@ -189,9 +235,16 @@ static void __init cm_add_device_nand(vo +@@ -189,25 +235,70 @@ * LEDs */ static struct gpio_led cm_leds[] = { -+ { /* Network Interface LED */ -+ .name = "network:green:activity", -+ .gpio = AT91_PIN_PC15, -+ .active_low = 1 -+ }, -+// MTR: disable kernel driven LEDs, driven by mts-io instead -+#if 0 - { /* "left" led, blue, userled1 */ +- { /* "left" led, blue, userled1 */ - .name = "d1", - .gpio = AT91_PIN_PB18, -+ .name = "status", +- .default_trigger = "heartbeat", +- }, +- { /* "right" led, red, userled2 */ +- .name = "d2", +- .gpio = AT91_PIN_PD21, +- .active_low = 1, +- .default_trigger = "mmc0", ++ { /* default status LED */ ++ .name = "led-a", + .gpio = AT91_PIN_PC21, - .default_trigger = "heartbeat", - }, - { /* "right" led, red, userled2 */ -@@ -200,6 +253,32 @@ static struct gpio_led cm_leds[] = { - .active_low = 1, - .default_trigger = "mmc0", ++ .active_low = 1 ++ }, ++ { ++ .name = "led-b", ++ .gpio = AT91_PIN_PC15, ++ .active_low = 1 ++ }, ++ { ++ .name = "led-c", ++ .gpio = AT91_PIN_PC20, ++ .active_low = 1 ++ }, ++ { ++ .name = "led-d", ++ .gpio = AT91_PIN_PC19, ++ .active_low = 1 ++ }, ++ { ++ .name = "led-e", ++ .gpio = AT91_PIN_PC18, ++ .active_low = 1 ++ }, ++ { ++ .name = "led-f", ++ .gpio = AT91_PIN_PC17, ++ .active_low = 1 }, -+#endif -+}; -+ + }; + + +uint8_t mts_id_eeprom[512]; + @@ -146,10 +166,10 @@ Index: linux-2.6.39.4/arch/arm/mach-at91/board-sam9x5cm.c + .byte_len = SZ_4K / 8, + .page_size = 16, + .setup = mts_id_eeprom_load, - }; - ++}; ++ /* -@@ -207,7 +286,8 @@ static struct gpio_led cm_leds[] = { + * I2C Devices */ static struct i2c_board_info __initdata cm_i2c_devices[] = { { @@ -159,7 +179,7 @@ Index: linux-2.6.39.4/arch/arm/mach-at91/board-sam9x5cm.c }, }; -@@ -234,8 +314,12 @@ void __init cm_board_init(u32 *cm_config +@@ -234,8 +325,12 @@ /* LEDs */ at91_gpio_leds(cm_leds, ARRAY_SIZE(cm_leds)); @@ -172,10 +192,10 @@ Index: linux-2.6.39.4/arch/arm/mach-at91/board-sam9x5cm.c printk(KERN_CRIT "AT91: CM rev B and higher\n"); + */ } -Index: linux-2.6.39.4/arch/arm/mach-at91/board-sam9x5ek.c +Index: git/arch/arm/mach-at91/board-sam9x5ek.c =================================================================== ---- linux-2.6.39.4.orig/arch/arm/mach-at91/board-sam9x5ek.c -+++ linux-2.6.39.4/arch/arm/mach-at91/board-sam9x5ek.c +--- git.orig/arch/arm/mach-at91/board-sam9x5ek.c 2013-04-17 17:15:13.000000000 -0500 ++++ git/arch/arm/mach-at91/board-sam9x5ek.c 2013-04-30 15:50:57.823175776 -0500 @@ -23,6 +23,7 @@ #include #include @@ -184,7 +204,7 @@ Index: linux-2.6.39.4/arch/arm/mach-at91/board-sam9x5ek.c #include #include