aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/atheros/patches
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/atheros/patches')
-rw-r--r--target/linux/atheros/patches/100-board.patch68
-rw-r--r--target/linux/atheros/patches/110-spiflash.patch22
-rw-r--r--target/linux/atheros/patches/130-ar2313_ethernet.patch27
-rw-r--r--target/linux/atheros/patches/140-redboot_partition_scan.patch24
4 files changed, 141 insertions, 0 deletions
diff --git a/target/linux/atheros/patches/100-board.patch b/target/linux/atheros/patches/100-board.patch
new file mode 100644
index 0000000000..8fb692c710
--- /dev/null
+++ b/target/linux/atheros/patches/100-board.patch
@@ -0,0 +1,68 @@
+diff -urN linux.old/arch/mips/Kconfig linux.dev/arch/mips/Kconfig
+--- linux.old/arch/mips/Kconfig 2007-02-02 23:55:52.912446784 +0100
++++ linux.dev/arch/mips/Kconfig 2007-02-03 21:50:25.262027104 +0100
+@@ -45,6 +45,16 @@
+ note that a kernel built with this option selected will not be
+ able to run on normal units.
+
++config ATHEROS
++ bool "Atheros SoC support (EXPERIMENTAL)"
++ depends on EXPERIMENTAL
++ select DMA_NONCOHERENT
++ select IRQ_CPU
++ select SYS_HAS_CPU_MIPS32_R1
++ select HAVE_STD_PC_SERIAL_PORT
++ select SYS_SUPPORTS_BIG_ENDIAN
++ select SYS_SUPPORTS_32BIT_KERNEL
++
+ config MIPS_COBALT
+ bool "Cobalt Server"
+ select DMA_NONCOHERENT
+@@ -658,6 +668,7 @@
+
+ endchoice
+
++source "arch/mips/atheros/Kconfig"
+ source "arch/mips/au1000/Kconfig"
+ source "arch/mips/ddb5xxx/Kconfig"
+ source "arch/mips/gt64120/ev64120/Kconfig"
+diff -urN linux.old/arch/mips/Makefile linux.dev/arch/mips/Makefile
+--- linux.old/arch/mips/Makefile 2007-02-02 23:55:52.913446632 +0100
++++ linux.dev/arch/mips/Makefile 2007-02-03 17:40:29.193776000 +0100
+@@ -267,6 +267,13 @@
+ load-$(CONFIG_MIPS_XXS1500) += 0xffffffff80100000
+
+ #
++# Atheros AR5312/AR2312 WiSoC
++#
++core-$(CONFIG_ATHEROS) += arch/mips/atheros/
++cflags-$(CONFIG_ATHEROS) += -Iinclude/asm-mips/mach-atheros
++load-$(CONFIG_ATHEROS) += 0xffffffff80041000
++
++#
+ # Cobalt Server
+ #
+ core-$(CONFIG_MIPS_COBALT) += arch/mips/cobalt/
+diff -urN linux.old/include/asm-mips/bootinfo.h linux.dev/include/asm-mips/bootinfo.h
+--- linux.old/include/asm-mips/bootinfo.h 2007-02-02 23:55:52.913446632 +0100
++++ linux.dev/include/asm-mips/bootinfo.h 2007-02-03 17:51:02.531494032 +0100
+@@ -213,6 +213,18 @@
+ #define MACH_GROUP_NEC_EMMA2RH 25 /* NEC EMMA2RH (was 23) */
+ #define MACH_NEC_MARKEINS 0 /* NEC EMMA2RH Mark-eins */
+
++/*
++ * Valid machtype for group ATHEROS
++ */
++#define MACH_GROUP_ATHEROS 26
++#define MACH_ATHEROS_AR5312 0
++#define MACH_ATHEROS_AR2312 1
++#define MACH_ATHEROS_AR2313 2
++#define MACH_ATHEROS_AR2315 3
++#define MACH_ATHEROS_AR2316 4
++#define MACH_ATHEROS_AR2317 5
++#define MACH_ATHEROS_AR2318 6
++
+ #define CL_SIZE COMMAND_LINE_SIZE
+
+ const char *get_system_type(void);
+
diff --git a/target/linux/atheros/patches/110-spiflash.patch b/target/linux/atheros/patches/110-spiflash.patch
new file mode 100644
index 0000000000..fc4ef4c0f2
--- /dev/null
+++ b/target/linux/atheros/patches/110-spiflash.patch
@@ -0,0 +1,22 @@
+diff -urN linux.old/drivers/mtd/devices/Kconfig linux.dev/drivers/mtd/devices/Kconfig
+--- linux.old/drivers/mtd/devices/Kconfig 2007-02-04 04:30:26.145338240 +0100
++++ linux.dev/drivers/mtd/devices/Kconfig 2007-02-02 23:48:28.748969000 +0100
+@@ -76,6 +76,10 @@
+ used for program and data storage. Set up your spi devices
+ with the right board-specific platform data.
+
++config MTD_SPIFLASH
++ tristate "Atheros AR2315/6/7 SPI Flash support"
++ depends on ATHEROS_AR5315
++
+ config MTD_SLRAM
+ tristate "Uncached system RAM"
+ help
+diff -urN linux.old/drivers/mtd/devices/Makefile linux.dev/drivers/mtd/devices/Makefile
+--- linux.old/drivers/mtd/devices/Makefile 2007-02-04 04:30:26.146338088 +0100
++++ linux.dev/drivers/mtd/devices/Makefile 2007-02-02 23:48:28.749969000 +0100
+@@ -18,3 +18,4 @@
+ obj-$(CONFIG_MTD_DATAFLASH) += mtd_dataflash.o
+ obj-$(CONFIG_MTD_DATAFLASH26) += at91_dataflash26.o
+ obj-$(CONFIG_MTD_M25P80) += m25p80.o
++obj-$(CONFIG_MTD_SPIFLASH) += spiflash.o
diff --git a/target/linux/atheros/patches/130-ar2313_ethernet.patch b/target/linux/atheros/patches/130-ar2313_ethernet.patch
new file mode 100644
index 0000000000..65fc51e7a8
--- /dev/null
+++ b/target/linux/atheros/patches/130-ar2313_ethernet.patch
@@ -0,0 +1,27 @@
+diff -urN linux.old/drivers/net/Kconfig linux.eth/drivers/net/Kconfig
+--- linux.old/drivers/net/Kconfig 2006-12-14 23:53:29.000000000 +0100
++++ linux.eth/drivers/net/Kconfig 2006-12-16 04:30:11.000000000 +0100
+@@ -324,6 +324,12 @@
+
+ source "drivers/net/arm/Kconfig"
+
++config AR2313
++ tristate "AR2313 Ethernet support"
++ depends on NET_ETHERNET && ATHEROS
++ help
++ Support for the AR231x/531x ethernet controller
++
+ config MACE
+ tristate "MACE (Power Mac ethernet) support"
+ depends on NET_ETHERNET && PPC_PMAC && PPC32
+diff -urN linux.old/drivers/net/Makefile linux.eth/drivers/net/Makefile
+--- linux.old/drivers/net/Makefile 2006-12-14 23:53:29.000000000 +0100
++++ linux.eth/drivers/net/Makefile 2006-12-16 04:30:11.000000000 +0100
+@@ -11,6 +11,7 @@
+ obj-$(CONFIG_BONDING) += bonding/
+ obj-$(CONFIG_ATL1) += atl1/
+ obj-$(CONFIG_GIANFAR) += gianfar_driver.o
++obj-$(CONFIG_AR2313) += ar2313/
+
+ gianfar_driver-objs := gianfar.o \
+ gianfar_ethtool.o \
diff --git a/target/linux/atheros/patches/140-redboot_partition_scan.patch b/target/linux/atheros/patches/140-redboot_partition_scan.patch
new file mode 100644
index 0000000000..de4ebeb553
--- /dev/null
+++ b/target/linux/atheros/patches/140-redboot_partition_scan.patch
@@ -0,0 +1,24 @@
+diff -urN linux.old/drivers/mtd/redboot.c linux.dev/drivers/mtd/redboot.c
+--- linux.old/drivers/mtd/redboot.c 2006-12-14 23:53:29.000000000 +0100
++++ linux.dev/drivers/mtd/redboot.c 2006-12-16 04:23:42.000000000 +0100
+@@ -64,6 +64,7 @@
+ if (!buf)
+ return -ENOMEM;
+
++restart:
+ if ( directory < 0 )
+ offset = master->size + directory*master->erasesize;
+ else
+@@ -140,6 +141,11 @@
+ }
+ if (i == numslots) {
+ /* Didn't find it */
++ if (offset + master->erasesize < master->size) {
++ /* not at the end of the flash yet, maybe next block :) */
++ directory++;
++ goto restart;
++ }
+ printk(KERN_NOTICE "No RedBoot partition table detected in %s\n",
+ master->name);
+ ret = 0;
+