summaryrefslogtreecommitdiffstats
path: root/target/linux/ar7
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-03-14 15:52:42 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-03-14 15:52:42 +0000
commit26e3776a22bf894ced5af4c28968dc1dc99968eb (patch)
tree2d38a3789e27a423439c37a45a09cae31990a615 /target/linux/ar7
parent4bd70fc26256cf485f19e0c8b881e078dc36134f (diff)
nuke obsolete kernel stuff
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14875 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar7')
-rw-r--r--target/linux/ar7/config-2.6.23190
-rw-r--r--target/linux/ar7/config-2.6.24198
-rw-r--r--target/linux/ar7/config-2.6.25214
-rw-r--r--target/linux/ar7/patches-2.6.23/100-board_support.patch94
-rw-r--r--target/linux/ar7/patches-2.6.23/110-flash.patch43
-rw-r--r--target/linux/ar7/patches-2.6.23/120-gpio_chrdev.patch32
-rw-r--r--target/linux/ar7/patches-2.6.23/130-vlynq.patch21
-rw-r--r--target/linux/ar7/patches-2.6.23/140-watchdog.patch29
-rw-r--r--target/linux/ar7/patches-2.6.23/200-ethernet_driver.patch32
-rw-r--r--target/linux/ar7/patches-2.6.23/210-phy_fixed.patch93
-rw-r--r--target/linux/ar7/patches-2.6.23/500-serial_kludge.patch57
-rw-r--r--target/linux/ar7/patches-2.6.24/100-board_support.patch94
-rw-r--r--target/linux/ar7/patches-2.6.24/110-flash.patch43
-rw-r--r--target/linux/ar7/patches-2.6.24/120-gpio_chrdev.patch32
-rw-r--r--target/linux/ar7/patches-2.6.24/130-vlynq.patch24
-rw-r--r--target/linux/ar7/patches-2.6.24/140-cpmac_fix.patch268
-rw-r--r--target/linux/ar7/patches-2.6.24/150-cpmac_up_and_running.diff95
-rw-r--r--target/linux/ar7/patches-2.6.24/160-cpmac-rx-ring-use-eoq.diff180
-rw-r--r--target/linux/ar7/patches-2.6.24/170-cpmac_eth_fix.patch15
-rw-r--r--target/linux/ar7/patches-2.6.24/500-serial_kludge.patch44
-rw-r--r--target/linux/ar7/patches-2.6.24/900-temporary_cpmac_hack.diff29
-rw-r--r--target/linux/ar7/patches-2.6.25/100-board_support.patch86
-rw-r--r--target/linux/ar7/patches-2.6.25/110-flash.patch37
-rw-r--r--target/linux/ar7/patches-2.6.25/120-gpio_chrdev.patch28
-rw-r--r--target/linux/ar7/patches-2.6.25/130-vlynq.patch18
-rw-r--r--target/linux/ar7/patches-2.6.25/140-cpmac_fix.patch167
-rw-r--r--target/linux/ar7/patches-2.6.25/150-cpmac_not_broken.patch11
-rw-r--r--target/linux/ar7/patches-2.6.25/150-cpmac_up_and_running.diff91
-rw-r--r--target/linux/ar7/patches-2.6.25/160-cpmac-rx-ring-use-eoq.diff178
-rw-r--r--target/linux/ar7/patches-2.6.25/170-cpmac_eth_fix.patch13
-rw-r--r--target/linux/ar7/patches-2.6.25/200-mtd_fixes.patch54
-rw-r--r--target/linux/ar7/patches-2.6.25/500-serial_kludge.patch40
-rw-r--r--target/linux/ar7/patches-2.6.25/900-temporary_cpmac_hack.diff27
33 files changed, 0 insertions, 2577 deletions
diff --git a/target/linux/ar7/config-2.6.23 b/target/linux/ar7/config-2.6.23
deleted file mode 100644
index 00c517098..000000000
--- a/target/linux/ar7/config-2.6.23
+++ /dev/null
@@ -1,190 +0,0 @@
-CONFIG_32BIT=y
-# CONFIG_64BIT is not set
-CONFIG_AR7=y
-CONFIG_AR7_GPIO=y
-CONFIG_AR7_WDT=y
-# CONFIG_ARCH_HAS_ILOG2_U32 is not set
-# CONFIG_ARCH_HAS_ILOG2_U64 is not set
-# CONFIG_ARCH_SUPPORTS_MSI is not set
-CONFIG_ATM_DRIVERS=y
-CONFIG_BASE_SMALL=0
-CONFIG_BITREVERSE=y
-CONFIG_BOOT_ELF32=y
-# CONFIG_BROADCOM_PHY is not set
-# CONFIG_BT is not set
-CONFIG_CMDLINE="init=/etc/preinit rootfstype=squashfs,jffs2,"
-CONFIG_CPMAC=y
-# CONFIG_CPU_BIG_ENDIAN is not set
-CONFIG_CPU_HAS_LLSC=y
-CONFIG_CPU_HAS_PREFETCH=y
-CONFIG_CPU_HAS_SYNC=y
-CONFIG_CPU_LITTLE_ENDIAN=y
-# CONFIG_CPU_LOONGSON2 is not set
-CONFIG_CPU_MIPS32=y
-CONFIG_CPU_MIPS32_R1=y
-# CONFIG_CPU_MIPS32_R2 is not set
-# CONFIG_CPU_MIPS64_R1 is not set
-# CONFIG_CPU_MIPS64_R2 is not set
-CONFIG_CPU_MIPSR1=y
-# CONFIG_CPU_NEVADA is not set
-# CONFIG_CPU_R10000 is not set
-# CONFIG_CPU_R3000 is not set
-# CONFIG_CPU_R4300 is not set
-# CONFIG_CPU_R4X00 is not set
-# CONFIG_CPU_R5000 is not set
-# CONFIG_CPU_R5432 is not set
-# CONFIG_CPU_R6000 is not set
-# CONFIG_CPU_R8000 is not set
-# CONFIG_CPU_RM7000 is not set
-# CONFIG_CPU_RM9000 is not set
-# CONFIG_CPU_SB1 is not set
-CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
-CONFIG_CPU_SUPPORTS_HIGHMEM=y
-# CONFIG_CPU_TX39XX is not set
-# CONFIG_CPU_TX49XX is not set
-# CONFIG_CPU_VR41XX is not set
-# CONFIG_DM9000 is not set
-CONFIG_DMA_NEED_PCI_MAP_STATE=y
-CONFIG_DMA_NONCOHERENT=y
-CONFIG_EARLY_PRINTK=y
-CONFIG_FIXED_MII_100_FDX=y
-# CONFIG_FIXED_MII_10_FDX is not set
-CONFIG_FIXED_PHY=y
-CONFIG_FS_POSIX_ACL=y
-CONFIG_GENERIC_FIND_NEXT_BIT=y
-CONFIG_GENERIC_GPIO=y
-CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
-CONFIG_HAS_DMA=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-CONFIG_HID_SUPPORT=n
-CONFIG_HW_HAS_PCI=y
-CONFIG_HW_RANDOM=y
-# CONFIG_I2C is not set
-# CONFIG_IDE is not set
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_IRQ_CPU=y
-CONFIG_KALLSYMS=y
-# CONFIG_KALLSYMS_EXTRA_PASS is not set
-CONFIG_LEDS_GPIO=y
-CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
-# CONFIG_LEMOTE_FULONG is not set
-# CONFIG_MACH_ALCHEMY is not set
-# CONFIG_MACH_DECSTATION is not set
-# CONFIG_MACH_JAZZ is not set
-# CONFIG_MACH_VR41XX is not set
-CONFIG_MIPS=y
-# CONFIG_MIPS_ATLAS is not set
-# CONFIG_MIPS_COBALT is not set
-CONFIG_MIPS_L1_CACHE_SHIFT=5
-# CONFIG_MIPS_MALTA is not set
-CONFIG_MIPS_MT_DISABLED=y
-# CONFIG_MIPS_MT_SMP is not set
-# CONFIG_MIPS_MT_SMTC is not set
-# CONFIG_MIPS_SEAD is not set
-# CONFIG_MIPS_SIM is not set
-CONFIG_MTD=y
-# CONFIG_MTD_ABSENT is not set
-CONFIG_MTD_AR7_PARTS=y
-CONFIG_MTD_BLKDEVS=y
-CONFIG_MTD_BLOCK=y
-# CONFIG_MTD_BLOCK2MTD is not set
-CONFIG_MTD_CFI=y
-# CONFIG_MTD_CFI_ADV_OPTIONS is not set
-CONFIG_MTD_CFI_AMDSTD=y
-CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
-# CONFIG_MTD_CFI_I4 is not set
-# CONFIG_MTD_CFI_I8 is not set
-CONFIG_MTD_CFI_INTELEXT=y
-CONFIG_MTD_CFI_STAA=y
-CONFIG_MTD_CFI_UTIL=y
-CONFIG_MTD_CHAR=y
-# CONFIG_MTD_CMDLINE_PARTS is not set
-CONFIG_MTD_COMPLEX_MAPPINGS=y
-# CONFIG_MTD_CONCAT is not set
-# CONFIG_MTD_DEBUG is not set
-# CONFIG_MTD_DOC2000 is not set
-# CONFIG_MTD_DOC2001 is not set
-# CONFIG_MTD_DOC2001PLUS is not set
-CONFIG_MTD_GEN_PROBE=y
-# CONFIG_MTD_JEDECPROBE is not set
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
-# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-CONFIG_MTD_MAP_BANK_WIDTH_2=y
-# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
-# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-# CONFIG_MTD_MTDRAM is not set
-# CONFIG_MTD_ONENAND is not set
-CONFIG_MTD_PARTITIONS=y
-# CONFIG_MTD_PHRAM is not set
-CONFIG_MTD_PHYSMAP=y
-CONFIG_MTD_PHYSMAP_BANKWIDTH=2
-CONFIG_MTD_PHYSMAP_LEN=0
-CONFIG_MTD_PHYSMAP_START=0x10000000
-# CONFIG_MTD_PLATRAM is not set
-# CONFIG_MTD_RAM is not set
-# CONFIG_MTD_REDBOOT_PARTS is not set
-# CONFIG_MTD_ROM is not set
-# CONFIG_MTD_SLRAM is not set
-# CONFIG_NETDEV_1000 is not set
-# CONFIG_NETDEVICES_MULTIQUEUE is not set
-CONFIG_NET_ACT_POLICE=y
-CONFIG_NET_SCH_FIFO=y
-# CONFIG_NF_CT_PROTO_GRE is not set
-# CONFIG_NF_NAT_PROTO_GRE is not set
-CONFIG_NO_EXCEPT_FILL=y
-# CONFIG_NO_IOPORT is not set
-# CONFIG_PAGE_SIZE_16KB is not set
-CONFIG_PAGE_SIZE_4KB=y
-# CONFIG_PAGE_SIZE_64KB is not set
-# CONFIG_PAGE_SIZE_8KB is not set
-# CONFIG_PCI is not set
-CONFIG_PHYLIB=y
-# CONFIG_PMC_MSP is not set
-# CONFIG_PMC_YOSEMITE is not set
-# CONFIG_PNX8550_JBS is not set
-# CONFIG_PNX8550_STB810 is not set
-# CONFIG_QSEMI_PHY is not set
-# CONFIG_RTC is not set
-CONFIG_RWSEM_GENERIC_SPINLOCK=y
-CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
-# CONFIG_SCSI_WAIT_SCAN is not set
-# CONFIG_SERIAL_8250_EXTENDED is not set
-# CONFIG_SGI_IP22 is not set
-# CONFIG_SGI_IP27 is not set
-# CONFIG_SGI_IP32 is not set
-# CONFIG_SIBYTE_BIGSUR is not set
-# CONFIG_SIBYTE_CARMEL is not set
-# CONFIG_SIBYTE_CRHINE is not set
-# CONFIG_SIBYTE_CRHONE is not set
-# CONFIG_SIBYTE_LITTLESUR is not set
-# CONFIG_SIBYTE_PTSWARM is not set
-# CONFIG_SIBYTE_RHONE is not set
-# CONFIG_SIBYTE_SENTOSA is not set
-# CONFIG_SIBYTE_SWARM is not set
-# CONFIG_SMSC_PHY is not set
-# CONFIG_SOFT_WATCHDOG is not set
-# CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_SWAP_IO_SPACE=y
-CONFIG_SYSVIPC_SYSCTL=y
-CONFIG_SYS_HAS_CPU_MIPS32_R1=y
-CONFIG_SYS_HAS_EARLY_PRINTK=y
-CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
-CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
-CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
-CONFIG_SYS_SUPPORTS_KGDB=y
-CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
-# CONFIG_TOSHIBA_JMR3927 is not set
-# CONFIG_TOSHIBA_RBTX4927 is not set
-# CONFIG_TOSHIBA_RBTX4938 is not set
-CONFIG_TRAD_SIGNALS=y
-# CONFIG_UNUSED_SYMBOLS is not set
-# CONFIG_USB_ARCH_HAS_EHCI is not set
-# CONFIG_USB_ARCH_HAS_HCD is not set
-# CONFIG_USB_ARCH_HAS_OHCI is not set
-# CONFIG_USER_NS is not set
-# CONFIG_VGASTATE is not set
-CONFIG_VLYNQ=y
-CONFIG_ZONE_DMA_FLAG=0
diff --git a/target/linux/ar7/config-2.6.24 b/target/linux/ar7/config-2.6.24
deleted file mode 100644
index edc8b2b87..000000000
--- a/target/linux/ar7/config-2.6.24
+++ /dev/null
@@ -1,198 +0,0 @@
-CONFIG_32BIT=y
-# CONFIG_64BIT is not set
-CONFIG_AR7=y
-CONFIG_AR7_GPIO=y
-CONFIG_AR7_WDT=y
-# CONFIG_ARCH_HAS_ILOG2_U32 is not set
-# CONFIG_ARCH_HAS_ILOG2_U64 is not set
-CONFIG_ARCH_POPULATES_NODE_MAP=y
-# CONFIG_ARCH_SUPPORTS_MSI is not set
-CONFIG_ARCH_SUPPORTS_OPROFILE=y
-CONFIG_ATM_DRIVERS=y
-CONFIG_BASE_SMALL=0
-# CONFIG_BCM47XX is not set
-CONFIG_BITREVERSE=y
-CONFIG_BOOT_ELF32=y
-# CONFIG_BROADCOM_PHY is not set
-# CONFIG_BT is not set
-CONFIG_CEVT_R4K=y
-CONFIG_CMDLINE="init=/etc/preinit rootfstype=squashfs,jffs2,"
-CONFIG_CPMAC=y
-# CONFIG_CPU_BIG_ENDIAN is not set
-CONFIG_CPU_HAS_LLSC=y
-CONFIG_CPU_HAS_PREFETCH=y
-CONFIG_CPU_HAS_SYNC=y
-CONFIG_CPU_LITTLE_ENDIAN=y
-# CONFIG_CPU_LOONGSON2 is not set
-CONFIG_CPU_MIPS32=y
-CONFIG_CPU_MIPS32_R1=y
-# CONFIG_CPU_MIPS32_R2 is not set
-# CONFIG_CPU_MIPS64_R1 is not set
-# CONFIG_CPU_MIPS64_R2 is not set
-CONFIG_CPU_MIPSR1=y
-# CONFIG_CPU_NEVADA is not set
-# CONFIG_CPU_R10000 is not set
-# CONFIG_CPU_R3000 is not set
-# CONFIG_CPU_R4300 is not set
-# CONFIG_CPU_R4X00 is not set
-# CONFIG_CPU_R5000 is not set
-# CONFIG_CPU_R5432 is not set
-# CONFIG_CPU_R6000 is not set
-# CONFIG_CPU_R8000 is not set
-# CONFIG_CPU_RM7000 is not set
-# CONFIG_CPU_RM9000 is not set
-# CONFIG_CPU_SB1 is not set
-CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
-CONFIG_CPU_SUPPORTS_HIGHMEM=y
-# CONFIG_CPU_TX39XX is not set
-# CONFIG_CPU_TX49XX is not set
-# CONFIG_CPU_VR41XX is not set
-CONFIG_CSRC_R4K=y
-# CONFIG_DM9000 is not set
-CONFIG_DMA_NEED_PCI_MAP_STATE=y
-CONFIG_DMA_NONCOHERENT=y
-CONFIG_EARLY_PRINTK=y
-CONFIG_FIXED_PHY=y
-CONFIG_FS_POSIX_ACL=y
-CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
-CONFIG_GENERIC_CMOS_UPDATE=y
-CONFIG_GENERIC_FIND_NEXT_BIT=y
-CONFIG_GENERIC_GPIO=y
-CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
-CONFIG_HAS_DMA=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-CONFIG_HW_RANDOM=y
-# CONFIG_I2C is not set
-# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
-# CONFIG_IBM_NEW_EMAC_RGMII is not set
-# CONFIG_IBM_NEW_EMAC_TAH is not set
-# CONFIG_IBM_NEW_EMAC_ZMII is not set
-# CONFIG_IDE is not set
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_IRQ_CPU=y
-CONFIG_KALLSYMS=y
-# CONFIG_LEDS_ALIX is not set
-CONFIG_LEDS_GPIO=y
-# CONFIG_LEMOTE_FULONG is not set
-# CONFIG_MACH_ALCHEMY is not set
-# CONFIG_MACH_DECSTATION is not set
-# CONFIG_MACH_JAZZ is not set
-# CONFIG_MACH_VR41XX is not set
-# CONFIG_MDIO_BITBANG is not set
-CONFIG_MIPS=y
-# CONFIG_MIPS_ATLAS is not set
-# CONFIG_MIPS_COBALT is not set
-CONFIG_MIPS_L1_CACHE_SHIFT=5
-# CONFIG_MIPS_MALTA is not set
-CONFIG_MIPS_MT_DISABLED=y
-# CONFIG_MIPS_MT_SMP is not set
-# CONFIG_MIPS_MT_SMTC is not set
-# CONFIG_MIPS_SEAD is not set
-# CONFIG_MIPS_SIM is not set
-CONFIG_MTD=y
-# CONFIG_MTD_ABSENT is not set
-CONFIG_MTD_AR7_PARTS=y
-CONFIG_MTD_BLKDEVS=y
-CONFIG_MTD_BLOCK=y
-# CONFIG_MTD_BLOCK2MTD is not set
-CONFIG_MTD_CFI=y
-# CONFIG_MTD_CFI_ADV_OPTIONS is not set
-CONFIG_MTD_CFI_AMDSTD=y
-CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
-# CONFIG_MTD_CFI_I4 is not set
-# CONFIG_MTD_CFI_I8 is not set
-CONFIG_MTD_CFI_INTELEXT=y
-CONFIG_MTD_CFI_STAA=y
-CONFIG_MTD_CFI_UTIL=y
-CONFIG_MTD_CHAR=y
-# CONFIG_MTD_CMDLINE_PARTS is not set
-CONFIG_MTD_COMPLEX_MAPPINGS=y
-# CONFIG_MTD_CONCAT is not set
-# CONFIG_MTD_DEBUG is not set
-# CONFIG_MTD_DOC2000 is not set
-# CONFIG_MTD_DOC2001 is not set
-# CONFIG_MTD_DOC2001PLUS is not set
-CONFIG_MTD_GEN_PROBE=y
-# CONFIG_MTD_JEDECPROBE is not set
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
-# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-CONFIG_MTD_MAP_BANK_WIDTH_2=y
-# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
-# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-# CONFIG_MTD_MTDRAM is not set
-# CONFIG_MTD_ONENAND is not set
-CONFIG_MTD_PARTITIONS=y
-# CONFIG_MTD_PHRAM is not set
-CONFIG_MTD_PHYSMAP=y
-CONFIG_MTD_PHYSMAP_BANKWIDTH=2
-CONFIG_MTD_PHYSMAP_LEN=0
-CONFIG_MTD_PHYSMAP_START=0x10000000
-# CONFIG_MTD_PLATRAM is not set
-# CONFIG_MTD_RAM is not set
-# CONFIG_MTD_REDBOOT_PARTS is not set
-# CONFIG_MTD_ROM is not set
-# CONFIG_MTD_SLRAM is not set
-CONFIG_NO_EXCEPT_FILL=y
-# CONFIG_NO_IOPORT is not set
-# CONFIG_PAGE_SIZE_16KB is not set
-CONFIG_PAGE_SIZE_4KB=y
-# CONFIG_PAGE_SIZE_64KB is not set
-# CONFIG_PAGE_SIZE_8KB is not set
-CONFIG_PHYLIB=y
-# CONFIG_PMC_MSP is not set
-# CONFIG_PMC_YOSEMITE is not set
-# CONFIG_PNX8550_JBS is not set
-# CONFIG_PNX8550_STB810 is not set
-# CONFIG_QSEMI_PHY is not set
-# CONFIG_RTC is not set
-CONFIG_RTC_LIB=y
-CONFIG_RWSEM_GENERIC_SPINLOCK=y
-CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
-# CONFIG_SCSI_WAIT_SCAN is not set
-# CONFIG_SERIAL_8250_EXTENDED is not set
-# CONFIG_SGI_IP22 is not set
-# CONFIG_SGI_IP27 is not set
-# CONFIG_SGI_IP32 is not set
-# CONFIG_SIBYTE_BIGSUR is not set
-# CONFIG_SIBYTE_CARMEL is not set
-# CONFIG_SIBYTE_CRHINE is not set
-# CONFIG_SIBYTE_CRHONE is not set
-# CONFIG_SIBYTE_LITTLESUR is not set
-# CONFIG_SIBYTE_PTSWARM is not set
-# CONFIG_SIBYTE_RHONE is not set
-# CONFIG_SIBYTE_SENTOSA is not set
-# CONFIG_SIBYTE_SWARM is not set
-# CONFIG_SLAB is not set
-CONFIG_SLABINFO=y
-CONFIG_SLUB=y
-# CONFIG_SLUB_DEBUG is not set
-# CONFIG_SMSC_PHY is not set
-# CONFIG_SOFT_WATCHDOG is not set
-# CONFIG_SPARSEMEM_STATIC is not set
-# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
-CONFIG_SSB_POSSIBLE=y
-CONFIG_SWAP_IO_SPACE=y
-CONFIG_SYSVIPC_SYSCTL=y
-CONFIG_SYS_HAS_CPU_MIPS32_R1=y
-CONFIG_SYS_HAS_EARLY_PRINTK=y
-CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
-CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
-CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
-CONFIG_SYS_SUPPORTS_KGDB=y
-CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
-CONFIG_TICK_ONESHOT=y
-# CONFIG_TOSHIBA_JMR3927 is not set
-# CONFIG_TOSHIBA_RBTX4927 is not set
-# CONFIG_TOSHIBA_RBTX4938 is not set
-CONFIG_TRAD_SIGNALS=y
-# CONFIG_USB_ARCH_HAS_EHCI is not set
-# CONFIG_USB_ARCH_HAS_HCD is not set
-# CONFIG_USB_ARCH_HAS_OHCI is not set
-# CONFIG_USER_NS is not set
-# CONFIG_VGASTATE is not set
-CONFIG_VLYNQ=y
-CONFIG_ZONE_DMA_FLAG=0
diff --git a/target/linux/ar7/config-2.6.25 b/target/linux/ar7/config-2.6.25
deleted file mode 100644
index f43e31aa5..000000000
--- a/target/linux/ar7/config-2.6.25
+++ /dev/null
@@ -1,214 +0,0 @@
-CONFIG_32BIT=y
-# CONFIG_64BIT is not set
-CONFIG_AR7=y
-CONFIG_AR7_GPIO=y
-CONFIG_AR7_WDT=y
-# CONFIG_ARCH_HAS_ILOG2_U32 is not set
-# CONFIG_ARCH_HAS_ILOG2_U64 is not set
-CONFIG_ARCH_POPULATES_NODE_MAP=y
-# CONFIG_ARCH_SUPPORTS_MSI is not set
-CONFIG_ARCH_SUPPORTS_OPROFILE=y
-CONFIG_ARCH_SUSPEND_POSSIBLE=y
-CONFIG_ATM_DRIVERS=y
-CONFIG_BASE_SMALL=0
-# CONFIG_BCM47XX is not set
-CONFIG_BITREVERSE=y
-CONFIG_BOOT_ELF32=y
-# CONFIG_BROADCOM_PHY is not set
-# CONFIG_BT is not set
-CONFIG_CEVT_R4K=y
-CONFIG_CLASSIC_RCU=y
-CONFIG_CMDLINE="init=/etc/preinit rootfstype=squashfs,jffs2,"
-CONFIG_CPMAC=y
-# CONFIG_CPU_BIG_ENDIAN is not set
-CONFIG_CPU_HAS_LLSC=y
-CONFIG_CPU_HAS_PREFETCH=y
-CONFIG_CPU_HAS_SYNC=y
-CONFIG_CPU_LITTLE_ENDIAN=y
-# CONFIG_CPU_LOONGSON2 is not set
-CONFIG_CPU_MIPS32=y
-CONFIG_CPU_MIPS32_R1=y
-# CONFIG_CPU_MIPS32_R2 is not set
-# CONFIG_CPU_MIPS64_R1 is not set
-# CONFIG_CPU_MIPS64_R2 is not set
-CONFIG_CPU_MIPSR1=y
-# CONFIG_CPU_NEVADA is not set
-# CONFIG_CPU_R10000 is not set
-# CONFIG_CPU_R3000 is not set
-# CONFIG_CPU_R4300 is not set
-# CONFIG_CPU_R4X00 is not set
-# CONFIG_CPU_R5000 is not set
-# CONFIG_CPU_R5432 is not set
-# CONFIG_CPU_R6000 is not set
-# CONFIG_CPU_R8000 is not set
-# CONFIG_CPU_RM7000 is not set
-# CONFIG_CPU_RM9000 is not set
-# CONFIG_CPU_SB1 is not set
-CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
-CONFIG_CPU_SUPPORTS_HIGHMEM=y
-# CONFIG_CPU_TX39XX is not set
-# CONFIG_CPU_TX49XX is not set
-# CONFIG_CPU_VR41XX is not set
-# CONFIG_CRYPTO_AEAD is not set
-# CONFIG_CRYPTO_AUTHENC is not set
-# CONFIG_CRYPTO_GF128MUL is not set
-CONFIG_CSRC_R4K=y
-# CONFIG_DM9000 is not set
-CONFIG_DMA_NEED_PCI_MAP_STATE=y
-CONFIG_DMA_NONCOHERENT=y
-CONFIG_EARLY_PRINTK=y
-CONFIG_FIXED_PHY=y
-CONFIG_FS_POSIX_ACL=y
-CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
-CONFIG_GENERIC_CMOS_UPDATE=y
-CONFIG_GENERIC_FIND_NEXT_BIT=y
-CONFIG_GENERIC_GPIO=y
-CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
-CONFIG_HAS_DMA=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-CONFIG_HAVE_IDE=y
-# CONFIG_HAVE_KPROBES is not set
-# CONFIG_HAVE_KRETPROBES is not set
-CONFIG_HAVE_OPROFILE=y
-CONFIG_HW_RANDOM=y
-# CONFIG_I2C is not set
-# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
-# CONFIG_IBM_NEW_EMAC_RGMII is not set
-# CONFIG_IBM_NEW_EMAC_TAH is not set
-# CONFIG_IBM_NEW_EMAC_ZMII is not set
-# CONFIG_IDE is not set
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_IRQ_CPU=y
-# CONFIG_ISDN is not set
-CONFIG_KALLSYMS=y
-# CONFIG_LEDS_ALIX is not set
-CONFIG_LEDS_GPIO=y
-# CONFIG_LEMOTE_FULONG is not set
-# CONFIG_LZO_COMPRESS is not set
-# CONFIG_LZO_DECOMPRESS is not set
-# CONFIG_MACH_ALCHEMY is not set
-# CONFIG_MACH_DECSTATION is not set
-# CONFIG_MACH_JAZZ is not set
-# CONFIG_MACH_VR41XX is not set
-# CONFIG_MDIO_BITBANG is not set
-# CONFIG_MEMSTICK is not set
-CONFIG_MIPS=y
-# CONFIG_MIPS_ATLAS is not set
-# CONFIG_MIPS_COBALT is not set
-CONFIG_MIPS_L1_CACHE_SHIFT=5
-# CONFIG_MIPS_MALTA is not set
-CONFIG_MIPS_MT_DISABLED=y
-# CONFIG_MIPS_MT_SMP is not set
-# CONFIG_MIPS_MT_SMTC is not set
-# CONFIG_MIPS_SEAD is not set
-# CONFIG_MIPS_SIM is not set
-CONFIG_MTD=y
-# CONFIG_MTD_ABSENT is not set
-CONFIG_MTD_AR7_PARTS=y
-CONFIG_MTD_BLKDEVS=y
-CONFIG_MTD_BLOCK=y
-# CONFIG_MTD_BLOCK2MTD is not set
-CONFIG_MTD_CFI=y
-# CONFIG_MTD_CFI_ADV_OPTIONS is not set
-CONFIG_MTD_CFI_AMDSTD=y
-CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
-# CONFIG_MTD_CFI_I4 is not set
-# CONFIG_MTD_CFI_I8 is not set
-CONFIG_MTD_CFI_INTELEXT=y
-CONFIG_MTD_CFI_STAA=y
-CONFIG_MTD_CFI_UTIL=y
-CONFIG_MTD_CHAR=y
-# CONFIG_MTD_CMDLINE_PARTS is not set
-CONFIG_MTD_COMPLEX_MAPPINGS=y
-# CONFIG_MTD_CONCAT is not set
-# CONFIG_MTD_DEBUG is not set
-# CONFIG_MTD_DOC2000 is not set
-# CONFIG_MTD_DOC2001 is not set
-# CONFIG_MTD_DOC2001PLUS is not set
-CONFIG_MTD_GEN_PROBE=y
-# CONFIG_MTD_JEDECPROBE is not set
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
-# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-CONFIG_MTD_MAP_BANK_WIDTH_2=y
-# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
-# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-# CONFIG_MTD_MTDRAM is not set
-# CONFIG_MTD_ONENAND is not set
-CONFIG_MTD_PARTITIONS=y
-# CONFIG_MTD_PHRAM is not set
-CONFIG_MTD_PHYSMAP=y
-CONFIG_MTD_PHYSMAP_BANKWIDTH=2
-CONFIG_MTD_PHYSMAP_LEN=0
-CONFIG_MTD_PHYSMAP_START=0x10000000
-# CONFIG_MTD_PLATRAM is not set
-# CONFIG_MTD_RAM is not set
-# CONFIG_MTD_REDBOOT_PARTS is not set
-# CONFIG_MTD_ROM is not set
-# CONFIG_MTD_SLRAM is not set
-CONFIG_NO_EXCEPT_FILL=y
-# CONFIG_NO_IOPORT is not set
-# CONFIG_PAGE_SIZE_16KB is not set
-CONFIG_PAGE_SIZE_4KB=y
-# CONFIG_PAGE_SIZE_64KB is not set
-# CONFIG_PAGE_SIZE_8KB is not set
-CONFIG_PHYLIB=y
-# CONFIG_PMC_MSP is not set
-# CONFIG_PMC_YOSEMITE is not set
-# CONFIG_PNX8550_JBS is not set
-# CONFIG_PNX8550_STB810 is not set
-# CONFIG_QSEMI_PHY is not set
-# CONFIG_REALTEK_PHY is not set
-# CONFIG_RTC is not set
-CONFIG_RTC_LIB=y
-CONFIG_RWSEM_GENERIC_SPINLOCK=y
-CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
-# CONFIG_SCSI is not set
-# CONFIG_SCSI_DMA is not set
-# CONFIG_SERIAL_8250_EXTENDED is not set
-# CONFIG_SGI_IP22 is not set
-# CONFIG_SGI_IP27 is not set
-# CONFIG_SGI_IP28 is not set
-# CONFIG_SGI_IP32 is not set
-# CONFIG_SIBYTE_BIGSUR is not set
-# CONFIG_SIBYTE_CARMEL is not set
-# CONFIG_SIBYTE_CRHINE is not set
-# CONFIG_SIBYTE_CRHONE is not set
-# CONFIG_SIBYTE_LITTLESUR is not set
-# CONFIG_SIBYTE_RHONE is not set
-# CONFIG_SIBYTE_SENTOSA is not set
-# CONFIG_SIBYTE_SWARM is not set
-# CONFIG_SLAB is not set
-CONFIG_SLABINFO=y
-CONFIG_SLUB=y
-# CONFIG_SLUB_DEBUG is not set
-# CONFIG_SLUB_STATS is not set
-# CONFIG_SMSC_PHY is not set
-# CONFIG_SOFT_WATCHDOG is not set
-# CONFIG_SOUND is not set
-# CONFIG_SPARSEMEM_STATIC is not set
-# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
-CONFIG_SSB_POSSIBLE=y
-CONFIG_SWAP_IO_SPACE=y
-CONFIG_SYSVIPC_SYSCTL=y
-CONFIG_SYS_HAS_CPU_MIPS32_R1=y
-CONFIG_SYS_HAS_EARLY_PRINTK=y
-CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
-CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
-CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
-CONFIG_SYS_SUPPORTS_KGDB=y
-CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
-CONFIG_TICK_ONESHOT=y
-# CONFIG_TOSHIBA_JMR3927 is not set
-# CONFIG_TOSHIBA_RBTX4927 is not set
-# CONFIG_TOSHIBA_RBTX4938 is not set
-CONFIG_TRAD_SIGNALS=y
-# CONFIG_USB_SUPPORT is not set
-# CONFIG_VGASTATE is not set
-# CONFIG_VIDEO_DEV is not set
-CONFIG_VLYNQ=y
-# CONFIG_W1 is not set
-CONFIG_ZONE_DMA_FLAG=0
diff --git a/target/linux/ar7/patches-2.6.23/100-board_support.patch b/target/linux/ar7/patches-2.6.23/100-board_support.patch
deleted file mode 100644
index 681a1a984..000000000
--- a/target/linux/ar7/patches-2.6.23/100-board_support.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-Index: linux-2.6.23.17/arch/mips/Kconfig
-===================================================================
---- linux-2.6.23.17.orig/arch/mips/Kconfig
-+++ linux-2.6.23.17/arch/mips/Kconfig
-@@ -15,6 +15,22 @@ choice
- prompt "System type"
- default SGI_IP22
-
-+config AR7
-+ bool "Texas Instruments AR7"
-+ select BOOT_ELF32
-+ select DMA_NONCOHERENT
-+ select IRQ_CPU
-+ select NO_EXCEPT_FILL
-+ select SWAP_IO_SPACE
-+ select SYS_HAS_CPU_MIPS32_R1
-+ select SYS_HAS_EARLY_PRINTK
-+ select SYS_SUPPORTS_32BIT_KERNEL
-+ select SYS_SUPPORTS_KGDB
-+ select SYS_SUPPORTS_LITTLE_ENDIAN
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ select GENERIC_GPIO
-+ select GENERIC_HARDIRQS_NO__DO_IRQ
-+
- config MACH_ALCHEMY
- bool "Alchemy processor based machines"
-
-Index: linux-2.6.23.17/arch/mips/kernel/traps.c
-===================================================================
---- linux-2.6.23.17.orig/arch/mips/kernel/traps.c
-+++ linux-2.6.23.17/arch/mips/kernel/traps.c
-@@ -1075,10 +1075,23 @@ void *set_except_vector(int n, void *add
-
- exception_handlers[n] = handler;
- if (n == 0 && cpu_has_divec) {
-- *(volatile u32 *)(ebase + 0x200) = 0x08000000 |
-- (0x03ffffff & (handler >> 2));
-- flush_icache_range(ebase + 0x200, ebase + 0x204);
-- }
-+ if ((handler ^ (ebase + 4)) & 0xfc000000) {
-+ /* lui k0, 0x0000 */
-+ *(u32 *)(ebase + 0x200) = 0x3c1a0000 | (handler >> 16);
-+ /* ori k0, 0x0000 */
-+ *(u32 *)(ebase + 0x204) =
-+ 0x375a0000 | (handler & 0xffff);
-+ /* jr k0 */
-+ *(u32 *)(ebase + 0x208) = 0x03400008;
-+ /* nop */
-+ *(u32 *)(ebase + 0x20C) = 0x00000000;
-+ flush_icache_range(ebase + 0x200, ebase + 0x210);
-+ } else {
-+ *(volatile u32 *)(ebase + 0x200) =
-+ 0x08000000 | (0x03ffffff & (handler >> 2));
-+ flush_icache_range(ebase + 0x200, ebase + 0x204);
-+ }
-+ }
- return (void *)old_handler;
- }
-
-Index: linux-2.6.23.17/arch/mips/Makefile
-===================================================================
---- linux-2.6.23.17.orig/arch/mips/Makefile
-+++ linux-2.6.23.17/arch/mips/Makefile
-@@ -161,6 +161,13 @@ libs-$(CONFIG_SIBYTE_CFE) += arch/mips/s
- #
-
- #
-+# Texas Instruments AR7
-+#
-+core-$(CONFIG_AR7) += arch/mips/ar7/
-+cflags-$(CONFIG_AR7) += -Iinclude/asm-mips/ar7
-+load-$(CONFIG_AR7) += 0xffffffff94100000
-+
-+#
- # Acer PICA 61, Mips Magnum 4000 and Olivetti M700.
- #
- core-$(CONFIG_MACH_JAZZ) += arch/mips/jazz/
-Index: linux-2.6.23.17/include/asm-mips/page.h
-===================================================================
---- linux-2.6.23.17.orig/include/asm-mips/page.h
-+++ linux-2.6.23.17/include/asm-mips/page.h
-@@ -184,8 +184,10 @@ typedef struct { unsigned long pgprot; }
- #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
- VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
-
--#define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE)
--#define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET)
-+#define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE + \
-+ PHYS_OFFSET)
-+#define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET - \
-+ PHYS_OFFSET)
-
- #include <asm-generic/memory_model.h>
- #include <asm-generic/page.h>
diff --git a/target/linux/ar7/patches-2.6.23/110-flash.patch b/target/linux/ar7/patches-2.6.23/110-flash.patch
deleted file mode 100644
index fa6010814..000000000
--- a/target/linux/ar7/patches-2.6.23/110-flash.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Index: linux-2.6.23.17/drivers/mtd/Kconfig
-===================================================================
---- linux-2.6.23.17.orig/drivers/mtd/Kconfig
-+++ linux-2.6.23.17/drivers/mtd/Kconfig
-@@ -160,6 +160,12 @@ config MTD_AFS_PARTS
- for your particular device. It won't happen automatically. The
- 'armflash' map driver (CONFIG_MTD_ARMFLASH) does this, for example.
-
-+config MTD_AR7_PARTS
-+ tristate "TI AR7 partitioning support"
-+ depends on MTD_PARTITIONS
-+ ---help---
-+ TI AR7 partitioning support
-+
- comment "User Modules And Translation Layers"
-
- config MTD_CHAR
-Index: linux-2.6.23.17/drivers/mtd/Makefile
-===================================================================
---- linux-2.6.23.17.orig/drivers/mtd/Makefile
-+++ linux-2.6.23.17/drivers/mtd/Makefile
-@@ -11,6 +11,7 @@ obj-$(CONFIG_MTD_CONCAT) += mtdconcat.o
- obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
- obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o
- obj-$(CONFIG_MTD_AFS_PARTS) += afs.o
-+obj-$(CONFIG_MTD_AR7_PARTS) += ar7part.o
-
- # 'Users' - code which presents functionality to userspace.
- obj-$(CONFIG_MTD_CHAR) += mtdchar.o
-Index: linux-2.6.23.17/drivers/mtd/maps/physmap.c
-===================================================================
---- linux-2.6.23.17.orig/drivers/mtd/maps/physmap.c
-+++ linux-2.6.23.17/drivers/mtd/maps/physmap.c
-@@ -74,7 +74,8 @@ static int physmap_flash_remove(struct p
-
- static const char *rom_probe_types[] = { "cfi_probe", "jedec_probe", "map_rom", NULL };
- #ifdef CONFIG_MTD_PARTITIONS
--static const char *part_probe_types[] = { "cmdlinepart", "RedBoot", NULL };
-+static const char *part_probe_types[] = {"cmdlinepart", "RedBoot",
-+ "ar7part", NULL };
- #endif
-
- static int physmap_flash_probe(struct platform_device *dev)
diff --git a/target/linux/ar7/patches-2.6.23/120-gpio_chrdev.patch b/target/linux/ar7/patches-2.6.23/120-gpio_chrdev.patch
deleted file mode 100644
index a61f3e0db..000000000
--- a/target/linux/ar7/patches-2.6.23/120-gpio_chrdev.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Index: linux-2.6.23.17/drivers/char/Kconfig
-===================================================================
---- linux-2.6.23.17.orig/drivers/char/Kconfig
-+++ linux-2.6.23.17/drivers/char/Kconfig
-@@ -928,6 +928,15 @@ config MWAVE
- To compile this driver as a module, choose M here: the
- module will be called mwave.
-
-+config AR7_GPIO
-+ tristate "TI AR7 GPIO Support"
-+ depends on AR7
-+ help
-+ Give userspace access to the GPIO pins on the Texas Instruments AR7
-+ processors.
-+
-+ If compiled as a module, it will be called ar7_gpio.
-+
- config SCx200_GPIO
- tristate "NatSemi SCx200 GPIO Support"
- depends on SCx200
-Index: linux-2.6.23.17/drivers/char/Makefile
-===================================================================
---- linux-2.6.23.17.orig/drivers/char/Makefile
-+++ linux-2.6.23.17/drivers/char/Makefile
-@@ -89,6 +89,7 @@ obj-$(CONFIG_COBALT_LCD) += lcd.o
- obj-$(CONFIG_PPDEV) += ppdev.o
- obj-$(CONFIG_NWBUTTON) += nwbutton.o
- obj-$(CONFIG_NWFLASH) += nwflash.o
-+obj-$(CONFIG_AR7_GPIO) += ar7_gpio.o
- obj-$(CONFIG_SCx200_GPIO) += scx200_gpio.o
- obj-$(CONFIG_PC8736x_GPIO) += pc8736x_gpio.o
- obj-$(CONFIG_NSC_GPIO) += nsc_gpio.o
diff --git a/target/linux/ar7/patches-2.6.23/130-vlynq.patch b/target/linux/ar7/patches-2.6.23/130-vlynq.patch
deleted file mode 100644
index 8f7e94b34..000000000
--- a/target/linux/ar7/patches-2.6.23/130-vlynq.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Index: linux-2.6.23.17/drivers/Kconfig
-===================================================================
---- linux-2.6.23.17.orig/drivers/Kconfig
-+++ linux-2.6.23.17/drivers/Kconfig
-@@ -93,4 +93,6 @@ source "drivers/kvm/Kconfig"
- source "drivers/uio/Kconfig"
-
- source "drivers/lguest/Kconfig"
-+
-+source "drivers/vlynq/Kconfig"
- endmenu
-Index: linux-2.6.23.17/drivers/Makefile
-===================================================================
---- linux-2.6.23.17.orig/drivers/Makefile
-+++ linux-2.6.23.17/drivers/Makefile
-@@ -89,4 +89,5 @@ obj-$(CONFIG_DMA_ENGINE) += dma/
- obj-$(CONFIG_HID) += hid/
- obj-$(CONFIG_PPC_PS3) += ps3/
- obj-$(CONFIG_OF) += of/
-+obj-$(CONFIG_VLYNQ) += vlynq/
- obj-$(CONFIG_GPIO_DEVICE) += gpio/
diff --git a/target/linux/ar7/patches-2.6.23/140-watchdog.patch b/target/linux/ar7/patches-2.6.23/140-watchdog.patch
deleted file mode 100644
index 09a8ad5b9..000000000
--- a/target/linux/ar7/patches-2.6.23/140-watchdog.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Index: linux-2.6.23.17/drivers/char/watchdog/Kconfig
-===================================================================
---- linux-2.6.23.17.orig/drivers/char/watchdog/Kconfig
-+++ linux-2.6.23.17/drivers/char/watchdog/Kconfig
-@@ -583,6 +583,12 @@ config SBC_EPX_C3_WATCHDOG
-
- # MIPS Architecture
-
-+config AR7_WDT
-+ tristate "TI AR7 Watchdog Timer"
-+ depends on WATCHDOG && AR7
-+ help
-+ Hardware driver for the TI AR7 Watchdog Timer.
-+
- config INDYDOG
- tristate "Indy/I2 Hardware Watchdog"
- depends on SGI_IP22
-Index: linux-2.6.23.17/drivers/char/watchdog/Makefile
-===================================================================
---- linux-2.6.23.17.orig/drivers/char/watchdog/Makefile
-+++ linux-2.6.23.17/drivers/char/watchdog/Makefile
-@@ -87,6 +87,7 @@ obj-$(CONFIG_SBC_EPX_C3_WATCHDOG) += sbc
- # M68KNOMMU Architecture
-
- # MIPS Architecture
-+obj-$(CONFIG_AR7_WDT) += ar7_wdt.o
- obj-$(CONFIG_INDYDOG) += indydog.o
- obj-$(CONFIG_WDT_MTX1) += mtx-1_wdt.o
- obj-$(CONFIG_WDT_RM9K_GPI) += rm9k_wdt.o
diff --git a/target/linux/ar7/patches-2.6.23/200-ethernet_driver.patch b/target/linux/ar7/patches-2.6.23/200-ethernet_driver.patch
deleted file mode 100644
index 0f13204a7..000000000
--- a/target/linux/ar7/patches-2.6.23/200-ethernet_driver.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Index: linux-2.6.23.17/drivers/net/Kconfig
-===================================================================
---- linux-2.6.23.17.orig/drivers/net/Kconfig
-+++ linux-2.6.23.17/drivers/net/Kconfig
-@@ -1965,6 +1965,15 @@ config SC92031
- To compile this driver as a module, choose M here: the module
- will be called sc92031. This is recommended.
-
-+config CPMAC
-+ tristate "TI AR7 CPMAC Ethernet support (EXPERIMENTAL)"
-+ depends on NET_ETHERNET && EXPERIMENTAL && AR7
-+ select PHYLIB
-+ select FIXED_PHY
-+ select FIXED_MII_100_FDX
-+ help
-+ TI AR7 CPMAC Ethernet support
-+
- config NET_POCKET
- bool "Pocket and portable adapters"
- depends on PARPORT
-Index: linux-2.6.23.17/drivers/net/Makefile
-===================================================================
---- linux-2.6.23.17.orig/drivers/net/Makefile
-+++ linux-2.6.23.17/drivers/net/Makefile
-@@ -156,6 +156,7 @@ obj-$(CONFIG_8139CP) += 8139cp.o
- obj-$(CONFIG_8139TOO) += 8139too.o
- obj-$(CONFIG_ZNET) += znet.o
- obj-$(CONFIG_LAN_SAA9730) += saa9730.o
-+obj-$(CONFIG_CPMAC) += cpmac.o
- obj-$(CONFIG_DEPCA) += depca.o
- obj-$(CONFIG_EWRK3) += ewrk3.o
- obj-$(CONFIG_ATP) += atp.o
diff --git a/target/linux/ar7/patches-2.6.23/210-phy_fixed.patch b/target/linux/ar7/patches-2.6.23/210-phy_fixed.patch
deleted file mode 100644
index 24040786c..000000000
--- a/target/linux/ar7/patches-2.6.23/210-phy_fixed.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-Index: linux-2.6.23.17/drivers/net/phy/fixed.c
-===================================================================
---- linux-2.6.23.17.orig/drivers/net/phy/fixed.c
-+++ linux-2.6.23.17/drivers/net/phy/fixed.c
-@@ -189,6 +189,19 @@ static struct phy_driver fixed_mdio_driv
- .driver = { .owner = THIS_MODULE,},
- };
-
-+static void fixed_mdio_release (struct device * dev)
-+{
-+ struct phy_device *phydev = container_of(dev, struct phy_device, dev);
-+ struct mii_bus *bus = phydev->bus;
-+ struct fixed_info *fixed = bus->priv;
-+
-+ kfree(phydev);
-+ kfree(bus->dev);
-+ kfree(bus);
-+ kfree(fixed->regs);
-+ kfree(fixed);
-+}
-+
- /*-----------------------------------------------------------------------------
- * This func is used to create all the necessary stuff, bind
- * the fixed phy driver and register all it on the mdio_bus_type.
-@@ -224,6 +237,12 @@ static int fixed_mdio_register_device(in
- }
-
- fixed->regs = kzalloc(MII_REGS_NUM*sizeof(int), GFP_KERNEL);
-+ if (NULL == fixed->regs) {
-+ kfree(dev);
-+ kfree(new_bus);
-+ kfree(fixed);
-+ return -ENOMEM;
-+ }
- fixed->regs_num = MII_REGS_NUM;
- fixed->phy_status.speed = speed;
- fixed->phy_status.duplex = duplex;
-@@ -252,8 +271,11 @@ static int fixed_mdio_register_device(in
- fixed->phydev = phydev;
-
- if(NULL == phydev) {
-- err = -ENOMEM;
-- goto device_create_fail;
-+ kfree(dev);
-+ kfree(new_bus);
-+ kfree(fixed->regs);
-+ kfree(fixed);
-+ return -ENOMEM;
- }
-
- phydev->irq = PHY_IGNORE_INTERRUPT;
-@@ -265,8 +287,33 @@ static int fixed_mdio_register_device(in
- else
- snprintf(phydev->dev.bus_id, BUS_ID_SIZE,
- "fixed@%d:%d", speed, duplex);
-+
- phydev->bus = new_bus;
-
-+#if 1
-+ phydev->dev.driver = &fixed_mdio_driver.driver;
-+ phydev->dev.release = fixed_mdio_release;
-+
-+ err = phydev->dev.driver->probe(&phydev->dev);
-+ if(err < 0) {
-+ printk(KERN_ERR "Phy %s: problems with fixed driver\n",
-+ phydev->dev.bus_id);
-+ kfree(phydev);
-+ kfree(dev);
-+ kfree(new_bus);
-+ kfree(fixed->regs);
-+ kfree(fixed);
-+ return err;
-+ }
-+
-+ err = device_register(&phydev->dev);
-+ if(err) {
-+ printk(KERN_ERR "Phy %s failed to register\n",
-+ phydev->dev.bus_id);
-+ }
-+
-+ return 0;
-+#else
- err = device_register(&phydev->dev);
- if(err) {
- printk(KERN_ERR "Phy %s failed to register\n",
-@@ -303,6 +350,7 @@ device_create_fail:
- kfree(fixed);
-
- return err;
-+#endif
- }
- #endif
-
diff --git a/target/linux/ar7/patches-2.6.23/500-serial_kludge.patch b/target/linux/ar7/patches-2.6.23/500-serial_kludge.patch
deleted file mode 100644
index f695d2a8e..000000000
--- a/target/linux/ar7/patches-2.6.23/500-serial_kludge.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-Index: linux-2.6.23.17/drivers/serial/8250.c
-===================================================================
---- linux-2.6.23.17.orig/drivers/serial/8250.c
-+++ linux-2.6.23.17/drivers/serial/8250.c
-@@ -267,6 +267,13 @@ static const struct serial8250_config ua
- .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
- .flags = UART_CAP_FIFO,
- },
-+ [PORT_AR7] = {
-+ .name = "TI-AR7",
-+ .fifo_size = 16,
-+ .tx_loadsz = 16,
-+ .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_00,
-+ .flags = UART_CAP_FIFO | UART_CAP_AFE,
-+ },
- };
-
- #if defined (CONFIG_SERIAL_8250_AU1X00)
-@@ -2455,7 +2462,11 @@ static void serial8250_console_putchar(s
- {
- struct uart_8250_port *up = (struct uart_8250_port *)port;
-
-+#ifdef CONFIG_AR7
-+ wait_for_xmitr(up, BOTH_EMPTY);
-+#else
- wait_for_xmitr(up, UART_LSR_THRE);
-+#endif
- serial_out(up, UART_TX, ch);
- }
-
-Index: linux-2.6.23.17/include/linux/serial_core.h
-===================================================================
---- linux-2.6.23.17.orig/include/linux/serial_core.h
-+++ linux-2.6.23.17/include/linux/serial_core.h
-@@ -40,6 +40,7 @@
- #define PORT_NS16550A 14
- #define PORT_XSCALE 15
- #define PORT_RM9000 16 /* PMC-Sierra RM9xxx internal UART */
-+#define PORT_AR7 16
- #define PORT_MAX_8250 16 /* max port ID */
-
- /*
-Index: linux-2.6.23.17/include/linux/serialP.h
-===================================================================
---- linux-2.6.23.17.orig/include/linux/serialP.h
-+++ linux-2.6.23.17/include/linux/serialP.h
-@@ -135,6 +135,10 @@ struct rs_multiport_struct {
- * the interrupt line _up_ instead of down, so if we register the IRQ
- * while the UART is in that state, we die in an IRQ storm. */
- #define ALPHA_KLUDGE_MCR (UART_MCR_OUT2)
-+#elif defined(CONFIG_AR7)
-+/* This is how it is set up by bootloader... */
-+#define ALPHA_KLUDGE_MCR (UART_MCR_OUT2 | UART_MCR_OUT1 \
-+ | UART_MCR_RTS | UART_MCR_DTR)
- #else
- #define ALPHA_KLUDGE_MCR 0
- #endif
diff --git a/target/linux/ar7/patches-2.6.24/100-board_support.patch b/target/linux/ar7/patches-2.6.24/100-board_support.patch
deleted file mode 100644
index 744371eec..000000000
--- a/target/linux/ar7/patches-2.6.24/100-board_support.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-Index: linux-2.6.24.7/arch/mips/Kconfig
-===================================================================
---- linux-2.6.24.7.orig/arch/mips/Kconfig
-+++ linux-2.6.24.7/arch/mips/Kconfig
-@@ -16,6 +16,24 @@ choice
- prompt "System type"
- default SGI_IP22
-
-+config AR7
-+ bool "Texas Instruments AR7"
-+ select BOOT_ELF32
-+ select DMA_NONCOHERENT
-+ select CEVT_R4K
-+ select CSRC_R4K
-+ select IRQ_CPU
-+ select NO_EXCEPT_FILL
-+ select SWAP_IO_SPACE
-+ select SYS_HAS_CPU_MIPS32_R1
-+ select SYS_HAS_EARLY_PRINTK
-+ select SYS_SUPPORTS_32BIT_KERNEL
-+ select SYS_SUPPORTS_KGDB
-+ select SYS_SUPPORTS_LITTLE_ENDIAN
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ select GENERIC_GPIO
-+ select GENERIC_HARDIRQS_NO__DO_IRQ
-+
- config MACH_ALCHEMY
- bool "Alchemy processor based machines"
-
-Index: linux-2.6.24.7/arch/mips/kernel/traps.c
-===================================================================
---- linux-2.6.24.7.orig/arch/mips/kernel/traps.c
-+++ linux-2.6.24.7/arch/mips/kernel/traps.c
-@@ -1093,9 +1093,22 @@ void *set_except_vector(int n, void *add
-
- exception_handlers[n] = handler;
- if (n == 0 && cpu_has_divec) {
-- *(u32 *)(ebase + 0x200) = 0x08000000 |
-- (0x03ffffff & (handler >> 2));
-- flush_icache_range(ebase + 0x200, ebase + 0x204);
-+ if ((handler ^ (ebase + 4)) & 0xfc000000) {
-+ /* lui k0, 0x0000 */
-+ *(u32 *)(ebase + 0x200) = 0x3c1a0000 | (handler >> 16);
-+ /* ori k0, 0x0000 */
-+ *(u32 *)(ebase + 0x204) =
-+ 0x375a0000 | (handler & 0xffff);
-+ /* jr k0 */
-+ *(u32 *)(ebase + 0x208) = 0x03400008;
-+ /* nop */
-+ *(u32 *)(ebase + 0x20C) = 0x00000000;
-+ flush_icache_range(ebase + 0x200, ebase + 0x210);
-+ } else {
-+ *(u32 *)(ebase + 0x200) =
-+ 0x08000000 | (0x03ffffff & (handler >> 2));
-+ flush_icache_range(ebase + 0x200, ebase + 0x204);
-+ }
- }
- return (void *)old_handler;
- }
-Index: linux-2.6.24.7/arch/mips/Makefile
-===================================================================
---- linux-2.6.24.7.orig/arch/mips/Makefile
-+++ linux-2.6.24.7/arch/mips/Makefile
-@@ -159,6 +159,13 @@ libs-$(CONFIG_SIBYTE_CFE) += arch/mips/s
- #
-
- #
-+# Texas Instruments AR7
-+#
-+core-$(CONFIG_AR7) += arch/mips/ar7/
-+cflags-$(CONFIG_AR7) += -Iinclude/asm-mips/ar7
-+load-$(CONFIG_AR7) += 0xffffffff94100000
-+
-+#
- # Acer PICA 61, Mips Magnum 4000 and Olivetti M700.
- #
- core-$(CONFIG_MACH_JAZZ) += arch/mips/jazz/
-Index: linux-2.6.24.7/include/asm-mips/page.h
-===================================================================
---- linux-2.6.24.7.orig/include/asm-mips/page.h
-+++ linux-2.6.24.7/include/asm-mips/page.h
-@@ -184,8 +184,10 @@ typedef struct { unsigned long pgprot; }
- #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
- VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
-
--#define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE)
--#define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET)
-+#define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE + \
-+ PHYS_OFFSET)
-+#define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET - \
-+ PHYS_OFFSET)
-
- #include <asm-generic/memory_model.h>
- #include <asm-generic/page.h>
diff --git a/target/linux/ar7/patches-2.6.24/110-flash.patch b/target/linux/ar7/patches-2.6.24/110-flash.patch
deleted file mode 100644
index 7a313681d..000000000
--- a/target/linux/ar7/patches-2.6.24/110-flash.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Index: linux-2.6.24.7/drivers/mtd/Kconfig
-===================================================================
---- linux-2.6.24.7.orig/drivers/mtd/Kconfig
-+++ linux-2.6.24.7/drivers/mtd/Kconfig
-@@ -160,6 +160,12 @@ config MTD_AFS_PARTS
- for your particular device. It won't happen automatically. The
- 'armflash' map driver (CONFIG_MTD_ARMFLASH) does this, for example.
-
-+config MTD_AR7_PARTS
-+ tristate "TI AR7 partitioning support"
-+ depends on MTD_PARTITIONS
-+ ---help---
-+ TI AR7 partitioning support
-+
- comment "User Modules And Translation Layers"
-
- config MTD_CHAR
-Index: linux-2.6.24.7/drivers/mtd/Makefile
-===================================================================
---- linux-2.6.24.7.orig/drivers/mtd/Makefile
-+++ linux-2.6.24.7/drivers/mtd/Makefile
-@@ -11,6 +11,7 @@ obj-$(CONFIG_MTD_CONCAT) += mtdconcat.o
- obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
- obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o
- obj-$(CONFIG_MTD_AFS_PARTS) += afs.o
-+obj-$(CONFIG_MTD_AR7_PARTS) += ar7part.o
-
- # 'Users' - code which presents functionality to userspace.
- obj-$(CONFIG_MTD_CHAR) += mtdchar.o
-Index: linux-2.6.24.7/drivers/mtd/maps/physmap.c
-===================================================================
---- linux-2.6.24.7.orig/drivers/mtd/maps/physmap.c
-+++ linux-2.6.24.7/drivers/mtd/maps/physmap.c
-@@ -74,7 +74,8 @@ static int physmap_flash_remove(struct p
-
- static const char *rom_probe_types[] = { "cfi_probe", "jedec_probe", "map_rom", NULL };
- #ifdef CONFIG_MTD_PARTITIONS
--static const char *part_probe_types[] = { "cmdlinepart", "RedBoot", NULL };
-+static const char *part_probe_types[] = {"cmdlinepart", "RedBoot",
-+ "ar7part", NULL };
- #endif
-
- static int physmap_flash_probe(struct platform_device *dev)
diff --git a/target/linux/ar7/patches-2.6.24/120-gpio_chrdev.patch b/target/linux/ar7/patches-2.6.24/120-gpio_chrdev.patch
deleted file mode 100644
index 27db92ac8..000000000
--- a/target/linux/ar7/patches-2.6.24/120-gpio_chrdev.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Index: linux-2.6.24.7/drivers/char/Kconfig
-===================================================================
---- linux-2.6.24.7.orig/drivers/char/Kconfig
-+++ linux-2.6.24.7/drivers/char/Kconfig
-@@ -904,6 +904,15 @@ config MWAVE
- To compile this driver as a module, choose M here: the
- module will be called mwave.
-
-+config AR7_GPIO
-+ tristate "TI AR7 GPIO Support"
-+ depends on AR7
-+ help
-+ Give userspace access to the GPIO pins on the Texas Instruments AR7
-+ processors.
-+
-+ If compiled as a module, it will be called ar7_gpio.
-+
- config SCx200_GPIO
- tristate "NatSemi SCx200 GPIO Support"
- depends on SCx200
-Index: linux-2.6.24.7/drivers/char/Makefile
-===================================================================
---- linux-2.6.24.7.orig/drivers/char/Makefile
-+++ linux-2.6.24.7/drivers/char/Makefile
-@@ -89,6 +89,7 @@ obj-$(CONFIG_COBALT_LCD) += lcd.o
- obj-$(CONFIG_PPDEV) += ppdev.o
- obj-$(CONFIG_NWBUTTON) += nwbutton.o
- obj-$(CONFIG_NWFLASH) += nwflash.o
-+obj-$(CONFIG_AR7_GPIO) += ar7_gpio.o
- obj-$(CONFIG_SCx200_GPIO) += scx200_gpio.o
- obj-$(CONFIG_PC8736x_GPIO) += pc8736x_gpio.o
- obj-$(CONFIG_NSC_GPIO) += nsc_gpio.o
diff --git a/target/linux/ar7/patches-2.6.24/130-vlynq.patch b/target/linux/ar7/patches-2.6.24/130-vlynq.patch
deleted file mode 100644
index f4154ab8e..000000000
--- a/target/linux/ar7/patches-2.6.24/130-vlynq.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Index: linux-2.6.24.7/drivers/Kconfig
-===================================================================
---- linux-2.6.24.7.orig/drivers/Kconfig
-+++ linux-2.6.24.7/drivers/Kconfig
-@@ -96,5 +96,7 @@ source "drivers/kvm/Kconfig"
-
- source "drivers/uio/Kconfig"
-
-+source "drivers/vlynq/Kconfig"
-+
- source "drivers/virtio/Kconfig"
- endmenu
-Index: linux-2.6.24.7/drivers/Makefile
-===================================================================
---- linux-2.6.24.7.orig/drivers/Makefile
-+++ linux-2.6.24.7/drivers/Makefile
-@@ -89,6 +89,7 @@ obj-$(CONFIG_DCA) += dca/
- obj-$(CONFIG_HID) += hid/
- obj-$(CONFIG_PPC_PS3) += ps3/
- obj-$(CONFIG_OF) += of/
-+obj-$(CONFIG_VLYNQ) += vlynq/
- obj-$(CONFIG_SSB) += ssb/
- obj-$(CONFIG_VIRTIO) += virtio/
- obj-$(CONFIG_GPIO_DEVICE) += gpio/
diff --git a/target/linux/ar7/patches-2.6.24/140-cpmac_fix.patch b/target/linux/ar7/patches-2.6.24/140-cpmac_fix.patch
deleted file mode 100644
index 765893295..000000000
--- a/target/linux/ar7/patches-2.6.24/140-cpmac_fix.patch
+++ /dev/null
@@ -1,268 +0,0 @@
-Index: linux-2.6.24.7/drivers/net/cpmac.c
-===================================================================
---- linux-2.6.24.7.orig/drivers/net/cpmac.c
-+++ linux-2.6.24.7/drivers/net/cpmac.c
-@@ -38,6 +38,7 @@
- #include <linux/platform_device.h>
- #include <linux/dma-mapping.h>
- #include <asm/gpio.h>
-+#include <asm/atomic.h>
-
- MODULE_AUTHOR("Eugene Konev <ejka@imfi.kspu.ru>");
- MODULE_DESCRIPTION("TI AR7 ethernet driver (CPMAC)");
-@@ -207,6 +208,7 @@ struct cpmac_priv {
- struct work_struct reset_work;
- struct platform_device *pdev;
- struct napi_struct napi;
-+ atomic_t reset_pending;
- };
-
- static irqreturn_t cpmac_irq(int, void *);
-@@ -455,6 +457,9 @@ static int cpmac_start_xmit(struct sk_bu
- struct cpmac_desc *desc;
- struct cpmac_priv *priv = netdev_priv(dev);
-
-+ if (unlikely(atomic_read(&priv->reset_pending)))
-+ return NETDEV_TX_BUSY;
-+
- if (unlikely(skb_padto(skb, ETH_ZLEN)))
- return NETDEV_TX_OK;
-
-@@ -634,14 +639,14 @@ static void cpmac_clear_tx(struct net_de
- priv->desc_ring[i].dataflags = 0;
- if (priv->desc_ring[i].skb) {
- dev_kfree_skb_any(priv->desc_ring[i].skb);
-- if (netif_subqueue_stopped(dev, i))
-- netif_wake_subqueue(dev, i);
-+ priv->desc_ring[i].skb = NULL;
- }
- }
- }
-
- static void cpmac_hw_error(struct work_struct *work)
- {
-+ int i;
- struct cpmac_priv *priv =
- container_of(work, struct cpmac_priv, reset_work);
-
-@@ -650,8 +655,47 @@ static void cpmac_hw_error(struct work_s
- spin_unlock(&priv->rx_lock);
- cpmac_clear_tx(priv->dev);
- cpmac_hw_start(priv->dev);
-- napi_enable(&priv->napi);
-- netif_start_queue(priv->dev);
-+ barrier();
-+ atomic_dec(&priv->reset_pending);
-+
-+ for (i = 0; i < CPMAC_QUEUES; i++) {
-+ netif_wake_subqueue(priv->dev, i);
-+ }
-+ netif_wake_queue(priv->dev);
-+ cpmac_write(priv->regs, CPMAC_MAC_INT_ENABLE, 3);
-+}
-+
-+static void cpmac_check_status(struct net_device *dev)
-+{
-+ struct cpmac_priv *priv = netdev_priv(dev);
-+
-+ u32 macstatus = cpmac_read(priv->regs, CPMAC_MAC_STATUS);
-+ int rx_channel = (macstatus >> 8) & 7;
-+ int rx_code = (macstatus >> 12) & 15;
-+ int tx_channel = (macstatus >> 16) & 7;
-+ int tx_code = (macstatus >> 20) & 15;
-+
-+ if (rx_code || tx_code) {
-+ if (netif_msg_drv(priv) && net_ratelimit()) {
-+ /* Can't find any documentation on what these error codes actually are.
-+ * So just log them and hope..
-+ */
-+ if (rx_code)
-+ printk(KERN_WARNING "%s: host error %d on rx channel %d (macstatus %08x), resetting\n",
-+ dev->name, rx_code, rx_channel, macstatus);
-+ if (tx_code)
-+ printk(KERN_WARNING "%s: host error %d on tx channel %d (macstatus %08x), resetting\n",
-+ dev->name, tx_code, tx_channel, macstatus);
-+ }
-+
-+ netif_stop_queue(dev);
-+ cpmac_hw_stop(dev);
-+ if (schedule_work(&priv->reset_work))
-+ atomic_inc(&priv->reset_pending);
-+ if (unlikely(netif_msg_hw(priv)))
-+ cpmac_dump_regs(dev);
-+ }
-+ cpmac_write(priv->regs, CPMAC_MAC_INT_CLEAR, 0xff);
- }
-
- static irqreturn_t cpmac_irq(int irq, void *dev_id)
-@@ -661,9 +705,6 @@ static irqreturn_t cpmac_irq(int irq, vo
- int queue;
- u32 status;
-
-- if (!dev)
-- return IRQ_NONE;
--
- priv = netdev_priv(dev);
-
- status = cpmac_read(priv->regs, CPMAC_MAC_INT_VECTOR);
-@@ -685,49 +726,33 @@ static irqreturn_t cpmac_irq(int irq, vo
-
- cpmac_write(priv->regs, CPMAC_MAC_EOI_VECTOR, 0);
-
-- if (unlikely(status & (MAC_INT_HOST | MAC_INT_STATUS))) {
-- if (netif_msg_drv(priv) && net_ratelimit())
-- printk(KERN_ERR "%s: hw error, resetting...\n",
-- dev->name);
-- netif_stop_queue(dev);
-- napi_disable(&priv->napi);
-- cpmac_hw_stop(dev);
-- schedule_work(&priv->reset_work);
-- if (unlikely(netif_msg_hw(priv)))
-- cpmac_dump_regs(dev);
-- }
-+ if (unlikely(status & (MAC_INT_HOST | MAC_INT_STATUS)))
-+ cpmac_check_status(dev);
-
- return IRQ_HANDLED;
- }
-
- static void cpmac_tx_timeout(struct net_device *dev)
- {
-- struct cpmac_priv *priv = netdev_priv(dev);
- int i;
-+ struct cpmac_priv *priv = netdev_priv(dev);
-
- spin_lock(&priv->lock);
- dev->stats.tx_errors++;
- spin_unlock(&priv->lock);
- if (netif_msg_tx_err(priv) && net_ratelimit())
- printk(KERN_WARNING "%s: transmit timeout\n", dev->name);
-- /*
-- * FIXME: waking up random queue is not the best thing to
-- * do... on the other hand why we got here at all?
-- */
--#ifdef CONFIG_NETDEVICES_MULTIQUEUE
-- for (i = 0; i < CPMAC_QUEUES; i++)
-- if (priv->desc_ring[i].skb) {
-- priv->desc_ring[i].dataflags = 0;
-- dev_kfree_skb_any(priv->desc_ring[i].skb);
-- netif_wake_subqueue(dev, i);
-- break;
-- }
--#else
-- priv->desc_ring[0].dataflags = 0;
-- if (priv->desc_ring[0].skb)
-- dev_kfree_skb_any(priv->desc_ring[0].skb);
-- netif_wake_queue(dev);
--#endif
-+
-+ atomic_inc(&priv->reset_pending);
-+ barrier();
-+ cpmac_clear_tx(dev);
-+ barrier();
-+ atomic_dec(&priv->reset_pending);
-+
-+ netif_wake_queue(priv->dev);
-+ for (i = 0; i < CPMAC_QUEUES; i++) {
-+ netif_wake_subqueue(dev, i);
-+ }
- }
-
- static int cpmac_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
-@@ -848,15 +873,6 @@ static void cpmac_adjust_link(struct net
- spin_unlock(&priv->lock);
- }
-
--static int cpmac_link_update(struct net_device *dev,
-- struct fixed_phy_status *status)
--{
-- status->link = 1;
-- status->speed = 100;
-- status->duplex = 1;
-- return 0;
--}
--
- static int cpmac_open(struct net_device *dev)
- {
- int i, size, res;
-@@ -923,6 +939,7 @@ static int cpmac_open(struct net_device
- goto fail_irq;
- }
-
-+ atomic_set(&priv->reset_pending, 0);
- INIT_WORK(&priv->reset_work, cpmac_hw_error);
- cpmac_hw_start(dev);
-
-@@ -999,11 +1016,11 @@ static int external_switch;
- static int __devinit cpmac_probe(struct platform_device *pdev)
- {
- int rc, phy_id, i;
-+ int mdio_bus_id = cpmac_mii.id;
- struct resource *mem;
- struct cpmac_priv *priv;
- struct net_device *dev;
- struct plat_cpmac_data *pdata;
-- struct fixed_info *fixed_phy;
- DECLARE_MAC_BUF(mac);
-
- pdata = pdev->dev.platform_data;
-@@ -1017,9 +1034,23 @@ static int __devinit cpmac_probe(struct
- }
-
- if (phy_id == PHY_MAX_ADDR) {
-- if (external_switch || dumb_switch)
-+ if (external_switch || dumb_switch) {
-+ struct fixed_phy_status status = {};
-+
-+ mdio_bus_id = 0;
-+
-+ /*
-+ * FIXME: this should be in the platform code!
-+ * Since there is not platform code at all (that is,
-+ * no mainline users of that driver), place it here
-+ * for now.
-+ */
- phy_id = 0;
-- else {
-+ status.link = 1;
-+ status.duplex = 1;
-+ status.speed = 100;
-+ fixed_phy_add(PHY_POLL, phy_id, &status);
-+ } else {
- printk(KERN_ERR "cpmac: no PHY present\n");
- return -ENODEV;
- }
-@@ -1063,32 +1094,8 @@ static int __devinit cpmac_probe(struct
- priv->msg_enable = netif_msg_init(debug_level, 0xff);
- memcpy(dev->dev_addr, pdata->dev_addr, sizeof(dev->dev_addr));
-
-- if (phy_id == 31) {
-- snprintf(priv->phy_name, BUS_ID_SIZE, PHY_ID_FMT, cpmac_mii.id,
-- phy_id);
-- } else {
-- /* Let's try to get a free fixed phy... */
-- for (i = 0; i < MAX_PHY_AMNT; i++) {
-- fixed_phy = fixed_mdio_get_phydev(i);
-- if (!fixed_phy)
-- continue;
-- if (!fixed_phy->phydev->attached_dev) {
-- strncpy(priv->phy_name,
-- fixed_phy->phydev->dev.bus_id,
-- BUS_ID_SIZE);
-- fixed_mdio_set_link_update(fixed_phy->phydev,
-- &cpmac_link_update);
-- goto phy_found;
-- }
-- }
-- if (netif_msg_drv(priv))
-- printk(KERN_ERR "%s: Could not find fixed PHY\n",
-- dev->name);
-- rc = -ENODEV;
-- goto fail;
-- }
-+ snprintf(priv->phy_name, BUS_ID_SIZE, PHY_ID_FMT, mdio_bus_id, phy_id);
-
--phy_found:
- priv->phy = phy_connect(dev, priv->phy_name, &cpmac_adjust_link, 0,
- PHY_INTERFACE_MODE_MII);
- if (IS_ERR(priv->phy)) {
diff --git a/target/linux/ar7/patches-2.6.24/150-cpmac_up_and_running.diff b/target/linux/ar7/patches-2.6.24/150-cpmac_up_and_running.diff
deleted file mode 100644
index c2fb478c4..000000000
--- a/target/linux/ar7/patches-2.6.24/150-cpmac_up_and_running.diff
+++ /dev/null
@@ -1,95 +0,0 @@
-From 0daaa095cefd9d7091a7ccce2ff89f1ff4feae7a Mon Sep 17 00:00:00 2001
-From: Anton Vorontsov <avorontsov@ru.mvista.com>
-Date: Wed, 5 Mar 2008 14:52:26 +0300
-Subject: [PATCH] AR7/cpmac: convert to new fixed phy infrastructure, now for real
-
-This patch converts platform code to register fixed phys early.
-cpmac driver modified to blindly accept fixed phy id (that is equal
-to platform device id).
-
-Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
----
- arch/mips/ar7/platform.c | 17 +++++++++++++++++
- drivers/net/cpmac.c | 19 +++----------------
- 2 files changed, 20 insertions(+), 16 deletions(-)
-
-Index: linux-2.6.24.7/arch/mips/ar7/platform.c
-===================================================================
---- linux-2.6.24.7.orig/arch/mips/ar7/platform.c
-+++ linux-2.6.24.7/arch/mips/ar7/platform.c
-@@ -33,6 +33,8 @@
- #include <linux/vlynq.h>
- #include <linux/leds.h>
- #include <linux/string.h>
-+#include <linux/phy.h>
-+#include <linux/phy_fixed.h>
-
- #include <asm/addrspace.h>
- #include <asm/ar7/ar7.h>
-@@ -205,6 +207,13 @@ static struct physmap_flash_data physmap
- .width = 2,
- };
-
-+/* lets assume this is suitable for both high and low cpmacs links */
-+static struct fixed_phy_status fixed_phy_status __initdata = {
-+ .link = 1,
-+ .speed = 100,
-+ .duplex = 1,
-+};
-+
- static struct plat_cpmac_data cpmac_low_data = {
- .reset_bit = 17,
- .power_bit = 20,
-@@ -506,6 +515,10 @@ static int __init ar7_register_devices(v
- }
-
- if (ar7_has_high_cpmac()) {
-+ res = fixed_phy_add(PHY_POLL, cpmac_high.id, &fixed_phy_status);
-+ if (res && res != -ENODEV)
-+ return res;
-+
- cpmac_get_mac(1, cpmac_high_data.dev_addr);
- res = platform_device_register(&cpmac_high);
- if (res)
-@@ -514,6 +527,10 @@ static int __init ar7_register_devices(v
- cpmac_low_data.phy_mask = 0xffffffff;
- }
-
-+ res = fixed_phy_add(PHY_POLL, cpmac_low.id, &fixed_phy_status);
-+ if (res && res != -ENODEV)
-+ return res;
-+
- cpmac_get_mac(0, cpmac_low_data.dev_addr);
- res = platform_device_register(&cpmac_low);
- if (res)
-Index: linux-2.6.24.7/drivers/net/cpmac.c
-===================================================================
---- linux-2.6.24.7.orig/drivers/net/cpmac.c
-+++ linux-2.6.24.7/drivers/net/cpmac.c
-@@ -1035,23 +1035,10 @@ static int __devinit cpmac_probe(struct
-
- if (phy_id == PHY_MAX_ADDR) {
- if (external_switch || dumb_switch) {
-- struct fixed_phy_status status = {};
--
-- mdio_bus_id = 0;
--
-- /*
-- * FIXME: this should be in the platform code!
-- * Since there is not platform code at all (that is,
-- * no mainline users of that driver), place it here
-- * for now.
-- */
-- phy_id = 0;
-- status.link = 1;
-- status.duplex = 1;
-- status.speed = 100;
-- fixed_phy_add(PHY_POLL, phy_id, &status);
-+ mdio_bus_id = 0; /* fixed phys bus */
-+ phy_id = pdev->id;
- } else {
-- printk(KERN_ERR "cpmac: no PHY present\n");
-+ dev_err(&pdev->dev, "no PHY present\n");
- return -ENODEV;
- }
- }
diff --git a/target/linux/ar7/patches-2.6.24/160-cpmac-rx-ring-use-eoq.diff b/target/linux/ar7/patches-2.6.24/160-cpmac-rx-ring-use-eoq.diff
deleted file mode 100644
index 2fb71cd4b..000000000
--- a/target/linux/ar7/patches-2.6.24/160-cpmac-rx-ring-use-eoq.diff
+++ /dev/null
@@ -1,180 +0,0 @@
-Index: linux-2.6.24.7/drivers/net/cpmac.c
-===================================================================
---- linux-2.6.24.7.orig/drivers/net/cpmac.c
-+++ linux-2.6.24.7/drivers/net/cpmac.c
-@@ -187,6 +187,7 @@ struct cpmac_desc {
- #define CPMAC_EOQ 0x1000
- struct sk_buff *skb;
- struct cpmac_desc *next;
-+ struct cpmac_desc *prev;
- dma_addr_t mapping;
- dma_addr_t data_mapping;
- };
-@@ -242,6 +243,16 @@ static void cpmac_dump_desc(struct net_d
- printk("\n");
- }
-
-+static void cpmac_dump_all_desc(struct net_device *dev)
-+{
-+ struct cpmac_priv *priv = netdev_priv(dev);
-+ struct cpmac_desc *dump = priv->rx_head;
-+ do {
-+ cpmac_dump_desc(dev, dump);
-+ dump = dump->next;
-+ } while (dump != priv->rx_head);
-+}
-+
- static void cpmac_dump_skb(struct net_device *dev, struct sk_buff *skb)
- {
- int i;
-@@ -413,21 +424,40 @@ static struct sk_buff *cpmac_rx_one(stru
- static int cpmac_poll(struct napi_struct *napi, int budget)
- {
- struct sk_buff *skb;
-- struct cpmac_desc *desc;
-- int received = 0;
-+ struct cpmac_desc *desc, *restart;
- struct cpmac_priv *priv = container_of(napi, struct cpmac_priv, napi);
-+ int received = 0, processed = 0;
-
- spin_lock(&priv->rx_lock);
- if (unlikely(!priv->rx_head)) {
- if (netif_msg_rx_err(priv) && net_ratelimit())
- printk(KERN_WARNING "%s: rx: polling, but no queue\n",
- priv->dev->name);
-+ spin_unlock(&priv->rx_lock);
- netif_rx_complete(priv->dev, napi);
- return 0;
- }
-
- desc = priv->rx_head;
-+ restart = NULL;
- while (((desc->dataflags & CPMAC_OWN) == 0) && (received < budget)) {
-+ processed++;
-+
-+ if ((desc->dataflags & CPMAC_EOQ) != 0) {
-+ /* The last update to eoq->hw_next didn't happen soon enough, and the
-+ * receiver stopped here. Remember this descriptor so we can restart
-+ * the receiver after freeing some space.
-+ */
-+ if (unlikely(restart)) {
-+ if (netif_msg_rx_err(priv))
-+ printk(KERN_ERR "%s: poll found a duplicate EOQ: %p and %p\n",
-+ priv->dev->name, restart, desc);
-+ goto fatal_error;
-+ }
-+
-+ restart = desc->next;
-+ }
-+
- skb = cpmac_rx_one(priv, desc);
- if (likely(skb)) {
- netif_receive_skb(skb);
-@@ -436,19 +466,81 @@ static int cpmac_poll(struct napi_struct
- desc = desc->next;
- }
-
-+ if (desc != priv->rx_head) {
-+ /* We freed some buffers, but not the whole ring, add what we did free to the rx list */
-+ desc->prev->hw_next = (u32)0;
-+ priv->rx_head->prev->hw_next = priv->rx_head->mapping;
-+ }
-+
-+ /* Optimization: If we did not actually process an EOQ (perhaps because of
-+ * quota limits), check to see if the tail of the queue has EOQ set. We
-+ * should immediately restart in that case so that the receiver can restart
-+ * and run in parallel with more packet processing. This lets us handle slightly
-+ * larger bursts before running out of ring space (assuming dev->weight < ring_size)
-+ */
-+ if (!restart &&
-+ (priv->rx_head->prev->dataflags & (CPMAC_OWN|CPMAC_EOQ)) == CPMAC_EOQ &&
-+ (priv->rx_head->dataflags & CPMAC_OWN) != 0) {
-+ /* reset EOQ so the poll loop (above) doesn't try to restart this when it
-+ * eventually gets to this descriptor.
-+ */
-+ priv->rx_head->prev->dataflags &= ~CPMAC_EOQ;
-+ restart = priv->rx_head;
-+ }
-+
-+ if (restart) {
-+ priv->dev->stats.rx_errors++;
-+ priv->dev->stats.rx_fifo_errors++;
-+ if (netif_msg_rx_err(priv) && net_ratelimit())
-+ printk(KERN_WARNING "%s: rx dma ring overrun\n", priv->dev->name);
-+
-+ if (unlikely((restart->dataflags & CPMAC_OWN) == 0)) {
-+ if (netif_msg_drv(priv))
-+ printk(KERN_ERR "%s: cpmac_poll is trying to restart rx from a descriptor that's not free: %p\n",
-+ priv->dev->name, restart);
-+ goto fatal_error;
-+ }
-+
-+ cpmac_write(priv->regs, CPMAC_RX_PTR(0), restart->mapping);
-+ }
-+
- priv->rx_head = desc;
- spin_unlock(&priv->rx_lock);
- if (unlikely(netif_msg_rx_status(priv)))
- printk(KERN_DEBUG "%s: poll processed %d packets\n",
- priv->dev->name, received);
-- if (desc->dataflags & CPMAC_OWN) {
-+ if (processed == 0) {
-+ /* we ran out of packets to read, revert to interrupt-driven mode */
- netif_rx_complete(priv->dev, napi);
-- cpmac_write(priv->regs, CPMAC_RX_PTR(0), (u32)desc->mapping);
- cpmac_write(priv->regs, CPMAC_RX_INT_ENABLE, 1);
- return 0;
- }
-
- return 1;
-+
-+fatal_error:
-+ /* Something went horribly wrong. Reset hardware to try to recover rather than wedging. */
-+
-+ if (netif_msg_drv(priv)) {
-+ printk(KERN_ERR "%s: cpmac_poll is confused. Resetting hardware\n", priv->dev->name);
-+ cpmac_dump_all_desc(priv->dev);
-+ printk(KERN_DEBUG "%s: RX_PTR(0)=0x%08x RX_ACK(0)=0x%08x\n",
-+ priv->dev->name,
-+ cpmac_read(priv->regs, CPMAC_RX_PTR(0)),
-+ cpmac_read(priv->regs, CPMAC_RX_ACK(0)));
-+ }
-+
-+ spin_unlock(&priv->rx_lock);
-+ netif_rx_complete(priv->dev, napi);
-+ netif_stop_queue(priv->dev);
-+ napi_disable(&priv->napi);
-+
-+ atomic_inc(&priv->reset_pending);
-+ cpmac_hw_stop(priv->dev);
-+ if (!schedule_work(&priv->reset_work))
-+ atomic_dec(&priv->reset_pending);
-+ return 0;
-+
- }
-
- static int cpmac_start_xmit(struct sk_buff *skb, struct net_device *dev)
-@@ -625,8 +717,10 @@ static void cpmac_clear_rx(struct net_de
- desc->dataflags = CPMAC_OWN;
- dev->stats.rx_dropped++;
- }
-+ desc->hw_next = desc->next->mapping;
- desc = desc->next;
- }
-+ priv->rx_head->prev->hw_next = 0;
- }
-
- static void cpmac_clear_tx(struct net_device *dev)
-@@ -928,9 +1022,12 @@ static int cpmac_open(struct net_device
- desc->buflen = CPMAC_SKB_SIZE;
- desc->dataflags = CPMAC_OWN;
- desc->next = &priv->rx_head[(i + 1) % priv->ring_size];
-+ desc->next->prev = desc;
- desc->hw_next = (u32)desc->next->mapping;
- }
-
-+ priv->rx_head->prev->hw_next = (u32)0;
-+
- if ((res = request_irq(dev->irq, cpmac_irq, IRQF_SHARED,
- dev->name, dev))) {
- if (netif_msg_drv(priv))
diff --git a/target/linux/ar7/patches-2.6.24/170-cpmac_eth_fix.patch b/target/linux/ar7/patches-2.6.24/170-cpmac_eth_fix.patch
deleted file mode 100644
index bebd453cc..000000000
--- a/target/linux/ar7/patches-2.6.24/170-cpmac_eth_fix.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Index: linux-2.6.24.7/drivers/net/cpmac.c
-===================================================================
---- linux-2.6.24.7.orig/drivers/net/cpmac.c
-+++ linux-2.6.24.7/drivers/net/cpmac.c
-@@ -1178,9 +1178,7 @@ static int __devinit cpmac_probe(struct
- priv->msg_enable = netif_msg_init(debug_level, 0xff);
- memcpy(dev->dev_addr, pdata->dev_addr, sizeof(dev->dev_addr));
-
-- snprintf(priv->phy_name, BUS_ID_SIZE, PHY_ID_FMT, mdio_bus_id, phy_id);
--
-- priv->phy = phy_connect(dev, priv->phy_name, &cpmac_adjust_link, 0,
-+ priv->phy = phy_connect(dev, cpmac_mii.phy_map[phy_id]->dev.bus_id, &cpmac_adjust_link, 0,
- PHY_INTERFACE_MODE_MII);
- if (IS_ERR(priv->phy)) {
- if (netif_msg_drv(priv))
diff --git a/target/linux/ar7/patches-2.6.24/500-serial_kludge.patch b/target/linux/ar7/patches-2.6.24/500-serial_kludge.patch
deleted file mode 100644
index a66bc8ad8..000000000
--- a/target/linux/ar7/patches-2.6.24/500-serial_kludge.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-Index: linux-2.6.24.7/drivers/serial/8250.c
-===================================================================
---- linux-2.6.24.7.orig/drivers/serial/8250.c
-+++ linux-2.6.24.7/drivers/serial/8250.c
-@@ -267,6 +267,13 @@ static const struct serial8250_config ua
- .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
- .flags = UART_CAP_FIFO,
- },
-+ [PORT_AR7] = {
-+ .name = "TI-AR7",
-+ .fifo_size = 16,
-+ .tx_loadsz = 16,
-+ .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_00,
-+ .flags = UART_CAP_FIFO | UART_CAP_AFE,
-+ },
- };
-
- #if defined (CONFIG_SERIAL_8250_AU1X00)
-@@ -2453,7 +2460,11 @@ static void serial8250_console_putchar(s
- {
- struct uart_8250_port *up = (struct uart_8250_port *)port;
-
-+#ifdef CONFIG_AR7
-+ wait_for_xmitr(up, BOTH_EMPTY);
-+#else
- wait_for_xmitr(up, UART_LSR_THRE);
-+#endif
- serial_out(up, UART_TX, ch);
- }
-
-Index: linux-2.6.24.7/include/linux/serial_core.h
-===================================================================
---- linux-2.6.24.7.orig/include/linux/serial_core.h
-+++ linux-2.6.24.7/include/linux/serial_core.h
-@@ -40,7 +40,8 @@
- #define PORT_NS16550A 14
- #define PORT_XSCALE 15
- #define PORT_RM9000 16 /* PMC-Sierra RM9xxx internal UART */
--#define PORT_MAX_8250 16 /* max port ID */
-+#define PORT_AR7 17
-+#define PORT_MAX_8250 17 /* max port ID */
-
- /*
- * ARM specific type numbers. These are not currently guaranteed
diff --git a/target/linux/ar7/patches-2.6.24/900-temporary_cpmac_hack.diff b/target/linux/ar7/patches-2.6.24/900-temporary_cpmac_hack.diff
deleted file mode 100644
index dfd1a6747..000000000
--- a/target/linux/ar7/patches-2.6.24/900-temporary_cpmac_hack.diff
+++ /dev/null
@@ -1,29 +0,0 @@
-Index: linux-2.6.24.7/drivers/net/cpmac.c
-===================================================================
---- linux-2.6.24.7.orig/drivers/net/cpmac.c
-+++ linux-2.6.24.7/drivers/net/cpmac.c
-@@ -936,7 +936,8 @@ static void cpmac_adjust_link(struct net
- int new_state = 0;
-
- spin_lock(&priv->lock);
-- if (priv->phy->link) {
-+ if (1 /* priv->phy->link */ ) {
-+ netif_carrier_on(dev);
- netif_start_queue(dev);
- if (priv->phy->duplex != priv->oldduplex) {
- new_state = 1;
-@@ -948,11 +949,11 @@ static void cpmac_adjust_link(struct net
- priv->oldspeed = priv->phy->speed;
- }
-
-- if (!priv->oldlink) {
-+ /*if (!priv->oldlink) {
- new_state = 1;
-- priv->oldlink = 1;
-+ priv->oldlink = 1;*/
- netif_schedule(dev);
-- }
-+ /*}*/
- } else if (priv->oldlink) {
- netif_stop_queue(dev);
- new_state = 1;
diff --git a/target/linux/ar7/patches-2.6.25/100-board_support.patch b/target/linux/ar7/patches-2.6.25/100-board_support.patch
deleted file mode 100644
index 658a80e51..000000000
--- a/target/linux/ar7/patches-2.6.25/100-board_support.patch
+++ /dev/null
@@ -1,86 +0,0 @@
---- a/arch/mips/Kconfig
-+++ b/arch/mips/Kconfig
-@@ -18,6 +18,24 @@
- prompt "System type"
- default SGI_IP22
-
-+config AR7
-+ bool "Texas Instruments AR7"
-+ select BOOT_ELF32
-+ select DMA_NONCOHERENT
-+ select CEVT_R4K
-+ select CSRC_R4K
-+ select IRQ_CPU
-+ select NO_EXCEPT_FILL
-+ select SWAP_IO_SPACE
-+ select SYS_HAS_CPU_MIPS32_R1
-+ select SYS_HAS_EARLY_PRINTK
-+ select SYS_SUPPORTS_32BIT_KERNEL
-+ select SYS_SUPPORTS_KGDB
-+ select SYS_SUPPORTS_LITTLE_ENDIAN
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ select GENERIC_GPIO
-+ select GENERIC_HARDIRQS_NO__DO_IRQ
-+
- config MACH_ALCHEMY
- bool "Alchemy processor based machines"
-
---- a/arch/mips/kernel/traps.c
-+++ b/arch/mips/kernel/traps.c
-@@ -1112,9 +1112,22 @@
-
- exception_handlers[n] = handler;
- if (n == 0 && cpu_has_divec) {
-- *(u32 *)(ebase + 0x200) = 0x08000000 |
-- (0x03ffffff & (handler >> 2));
-- flush_icache_range(ebase + 0x200, ebase + 0x204);
-+ if ((handler ^ (ebase + 4)) & 0xfc000000) {
-+ /* lui k0, 0x0000 */
-+ *(u32 *)(ebase + 0x200) = 0x3c1a0000 | (handler >> 16);
-+ /* ori k0, 0x0000 */
-+ *(u32 *)(ebase + 0x204) =
-+ 0x375a0000 | (handler & 0xffff);
-+ /* jr k0 */
-+ *(u32 *)(ebase + 0x208) = 0x03400008;
-+ /* nop */
-+ *(u32 *)(ebase + 0x20C) = 0x00000000;
-+ flush_icache_range(ebase + 0x200, ebase + 0x210);
-+ } else {
-+ *(u32 *)(ebase + 0x200) =
-+ 0x08000000 | (0x03ffffff & (handler >> 2));
-+ flush_icache_range(ebase + 0x200, ebase + 0x204);
-+ }
- }
- return (void *)old_handler;
- }
---- a/arch/mips/Makefile
-+++ b/arch/mips/Makefile
-@@ -167,6 +167,13 @@
- #
-
- #
-+# Texas Instruments AR7
-+#
-+core-$(CONFIG_AR7) += arch/mips/ar7/
-+cflags-$(CONFIG_AR7) += -Iinclude/asm-mips/ar7
-+load-$(CONFIG_AR7) += 0xffffffff94100000
-+
-+#
- # Acer PICA 61, Mips Magnum 4000 and Olivetti M700.
- #
- core-$(CONFIG_MACH_JAZZ) += arch/mips/jazz/
---- a/include/asm-mips/page.h
-+++ b/include/asm-mips/page.h
-@@ -182,8 +182,10 @@
- #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
- VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
-
--#define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE)
--#define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET)
-+#define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE + \
-+ PHYS_OFFSET)
-+#define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET - \
-+ PHYS_OFFSET)
-
- #include <asm-generic/memory_model.h>
- #include <asm-generic/page.h>
diff --git a/target/linux/ar7/patches-2.6.25/110-flash.patch b/target/linux/ar7/patches-2.6.25/110-flash.patch
deleted file mode 100644
index 5f6b8f1df..000000000
--- a/target/linux/ar7/patches-2.6.25/110-flash.patch
+++ /dev/null
@@ -1,37 +0,0 @@
---- a/drivers/mtd/Kconfig
-+++ b/drivers/mtd/Kconfig
-@@ -168,6 +168,12 @@
- the partition map from the children of the flash node,
- as described in Documentation/powerpc/booting-without-of.txt.
-
-+config MTD_AR7_PARTS
-+ tristate "TI AR7 partitioning support"
-+ depends on MTD_PARTITIONS
-+ ---help---
-+ TI AR7 partitioning support
-+
- comment "User Modules And Translation Layers"
-
- config MTD_CHAR
---- a/drivers/mtd/Makefile
-+++ b/drivers/mtd/Makefile
-@@ -12,6 +12,7 @@
- obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o
- obj-$(CONFIG_MTD_AFS_PARTS) += afs.o
- obj-$(CONFIG_MTD_OF_PARTS) += ofpart.o
-+obj-$(CONFIG_MTD_AR7_PARTS) += ar7part.o
-
- # 'Users' - code which presents functionality to userspace.
- obj-$(CONFIG_MTD_CHAR) += mtdchar.o
---- a/drivers/mtd/maps/physmap.c
-+++ b/drivers/mtd/maps/physmap.c
-@@ -87,7 +87,8 @@
-
- static const char *rom_probe_types[] = { "cfi_probe", "jedec_probe", "map_rom", NULL };
- #ifdef CONFIG_MTD_PARTITIONS
--static const char *part_probe_types[] = { "cmdlinepart", "RedBoot", NULL };
-+static const char *part_probe_types[] = {"cmdlinepart", "RedBoot",
-+ "ar7part", NULL };
- #endif
-
- static int physmap_flash_probe(struct platform_device *dev)
diff --git a/target/linux/ar7/patches-2.6.25/120-gpio_chrdev.patch b/target/linux/ar7/patches-2.6.25/120-gpio_chrdev.patch
deleted file mode 100644
index cd5d744de..000000000
--- a/target/linux/ar7/patches-2.6.25/120-gpio_chrdev.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- a/drivers/char/Kconfig
-+++ b/drivers/char/Kconfig
-@@ -913,6 +913,15 @@
- To compile this driver as a module, choose M here: the
- module will be called mwave.
-
-+config AR7_GPIO
-+ tristate "TI AR7 GPIO Support"
-+ depends on AR7
-+ help
-+ Give userspace access to the GPIO pins on the Texas Instruments AR7
-+ processors.
-+
-+ If compiled as a module, it will be called ar7_gpio.
-+
- config SCx200_GPIO
- tristate "NatSemi SCx200 GPIO Support"
- depends on SCx200
---- a/drivers/char/Makefile
-+++ b/drivers/char/Makefile
-@@ -90,6 +90,7 @@
- obj-$(CONFIG_PPDEV) += ppdev.o
- obj-$(CONFIG_NWBUTTON) += nwbutton.o
- obj-$(CONFIG_NWFLASH) += nwflash.o
-+obj-$(CONFIG_AR7_GPIO) += ar7_gpio.o
- obj-$(CONFIG_SCx200_GPIO) += scx200_gpio.o
- obj-$(CONFIG_PC8736x_GPIO) += pc8736x_gpio.o
- obj-$(CONFIG_NSC_GPIO) += nsc_gpio.o
diff --git a/target/linux/ar7/patches-2.6.25/130-vlynq.patch b/target/linux/ar7/patches-2.6.25/130-vlynq.patch
deleted file mode 100644
index f92525857..000000000
--- a/target/linux/ar7/patches-2.6.25/130-vlynq.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/drivers/Kconfig
-+++ b/drivers/Kconfig
-@@ -97,4 +97,6 @@
- source "drivers/auxdisplay/Kconfig"
-
- source "drivers/uio/Kconfig"
-+
-+source "drivers/vlynq/Kconfig"
- endmenu
---- a/drivers/Makefile
-+++ b/drivers/Makefile
-@@ -91,5 +91,6 @@
- obj-$(CONFIG_HID) += hid/
- obj-$(CONFIG_PPC_PS3) += ps3/
- obj-$(CONFIG_OF) += of/
-+obj-$(CONFIG_VLYNQ) += vlynq/
- obj-$(CONFIG_SSB) += ssb/
- obj-$(CONFIG_VIRTIO) += virtio/
diff --git a/target/linux/ar7/patches-2.6.25/140-cpmac_fix.patch b/target/linux/ar7/patches-2.6.25/140-cpmac_fix.patch
deleted file mode 100644
index f6f29eb82..000000000
--- a/target/linux/ar7/patches-2.6.25/140-cpmac_fix.patch
+++ /dev/null
@@ -1,167 +0,0 @@
---- a/drivers/net/cpmac.c
-+++ b/drivers/net/cpmac.c
-@@ -38,6 +38,7 @@
- #include <linux/platform_device.h>
- #include <linux/dma-mapping.h>
- #include <asm/gpio.h>
-+#include <asm/atomic.h>
-
- MODULE_AUTHOR("Eugene Konev <ejka@imfi.kspu.ru>");
- MODULE_DESCRIPTION("TI AR7 ethernet driver (CPMAC)");
-@@ -207,6 +208,7 @@
- struct work_struct reset_work;
- struct platform_device *pdev;
- struct napi_struct napi;
-+ atomic_t reset_pending;
- };
-
- static irqreturn_t cpmac_irq(int, void *);
-@@ -455,6 +457,9 @@
- struct cpmac_desc *desc;
- struct cpmac_priv *priv = netdev_priv(dev);
-
-+ if (unlikely(atomic_read(&priv->reset_pending)))
-+ return NETDEV_TX_BUSY;
-+
- if (unlikely(skb_padto(skb, ETH_ZLEN)))
- return NETDEV_TX_OK;
-
-@@ -634,14 +639,14 @@
- priv->desc_ring[i].dataflags = 0;
- if (priv->desc_ring[i].skb) {
- dev_kfree_skb_any(priv->desc_ring[i].skb);
-- if (netif_subqueue_stopped(dev, i))
-- netif_wake_subqueue(dev, i);
-+ priv->desc_ring[i].skb = NULL;
- }
- }
- }
-
- static void cpmac_hw_error(struct work_struct *work)
- {
-+ int i;
- struct cpmac_priv *priv =
- container_of(work, struct cpmac_priv, reset_work);
-
-@@ -650,8 +655,47 @@
- spin_unlock(&priv->rx_lock);
- cpmac_clear_tx(priv->dev);
- cpmac_hw_start(priv->dev);
-- napi_enable(&priv->napi);
-- netif_start_queue(priv->dev);
-+ barrier();
-+ atomic_dec(&priv->reset_pending);
-+
-+ for (i = 0; i < CPMAC_QUEUES; i++) {
-+ netif_wake_subqueue(priv->dev, i);
-+ }
-+ netif_wake_queue(priv->dev);
-+ cpmac_write(priv->regs, CPMAC_MAC_INT_ENABLE, 3);
-+}
-+
-+static void cpmac_check_status(struct net_device *dev)
-+{
-+ struct cpmac_priv *priv = netdev_priv(dev);
-+
-+ u32 macstatus = cpmac_read(priv->regs, CPMAC_MAC_STATUS);
-+ int rx_channel = (macstatus >> 8) & 7;
-+ int rx_code = (macstatus >> 12) & 15;
-+ int tx_channel = (macstatus >> 16) & 7;
-+ int tx_code = (macstatus >> 20) & 15;
-+
-+ if (rx_code || tx_code) {
-+ if (netif_msg_drv(priv) && net_ratelimit()) {
-+ /* Can't find any documentation on what these error codes actually are.
-+ * So just log them and hope..
-+ */
-+ if (rx_code)
-+ printk(KERN_WARNING "%s: host error %d on rx channel %d (macstatus %08x), resetting\n",
-+ dev->name, rx_code, rx_channel, macstatus);
-+ if (tx_code)
-+ printk(KERN_WARNING "%s: host error %d on tx channel %d (macstatus %08x), resetting\n",
-+ dev->name, tx_code, tx_channel, macstatus);
-+ }
-+
-+ netif_stop_queue(dev);
-+ cpmac_hw_stop(dev);
-+ if (schedule_work(&priv->reset_work))
-+ atomic_inc(&priv->reset_pending);
-+ if (unlikely(netif_msg_hw(priv)))
-+ cpmac_dump_regs(dev);
-+ }
-+ cpmac_write(priv->regs, CPMAC_MAC_INT_CLEAR, 0xff);
- }
-
- static irqreturn_t cpmac_irq(int irq, void *dev_id)
-@@ -682,49 +726,33 @@
-
- cpmac_write(priv->regs, CPMAC_MAC_EOI_VECTOR, 0);
-
-- if (unlikely(status & (MAC_INT_HOST | MAC_INT_STATUS))) {
-- if (netif_msg_drv(priv) && net_ratelimit())
-- printk(KERN_ERR "%s: hw error, resetting...\n",
-- dev->name);
-- netif_stop_queue(dev);
-- napi_disable(&priv->napi);
-- cpmac_hw_stop(dev);
-- schedule_work(&priv->reset_work);
-- if (unlikely(netif_msg_hw(priv)))
-- cpmac_dump_regs(dev);
-- }
-+ if (unlikely(status & (MAC_INT_HOST | MAC_INT_STATUS)))
-+ cpmac_check_status(dev);
-
- return IRQ_HANDLED;
- }
-
- static void cpmac_tx_timeout(struct net_device *dev)
- {
-- struct cpmac_priv *priv = netdev_priv(dev);
- int i;
-+ struct cpmac_priv *priv = netdev_priv(dev);
-
- spin_lock(&priv->lock);
- dev->stats.tx_errors++;
- spin_unlock(&priv->lock);
- if (netif_msg_tx_err(priv) && net_ratelimit())
- printk(KERN_WARNING "%s: transmit timeout\n", dev->name);
-- /*
-- * FIXME: waking up random queue is not the best thing to
-- * do... on the other hand why we got here at all?
-- */
--#ifdef CONFIG_NETDEVICES_MULTIQUEUE
-- for (i = 0; i < CPMAC_QUEUES; i++)
-- if (priv->desc_ring[i].skb) {
-- priv->desc_ring[i].dataflags = 0;
-- dev_kfree_skb_any(priv->desc_ring[i].skb);
-- netif_wake_subqueue(dev, i);
-- break;
-- }
--#else
-- priv->desc_ring[0].dataflags = 0;
-- if (priv->desc_ring[0].skb)
-- dev_kfree_skb_any(priv->desc_ring[0].skb);
-- netif_wake_queue(dev);
--#endif
-+
-+ atomic_inc(&priv->reset_pending);
-+ barrier();
-+ cpmac_clear_tx(dev);
-+ barrier();
-+ atomic_dec(&priv->reset_pending);
-+
-+ netif_wake_queue(priv->dev);
-+ for (i = 0; i < CPMAC_QUEUES; i++) {
-+ netif_wake_subqueue(dev, i);
-+ }
- }
-
- static int cpmac_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
-@@ -911,6 +939,7 @@
- goto fail_irq;
- }
-
-+ atomic_set(&priv->reset_pending, 0);
- INIT_WORK(&priv->reset_work, cpmac_hw_error);
- cpmac_hw_start(dev);
-
diff --git a/target/linux/ar7/patches-2.6.25/150-cpmac_not_broken.patch b/target/linux/ar7/patches-2.6.25/150-cpmac_not_broken.patch
deleted file mode 100644
index 6444cac88..000000000
--- a/target/linux/ar7/patches-2.6.25/150-cpmac_not_broken.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/drivers/net/Kconfig
-+++ b/drivers/net/Kconfig
-@@ -1874,7 +1874,7 @@
-
- config CPMAC
- tristate "TI AR7 CPMAC Ethernet support (EXPERIMENTAL)"
-- depends on NET_ETHERNET && EXPERIMENTAL && AR7 && BROKEN
-+ depends on NET_ETHERNET && EXPERIMENTAL && AR7
- select PHYLIB
- help
- TI AR7 CPMAC Ethernet support
diff --git a/target/linux/ar7/patches-2.6.25/150-cpmac_up_and_running.diff b/target/linux/ar7/patches-2.6.25/150-cpmac_up_and_running.diff
deleted file mode 100644
index f0f153bf3..000000000
--- a/target/linux/ar7/patches-2.6.25/150-cpmac_up_and_running.diff
+++ /dev/null
@@ -1,91 +0,0 @@
-From 0daaa095cefd9d7091a7ccce2ff89f1ff4feae7a Mon Sep 17 00:00:00 2001
-From: Anton Vorontsov <avorontsov@ru.mvista.com>
-Date: Wed, 5 Mar 2008 14:52:26 +0300
-Subject: [PATCH] AR7/cpmac: convert to new fixed phy infrastructure, now for real
-
-This patch converts platform code to register fixed phys early.
-cpmac driver modified to blindly accept fixed phy id (that is equal
-to platform device id).
-
-Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
----
- arch/mips/ar7/platform.c | 17 +++++++++++++++++
- drivers/net/cpmac.c | 19 +++----------------
- 2 files changed, 20 insertions(+), 16 deletions(-)
-
---- a/arch/mips/ar7/platform.c
-+++ b/arch/mips/ar7/platform.c
-@@ -33,6 +33,8 @@
- #include <linux/vlynq.h>
- #include <linux/leds.h>
- #include <linux/string.h>
-+#include <linux/phy.h>
-+#include <linux/phy_fixed.h>
-
- #include <asm/addrspace.h>
- #include <asm/ar7/ar7.h>
-@@ -205,6 +207,13 @@
- .width = 2,
- };
-
-+/* lets assume this is suitable for both high and low cpmacs links */
-+static struct fixed_phy_status fixed_phy_status __initdata = {
-+ .link = 1,
-+ .speed = 100,
-+ .duplex = 1,
-+};
-+
- static struct plat_cpmac_data cpmac_low_data = {
- .reset_bit = 17,
- .power_bit = 20,
-@@ -506,6 +515,10 @@
- }
-
- if (ar7_has_high_cpmac()) {
-+ res = fixed_phy_add(PHY_POLL, cpmac_high.id, &fixed_phy_status);
-+ if (res && res != -ENODEV)
-+ return res;
-+
- cpmac_get_mac(1, cpmac_high_data.dev_addr);
- res = platform_device_register(&cpmac_high);
- if (res)
-@@ -514,6 +527,10 @@
- cpmac_low_data.phy_mask = 0xffffffff;
- }
-
-+ res = fixed_phy_add(PHY_POLL, cpmac_low.id, &fixed_phy_status);
-+ if (res && res != -ENODEV)
-+ return res;
-+
- cpmac_get_mac(0, cpmac_low_data.dev_addr);
- res = platform_device_register(&cpmac_low);
- if (res)
---- a/drivers/net/cpmac.c
-+++ b/drivers/net/cpmac.c
-@@ -1035,23 +1035,10 @@
-
- if (phy_id == PHY_MAX_ADDR) {
- if (external_switch || dumb_switch) {
-- struct fixed_phy_status status = {};
--
-- mdio_bus_id = 0;
--
-- /*
-- * FIXME: this should be in the platform code!
-- * Since there is not platform code at all (that is,
-- * no mainline users of that driver), place it here
-- * for now.
-- */
-- phy_id = 0;
-- status.link = 1;
-- status.duplex = 1;
-- status.speed = 100;
-- fixed_phy_add(PHY_POLL, phy_id, &status);
-+ mdio_bus_id = 0; /* fixed phys bus */
-+ phy_id = pdev->id;
- } else {
-- printk(KERN_ERR "cpmac: no PHY present\n");
-+ dev_err(&pdev->dev, "no PHY present\n");
- return -ENODEV;
- }
- }
diff --git a/target/linux/ar7/patches-2.6.25/160-cpmac-rx-ring-use-eoq.diff b/target/linux/ar7/patches-2.6.25/160-cpmac-rx-ring-use-eoq.diff
deleted file mode 100644
index 24d70e7db..000000000
--- a/target/linux/ar7/patches-2.6.25/160-cpmac-rx-ring-use-eoq.diff
+++ /dev/null
@@ -1,178 +0,0 @@
---- a/drivers/net/cpmac.c
-+++ b/drivers/net/cpmac.c
-@@ -187,6 +187,7 @@
- #define CPMAC_EOQ 0x1000
- struct sk_buff *skb;
- struct cpmac_desc *next;
-+ struct cpmac_desc *prev;
- dma_addr_t mapping;
- dma_addr_t data_mapping;
- };
-@@ -242,6 +243,16 @@
- printk("\n");
- }
-
-+static void cpmac_dump_all_desc(struct net_device *dev)
-+{
-+ struct cpmac_priv *priv = netdev_priv(dev);
-+ struct cpmac_desc *dump = priv->rx_head;
-+ do {
-+ cpmac_dump_desc(dev, dump);
-+ dump = dump->next;
-+ } while (dump != priv->rx_head);
-+}
-+
- static void cpmac_dump_skb(struct net_device *dev, struct sk_buff *skb)
- {
- int i;
-@@ -413,21 +424,40 @@
- static int cpmac_poll(struct napi_struct *napi, int budget)
- {
- struct sk_buff *skb;
-- struct cpmac_desc *desc;
-- int received = 0;
-+ struct cpmac_desc *desc, *restart;
- struct cpmac_priv *priv = container_of(napi, struct cpmac_priv, napi);
-+ int received = 0, processed = 0;
-
- spin_lock(&priv->rx_lock);
- if (unlikely(!priv->rx_head)) {
- if (netif_msg_rx_err(priv) && net_ratelimit())
- printk(KERN_WARNING "%s: rx: polling, but no queue\n",
- priv->dev->name);
-+ spin_unlock(&priv->rx_lock);
- netif_rx_complete(priv->dev, napi);
- return 0;
- }
-
- desc = priv->rx_head;
-+ restart = NULL;
- while (((desc->dataflags & CPMAC_OWN) == 0) && (received < budget)) {
-+ processed++;
-+
-+ if ((desc->dataflags & CPMAC_EOQ) != 0) {
-+ /* The last update to eoq->hw_next didn't happen soon enough, and the
-+ * receiver stopped here. Remember this descriptor so we can restart
-+ * the receiver after freeing some space.
-+ */
-+ if (unlikely(restart)) {
-+ if (netif_msg_rx_err(priv))
-+ printk(KERN_ERR "%s: poll found a duplicate EOQ: %p and %p\n",
-+ priv->dev->name, restart, desc);
-+ goto fatal_error;
-+ }
-+
-+ restart = desc->next;
-+ }
-+
- skb = cpmac_rx_one(priv, desc);
- if (likely(skb)) {
- netif_receive_skb(skb);
-@@ -436,19 +466,81 @@
- desc = desc->next;
- }
-
-+ if (desc != priv->rx_head) {
-+ /* We freed some buffers, but not the whole ring, add what we did free to the rx list */
-+ desc->prev->hw_next = (u32)0;
-+ priv->rx_head->prev->hw_next = priv->rx_head->mapping;
-+ }
-+
-+ /* Optimization: If we did not actually process an EOQ (perhaps because of
-+ * quota limits), check to see if the tail of the queue has EOQ set. We
-+ * should immediately restart in that case so that the receiver can restart
-+ * and run in parallel with more packet processing. This lets us handle slightly
-+ * larger bursts before running out of ring space (assuming dev->weight < ring_size)
-+ */
-+ if (!restart &&
-+ (priv->rx_head->prev->dataflags & (CPMAC_OWN|CPMAC_EOQ)) == CPMAC_EOQ &&
-+ (priv->rx_head->dataflags & CPMAC_OWN) != 0) {
-+ /* reset EOQ so the poll loop (above) doesn't try to restart this when it
-+ * eventually gets to this descriptor.
-+ */
-+ priv->rx_head->prev->dataflags &= ~CPMAC_EOQ;
-+ restart = priv->rx_head;
-+ }
-+
-+ if (restart) {
-+ priv->dev->stats.rx_errors++;
-+ priv->dev->stats.rx_fifo_errors++;
-+ if (netif_msg_rx_err(priv) && net_ratelimit())
-+ printk(KERN_WARNING "%s: rx dma ring overrun\n", priv->dev->name);
-+
-+ if (unlikely((restart->dataflags & CPMAC_OWN) == 0)) {
-+ if (netif_msg_drv(priv))
-+ printk(KERN_ERR "%s: cpmac_poll is trying to restart rx from a descriptor that's not free: %p\n",
-+ priv->dev->name, restart);
-+ goto fatal_error;
-+ }
-+
-+ cpmac_write(priv->regs, CPMAC_RX_PTR(0), restart->mapping);
-+ }
-+
- priv->rx_head = desc;
- spin_unlock(&priv->rx_lock);
- if (unlikely(netif_msg_rx_status(priv)))
- printk(KERN_DEBUG "%s: poll processed %d packets\n",
- priv->dev->name, received);
-- if (desc->dataflags & CPMAC_OWN) {
-+ if (processed == 0) {
-+ /* we ran out of packets to read, revert to interrupt-driven mode */
- netif_rx_complete(priv->dev, napi);
-- cpmac_write(priv->regs, CPMAC_RX_PTR(0), (u32)desc->mapping);
- cpmac_write(priv->regs, CPMAC_RX_INT_ENABLE, 1);
- return 0;
- }
-
- return 1;
-+
-+fatal_error:
-+ /* Something went horribly wrong. Reset hardware to try to recover rather than wedging. */
-+
-+ if (netif_msg_drv(priv)) {
-+ printk(KERN_ERR "%s: cpmac_poll is confused. Resetting hardware\n", priv->dev->name);
-+ cpmac_dump_all_desc(priv->dev);
-+ printk(KERN_DEBUG "%s: RX_PTR(0)=0x%08x RX_ACK(0)=0x%08x\n",
-+ priv->dev->name,
-+ cpmac_read(priv->regs, CPMAC_RX_PTR(0)),
-+ cpmac_read(priv->regs, CPMAC_RX_ACK(0)));
-+ }
-+
-+ spin_unlock(&priv->rx_lock);
-+ netif_rx_complete(priv->dev, napi);
-+ netif_stop_queue(priv->dev);
-+ napi_disable(&priv->napi);
-+
-+ atomic_inc(&priv->reset_pending);
-+ cpmac_hw_stop(priv->dev);
-+ if (!schedule_work(&priv->reset_work))
-+ atomic_dec(&priv->reset_pending);
-+ return 0;
-+
- }
-
- static int cpmac_start_xmit(struct sk_buff *skb, struct net_device *dev)
-@@ -625,8 +717,10 @@
- desc->dataflags = CPMAC_OWN;
- dev->stats.rx_dropped++;
- }
-+ desc->hw_next = desc->next->mapping;
- desc = desc->next;
- }
-+ priv->rx_head->prev->hw_next = 0;
- }
-
- static void cpmac_clear_tx(struct net_device *dev)
-@@ -928,9 +1022,12 @@
- desc->buflen = CPMAC_SKB_SIZE;
- desc->dataflags = CPMAC_OWN;
- desc->next = &priv->rx_head[(i + 1) % priv->ring_size];
-+ desc->next->prev = desc;
- desc->hw_next = (u32)desc->next->mapping;
- }
-
-+ priv->rx_head->prev->hw_next = (u32)0;
-+
- if ((res = request_irq(dev->irq, cpmac_irq, IRQF_SHARED,
- dev->name, dev))) {
- if (netif_msg_drv(priv))
diff --git a/target/linux/ar7/patches-2.6.25/170-cpmac_eth_fix.patch b/target/linux/ar7/patches-2.6.25/170-cpmac_eth_fix.patch
deleted file mode 100644
index 0942b1ccc..000000000
--- a/target/linux/ar7/patches-2.6.25/170-cpmac_eth_fix.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/drivers/net/cpmac.c
-+++ b/drivers/net/cpmac.c
-@@ -1178,9 +1178,7 @@
- priv->msg_enable = netif_msg_init(debug_level, 0xff);
- memcpy(dev->dev_addr, pdata->dev_addr, sizeof(dev->dev_addr));
-
-- snprintf(priv->phy_name, BUS_ID_SIZE, PHY_ID_FMT, mdio_bus_id, phy_id);
--
-- priv->phy = phy_connect(dev, priv->phy_name, &cpmac_adjust_link, 0,
-+ priv->phy = phy_connect(dev, cpmac_mii.phy_map[phy_id]->dev.bus_id, &cpmac_adjust_link, 0,
- PHY_INTERFACE_MODE_MII);
- if (IS_ERR(priv->phy)) {
- if (netif_msg_drv(priv))
diff --git a/target/linux/ar7/patches-2.6.25/200-mtd_fixes.patch b/target/linux/ar7/patches-2.6.25/200-mtd_fixes.patch
deleted file mode 100644
index 850a64302..000000000
--- a/target/linux/ar7/patches-2.6.25/200-mtd_fixes.patch
+++ /dev/null
@@ -1,54 +0,0 @@
---- a/drivers/mtd/ar7part.c
-+++ b/drivers/mtd/ar7part.c
-@@ -34,6 +34,10 @@
- #define LOADER_MAGIC1 le32_to_cpu(0xfeedfa42)
- #define LOADER_MAGIC2 le32_to_cpu(0xfeed1281)
-
-+#ifndef SQUASHFS_MAGIC
-+#define SQUASHFS_MAGIC 0x73717368
-+#endif
-+
- struct ar7_bin_rec {
- unsigned int checksum;
- unsigned int length;
-@@ -47,7 +51,8 @@
- unsigned long origin)
- {
- struct ar7_bin_rec header;
-- unsigned int offset, len;
-+ unsigned int offset;
-+ size_t len;
- unsigned int pre_size = master->erasesize, post_size = 0;
- unsigned int root_offset = ROOT_OFFSET;
-
-@@ -66,7 +71,7 @@
- do { /* Try 10 blocks starting from master->erasesize */
- offset = pre_size;
- master->read(master, offset,
-- sizeof(header), &len, (u8 *)&header);
-+ sizeof(header), &len, (uint8_t *)&header);
- if (!strncmp((char *)&header, "TIENV0.8", 8))
- ar7_parts[1].offset = pre_size;
- if (header.checksum == LOADER_MAGIC1)
-@@ -88,7 +93,7 @@
- while (header.length) {
- offset += sizeof(header) + header.length;
- master->read(master, offset, sizeof(header),
-- &len, (u8 *)&header);
-+ &len, (uint8_t *)&header);
- }
- root_offset = offset + sizeof(header) + 4;
- break;
-@@ -96,10 +101,10 @@
- while (header.length) {
- offset += sizeof(header) + header.length;
- master->read(master, offset, sizeof(header),
-- &len, (u8 *)&header);
-+ &len, (uint8_t *)&header);
- }
- root_offset = offset + sizeof(header) + 4 + 0xff;
-- root_offset &= ~(u32)0xff;
-+ root_offset &= ~(uint32_t)0xff;
- break;
- default:
- printk(KERN_WARNING "Unknown magic: %08x\n", header.checksum);
diff --git a/target/linux/ar7/patches-2.6.25/500-serial_kludge.patch b/target/linux/ar7/patches-2.6.25/500-serial_kludge.patch
deleted file mode 100644
index 26b4b3e40..000000000
--- a/target/linux/ar7/patches-2.6.25/500-serial_kludge.patch
+++ /dev/null
@@ -1,40 +0,0 @@
---- a/drivers/serial/8250.c
-+++ b/drivers/serial/8250.c
-@@ -267,6 +267,13 @@
- .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
- .flags = UART_CAP_FIFO,
- },
-+ [PORT_AR7] = {
-+ .name = "TI-AR7",
-+ .fifo_size = 16,
-+ .tx_loadsz = 16,
-+ .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_00,
-+ .flags = UART_CAP_FIFO | UART_CAP_AFE,
-+ },
- };
-
- #if defined (CONFIG_SERIAL_8250_AU1X00)
-@@ -2457,7 +2464,11 @@
- {
- struct uart_8250_port *up = (struct uart_8250_port *)port;
-
-+#ifdef CONFIG_AR7
-+ wait_for_xmitr(up, BOTH_EMPTY);
-+#else
- wait_for_xmitr(up, UART_LSR_THRE);
-+#endif
- serial_out(up, UART_TX, ch);
- }
-
---- a/include/linux/serial_core.h
-+++ b/include/linux/serial_core.h
-@@ -40,7 +40,8 @@
- #define PORT_NS16550A 14
- #define PORT_XSCALE 15
- #define PORT_RM9000 16 /* PMC-Sierra RM9xxx internal UART */
--#define PORT_MAX_8250 16 /* max port ID */
-+#define PORT_AR7 17
-+#define PORT_MAX_8250 17 /* max port ID */
-
- /*
- * ARM specific type numbers. These are not currently guaranteed
diff --git a/target/linux/ar7/patches-2.6.25/900-temporary_cpmac_hack.diff b/target/linux/ar7/patches-2.6.25/900-temporary_cpmac_hack.diff
deleted file mode 100644
index 7da22cd99..000000000
--- a/target/linux/ar7/patches-2.6.25/900-temporary_cpmac_hack.diff
+++ /dev/null
@@ -1,27 +0,0 @@
---- a/drivers/net/cpmac.c
-+++ b/drivers/net/cpmac.c
-@@ -936,7 +936,8 @@
- int new_state = 0;
-
- spin_lock(&priv->lock);
-- if (priv->phy->link) {
-+ if (1 /* priv->phy->link */) {
-+ netif_carrier_on(dev);
- netif_start_queue(dev);
- if (priv->phy->duplex != priv->oldduplex) {
- new_state = 1;
-@@ -948,11 +949,11 @@
- priv->oldspeed = priv->phy->speed;
- }
-
-- if (!priv->oldlink) {
-+ /*if (!priv->oldlink) {
- new_state = 1;
-- priv->oldlink = 1;
-+ priv->oldlink = 1;*/
- netif_schedule(dev);
-- }
-+ /*}*/
- } else if (priv->oldlink) {
- netif_stop_queue(dev);
- new_state = 1;