From 697e06b22580013c25f0f170925fa5f02879345b Mon Sep 17 00:00:00 2001 From: nbd Date: Thu, 31 Jan 2008 04:44:35 +0000 Subject: port atheros to 2.6.24 (untested), but do not use the new kernel by default yet git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10335 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../linux/atheros/patches-2.6.24/100-board.patch | 67 ++++++++++++++++++++++ .../atheros/patches-2.6.24/110-spiflash.patch | 22 +++++++ .../patches-2.6.24/130-ar2313_ethernet.patch | 29 ++++++++++ .../140-redboot_partition_scan.patch | 24 ++++++++ .../atheros/patches-2.6.24/150-bridge-printk.patch | 26 +++++++++ 5 files changed, 168 insertions(+) create mode 100644 target/linux/atheros/patches-2.6.24/100-board.patch create mode 100644 target/linux/atheros/patches-2.6.24/110-spiflash.patch create mode 100644 target/linux/atheros/patches-2.6.24/130-ar2313_ethernet.patch create mode 100644 target/linux/atheros/patches-2.6.24/140-redboot_partition_scan.patch create mode 100644 target/linux/atheros/patches-2.6.24/150-bridge-printk.patch (limited to 'target/linux/atheros/patches-2.6.24') diff --git a/target/linux/atheros/patches-2.6.24/100-board.patch b/target/linux/atheros/patches-2.6.24/100-board.patch new file mode 100644 index 000000000..f1aa655f6 --- /dev/null +++ b/target/linux/atheros/patches-2.6.24/100-board.patch @@ -0,0 +1,67 @@ +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,15 @@ + 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 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-2.6.24/110-spiflash.patch b/target/linux/atheros/patches-2.6.24/110-spiflash.patch new file mode 100644 index 000000000..fc4ef4c0f --- /dev/null +++ b/target/linux/atheros/patches-2.6.24/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-2.6.24/130-ar2313_ethernet.patch b/target/linux/atheros/patches-2.6.24/130-ar2313_ethernet.patch new file mode 100644 index 000000000..721eba663 --- /dev/null +++ b/target/linux/atheros/patches-2.6.24/130-ar2313_ethernet.patch @@ -0,0 +1,29 @@ +Index: linux-2.6.23/drivers/net/Kconfig +=================================================================== +--- linux-2.6.23.orig/drivers/net/Kconfig 2007-10-14 00:55:22.000000000 +0200 ++++ linux-2.6.23/drivers/net/Kconfig 2007-10-14 00:56:32.000000000 +0200 +@@ -348,6 +348,12 @@ + AX88796 driver, using platform bus to provide + chip detection and resources + ++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 PPC_PMAC && PPC32 +Index: linux-2.6.23/drivers/net/Makefile +=================================================================== +--- linux-2.6.23.orig/drivers/net/Makefile 2007-10-14 00:55:22.000000000 +0200 ++++ linux-2.6.23/drivers/net/Makefile 2007-10-14 00:56:55.000000000 +0200 +@@ -182,6 +182,7 @@ + obj-$(CONFIG_LGUEST_NET) += lguest_net.o + obj-$(CONFIG_MIPS_JAZZ_SONIC) += jazzsonic.o + obj-$(CONFIG_MIPS_AU1X00_ENET) += au1000_eth.o ++obj-$(CONFIG_AR2313) += ar2313/ + obj-$(CONFIG_MIPS_SIM_NET) += mipsnet.o + obj-$(CONFIG_SGI_IOC3_ETH) += ioc3-eth.o + obj-$(CONFIG_DECLANCE) += declance.o diff --git a/target/linux/atheros/patches-2.6.24/140-redboot_partition_scan.patch b/target/linux/atheros/patches-2.6.24/140-redboot_partition_scan.patch new file mode 100644 index 000000000..de4ebeb55 --- /dev/null +++ b/target/linux/atheros/patches-2.6.24/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; + diff --git a/target/linux/atheros/patches-2.6.24/150-bridge-printk.patch b/target/linux/atheros/patches-2.6.24/150-bridge-printk.patch new file mode 100644 index 000000000..0a35d89be --- /dev/null +++ b/target/linux/atheros/patches-2.6.24/150-bridge-printk.patch @@ -0,0 +1,26 @@ +--- linux-2.6.23.orig/net/core/dev.c 2007-10-12 23:42:06.000000000 +0200 ++++ linux-2.6.23/net/core/dev.c 2007-10-12 23:44:22.000000000 +0200 +@@ -3425,8 +3425,8 @@ + /* Fix illegal SG+CSUM combinations. */ + if ((dev->features & NETIF_F_SG) && + !(dev->features & NETIF_F_ALL_CSUM)) { +- printk(KERN_NOTICE "%s: Dropping NETIF_F_SG since no checksum feature.\n", +- dev->name); ++ //printk(KERN_NOTICE "%s: Dropping NETIF_F_SG since no checksum feature.\n", ++ // dev->name); + dev->features &= ~NETIF_F_SG; + } + +@@ -3439,9 +3439,9 @@ + } + if (dev->features & NETIF_F_UFO) { + if (!(dev->features & NETIF_F_HW_CSUM)) { +- printk(KERN_ERR "%s: Dropping NETIF_F_UFO since no " +- "NETIF_F_HW_CSUM feature.\n", +- dev->name); ++ //printk(KERN_ERR "%s: Dropping NETIF_F_UFO since no " ++ // "NETIF_F_HW_CSUM feature.\n", ++ // dev->name); + dev->features &= ~NETIF_F_UFO; + } + if (!(dev->features & NETIF_F_SG)) { -- cgit v1.2.3