summaryrefslogtreecommitdiff
path: root/recipes
diff options
context:
space:
mode:
Diffstat (limited to 'recipes')
-rw-r--r--recipes/linux/linux-2.6.32/mtcdp/linux-2.6.32.3-m25p80.patch12
-rw-r--r--recipes/linux/linux-2.6.32/mtcdp/linux-2.6.32.3-mach-at91.patch98
-rw-r--r--recipes/linux/linux_2.6.32.bb1
3 files changed, 84 insertions, 27 deletions
diff --git a/recipes/linux/linux-2.6.32/mtcdp/linux-2.6.32.3-m25p80.patch b/recipes/linux/linux-2.6.32/mtcdp/linux-2.6.32.3-m25p80.patch
new file mode 100644
index 0000000000..71d3a920bb
--- /dev/null
+++ b/recipes/linux/linux-2.6.32/mtcdp/linux-2.6.32.3-m25p80.patch
@@ -0,0 +1,12 @@
+diff -uprN -X linux-2.6.32.3/Documentation/dontdiff linux-2.6.32.3-vanilla/drivers/mtd/devices/m25p80.c linux-2.6.32.3/drivers/mtd/devices/m25p80.c
+--- linux-2.6.32.3-vanilla/drivers/mtd/devices/m25p80.c 2010-01-06 17:07:45.000000000 -0600
++++ linux-2.6.32.3/drivers/mtd/devices/m25p80.c 2010-10-14 11:36:06.000000000 -0500
+@@ -780,7 +780,7 @@ static int __devinit m25p_probe(struct s
+ * with the software protection bits set
+ */
+
+- if (info->jedec_id >> 16 == 0x1f) {
++ if (info->jedec_id >> 16 == 0x1f || info->jedec_id == 0xbf258e) {
+ write_enable(flash);
+ write_sr(flash, 0);
+ }
diff --git a/recipes/linux/linux-2.6.32/mtcdp/linux-2.6.32.3-mach-at91.patch b/recipes/linux/linux-2.6.32/mtcdp/linux-2.6.32.3-mach-at91.patch
index 2fa73ec9f7..a4bcac89ca 100644
--- a/recipes/linux/linux-2.6.32/mtcdp/linux-2.6.32.3-mach-at91.patch
+++ b/recipes/linux/linux-2.6.32/mtcdp/linux-2.6.32.3-mach-at91.patch
@@ -33,18 +33,20 @@ diff -uprN -X linux-2.6.32.3/Documentation/dontdiff linux-2.6.32.3-vanilla/arch/
{
diff -uprN -X linux-2.6.32.3/Documentation/dontdiff linux-2.6.32.3-vanilla/arch/arm/mach-at91/board-sam9g20ek.c linux-2.6.32.3/arch/arm/mach-at91/board-sam9g20ek.c
--- linux-2.6.32.3-vanilla/arch/arm/mach-at91/board-sam9g20ek.c 2010-01-06 17:07:45.000000000 -0600
-+++ linux-2.6.32.3/arch/arm/mach-at91/board-sam9g20ek.c 2010-10-11 10:19:56.000000000 -0500
-@@ -27,6 +27,9 @@
++++ linux-2.6.32.3/arch/arm/mach-at91/board-sam9g20ek.c 2010-10-14 16:16:52.000000000 -0500
+@@ -27,6 +27,11 @@
#include <linux/gpio_keys.h>
#include <linux/input.h>
#include <linux/clk.h>
+#include <linux/i2c/at24.h>
+#include <linux/spi/eeprom.h>
++#include <linux/spi/flash.h>
+#include <linux/delay.h>
++#include <mach/at91_rtt.h>
#include <mach/hardware.h>
#include <asm/setup.h>
-@@ -44,6 +47,7 @@
+@@ -44,9 +49,12 @@
#include "sam9_smc.h"
#include "generic.h"
@@ -52,12 +54,15 @@ diff -uprN -X linux-2.6.32.3/Documentation/dontdiff linux-2.6.32.3-vanilla/arch/
static void __init ek_map_io(void)
{
-@@ -61,6 +65,43 @@ static void __init ek_map_io(void)
++ int tmp;
++
+ /* Initialize processor: 18.432 MHz crystal */
+ at91sam9260_initialize(18432000);
+
+@@ -61,12 +69,55 @@ static void __init ek_map_io(void)
/* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
-+ int tmp;
-+
+ /*
+ * Reset any initiated i2c data transfers?
+ */
@@ -96,7 +101,21 @@ diff -uprN -X linux-2.6.32.3/Documentation/dontdiff linux-2.6.32.3-vanilla/arch/
/* set serial console to ttyS0 (ie, DBGU) */
at91_set_serial_console(0);
}
-@@ -82,11 +123,21 @@ static struct at91_usbh_data __initdata
+
+ static void __init ek_init_irq(void)
+ {
++ /*
++ * Ensure RTT interrupts are disabled
++ */
++ u32 mr;
++ mr = __raw_readl(AT91_VA_BASE_SYS + AT91_RTT + AT91_RTT_MR);
++ __raw_writel(mr & ~(AT91_RTT_ALMIEN | AT91_RTT_RTTINCIEN),
++ AT91_VA_BASE_SYS + AT91_RTT + AT91_RTT_MR);
++
+ at91sam9260_init_interrupts(NULL);
+ }
+
+@@ -82,11 +133,38 @@ static struct at91_usbh_data __initdata
* USB Device port
*/
static struct at91_udc_data __initdata ek_udc_data = {
@@ -117,10 +136,27 @@ diff -uprN -X linux-2.6.32.3/Documentation/dontdiff linux-2.6.32.3-vanilla/arch/
+};
+#endif
+
++#define MTS_EXT_STT25_TEST 0
++#if MTS_EXT_STT25_TEST
++static struct mtd_partition m25_partitions[] = {
++ {
++ .name = "flash",
++ .offset = 0x00000000,
++ .size = MTDPART_SIZ_FULL,
++ },
++};
++
++static struct flash_platform_data m25_spi_flash_data = {
++ .type = "sst25vf080b",
++ .nr_parts = ARRAY_SIZE(m25_partitions),
++ .parts = m25_partitions,
++};
++#endif
++
/*
* SPI devices.
*/
-@@ -107,6 +158,44 @@ static struct spi_board_info ek_spi_devi
+@@ -107,6 +185,54 @@ static struct spi_board_info ek_spi_devi
},
#endif
#endif
@@ -162,10 +198,20 @@ diff -uprN -X linux-2.6.32.3/Documentation/dontdiff linux-2.6.32.3-vanilla/arch/
+ .mode = SPI_MODE_0,
+ },
+#endif
++#if MTS_EXT_STT25_TEST
++ {
++ .modalias = "m25p80",
++ .platform_data = &m25_spi_flash_data,
++ .irq = NO_IRQ,
++ .max_speed_hz = 33 * 1000 * 1000,
++ .bus_num = 1,
++ .chip_select = 5,
++ },
++#endif
};
-@@ -115,7 +204,7 @@ static struct spi_board_info ek_spi_devi
+@@ -115,7 +241,7 @@ static struct spi_board_info ek_spi_devi
*/
static struct at91_eth_data __initdata ek_macb_data = {
.phy_irq_pin = AT91_PIN_PA7,
@@ -174,7 +220,7 @@ diff -uprN -X linux-2.6.32.3/Documentation/dontdiff linux-2.6.32.3-vanilla/arch/
};
-@@ -124,18 +213,48 @@ static struct at91_eth_data __initdata e
+@@ -124,18 +250,48 @@ static struct at91_eth_data __initdata e
*/
static struct mtd_partition __initdata ek_nand_partition[] = {
{
@@ -184,23 +230,23 @@ diff -uprN -X linux-2.6.32.3/Documentation/dontdiff linux-2.6.32.3-vanilla/arch/
+ .name = "MTNCG-NANDFlash",
+ .offset = 0,
+ .size = 256*1024*1024,
- },
- {
-- .name = "Partition 1",
-- .offset = MTDPART_OFS_NXTBLK,
-- .size = 60 * SZ_1M,
++ },
++ {
+ .name = "AT91Bootstrap",
+ .offset = 0,
+ .size = 128*1024,
},
{
-- .name = "Partition 2",
+- .name = "Partition 1",
- .offset = MTDPART_OFS_NXTBLK,
+- .size = 60 * SZ_1M,
+ .name = "UBoot",
+ .offset = 128*1024,
+ .size = 256*1024,
-+ },
-+ {
+ },
+ {
+- .name = "Partition 2",
+- .offset = MTDPART_OFS_NXTBLK,
+ .name = "UBoot Config",
+ .offset = 384*1024,
+ .size = 128*1024,
@@ -231,7 +277,7 @@ diff -uprN -X linux-2.6.32.3/Documentation/dontdiff linux-2.6.32.3-vanilla/arch/
.size = MTDPART_SIZ_FULL,
},
};
-@@ -195,11 +314,13 @@ static void __init ek_add_device_nand(vo
+@@ -195,11 +351,13 @@ static void __init ek_add_device_nand(vo
/*
* MCI (SD/MMC)
@@ -246,7 +292,7 @@ diff -uprN -X linux-2.6.32.3/Documentation/dontdiff linux-2.6.32.3-vanilla/arch/
};
-@@ -207,15 +328,10 @@ static struct at91_mmc_data __initdata e
+@@ -207,15 +365,10 @@ static struct at91_mmc_data __initdata e
* LEDs
*/
static struct gpio_led ek_leds[] = {
@@ -255,7 +301,7 @@ diff -uprN -X linux-2.6.32.3/Documentation/dontdiff linux-2.6.32.3-vanilla/arch/
- .gpio = AT91_PIN_PA6,
+ { /* "status" led, green */
+ .name = "status",
-+ .gpio = AT91_PIN_PA30, /* DJS -- was AT91_PIN_PA9, */
++ .gpio = AT91_PIN_PA30,
.active_low = 1,
- .default_trigger = "none",
- },
@@ -265,7 +311,7 @@ diff -uprN -X linux-2.6.32.3/Documentation/dontdiff linux-2.6.32.3-vanilla/arch/
.default_trigger = "heartbeat",
}
};
-@@ -269,15 +385,37 @@ static void __init ek_add_device_buttons
+@@ -269,15 +422,37 @@ static void __init ek_add_device_buttons
static void __init ek_add_device_buttons(void) {}
#endif
@@ -306,14 +352,12 @@ diff -uprN -X linux-2.6.32.3/Documentation/dontdiff linux-2.6.32.3-vanilla/arch/
static void __init ek_board_init(void)
{
/* Serial */
-@@ -302,8 +440,10 @@ static void __init ek_board_init(void)
- ek_add_device_buttons();
+@@ -303,7 +478,7 @@ static void __init ek_board_init(void)
/* PCK0 provides MCLK to the WM8731 */
at91_set_B_periph(AT91_PIN_PC1, 0);
-+#if 0
/* SSC (for WM8731) */
- at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX);
-+#endif
+- at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX);
++ /* at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX); */
}
MACHINE_START(AT91SAM9G20EK, "Atmel AT91SAM9G20-EK")
diff --git a/recipes/linux/linux_2.6.32.bb b/recipes/linux/linux_2.6.32.bb
index f337561500..8729261bfa 100644
--- a/recipes/linux/linux_2.6.32.bb
+++ b/recipes/linux/linux_2.6.32.bb
@@ -35,6 +35,7 @@ SRC_URI_mtcdp = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2;n
file://linux-2.6.32.3-sierra.patch;patch=1 \
file://linux-2.6.32.3-atmel_spi.patch;patch=1 \
file://linux-2.6.32.3-at91_mci.patch;patch=1 \
+ file://linux-2.6.32.3-m25p80.patch;patch=1 \
"
SRC_URI[build.md5sum] = "6bd3c5fea1e88bb4d0948ec3688bd8f6"
SRC_URI[build.sha256sum] = "e7526a7ae7210bc7c4f4837e9d8a666f9b126d59bee16015c41c5850d29c841f"