summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Fiore <mfiore@multitech.com>2013-05-01 14:48:12 -0500
committerMike Fiore <mfiore@multitech.com>2013-05-01 14:48:12 -0500
commit7e83768e5a1db0d7c7d18e26108ab72ed1480032 (patch)
tree35af0fcd854453a8d32600ec164d2e1184344407
parentd1a2f7829ab1d1efc4ceb9730ba2cba5769f0072 (diff)
linux-2.6.39-at91: updated mtocgd patch to enable leds-gpio
-rw-r--r--multitech/recipes/linux/linux-2.6.39-at91/mtocgd/linux-2.6.39.4-mach-at91-mtocgd.patch112
1 files 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 <linux/platform_device.h>
#include <linux/spi/flash.h>
@@ -12,7 +12,7 @@ Index: linux-2.6.39.4/arch/arm/mach-at91/board-sam9x5cm.c
#include <linux/fb.h>
#include <linux/gpio_keys.h>
#include <linux/input.h>
-@@ -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 <linux/leds.h>
#include <linux/clk.h>
@@ -184,7 +204,7 @@ Index: linux-2.6.39.4/arch/arm/mach-at91/board-sam9x5ek.c
#include <mach/cpu.h>
#include <video/atmel_lcdfb.h>
-@@ -53,12 +54,8 @@ static void __init ek_map_io(void)
+@@ -53,12 +54,8 @@
/* Initialize processor and DBGU */
cm_map_io();
@@ -199,7 +219,7 @@ Index: linux-2.6.39.4/arch/arm/mach-at91/board-sam9x5ek.c
}
/*
-@@ -89,26 +86,31 @@ static struct usba_platform_data __initd
+@@ -89,26 +86,31 @@
* MACB Ethernet devices
*/
static struct at91_eth_data __initdata ek_macb0_data = {
@@ -233,7 +253,7 @@ Index: linux-2.6.39.4/arch/arm/mach-at91/board-sam9x5ek.c
static struct mci_platform_data __initdata mci1_data = {
.slot[0] = {
.bus_width = 4,
-@@ -116,6 +118,33 @@ static struct mci_platform_data __initda
+@@ -116,6 +118,33 @@
.wp_pin = -1,
},
};
@@ -267,7 +287,7 @@ Index: linux-2.6.39.4/arch/arm/mach-at91/board-sam9x5ek.c
/*
* ISI
-@@ -326,9 +355,11 @@ static void __init ek_add_device_buttons
+@@ -330,9 +359,11 @@
* I2C Devices
*/
static struct i2c_board_info __initdata ek_i2c_devices[] = {
@@ -279,7 +299,7 @@ Index: linux-2.6.39.4/arch/arm/mach-at91/board-sam9x5ek.c
#if defined(CONFIG_KEYBOARD_QT1070)
{
I2C_BOARD_INFO("qt1070", 0x1b),
-@@ -384,18 +415,24 @@ static void __init ek_board_init(void)
+@@ -388,18 +419,24 @@
bool config_isi_enabled = false;
cm_board_init(&cm_config);
@@ -305,7 +325,7 @@ Index: linux-2.6.39.4/arch/arm/mach-at91/board-sam9x5ek.c
at91_add_device_mci(0, &mci0_data);
/* I2C */
if (cm_config & CM_CONFIG_I2C0_ENABLE)
-@@ -405,6 +442,15 @@ static void __init ek_board_init(void)
+@@ -409,6 +446,15 @@
at91_add_device_i2c(0,
ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices));
@@ -321,7 +341,7 @@ Index: linux-2.6.39.4/arch/arm/mach-at91/board-sam9x5ek.c
if (cpu_is_at91sam9g25()) {
/* ISI */
/* NOTE: PCK0 provides ISI_MCK to the ISI module.
-@@ -430,13 +476,16 @@ static void __init ek_board_init(void)
+@@ -434,13 +480,16 @@
/* Touch Screen */
at91_add_device_tsadcc(&ek_tsadcc_data);
}
@@ -338,7 +358,7 @@ Index: linux-2.6.39.4/arch/arm/mach-at91/board-sam9x5ek.c
#if 0
if (cpu_is_at91sam9x25() || cpu_is_at91sam9x35())
-@@ -448,6 +497,8 @@ static void __init ek_board_init(void)
+@@ -452,6 +501,8 @@
at91_add_device_can(0, NULL);
#endif
@@ -347,7 +367,7 @@ Index: linux-2.6.39.4/arch/arm/mach-at91/board-sam9x5ek.c
if (cpu_is_at91sam9x25() || cpu_is_at91sam9x35())
/* this conflicts with usart.1 */
at91_add_device_can(1, NULL);
-@@ -474,6 +525,9 @@ static void __init ek_board_init(void)
+@@ -478,6 +529,9 @@
else if (config_isi_enabled)
printk(KERN_CRIT
"AT91: ISI conficts with MCI1, disable MCI1\n");
@@ -357,11 +377,11 @@ Index: linux-2.6.39.4/arch/arm/mach-at91/board-sam9x5ek.c
}
MACHINE_START(AT91SAM9X5EK, "Atmel AT91SAM9X5-EK")
-Index: linux-2.6.39.4/arch/arm/mach-at91/at91sam9x5_devices.c
+Index: git/arch/arm/mach-at91/at91sam9x5_devices.c
===================================================================
---- linux-2.6.39.4.orig/arch/arm/mach-at91/at91sam9x5_devices.c
-+++ linux-2.6.39.4/arch/arm/mach-at91/at91sam9x5_devices.c
-@@ -543,11 +543,11 @@ void __init at91_add_device_mci(short mm
+--- git.orig/arch/arm/mach-at91/at91sam9x5_devices.c 2013-04-17 17:15:13.000000000 -0500
++++ git/arch/arm/mach-at91/at91sam9x5_devices.c 2013-04-30 15:50:57.823175776 -0500
+@@ -543,11 +543,11 @@
#endif
/* input/irq */