summaryrefslogtreecommitdiff
path: root/target/linux
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/adm5120/Makefile2
-rw-r--r--target/linux/adm5120/files/arch/mips/adm5120/reset.c2
-rw-r--r--target/linux/adm5120/files/arch/mips/adm5120/setup.c6
-rw-r--r--target/linux/adm5120/files/arch/mips/adm5120/time.c11
-rw-r--r--target/linux/adm5120/files/drivers/char/watchdog/adm5120_wdt.c206
-rw-r--r--target/linux/adm5120/files/drivers/net/adm5120sw.c52
-rw-r--r--target/linux/adm5120/files/drivers/serial/adm5120_uart.c520
-rw-r--r--target/linux/adm5120/files/drivers/usb/host/adm5120-dbg.c8
-rw-r--r--target/linux/adm5120/files/drivers/usb/host/adm5120-hcd.c50
-rw-r--r--target/linux/adm5120/files/drivers/usb/host/adm5120-pm.c5
-rw-r--r--target/linux/adm5120/files/drivers/usb/host/adm5120-q.c88
-rw-r--r--target/linux/adm5120/patches-2.6.23/001-adm5120.patch115
-rw-r--r--target/linux/adm5120/patches-2.6.23/002-adm5120_flash.patch26
-rw-r--r--target/linux/adm5120/patches-2.6.23/003-adm5120_switch.patch27
-rw-r--r--target/linux/adm5120/patches-2.6.23/004-adm5120_nand.patch33
-rw-r--r--target/linux/adm5120/patches-2.6.23/005-adm5120_usb.patch35
-rw-r--r--target/linux/adm5120/patches-2.6.23/006-adm5120_leds.patch38
-rw-r--r--target/linux/adm5120/patches-2.6.23/007-adm5120_pci.patch23
-rw-r--r--target/linux/adm5120/patches-2.6.23/008-adm5120_uart.patch53
-rw-r--r--target/linux/adm5120/patches-2.6.23/009-adm5120_leds_switch_trigger.patch26
-rw-r--r--target/linux/adm5120/patches-2.6.23/100-mtd_myloder_partition_parser.patch39
-rw-r--r--target/linux/adm5120/patches-2.6.23/101-cfi_fixup_macronix_bootloc.patch95
-rw-r--r--target/linux/adm5120/patches-2.6.23/102-jedec_pmc_39lvxxx_chips.patch74
-rw-r--r--target/linux/adm5120/patches-2.6.23/103-mtd_trxsplit.patch28
-rw-r--r--target/linux/adm5120/patches-2.6.23/120-rb153_cf_driver.patch30
-rw-r--r--target/linux/adm5120/patches-2.6.23/140-cmdline_hack.patch17
-rw-r--r--target/linux/adm5120/patches-2.6.23/200-amba_pl010_hacks.patch297
-rw-r--r--target/linux/adm5120/patches-2.6.23/201-amba_bus_hacks.patch15
-rw-r--r--target/linux/adm5120/patches-2.6.23/202-pci_disable_common_quirks.patch50
-rw-r--r--target/linux/adm5120/patches-2.6.23/203-gpio_leds_brightness.patch29
-rw-r--r--target/linux/adm5120/patches-2.6.23/300-i2c_gpio_custom.patch34
-rw-r--r--target/linux/adm5120/patches-2.6.23/310-adm5120_wdt.patch35
-rw-r--r--target/linux/adm5120/patches-2.6.24/004-adm5120_nand.patch33
-rw-r--r--target/linux/adm5120/patches-2.6.24/008-adm5120_uart.patch53
-rw-r--r--target/linux/adm5120/patches-2.6.24/900-adm5120_switch_napi.patch144
-rw-r--r--target/linux/adm5120/patches-2.6.24/910-usb_manage_endpoint_queues.patch110
-rw-r--r--target/linux/adm5120/patches-2.6.24/911-usb_centralize_eremoteio_handling.patch30
-rw-r--r--target/linux/adm5120/patches-2.6.24/912-usb_use_urb_unlinked_field.patch23
-rw-r--r--target/linux/adm5120/patches-2.6.24/913-usb_avoid_donelist_after_an_error.patch62
-rw-r--r--target/linux/adm5120/patches-2.6.24/914-usb_reorganize_urb_status_use.patch242
-rw-r--r--target/linux/adm5120/patches-2.6.24/915-usb_eliminate_urb_status.patch14
-rw-r--r--target/linux/adm5120/patches-2.6.24/916-usb_bump_version_number.patch13
-rw-r--r--target/linux/adm5120/patches/001-adm5120.patch (renamed from target/linux/adm5120/patches-2.6.24/001-adm5120.patch)2
-rw-r--r--target/linux/adm5120/patches/002-adm5120_flash.patch (renamed from target/linux/adm5120/patches-2.6.24/002-adm5120_flash.patch)0
-rw-r--r--target/linux/adm5120/patches/003-adm5120_switch.patch (renamed from target/linux/adm5120/patches-2.6.24/003-adm5120_switch.patch)0
-rw-r--r--target/linux/adm5120/patches/005-adm5120_usb.patch (renamed from target/linux/adm5120/patches-2.6.24/005-adm5120_usb.patch)0
-rw-r--r--target/linux/adm5120/patches/006-adm5120_leds.patch (renamed from target/linux/adm5120/patches-2.6.24/006-adm5120_leds.patch)0
-rw-r--r--target/linux/adm5120/patches/007-adm5120_pci.patch (renamed from target/linux/adm5120/patches-2.6.24/007-adm5120_pci.patch)0
-rw-r--r--target/linux/adm5120/patches/009-adm5120_leds_switch_trigger.patch (renamed from target/linux/adm5120/patches-2.6.24/009-adm5120_leds_switch_trigger.patch)0
-rw-r--r--target/linux/adm5120/patches/100-mtd_myloder_partition_parser.patch (renamed from target/linux/adm5120/patches-2.6.24/100-mtd_myloder_partition_parser.patch)0
-rw-r--r--target/linux/adm5120/patches/101-cfi_fixup_macronix_bootloc.patch (renamed from target/linux/adm5120/patches-2.6.24/101-cfi_fixup_macronix_bootloc.patch)0
-rw-r--r--target/linux/adm5120/patches/102-jedec_pmc_39lvxxx_chips.patch (renamed from target/linux/adm5120/patches-2.6.24/102-jedec_pmc_39lvxxx_chips.patch)0
-rw-r--r--target/linux/adm5120/patches/103-mtd_trxsplit.patch (renamed from target/linux/adm5120/patches-2.6.24/103-mtd_trxsplit.patch)0
-rw-r--r--target/linux/adm5120/patches/120-rb153_cf_driver.patch (renamed from target/linux/adm5120/patches-2.6.24/120-rb153_cf_driver.patch)0
-rw-r--r--target/linux/adm5120/patches/140-cmdline_hack.patch (renamed from target/linux/adm5120/patches-2.6.24/140-cmdline_hack.patch)0
-rw-r--r--target/linux/adm5120/patches/200-amba_pl010_hacks.patch (renamed from target/linux/adm5120/patches-2.6.24/200-amba_pl010_hacks.patch)0
-rw-r--r--target/linux/adm5120/patches/201-amba_bus_hacks.patch (renamed from target/linux/adm5120/patches-2.6.24/201-amba_bus_hacks.patch)0
-rw-r--r--target/linux/adm5120/patches/202-pci_disable_common_quirks.patch (renamed from target/linux/adm5120/patches-2.6.24/202-pci_disable_common_quirks.patch)0
-rw-r--r--target/linux/adm5120/patches/203-gpio_leds_brightness.patch (renamed from target/linux/adm5120/patches-2.6.24/203-gpio_leds_brightness.patch)0
-rw-r--r--target/linux/adm5120/patches/300-i2c_gpio_custom.patch (renamed from target/linux/adm5120/patches-2.6.24/300-i2c_gpio_custom.patch)0
-rw-r--r--target/linux/adm5120/patches/310-adm5120_wdt.patch (renamed from target/linux/adm5120/patches-2.6.24/310-adm5120_wdt.patch)0
-rw-r--r--target/linux/adm5120/router_be/config-2.6.23247
-rw-r--r--target/linux/adm5120/router_be/config-default (renamed from target/linux/adm5120/router_be/config-2.6.24)1
-rw-r--r--target/linux/adm5120/router_le/config-2.6.23271
-rw-r--r--target/linux/adm5120/router_le/config-default (renamed from target/linux/adm5120/router_le/config-2.6.24)2
65 files changed, 101 insertions, 3215 deletions
diff --git a/target/linux/adm5120/Makefile b/target/linux/adm5120/Makefile
index 6a78f724db..c7c66705a3 100644
--- a/target/linux/adm5120/Makefile
+++ b/target/linux/adm5120/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
BOARD:=adm5120
BOARDNAME:=Infineon ADM5120
-LINUX_VERSION:=2.6.23.14
+LINUX_VERSION:=2.6.24
SUBTARGETS:=router_le router_be
INITRAMFS_EXTRA_FILES:=
diff --git a/target/linux/adm5120/files/arch/mips/adm5120/reset.c b/target/linux/adm5120/files/arch/mips/adm5120/reset.c
index b086f9a5bd..653d42c849 100644
--- a/target/linux/adm5120/files/arch/mips/adm5120/reset.c
+++ b/target/linux/adm5120/files/arch/mips/adm5120/reset.c
@@ -27,7 +27,6 @@
#include <linux/irq.h>
#include <linux/io.h>
-#include <asm/bootinfo.h>
#include <asm/addrspace.h>
#include <adm5120_info.h>
@@ -50,7 +49,6 @@ void adm5120_halt(void)
{
local_irq_disable();
- printk(KERN_NOTICE "\n** You can safely turn off the power\n");
while (1) {
if (cpu_wait)
cpu_wait();
diff --git a/target/linux/adm5120/files/arch/mips/adm5120/setup.c b/target/linux/adm5120/files/arch/mips/adm5120/setup.c
index 9046057f9f..418a342e81 100644
--- a/target/linux/adm5120/files/arch/mips/adm5120/setup.c
+++ b/target/linux/adm5120/files/arch/mips/adm5120/setup.c
@@ -23,7 +23,6 @@
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/io.h>
-#include <linux/version.h>
#include <asm/reboot.h>
#include <asm/time.h>
@@ -60,11 +59,6 @@ void __init plat_mem_setup(void)
adm5120_mem_init();
adm5120_report();
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
-extern void plat_time_init(void) __init;
- board_time_init = plat_time_init;
-#endif
-
_machine_restart = adm5120_restart;
_machine_halt = adm5120_halt;
pm_power_off = adm5120_halt;
diff --git a/target/linux/adm5120/files/arch/mips/adm5120/time.c b/target/linux/adm5120/files/arch/mips/adm5120/time.c
index 66eb1ce7df..63191d4938 100644
--- a/target/linux/adm5120/files/arch/mips/adm5120/time.c
+++ b/target/linux/adm5120/files/arch/mips/adm5120/time.c
@@ -21,7 +21,6 @@
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/timex.h>
-#include <linux/version.h>
#include <asm/irq.h>
#include <asm/cpu.h>
@@ -34,13 +33,3 @@ void __init plat_time_init(void)
{
mips_hpt_frequency = adm5120_speed / 2;
}
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
-void __init plat_timer_setup(struct irqaction *irq)
-{
- clear_c0_status(ST0_BEV);
-
- /* Install ISR for CPU Counter interrupt */
- setup_irq(ADM5120_IRQ_COUNTER, irq);
-}
-#endif
diff --git a/target/linux/adm5120/files/drivers/char/watchdog/adm5120_wdt.c b/target/linux/adm5120/files/drivers/char/watchdog/adm5120_wdt.c
deleted file mode 100644
index cddb1721cf..0000000000
--- a/target/linux/adm5120/files/drivers/char/watchdog/adm5120_wdt.c
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- * ADM5120_WDT 0.01: Infineon ADM5120 SoC watchdog driver
- * Copyright (c) Ondrej Zajicek <santiago@crfreenet.org>, 2007
- *
- * based on
- *
- * RC32434_WDT 0.01: IDT Interprise 79RC32434 watchdog driver
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- */
-
-#include <linux/module.h>
-#include <linux/types.h>
-#include <linux/fs.h>
-#include <linux/miscdevice.h>
-#include <linux/watchdog.h>
-
-#include <asm/bootinfo.h>
-
-#include <adm5120_info.h>
-#include <adm5120_defs.h>
-#include <adm5120_irq.h>
-#include <adm5120_switch.h>
-
-
-#define DEFAULT_TIMEOUT 15 /* (secs) Default is 15 seconds */
-#define MAX_TIMEOUT 327
-/* Max is 327 seconds, counter is 15-bit integer, step is 10 ms */
-
-#define NAME "adm5120_wdt"
-#define VERSION "0.1"
-
-static int expect_close = 0;
-static int access = 0;
-static unsigned int timeout = DEFAULT_TIMEOUT;
-
-static int nowayout = WATCHDOG_NOWAYOUT;
-module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
-MODULE_LICENSE("GPL");
-
-
-static inline void wdt_set_timeout(void)
-{
- u32 val = (1 << 31) | (((timeout * 100) & 0x7FFF) << 16);
- SW_WRITE_REG(SWITCH_REG_WDOG0, val);
-}
-
-/*
- It looks like WDOG0-register-write don't modify counter,
- but WDOG0-register-read resets counter.
-*/
-
-static inline void wdt_reset_counter(void)
-{
- SW_READ_REG(SWITCH_REG_WDOG0);
-}
-
-static inline void wdt_disable(void)
-{
- SW_WRITE_REG(SWITCH_REG_WDOG0, 0x7FFF0000);
-}
-
-
-
-static int wdt_open(struct inode *inode, struct file *file)
-{
- /* Allow only one person to hold it open */
- if (access)
- return -EBUSY;
-
- if (nowayout) {
- __module_get(THIS_MODULE);
- }
-
- /* Activate timer */
- wdt_reset_counter();
- wdt_set_timeout();
- printk(KERN_INFO NAME ": enabling watchdog timer\n");
- access = 1;
- return 0;
-}
-
-static int wdt_release(struct inode *inode, struct file *file)
-{
- /*
- * Shut off the timer.
- * Lock it in if it's a module and we set nowayout
- */
- if (expect_close && (nowayout == 0)) {
- wdt_disable();
- printk(KERN_INFO NAME ": disabling watchdog timer\n");
- module_put(THIS_MODULE);
- } else {
- printk(KERN_CRIT NAME ": device closed unexpectedly. WDT will not stop!\n");
- }
- access = 0;
- return 0;
-}
-
-static ssize_t wdt_write(struct file *file, const char *data, size_t len, loff_t *ppos)
-{
- /* Refresh the timer. */
- if (len) {
- if (!nowayout) {
- size_t i;
-
- /* In case it was set long ago */
- expect_close = 0;
-
- for (i = 0; i != len; i++) {
- char c;
- if (get_user(c, data + i))
- return -EFAULT;
- if (c == 'V')
- expect_close = 1;
- }
- }
- wdt_reset_counter();
- return len;
- }
- return 0;
-}
-
-static int wdt_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd, unsigned long arg)
-{
- int new_timeout;
- static struct watchdog_info ident = {
- .options = WDIOF_SETTIMEOUT |
- WDIOF_KEEPALIVEPING |
- WDIOF_MAGICCLOSE,
- .firmware_version = 0,
- .identity = "ADM5120_WDT Watchdog",
- };
- switch (cmd) {
- default:
- return -ENOTTY;
- case WDIOC_GETSUPPORT:
- if(copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident)))
- return -EFAULT;
- return 0;
- case WDIOC_GETSTATUS:
- case WDIOC_GETBOOTSTATUS:
- return put_user(0,(int *)arg);
- case WDIOC_KEEPALIVE:
- wdt_reset_counter();
- return 0;
- case WDIOC_SETTIMEOUT:
- if (get_user(new_timeout, (int *)arg))
- return -EFAULT;
- if (new_timeout < 1)
- return -EINVAL;
- if (new_timeout > MAX_TIMEOUT)
- return -EINVAL;
- timeout = new_timeout;
- wdt_set_timeout();
- /* Fall */
- case WDIOC_GETTIMEOUT:
- return put_user(timeout, (int *)arg);
- }
-}
-
-static struct file_operations wdt_fops = {
- owner: THIS_MODULE,
- llseek: no_llseek,
- write: wdt_write,
- ioctl: wdt_ioctl,
- open: wdt_open,
- release: wdt_release,
-};
-
-static struct miscdevice wdt_miscdev = {
- minor: WATCHDOG_MINOR,
- name: "watchdog",
- fops: &wdt_fops,
-};
-
-static char banner[] __initdata = KERN_INFO NAME ": Watchdog Timer version " VERSION "\n";
-
-static int __init watchdog_init(void)
-{
- int ret;
-
- ret = misc_register(&wdt_miscdev);
-
- if (ret)
- return ret;
-
- wdt_disable();
- printk(banner);
-
- return 0;
-}
-
-static void __exit watchdog_exit(void)
-{
- misc_deregister(&wdt_miscdev);
-}
-
-module_init(watchdog_init);
-module_exit(watchdog_exit);
diff --git a/target/linux/adm5120/files/drivers/net/adm5120sw.c b/target/linux/adm5120/files/drivers/net/adm5120sw.c
index ff933cf7cf..8f3610e907 100644
--- a/target/linux/adm5120/files/drivers/net/adm5120sw.c
+++ b/target/linux/adm5120/files/drivers/net/adm5120sw.c
@@ -93,8 +93,14 @@
/* ------------------------------------------------------------------------ */
struct adm5120_if_priv {
+ struct net_device *dev;
+
unsigned int vlan_no;
unsigned int port_mask;
+
+#ifdef CONFIG_ADM5120_SWITCH_NAPI
+ struct napi_struct napi;
+#endif
};
struct dma_desc {
@@ -333,7 +339,6 @@ static void sw_dump_regs(void)
SW_DBG("rlda: %08X\n", t);
}
-
/* ------------------------------------------------------------------------ */
static inline void adm5120_rx_dma_update(struct dma_desc *desc,
@@ -495,9 +500,11 @@ static void adm5120_switch_tx(void)
}
#ifdef CONFIG_ADM5120_SWITCH_NAPI
-static int adm5120_if_poll(struct net_device *dev, int *budget)
+static int adm5120_if_poll(struct napi_struct *napi, int limit)
{
- int limit = min(dev->quota, *budget);
+ struct adm5120_if_priv *priv = container_of(napi,
+ struct adm5120_if_priv, napi);
+ struct net_device *dev = priv->dev;
int done;
u32 status;
@@ -509,13 +516,10 @@ static int adm5120_if_poll(struct net_device *dev, int *budget)
SW_DBG("%s: processing RX ring\n", dev->name);
done = adm5120_switch_rx(limit);
- *budget -= done;
- dev->quota -= done;
-
status = sw_int_status() & SWITCH_INTS_POLL;
if ((done < limit) && (!status)) {
SW_DBG("disable polling mode for %s\n", dev->name);
- netif_rx_complete(dev);
+ netif_rx_complete(dev, napi);
sw_int_unmask(SWITCH_INTS_POLL);
return 0;
}
@@ -541,10 +545,12 @@ static irqreturn_t adm5120_switch_irq(int irq, void *dev_id)
if (status & SWITCH_INTS_POLL) {
struct net_device *dev = dev_id;
+ struct adm5120_if_priv *priv = netdev_priv(dev);
+
sw_dump_intr_mask("poll ints", status);
SW_DBG("enable polling mode for %s\n", dev->name);
sw_int_mask(SWITCH_INTS_POLL);
- netif_rx_schedule(dev);
+ netif_rx_schedule(dev, &priv->napi);
}
#else
sw_int_ack(status);
@@ -779,12 +785,31 @@ static void adm5120_switch_set_vlan_ports(unsigned int vlan, u32 ports)
/* ------------------------------------------------------------------------ */
+#ifdef CONFIG_ADM5120_SWITCH_NAPI
+static inline void adm5120_if_napi_enable(struct net_device *dev)
+{
+ struct adm5120_if_priv *priv = netdev_priv(dev);
+ napi_enable(&priv->napi);
+}
+
+static inline void adm5120_if_napi_disable(struct net_device *dev)
+{
+ struct adm5120_if_priv *priv = netdev_priv(dev);
+ napi_disable(&priv->napi);
+}
+#else
+static inline void adm5120_if_napi_enable(struct net_device *dev) {}
+static inline void adm5120_if_napi_disable(struct net_device *dev) {}
+#endif /* CONFIG_ADM5120_SWITCH_NAPI */
+
static int adm5120_if_open(struct net_device *dev)
{
u32 t;
int err;
int i;
+ adm5120_if_napi_enable(dev);
+
err = request_irq(dev->irq, adm5120_switch_irq,
(IRQF_SHARED | IRQF_DISABLED), dev->name, dev);
if (err) {
@@ -809,6 +834,7 @@ static int adm5120_if_open(struct net_device *dev)
return 0;
err:
+ adm5120_if_napi_disable(dev);
return err;
}
@@ -818,6 +844,7 @@ static int adm5120_if_stop(struct net_device *dev)
int i;
netif_stop_queue(dev);
+ adm5120_if_napi_disable(dev);
/* disable port if not assigned to other devices */
t = sw_read_reg(SWITCH_REG_PORT_CONF0);
@@ -1001,6 +1028,9 @@ static struct net_device *adm5120_if_alloc(void)
if (!dev)
return NULL;
+ priv = netdev_priv(dev);
+ priv->dev = dev;
+
dev->irq = ADM5120_IRQ_SWITCH;
dev->open = adm5120_if_open;
dev->hard_start_xmit = adm5120_if_hard_start_xmit;
@@ -1010,13 +1040,11 @@ static struct net_device *adm5120_if_alloc(void)
dev->tx_timeout = adm5120_if_tx_timeout;
dev->watchdog_timeo = TX_TIMEOUT;
dev->set_mac_address = adm5120_if_set_mac_address;
+
#ifdef CONFIG_ADM5120_SWITCH_NAPI
- dev->poll = adm5120_if_poll;
- dev->weight = 64;
+ netif_napi_add(dev, &priv->napi, adm5120_if_poll, 64);
#endif
- SET_MODULE_OWNER(dev);
-
return dev;
}
diff --git a/target/linux/adm5120/files/drivers/serial/adm5120_uart.c b/target/linux/adm5120/files/drivers/serial/adm5120_uart.c
deleted file mode 100644
index 83c5f72012..0000000000
--- a/target/linux/adm5120/files/drivers/serial/adm5120_uart.c
+++ /dev/null
@@ -1,520 +0,0 @@
-/*
- * Serial driver for ADM5120 SoC
- *
- * Derived from drivers/serial/uart00.c
- * Copyright 2001 Altera Corporation
- *
- * Some pieces are derived from the ADMtek 2.4 serial driver.
- * Copyright (C) ADMtek Incorporated, 2003
- * daniell@admtek.com.tw
- * Which again was derived from drivers/char/serial.c
- * Copyright (C) Linus Torvalds et al.
- *
- * Copyright Jeroen Vreeken (pe1rxq@amsat.org), 2005
- */
-
-#include <linux/autoconf.h>
-#include <linux/init.h>
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/ioport.h>
-#include <linux/serial.h>
-#include <linux/serial_core.h>
-#include <linux/tty.h>
-#include <linux/tty_flip.h>
-#include <linux/console.h>
-
-#include <asm/mach-adm5120/adm5120_defs.h>
-#include <asm/mach-adm5120/adm5120_irq.h>
-
-#define ADM5120_UART_REG(base, reg) \
- (*(volatile u32 *)KSEG1ADDR((base)+(reg)))
-
-#define ADM5120_UARTCLK_FREQ 62500000
-#define ADM5120_UART_BAUDDIV(rate) ((unsigned long)(ADM5120_UARTCLK_FREQ/(16*(rate)) - 1))
-
-#define ADM5120_UART_BAUD115200 ADM5120_UART_BAUDDIV(115200)
-
-#define ADM5120_UART_DATA 0x00
-#define ADM5120_UART_RS 0x04
-#define ADM5120_UART_LCR_H 0x08
-#define ADM5120_UART_LCR_M 0x0c
-#define ADM5120_UART_LCR_L 0x10
-#define ADM5120_UART_CR 0x14
-#define ADM5120_UART_FR 0x18
-#define ADM5120_UART_IR 0x1c
-
-#define ADM5120_UART_FE 0x01
-#define ADM5120_UART_PE 0x02
-#define ADM5120_UART_BE 0x04
-#define ADM5120_UART_OE 0x08
-#define ADM5120_UART_ERR 0x0f
-#define ADM5120_UART_FIFO_EN 0x10
-#define ADM5120_UART_EN 0x01
-#define ADM5120_UART_TIE 0x20
-#define ADM5120_UART_RIE 0x50
-#define ADM5120_UART_IE 0x78
-#define ADM5120_UART_CTS 0x01
-#define ADM5120_UART_DSR 0x02
-#define ADM5120_UART_DCD 0x04
-#define ADM5120_UART_TXFF 0x20
-#define ADM5120_UART_TXFE 0x80
-#define ADM5120_UART_RXFE 0x10
-#define ADM5120_UART_BRK 0x01
-#define ADM5120_UART_PEN 0x02
-#define ADM5120_UART_EPS 0x04
-#define ADM5120_UART_STP2 0x08
-#define ADM5120_UART_W5 0x00
-#define ADM5120_UART_W6 0x20
-#define ADM5120_UART_W7 0x40
-#define ADM5120_UART_W8 0x60
-#define ADM5120_UART_MIS 0x01
-#define ADM5120_UART_RIS 0x02
-#define ADM5120_UART_TIS 0x04
-#define ADM5120_UART_RTIS 0x08
-
-static void adm5120ser_stop_tx(struct uart_port *port)
-{
- ADM5120_UART_REG(port->iobase, ADM5120_UART_CR) &= ~ADM5120_UART_TIE;
-}
-
-static void adm5120ser_irq_rx(struct uart_port *port)
-{
- struct tty_struct *tty = port->info->tty;
- unsigned int status, ch, rds, flg, ignored = 0;
-
- status = ADM5120_UART_REG(port->iobase, ADM5120_UART_FR);
- while (!(status & ADM5120_UART_RXFE)) {
- /*
- * We need to read rds before reading the
- * character from the fifo
- */
- rds = ADM5120_UART_REG(port->iobase, ADM5120_UART_RS);
- ch = ADM5120_UART_REG(port->iobase, ADM5120_UART_DATA);
- port->icount.rx++;
-
- if (tty->low_latency)
- tty_flip_buffer_push(tty);
-
- flg = TTY_NORMAL;
-
- /*
- * Note that the error handling code is
- * out of the main execution path
- */
- if (rds & ADM5120_UART_ERR)
- goto handle_error;
- if (uart_handle_sysrq_char(port, ch))
- goto ignore_char;
-
- error_return:
- tty_insert_flip_char(tty, ch, flg);
-
- ignore_char:
- status = ADM5120_UART_REG(port->iobase, ADM5120_UART_FR);
- }
- out:
- tty_flip_buffer_push(tty);
- return;
-
- handle_error:
- ADM5120_UART_REG(port->iobase, ADM5120_UART_RS) = 0xff;
- if (rds & ADM5120_UART_BE) {
- port->icount.brk++;
- if (uart_handle_break(port))
- goto ignore_char;
- } else if (rds & ADM5120_UART_PE)
- port->icount.parity++;
- else if (rds & ADM5120_UART_FE)
- port->icount.frame++;
- if (rds & ADM5120_UART_OE)
- port->icount.overrun++;
-
- if (rds & port->ignore_status_mask) {
- if (++ignored > 100)
- goto out;
- goto ignore_char;
- }
- rds &= port->read_status_mask;
-
- if (rds & ADM5120_UART_BE)
- flg = TTY_BREAK;
- else if (rds & ADM5120_UART_PE)
- flg = TTY_PARITY;
- else if (rds & ADM5120_UART_FE)
- flg = TTY_FRAME;
-
- if (rds & ADM5120_UART_OE) {
- /*
- * CHECK: does overrun affect the current character?
- * ASSUMPTION: it does not.
- */
- tty_insert_flip_char(tty, ch, flg);
- ch = 0;
- flg = TTY_OVERRUN;
- }
-#ifdef CONFIG_MAGIC_SYSRQ
- port->sysrq = 0;
-#endif
- goto error_return;
-}
-
-static void adm5120ser_irq_tx(struct uart_port *port)
-{
- struct circ_buf *xmit = &port->info->xmit;
- int count;
-
- if (port->x_char) {
- ADM5120_UART_REG(port->iobase, ADM5120_UART_DATA) =
- port->x_char;
- port->icount.tx++;
- port->x_char = 0;
- return;
- }
- if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
- adm5120ser_stop_tx(port);
- return;
- }
-
- count = port->fifosize >> 1;
- do {
- ADM5120_UART_REG(port->iobase, ADM5120_UART_DATA) =
- xmit->buf[xmit->tail];
- xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
- port->icount.tx++;
- if (uart_circ_empty(xmit))
- break;
- } while (--count > 0);
-
- if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
- uart_write_wakeup(port);
-
- if (uart_circ_empty(xmit))
- adm5120ser_stop_tx(port);
-}
-
-static void adm5120ser_irq_modem(struct uart_port *port)
-{
- unsigned int status;
-
- status = ADM5120_UART_REG(port->iobase, ADM5120_UART_FR);
-
- if (status & ADM5120_UART_DCD)
- uart_handle_dcd_change(port, status & ADM5120_UART_DCD);
-
- if (status & ADM5120_UART_DSR)
- port->icount.dsr++;
-
- if (status & ADM5120_UART_CTS)
- uart_handle_cts_change(port, status & ADM5120_UART_CTS);
-
- wake_up_interruptible(&port->info->delta_msr_wait);
-}
-
-static irqreturn_t adm5120ser_irq(int irq, void *dev_id)
-{
- struct uart_port *port = dev_id;
- unsigned long ir = ADM5120_UART_REG(port->iobase, ADM5120_UART_IR);
-
- if (ir & (ADM5120_UART_RIS | ADM5120_UART_RTIS))
- adm5120ser_irq_rx(port);
- if (ir & ADM5120_UART_TIS)
- adm5120ser_irq_tx(port);
- if (ir & ADM5120_UART_MIS) {
- adm5120ser_irq_modem(port);
- ADM5120_UART_REG(port->iobase, ADM5120_UART_IR) = 0xff;
- }
-
- return IRQ_HANDLED;
-}
-
-static unsigned int adm5120ser_tx_empty(struct uart_port *port)
-{
- unsigned int fr = ADM5120_UART_REG(port->iobase, ADM5120_UART_FR);
- return (fr & ADM5120_UART_TXFE) ? TIOCSER_TEMT : 0;
-}
-
-static void adm5120ser_set_mctrl(struct uart_port *port, unsigned int mctrl)
-{
-}
-
-static unsigned int adm5120ser_get_mctrl(struct uart_port *port)
-{
- unsigned int result = 0;
- unsigned int fr = ADM5120_UART_REG(port->iobase, ADM5120_UART_FR);
-
- if (fr & ADM5120_UART_CTS)
- result |= TIOCM_CTS;
- if (fr & ADM5120_UART_DSR)
- result |= TIOCM_DSR;
- if (fr & ADM5120_UART_DCD)
- result |= TIOCM_CAR;
- return result;
-}
-
-static void adm5120ser_start_tx(struct uart_port *port)
-{
- ADM5120_UART_REG(port->iobase, ADM5120_UART_CR) |= ADM5120_UART_TIE;
-}
-
-static void adm5120ser_stop_rx(struct uart_port *port)
-{
- ADM5120_UART_REG(port->iobase, ADM5120_UART_CR) &= ~ADM5120_UART_RIE;
-}
-
-static void adm5120ser_enable_ms(struct uart_port *port)
-{
-}
-
-static void adm5120ser_break_ctl(struct uart_port *port, int break_state)
-{
- unsigned long flags;
- unsigned long lcrh;
-
- spin_lock_irqsave(&port->lock, flags);
- lcrh = ADM5120_UART_REG(port->iobase, ADM5120_UART_LCR_H);
- if (break_state == -1)
- lcrh |= ADM5120_UART_BRK;
- else
- lcrh &= ~ADM5120_UART_BRK;
- ADM5120_UART_REG(port->iobase, ADM5120_UART_LCR_H) = lcrh;
- spin_unlock_irqrestore(&port->lock, flags);
-}
-
-static int adm5120ser_startup(struct uart_port *port)
-{
- int ret;
-
- ret = request_irq(port->irq, adm5120ser_irq, 0, "ADM5120 UART", port);
- if (ret) {
- printk(KERN_ERR "Couldn't get irq %d\n", port->irq);
- return ret;
- }
- ADM5120_UART_REG(port->iobase, ADM5120_UART_LCR_H) |=
- ADM5120_UART_FIFO_EN;
- ADM5120_UART_REG(port->iobase, ADM5120_UART_CR) |=
- ADM5120_UART_EN | ADM5120_UART_IE;
- return 0;
-}
-
-static void adm5120ser_shutdown(struct uart_port *port)
-{
- ADM5120_UART_REG(port->iobase, ADM5120_UART_CR) &= ~ADM5120_UART_IE;
- free_irq(port->irq, port);
-}
-
-static void adm5120ser_set_termios(struct uart_port *port,
- struct ktermios *termios, struct ktermios *old)
-{
- unsigned int baud, quot, lcrh;
- unsigned long flags;
-
- termios->c_cflag |= CREAD;
-
- baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
- quot = uart_get_divisor(port, baud);
-
- lcrh = ADM5120_UART_FIFO_EN;
- switch (termios->c_cflag & CSIZE) {
- case CS5:
- lcrh |= ADM5120_UART_W5;
- break;
- case CS6:
- lcrh |= ADM5120_UART_W6;
- break;
- case CS7:
- lcrh |= ADM5120_UART_W7;
- break;
- default:
- lcrh |= ADM5120_UART_W8;
- break;
- }
- if (termios->c_cflag & CSTOPB)
- lcrh |= ADM5120_UART_STP2;
- if (termios->c_cflag & PARENB) {
- lcrh |= ADM5120_UART_PEN;
- if (!(termios->c_cflag & PARODD))
- lcrh |= ADM5120_UART_EPS;
- }
-
- spin_lock_irqsave(port->lock, flags);
-
- ADM5120_UART_REG(port->iobase, ADM5120_UART_LCR_H) = lcrh;
-
- /*
- * Update the per-port timeout.
- */
- uart_update_timeout(port, termios->c_cflag, baud);
-
- port->read_status_mask = ADM5120_UART_OE;
- if (termios->c_iflag & INPCK)
- port->read_status_mask |= ADM5120_UART_FE | ADM5120_UART_PE;
- if (termios->c_iflag & (BRKINT | PARMRK))
- port->read_status_mask |= ADM5120_UART_BE;
-
- /*
- * Characters to ignore
- */
- port->ignore_status_mask = 0;
- if (termios->c_iflag & IGNPAR)
- port->ignore_status_mask |= ADM5120_UART_FE | ADM5120_UART_PE;
- if (termios->c_iflag & IGNBRK) {
- port->ignore_status_mask |= ADM5120_UART_BE;
- /*
- * If we're ignoring parity and break indicators,
- * ignore overruns to (for real raw support).
- */
- if (termios->c_iflag & IGNPAR)
- port->ignore_status_mask |= ADM5120_UART_OE;
- }
-
- quot = ADM5120_UART_BAUD115200;
- ADM5120_UART_REG(port->iobase, ADM5120_UART_LCR_L) = quot & 0xff;
- ADM5120_UART_REG(port->iobase, ADM5120_UART_LCR_M) = quot >> 8;
-
- spin_unlock_irqrestore(&port->lock, flags);
-}
-
-static const char *adm5120ser_type(struct uart_port *port)
-{
- return port->type == PORT_ADM5120 ? "ADM5120" : NULL;
-}
-
-static void adm5120ser_config_port(struct uart_port *port, int flags)
-{
- if (flags & UART_CONFIG_TYPE)
- port->type = PORT_ADM5120;
-}
-
-static void adm5120ser_release_port(struct uart_port *port)
-{
- release_mem_region(port->iobase, ADM5120_UART_SIZE);
-}
-
-static int adm5120ser_request_port(struct uart_port *port)
-{
- return request_mem_region(port->iobase, ADM5120_UART_SIZE,
- "adm5120-uart") != NULL ? 0 : -EBUSY;
-}
-
-static struct uart_ops adm5120ser_ops = {
- .tx_empty = adm5120ser_tx_empty,
- .set_mctrl = adm5120ser_set_mctrl,
- .get_mctrl = adm5120ser_get_mctrl,
- .stop_tx = adm5120ser_stop_tx,
- .start_tx = adm5120ser_start_tx,
- .stop_rx = adm5120ser_stop_rx,
- .enable_ms = adm5120ser_enable_ms,
- .break_ctl = adm5120ser_break_ctl,
- .startup = adm5120ser_startup,
- .shutdown = adm5120ser_shutdown,
- .set_termios = adm5120ser_set_termios,
- .type = adm5120ser_type,
- .config_port = adm5120ser_config_port,
- .release_port = adm5120ser_release_port,
- .request_port = adm5120ser_request_port,
-};
-
-static void adm5120console_put(const char c)
-{
- while ((ADM5120_UART_REG(ADM5120_UART0_BASE, ADM5120_UART_FR) &
- ADM5120_UART_TXFF) != 0);
- ADM5120_UART_REG(ADM5120_UART0_BASE, ADM5120_UART_DATA) = c;
-}
-
-static void adm5120console_write(struct console *con, const char *s,
- unsigned int count)
-{
- while (count--) {
- if (*s == '\n')
- adm5120console_put('\r');
- adm5120console_put(*s);
- s++;
- }
-}
-
-static int adm5120console_setup(struct console *con, char *options)
-{
- /* Set to 115200 baud, 8N1 and enable FIFO */
- ADM5120_UART_REG(ADM5120_UART0_BASE, ADM5120_UART_LCR_L) =
- ADM5120_UART_BAUD115200 & 0xff;
- ADM5120_UART_REG(ADM5120_UART0_BASE, ADM5120_UART_LCR_M) =
- ADM5120_UART_BAUD115200 >> 8;
- ADM5120_UART_REG(ADM5120_UART0_BASE, ADM5120_UART_LCR_H) =
- ADM5120_UART_W8 | ADM5120_UART_FIFO_EN;
- /* Enable port */
- ADM5120_UART_REG(ADM5120_UART0_BASE, ADM5120_UART_CR) =
- ADM5120_UART_EN;
-
- return 0;
-}
-
-static struct uart_driver adm5120ser_reg;
-
-static struct console adm5120_serconsole = {
- .name = "ttyS",
- .write = adm5120console_write,
- .device = uart_console_device,
- .setup = adm5120console_setup,
- .flags = CON_PRINTBUFFER,
- .cflag = B115200 | CS8 | CREAD,
- .index = 0,
- .data = &adm5120ser_reg,
-};
-
-static int __init adm5120console_init(void)
-{
- register_console(&adm5120_serconsole);
- return 0;
-}
-
-console_initcall(adm5120console_init);
-
-
-static struct uart_port adm5120ser_ports[] = {
- {
- .iobase = ADM5120_UART0_BASE,
- .irq = ADM5120_IRQ_UART0,
- .uartclk = ADM5120_UARTCLK_FREQ,
- .fifosize = 16,
- .ops = &adm5120ser_ops,
- .line = 0,
- .flags = ASYNC_BOOT_AUTOCONF,
- },
-#if (CONFIG_ADM5120_NR_UARTS > 1)
- {
- .iobase = ADM5120_UART1_BASE,
- .irq = ADM5120_IRQ_UART1,
- .uartclk = ADM5120_UARTCLK_FREQ,
- .fifosize = 16,
- .ops = &adm5120ser_ops,
- .line = 1,
- .flags = ASYNC_BOOT_AUTOCONF,
- },
-#endif
-};
-
-static struct uart_driver adm5120ser_reg = {
- .owner = THIS_MODULE,
- .driver_name = "ttyS",
- .dev_name = "ttyS",
- .major = TTY_MAJOR,
- .minor = 64,
- .nr = CONFIG_ADM5120_NR_UARTS,
- .cons = &adm5120_serconsole,
-};
-
-static int __init adm5120ser_init(void)
-{
- int ret, i;
-
- ret = uart_register_driver(&adm5120ser_reg);
- if (!ret) {
- for (i = 0; i < CONFIG_ADM5120_NR_UARTS; i++)
- uart_add_one_port(&adm5120ser_reg, &adm5120ser_ports[i]);
- }
-
- return ret;
-}
-
-__initcall(adm5120ser_init);
diff --git a/target/linux/adm5120/files/drivers/usb/host/adm5120-dbg.c b/target/linux/adm5120/files/drivers/usb/host/adm5120-dbg.c
index 1027e5c8cd..3eec94a381 100644
--- a/target/linux/adm5120/files/drivers/usb/host/adm5120-dbg.c
+++ b/target/linux/adm5120/files/drivers/usb/host/adm5120-dbg.c
@@ -82,7 +82,7 @@ static inline char *td_togglestring(u32 info)
* small: 0) header + data packets 1) just header
*/
static void __attribute__((unused))
-urb_print(struct admhcd *ahcd, struct urb *urb, char *str, int small)
+urb_print(struct admhcd *ahcd, struct urb *urb, char *str, int small, int status)
{
unsigned int pipe = urb->pipe;
@@ -92,7 +92,7 @@ urb_print(struct admhcd *ahcd, struct urb *urb, char *str, int small)
}
#ifndef ADMHC_VERBOSE_DEBUG
- if (urb->status != 0)
+ if (status != 0)
#endif
admhc_dbg(ahcd, "URB-%s %p dev=%d ep=%d%s-%s flags=%x len=%d/%d "
"stat=%d\n",
@@ -105,7 +105,7 @@ urb_print(struct admhcd *ahcd, struct urb *urb, char *str, int small)
urb->transfer_flags,
urb->actual_length,
urb->transfer_buffer_length,
- urb->status);
+ status);
#ifdef ADMHC_VERBOSE_DEBUG
if (!small) {
@@ -125,7 +125,7 @@ urb_print(struct admhcd *ahcd, struct urb *urb, char *str, int small)
urb->transfer_buffer_length: urb->actual_length;
for (i = 0; i < 16 && i < len; i++)
printk(" %02x", ((__u8 *)urb->transfer_buffer)[i]);
- printk("%s stat:%d\n", i < len? "...": "", urb->status);
+ printk("%s stat:%d\n", i < len? "...": "", status);
}
}
#endif /* ADMHC_VERBOSE_DEBUG */
diff --git a/target/linux/adm5120/files/drivers/usb/host/adm5120-hcd.c b/target/linux/adm5120/files/drivers/usb/host/adm5120-hcd.c
index 2d2604aa78..78b1aef134 100644
--- a/target/linux/adm5120/files/drivers/usb/host/adm5120-hcd.c
+++ b/target/linux/adm5120/files/drivers/usb/host/adm5120-hcd.c
@@ -45,7 +45,7 @@
#include "../core/hcd.h"
#include "../core/hub.h"
-#define DRIVER_VERSION "0.16.3"
+#define DRIVER_VERSION "0.24.0"
#define DRIVER_AUTHOR "Gabor Juhos <juhosg at openwrt.org>"
#define DRIVER_DESC "ADMtek USB 1.1 Host Controller Driver"
@@ -83,8 +83,8 @@ static void admhc_stop(struct usb_hcd *hcd);
/*
* queue up an urb for anything except the root hub
*/
-static int admhc_urb_enqueue(struct usb_hcd *hcd, struct usb_host_endpoint *ep,
- struct urb *urb, gfp_t mem_flags)
+static int admhc_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
+ gfp_t mem_flags)
{
struct admhcd *ahcd = hcd_to_admhcd(hcd);
struct ed *ed;
@@ -96,12 +96,12 @@ static int admhc_urb_enqueue(struct usb_hcd *hcd, struct usb_host_endpoint *ep,
#ifdef ADMHC_VERBOSE_DEBUG
spin_lock_irqsave(&ahcd->lock, flags);
- urb_print(ahcd, urb, "ENQEUE", usb_pipein(pipe));
+ urb_print(ahcd, urb, "ENQEUE", usb_pipein(pipe), -EINPROGRESS);
spin_unlock_irqrestore(&ahcd->lock, flags);
#endif
/* every endpoint has an ed, locate and maybe (re)initialize it */
- ed = ed_get(ahcd, ep, urb->dev, pipe, urb->interval);
+ ed = ed_get(ahcd, urb->ep, urb->dev, pipe, urb->interval);
if (!ed)
return -ENOMEM;
@@ -161,22 +161,17 @@ static int admhc_urb_enqueue(struct usb_hcd *hcd, struct usb_host_endpoint *ep,
goto fail;
}
- /* in case of unlink-during-submit */
- spin_lock(&urb->lock);
- if (urb->status != -EINPROGRESS) {
- spin_unlock(&urb->lock);
- urb->hcpriv = urb_priv;
- finish_urb(ahcd, urb);
- ret = 0;
+ ret = usb_hcd_link_urb_to_ep(hcd, urb);
+ if (ret)
goto fail;
- }
/* schedule the ed if needed */
if (ed->state == ED_IDLE) {
ret = ed_schedule(ahcd, ed);
- if (ret < 0)
- goto fail0;
-
+ if (ret < 0) {
+ usb_hcd_unlink_urb_from_ep(hcd, urb);
+ goto fail;
+ }
if (ed->type == PIPE_ISOCHRONOUS) {
u16 frame = admhc_frame_no(ahcd);
@@ -204,8 +199,6 @@ static int admhc_urb_enqueue(struct usb_hcd *hcd, struct usb_host_endpoint *ep,
admhc_dump_ed(ahcd, "admhc_urb_enqueue", urb_priv->ed, 1);
#endif
-fail0:
- spin_unlock(&urb->lock);
fail:
if (ret)
urb_priv_free(ahcd, urb_priv);
@@ -215,23 +208,28 @@ fail:
}
/*
- * decouple the URB from the HC queues (TDs, urb_priv); it's
- * already marked using urb->status. reporting is always done
+ * decouple the URB from the HC queues (TDs, urb_priv);
+ * reporting is always done
* asynchronously, and we might be dealing with an urb that's
* partially transferred, or an ED with other urbs being unlinked.
*/
-static int admhc_urb_dequeue(struct usb_hcd *hcd, struct urb *urb)
+static int admhc_urb_dequeue(struct usb_hcd *hcd, struct urb *urb,
+ int status)
{
struct admhcd *ahcd = hcd_to_admhcd(hcd);
unsigned long flags;
+ int ret;
spin_lock_irqsave(&ahcd->lock, flags);
#ifdef ADMHC_VERBOSE_DEBUG
- urb_print(ahcd, urb, "DEQUEUE", 1);
+ urb_print(ahcd, urb, "DEQUEUE", 1, status);
#endif
-
- if (HC_IS_RUNNING(hcd->state)) {
+ ret = usb_hcd_check_unlink_urb(hcd, urb, status);
+ if (ret) {
+ /* Do nothing */
+ ;
+ } else if (HC_IS_RUNNING(hcd->state)) {
struct urb_priv *urb_priv;
/* Unless an IRQ completed the unlink while it was being
@@ -249,11 +247,11 @@ static int admhc_urb_dequeue(struct usb_hcd *hcd, struct urb *urb)
* any more ... just clean up every urb's memory.
*/
if (urb->hcpriv)
- finish_urb(ahcd, urb);
+ finish_urb(ahcd, urb, status);
}
spin_unlock_irqrestore(&ahcd->lock, flags);
- return 0;
+ return ret;
}
/*-------------------------------------------------------------------------*/
diff --git a/target/linux/adm5120/files/drivers/usb/host/adm5120-pm.c b/target/linux/adm5120/files/drivers/usb/host/adm5120-pm.c
index ac7bf6cfcc..c88e44829f 100644
--- a/target/linux/adm5120/files/drivers/usb/host/adm5120-pm.c
+++ b/target/linux/adm5120/files/drivers/usb/host/adm5120-pm.c
@@ -383,9 +383,8 @@ static int admhc_restart(struct admhcd *ahcd)
ed, ed->state);
}
- spin_lock(&urb->lock);
- urb->status = -ESHUTDOWN;
- spin_unlock(&urb->lock);
+ if (!urb->unlinked)
+ urb->unlinked = -ESHUTDOWN;
}
finish_unlinks(ahcd, 0);
spin_unlock_irq(&ahcd->lock);
diff --git a/target/linux/adm5120/files/drivers/usb/host/adm5120-q.c b/target/linux/adm5120/files/drivers/usb/host/adm5120-q.c
index 52bd1e4e82..632140b75e 100644
--- a/target/linux/adm5120/files/drivers/usb/host/adm5120-q.c
+++ b/target/linux/adm5120/files/drivers/usb/host/adm5120-q.c
@@ -23,31 +23,14 @@
* PRECONDITION: ahcd lock held, irqs blocked.
*/
static void
-finish_urb(struct admhcd *ahcd, struct urb *urb)
+finish_urb(struct admhcd *ahcd, struct urb *urb, int status)
__releases(ahcd->lock)
__acquires(ahcd->lock)
{
urb_priv_free(ahcd, urb->hcpriv);
- urb->hcpriv = NULL;
- spin_lock(&urb->lock);
- if (likely(urb->status == -EINPROGRESS))
- urb->status = 0;
-
- /* report short control reads right even though the data TD always
- * has TD_R set. (much simpler, but creates the 1-td limit.)
- */
- if (unlikely(urb->transfer_flags & URB_SHORT_NOT_OK)
- && unlikely(usb_pipecontrol(urb->pipe))
- && urb->actual_length < urb->transfer_buffer_length
- && usb_pipein(urb->pipe)
- && urb->status == 0) {
- urb->status = -EREMOTEIO;
-#ifdef ADMHC_VERBOSE_DEBUG
- urb_print(ahcd, urb, "SHORT", usb_pipeout(urb->pipe));
-#endif
- }
- spin_unlock(&urb->lock);
+ if (likely(status == -EINPROGRESS))
+ status = 0;
switch (usb_pipetype(urb->pipe)) {
case PIPE_ISOCHRONOUS:
@@ -59,12 +42,13 @@ __acquires(ahcd->lock)
}
#ifdef ADMHC_VERBOSE_DEBUG
- urb_print(ahcd, urb, "RET", usb_pipeout (urb->pipe));
+ urb_print(ahcd, urb, "RET", usb_pipeout (urb->pipe), status);
#endif
/* urb->complete() can reenter this HCD */
+ usb_hcd_unlink_urb_from_ep(admhcd_to_hcd(ahcd), urb);
spin_unlock(&ahcd->lock);
- usb_hcd_giveback_urb(admhcd_to_hcd(ahcd), urb);
+ usb_hcd_giveback_urb(admhcd_to_hcd(ahcd), urb, status);
spin_lock(&ahcd->lock);
}
@@ -571,9 +555,7 @@ static void td_submit_urb(struct admhcd *ahcd, struct urb *urb)
* Done List handling functions
*-------------------------------------------------------------------------*/
-/* calculate transfer length/status and update the urb
- * PRECONDITION: irqsafe (only for urb->status locking)
- */
+/* calculate transfer length/status and update the urb */
static int td_done(struct admhcd *ahcd, struct urb *urb, struct td *td)
{
struct urb_priv *urb_priv = urb->hcpriv;
@@ -582,6 +564,7 @@ static int td_done(struct admhcd *ahcd, struct urb *urb, struct td *td)
u32 tdDBP;
int type = usb_pipetype(urb->pipe);
int cc;
+ int status = -EINPROGRESS;
info = hc32_to_cpup(ahcd, &td->hwINFO);
tdDBP = hc32_to_cpup(ahcd, &td->hwDBP);
@@ -596,10 +579,9 @@ static int td_done(struct admhcd *ahcd, struct urb *urb, struct td *td)
/* NOTE: assumes FC in tdINFO == 0, and that
* only the first of 0..MAXPSW psws is used.
*/
-#if 0
- if (tdINFO & TD_CC) /* hc didn't touch? */
- return;
-#endif
+ if (info & TD_CC) /* hc didn't touch? */
+ return status;
+
if (usb_pipeout(urb->pipe))
dlen = urb->iso_frame_desc[td->index].length;
else {
@@ -628,12 +610,9 @@ static int td_done(struct admhcd *ahcd, struct urb *urb, struct td *td)
&& !(urb->transfer_flags & URB_SHORT_NOT_OK))
cc = TD_CC_NOERROR;
- if (cc != TD_CC_NOERROR && cc < TD_CC_HCD0) {
- spin_lock(&urb->lock);
- if (urb->status == -EINPROGRESS)
- urb->status = cc_to_error[cc];
- spin_unlock(&urb->lock);
- }
+ if (cc != TD_CC_NOERROR && cc < TD_CC_HCD0)
+ status = cc_to_error[cc];
+
/* count all non-empty packets except control SETUP packet */
if ((type != PIPE_CONTROL || td->index != 0) && tdDBP != 0) {
@@ -651,15 +630,16 @@ static int td_done(struct admhcd *ahcd, struct urb *urb, struct td *td)
list_del(&td->td_list);
urb_priv->td_idx++;
- return cc;
+ return status;
}
/*-------------------------------------------------------------------------*/
-static inline struct td *
+static inline void
ed_halted(struct admhcd *ahcd, struct td *td, int cc, struct td *rev)
{
struct urb *urb = td->urb;
+ struct urb_priv *urb_priv = urb->hcpriv;
struct ed *ed = td->ed;
struct list_head *tmp = td->td_list.next;
__hc32 toggle = ed->hwHeadP & cpu_to_hc32(ahcd, ED_C);
@@ -672,13 +652,12 @@ ed_halted(struct admhcd *ahcd, struct td *td, int cc, struct td *rev)
wmb();
ed->hwHeadP &= ~cpu_to_hc32(ahcd, ED_H);
- /* put any later tds from this urb onto the donelist, after 'td',
- * order won't matter here: no errors, and nothing was transferred.
- * also patch the ed so it looks as if those tds completed normally.
+ /* Get rid of all later tds from this urb. We don't have
+ * to be careful: no errors and nothing was transferred.
+ * Also patch the ed so it looks as if those tds completed normally.
*/
while (tmp != &ed->td_list) {
struct td *next;
- __hc32 info;
next = list_entry(tmp, struct td, td_list);
tmp = next->td_list.next;
@@ -693,16 +672,8 @@ ed_halted(struct admhcd *ahcd, struct td *td, int cc, struct td *rev)
* then we need to leave the control STATUS packet queued
* and clear ED_SKIP.
*/
- info = next->hwINFO;
-#if 0 /* FIXME */
- info |= cpu_to_hc32(ahcd, TD_DONE);
-#endif
- info &= ~cpu_to_hc32(ahcd, TD_CC);
- next->hwINFO = info;
-
- next->next_dl_td = rev;
- rev = next;
-
+ list_del(&next->td_list);
+ urb_priv->td_cnt++;
ed->hwHeadP = next->hwNextTD | toggle;
}
@@ -728,8 +699,6 @@ ed_halted(struct admhcd *ahcd, struct td *td, int cc, struct td *rev)
hc32_to_cpu(ahcd, td->hwINFO),
cc, cc_to_error [cc]);
}
-
- return rev;
}
/*-------------------------------------------------------------------------*/
@@ -796,12 +765,13 @@ rescan_this:
struct urb *urb;
struct urb_priv *urb_priv;
__hc32 savebits;
+ int status;
td = list_entry(entry, struct td, td_list);
urb = td->urb;
urb_priv = td->urb->hcpriv;
- if (urb->status == -EINPROGRESS) {
+ if (!urb->unlinked) {
prev = &td->hwNextTD;
continue;
}
@@ -817,12 +787,12 @@ rescan_this:
#ifdef ADMHC_VERBOSE_DEBUG
urb_print(ahcd, urb, "PARTIAL", 0);
#endif
- td_done(ahcd, urb, td);
+ status = td_done(ahcd, urb, td);
/* if URB is done, clean up */
if (urb_priv->td_idx == urb_priv->td_cnt) {
modified = completed = 1;
- finish_urb(ahcd, urb);
+ finish_urb(ahcd, urb, status);
}
}
if (completed && !list_empty(&ed->td_list))
@@ -920,13 +890,13 @@ static void ed_update(struct admhcd *ahcd, struct ed *ed)
struct td *td = list_entry(entry, struct td, td_list);
struct urb *urb = td->urb;
struct urb_priv *urb_priv = urb->hcpriv;
- int cc;
+ int status;
if (hc32_to_cpup(ahcd, &td->hwINFO) & TD_OWN)
break;
/* update URB's length and status from TD */
- cc = td_done(ahcd, urb, td);
+ status = td_done(ahcd, urb, td);
if (is_ed_halted(ahcd, ed) && is_td_halted(ahcd, ed, td))
ed_unhalt(ahcd, ed, urb);
@@ -935,7 +905,7 @@ static void ed_update(struct admhcd *ahcd, struct ed *ed)
/* If all this urb's TDs are done, call complete() */
if (urb_priv->td_idx == urb_priv->td_cnt)
- finish_urb(ahcd, urb);
+ finish_urb(ahcd, urb, status);
/* clean schedule: unlink EDs that are no longer busy */
if (list_empty(&ed->td_list)) {
diff --git a/target/linux/adm5120/patches-2.6.23/001-adm5120.patch b/target/linux/adm5120/patches-2.6.23/001-adm5120.patch
deleted file mode 100644
index 5cf66ec8f6..0000000000
--- a/target/linux/adm5120/patches-2.6.23/001-adm5120.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-Index: linux-2.6.23.14/arch/mips/Kconfig
-===================================================================
---- linux-2.6.23.14.orig/arch/mips/Kconfig
-+++ linux-2.6.23.14/arch/mips/Kconfig
-@@ -15,6 +15,18 @@ choice
- prompt "System type"
- default SGI_IP22
-
-+config MIPS_ADM5120
-+ bool "ADM5120 SoC based machines"
-+ select SYS_HAS_CPU_MIPS32_R1
-+ select SYS_HAS_EARLY_PRINTK
-+ select DMA_NONCOHERENT
-+ select HW_HAS_PCI
-+ select IRQ_CPU
-+ select SYS_SUPPORTS_LITTLE_ENDIAN
-+ select SYS_SUPPORTS_BIG_ENDIAN
-+ select SYS_SUPPORTS_32BIT_KERNEL
-+ select GENERIC_GPIO
-+
- config MACH_ALCHEMY
- bool "Alchemy processor based machines"
-
-@@ -597,6 +609,7 @@ config WR_PPMC
-
- endchoice
-
-+source "arch/mips/adm5120/Kconfig"
- source "arch/mips/au1000/Kconfig"
- source "arch/mips/jazz/Kconfig"
- source "arch/mips/pmc-sierra/Kconfig"
-Index: linux-2.6.23.14/arch/mips/Makefile
-===================================================================
---- linux-2.6.23.14.orig/arch/mips/Makefile
-+++ linux-2.6.23.14/arch/mips/Makefile
-@@ -168,6 +168,16 @@ cflags-$(CONFIG_MACH_JAZZ) += -Iinclude/
- load-$(CONFIG_MACH_JAZZ) += 0xffffffff80080000
-
- #
-+# ADMtek 5120
-+#
-+
-+libs-$(CONFIG_MIPS_ADM5120) += arch/mips/adm5120/prom/
-+core-$(CONFIG_MIPS_ADM5120) += arch/mips/adm5120/
-+core-$(CONFIG_MIPS_ADM5120) += arch/mips/adm5120/boards/
-+cflags-$(CONFIG_MIPS_ADM5120) += -Iinclude/asm-mips/mach-adm5120
-+load-$(CONFIG_MIPS_ADM5120) += 0xffffffff80001000
-+
-+#
- # Common Alchemy Au1x00 stuff
- #
- core-$(CONFIG_SOC_AU1X00) += arch/mips/au1000/common/
-Index: linux-2.6.23.14/include/asm-mips/bootinfo.h
-===================================================================
---- linux-2.6.23.14.orig/include/asm-mips/bootinfo.h
-+++ linux-2.6.23.14/include/asm-mips/bootinfo.h
-@@ -208,6 +208,58 @@
- #define MACH_GROUP_WINDRIVER 28 /* Windriver boards */
- #define MACH_WRPPMC 1
-
-+/*
-+ * Valid machtype for group ADMtek ADM5120
-+ */
-+#define MACH_ADM5120_GENERIC 0 /* Generic board */
-+#define MACH_ADM5120_WP54G_WRT 1 /* Compex WP54G-WRT */
-+#define MACH_ADM5120_WP54G 2 /* Compex WP54G */
-+#define MACH_ADM5120_WP54AG 3 /* Compex WP54AG */
-+#define MACH_ADM5120_WPP54G 4 /* Compex WPP54G */
-+#define MACH_ADM5120_WPP54AG 5 /* Compex WPP54AG */
-+#define MACH_ADM5120_NP28G 6 /* Compex NP28G */
-+#define MACH_ADM5120_NP28GHS 7 /* Compex NP28G HotSpot */
-+#define MACH_ADM5120_NP27G 8 /* Compex NP27G */
-+#define MACH_ADM5120_WP54Gv1C 9 /* Compex WP54G version 1C */
-+#define MACH_ADM5120_RB_111 10 /* Mikrotik RouterBOARD 111 */
-+#define MACH_ADM5120_RB_112 11 /* Mikrotik RouterBOARD 112 */
-+#define MACH_ADM5120_RB_133 12 /* Mikrotik RouterBOARD 133 */
-+#define MACH_ADM5120_RB_133C 13 /* Mikrotik RouterBOARD 133c */
-+#define MACH_ADM5120_RB_150 14 /* Mikrotik RouterBOARD 150 */
-+#define MACH_ADM5120_RB_153 15 /* Mikrotik RouterBOARD 153 */
-+#define MACH_ADM5120_HS100 16 /* ZyXEL HomeSafe 100/100W */
-+#define MACH_ADM5120_P334 17 /* ZyXEL Prestige 334 */
-+#define MACH_ADM5120_P334U 18 /* ZyXEL Prestige 334U */
-+#define MACH_ADM5120_P334W 19 /* ZyXEL Prestige 334W */
-+#define MACH_ADM5120_P334WH 20 /* ZyXEL Prestige 334WH */
-+#define MACH_ADM5120_P334WHD 21 /* ZyXEL Prestige 334WHD */
-+#define MACH_ADM5120_P334WT 22 /* ZyXEL Prestige 334WT */
-+#define MACH_ADM5120_P335 23 /* ZyXEL Prestige 335/335WT */
-+#define MACH_ADM5120_P335PLUS 24 /* ZyXEL Prestige 335Plus */
-+#define MACH_ADM5120_P335U 25 /* ZyXEL Prestige 335U */
-+#define MACH_ADM5120_ES2108 26 /* ZyXEL Ethernet Switch 2108 */
-+#define MACH_ADM5120_ES2108F 27 /* ZyXEL Ethernet Switch 2108-F */
-+#define MACH_ADM5120_ES2108G 28 /* ZyXEL Ethernet Switch 2108-G */
-+#define MACH_ADM5120_ES2108LC 29 /* ZyXEL Ethernet Switch 2108-LC */
-+#define MACH_ADM5120_ES2108PWR 30 /* ZyXEL Ethernet Switch 2108-PWR */
-+#define MACH_ADM5120_ES2024A 31 /* ZyXEL Ethernet Switch 2024A */
-+#define MACH_ADM5120_ES2024PWR 32 /* ZyXEL Ethernet Switch 2024PWR */
-+#define MACH_ADM5120_CAS630 33 /* Cellvision CAS-630/630W */
-+#define MACH_ADM5120_CAS670 34 /* Cellvision CAS-670/670W */
-+#define MACH_ADM5120_CAS700 36 /* Cellvision CAS-700/700W */
-+#define MACH_ADM5120_CAS771 37 /* Cellvision CAS-771/771W */
-+#define MACH_ADM5120_CAS790 38 /* Cellvision CAS-790 */
-+#define MACH_ADM5120_CAS861 39 /* Cellvision CAS-861/861W */
-+#define MACH_ADM5120_NFS101U 40 /* Cellvision NFS-101U/101WU */
-+#define MACH_ADM5120_NFS202U 41 /* Cellvision NFS-202U/202WU */
-+#define MACH_ADM5120_EASY5120PATA 42 /* Infineon EASY 5120P-ATA */
-+#define MACH_ADM5120_EASY5120RT 43 /* Infineon EASY 5120-RT */
-+#define MACH_ADM5120_EASY5120WVOIP 44 /* Infineon EASY 5120-WVoIP */
-+#define MACH_ADM5120_EASY83000 45 /* Infineon EASY-83000 */
-+#define MACH_ADM5120_BR6104K 46 /* Edimax BR-6104K/BR-6104KP */
-+#define MACH_ADM5120_RB_192 47 /* Mikrotik RouterBOARD 192 */
-+#define MACH_ADM5120_BR61x4WG 48 /* Edimax BR-6104Wg/BR-6114WG */
-+
- #define CL_SIZE COMMAND_LINE_SIZE
-
- const char *get_system_type(void);
diff --git a/target/linux/adm5120/patches-2.6.23/002-adm5120_flash.patch b/target/linux/adm5120/patches-2.6.23/002-adm5120_flash.patch
deleted file mode 100644
index b1f36a1e2b..0000000000
--- a/target/linux/adm5120/patches-2.6.23/002-adm5120_flash.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Index: linux-2.6.23.14/drivers/mtd/maps/Kconfig
-===================================================================
---- linux-2.6.23.14.orig/drivers/mtd/maps/Kconfig
-+++ linux-2.6.23.14/drivers/mtd/maps/Kconfig
-@@ -614,5 +614,9 @@ config MTD_PLATRAM
-
- This selection automatically selects the map_ram driver.
-
-+config MTD_ADM5120
-+ tristate "Map driver for ADM5120 based boards"
-+ depends on MIPS_ADM5120
-+
- endmenu
-
-Index: linux-2.6.23.14/drivers/mtd/maps/Makefile
-===================================================================
---- linux-2.6.23.14.orig/drivers/mtd/maps/Makefile
-+++ linux-2.6.23.14/drivers/mtd/maps/Makefile
-@@ -47,6 +47,7 @@ obj-$(CONFIG_MTD_OCELOT) += ocelot.o
- obj-$(CONFIG_MTD_SOLUTIONENGINE)+= solutionengine.o
- obj-$(CONFIG_MTD_PCI) += pci.o
- obj-$(CONFIG_MTD_ALCHEMY) += alchemy-flash.o
-+obj-$(CONFIG_MTD_ADM5120) += adm5120-flash.o
- obj-$(CONFIG_MTD_AUTCPU12) += autcpu12-nvram.o
- obj-$(CONFIG_MTD_EDB7312) += edb7312.o
- obj-$(CONFIG_MTD_IMPA7) += impa7.o
diff --git a/target/linux/adm5120/patches-2.6.23/003-adm5120_switch.patch b/target/linux/adm5120/patches-2.6.23/003-adm5120_switch.patch
deleted file mode 100644
index ef80cf7fe8..0000000000
--- a/target/linux/adm5120/patches-2.6.23/003-adm5120_switch.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Index: linux-2.6.23.14/drivers/net/Kconfig
-===================================================================
---- linux-2.6.23.14.orig/drivers/net/Kconfig
-+++ linux-2.6.23.14/drivers/net/Kconfig
-@@ -589,6 +589,10 @@ config MIPS_AU1X00_ENET
- If you have an Alchemy Semi AU1X00 based system
- say Y. Otherwise, say N.
-
-+config MIPS_ADM5120_ENET
-+ tristate "MIPS ADM5120 Ethernet switch support"
-+ depends on NET_ETHERNET && MIPS_ADM5120
-+
- config NET_SB1250_MAC
- tristate "SB1250 Ethernet support"
- depends on SIBYTE_SB1xxx_SOC
-Index: linux-2.6.23.14/drivers/net/Makefile
-===================================================================
---- linux-2.6.23.14.orig/drivers/net/Makefile
-+++ linux-2.6.23.14/drivers/net/Makefile
-@@ -174,6 +174,7 @@ obj-$(CONFIG_SC92031) += sc92031.o
- # This is also a 82596 and should probably be merged
- obj-$(CONFIG_LP486E) += lp486e.o
-
-+obj-$(CONFIG_MIPS_ADM5120_ENET) += adm5120sw.o
- obj-$(CONFIG_ETH16I) += eth16i.o
- obj-$(CONFIG_ZORRO8390) += zorro8390.o
- obj-$(CONFIG_HPLANCE) += hplance.o 7990.o
diff --git a/target/linux/adm5120/patches-2.6.23/004-adm5120_nand.patch b/target/linux/adm5120/patches-2.6.23/004-adm5120_nand.patch
deleted file mode 100644
index 1e61a06572..0000000000
--- a/target/linux/adm5120/patches-2.6.23/004-adm5120_nand.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Index: linux-2.6.23.14/drivers/mtd/nand/Kconfig
-===================================================================
---- linux-2.6.23.14.orig/drivers/mtd/nand/Kconfig
-+++ linux-2.6.23.14/drivers/mtd/nand/Kconfig
-@@ -81,6 +81,16 @@ config MTD_NAND_TS7250
- help
- Support for NAND flash on Technologic Systems TS-7250 platform.
-
-+config MTD_NAND_ADM5120
-+ tristate "ADM5120 NAND support"
-+ depends on MTD_NAND && MIPS_ADM5120
-+ help
-+ This enables the driver for the ADM5120 SoC built-in
-+ NAND flash interface.
-+
-+ No board specific support is done by this driver, each board
-+ must advertise a platform_device for the driver to attach.
-+
- config MTD_NAND_IDS
- tristate
-
-Index: linux-2.6.23.14/drivers/mtd/nand/Makefile
-===================================================================
---- linux-2.6.23.14.orig/drivers/mtd/nand/Makefile
-+++ linux-2.6.23.14/drivers/mtd/nand/Makefile
-@@ -10,6 +10,7 @@ obj-$(CONFIG_MTD_NAND_CAFE) += cafe_nan
- obj-$(CONFIG_MTD_NAND_SPIA) += spia.o
- obj-$(CONFIG_MTD_NAND_AMS_DELTA) += ams-delta.o
- obj-$(CONFIG_MTD_NAND_TOTO) += toto.o
-+obj-$(CONFIG_MTD_NAND_ADM5120) += adm5120-nand.o
- obj-$(CONFIG_MTD_NAND_AUTCPU12) += autcpu12.o
- obj-$(CONFIG_MTD_NAND_EDB7312) += edb7312.o
- obj-$(CONFIG_MTD_NAND_AU1550) += au1550nd.o
diff --git a/target/linux/adm5120/patches-2.6.23/005-adm5120_usb.patch b/target/linux/adm5120/patches-2.6.23/005-adm5120_usb.patch
deleted file mode 100644
index c1b4ea31c2..0000000000
--- a/target/linux/adm5120/patches-2.6.23/005-adm5120_usb.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Index: linux-2.6.23.14/drivers/usb/host/Kconfig
-===================================================================
---- linux-2.6.23.14.orig/drivers/usb/host/Kconfig
-+++ linux-2.6.23.14/drivers/usb/host/Kconfig
-@@ -248,3 +248,6 @@ config USB_R8A66597_HCD
- To compile this driver as a module, choose M here: the
- module will be called r8a66597-hcd.
-
-+config USB_ADM5120_HCD
-+ tristate "ADM5120 HCD support (EXPERIMENTAL)"
-+ depends on USB && MIPS_ADM5120 && EXPERIMENTAL
-Index: linux-2.6.23.14/drivers/usb/host/Makefile
-===================================================================
---- linux-2.6.23.14.orig/drivers/usb/host/Makefile
-+++ linux-2.6.23.14/drivers/usb/host/Makefile
-@@ -8,6 +8,7 @@ endif
-
- obj-$(CONFIG_PCI) += pci-quirks.o
-
-+obj-$(CONFIG_USB_ADM5120_HCD) += adm5120-hcd.o
- obj-$(CONFIG_USB_EHCI_HCD) += ehci-hcd.o
- obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o
- obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o
-Index: linux-2.6.23.14/drivers/usb/Makefile
-===================================================================
---- linux-2.6.23.14.orig/drivers/usb/Makefile
-+++ linux-2.6.23.14/drivers/usb/Makefile
-@@ -16,6 +16,7 @@ obj-$(CONFIG_USB_UHCI_HCD) += host/
- obj-$(CONFIG_USB_SL811_HCD) += host/
- obj-$(CONFIG_USB_U132_HCD) += host/
- obj-$(CONFIG_USB_R8A66597_HCD) += host/
-+obj-$(CONFIG_USB_ADM5120_HCD) += host/
-
- obj-$(CONFIG_USB_ACM) += class/
- obj-$(CONFIG_USB_PRINTER) += class/
diff --git a/target/linux/adm5120/patches-2.6.23/006-adm5120_leds.patch b/target/linux/adm5120/patches-2.6.23/006-adm5120_leds.patch
deleted file mode 100644
index 8b5d86832f..0000000000
--- a/target/linux/adm5120/patches-2.6.23/006-adm5120_leds.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Index: linux-2.6.23.14/drivers/leds/Kconfig
-===================================================================
---- linux-2.6.23.14.orig/drivers/leds/Kconfig
-+++ linux-2.6.23.14/drivers/leds/Kconfig
-@@ -18,6 +18,21 @@ config LEDS_CLASS
-
- comment "LED drivers"
-
-+config LEDS_ADM5120
-+ tristate "LED Support for ADM5120 GPIO LEDs"
-+ depends on LEDS_GPIO && MIPS_ADM5120
-+ help
-+ This option enables support for LEDs connected to GPIO lines
-+ on ADM5120 SoC based platforms.
-+
-+config LEDS_ADM5120_EXPERIMENTAL
-+ bool "Enable ADM5120 LEDs experimental code"
-+ depends on LEDS_ADM5120
-+
-+config LEDS_ADM5120_DIAG
-+ bool "Enable ADM5120 LEDs diagnostic mode"
-+ depends on LEDS_ADM5120
-+
- config LEDS_CORGI
- tristate "LED Support for the Sharp SL-C7x0 series"
- depends on LEDS_CLASS && PXA_SHARP_C7xx
-Index: linux-2.6.23.14/drivers/leds/Makefile
-===================================================================
---- linux-2.6.23.14.orig/drivers/leds/Makefile
-+++ linux-2.6.23.14/drivers/leds/Makefile
-@@ -5,6 +5,7 @@ obj-$(CONFIG_LEDS_CLASS) += led-class.o
- obj-$(CONFIG_LEDS_TRIGGERS) += led-triggers.o
-
- # LED Platform Drivers
-+obj-$(CONFIG_LEDS_ADM5120) += leds-adm5120.o
- obj-$(CONFIG_LEDS_CORGI) += leds-corgi.o
- obj-$(CONFIG_LEDS_LOCOMO) += leds-locomo.o
- obj-$(CONFIG_LEDS_SPITZ) += leds-spitz.o
diff --git a/target/linux/adm5120/patches-2.6.23/007-adm5120_pci.patch b/target/linux/adm5120/patches-2.6.23/007-adm5120_pci.patch
deleted file mode 100644
index d44bd2d27d..0000000000
--- a/target/linux/adm5120/patches-2.6.23/007-adm5120_pci.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Index: linux-2.6.23.14/arch/mips/pci/Makefile
-===================================================================
---- linux-2.6.23.14.orig/arch/mips/pci/Makefile
-+++ linux-2.6.23.14/arch/mips/pci/Makefile
-@@ -46,3 +46,4 @@ obj-$(CONFIG_TOSHIBA_RBTX4938) += fixup-
- obj-$(CONFIG_VICTOR_MPC30X) += fixup-mpc30x.o
- obj-$(CONFIG_ZAO_CAPCELLA) += fixup-capcella.o
- obj-$(CONFIG_WR_PPMC) += fixup-wrppmc.o
-+obj-$(CONFIG_PCI_ADM5120) += pci-adm5120.o
-Index: linux-2.6.23.14/include/linux/pci_ids.h
-===================================================================
---- linux-2.6.23.14.orig/include/linux/pci_ids.h
-+++ linux-2.6.23.14/include/linux/pci_ids.h
-@@ -1698,6 +1698,9 @@
- #define PCI_VENDOR_ID_ESDGMBH 0x12fe
- #define PCI_DEVICE_ID_ESDGMBH_CPCIASIO4 0x0111
-
-+#define PCI_VENDOR_ID_ADMTEK 0x1317
-+#define PCI_DEVICE_ID_ADMTEK_ADM5120 0x5120
-+
- #define PCI_VENDOR_ID_SIIG 0x131f
- #define PCI_SUBVENDOR_ID_SIIG 0x131f
- #define PCI_DEVICE_ID_SIIG_1S_10x_550 0x1000
diff --git a/target/linux/adm5120/patches-2.6.23/008-adm5120_uart.patch b/target/linux/adm5120/patches-2.6.23/008-adm5120_uart.patch
deleted file mode 100644
index 3490e90805..0000000000
--- a/target/linux/adm5120/patches-2.6.23/008-adm5120_uart.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-Index: linux-2.6.23.14/drivers/serial/Makefile
-===================================================================
---- linux-2.6.23.14.orig/drivers/serial/Makefile
-+++ linux-2.6.23.14/drivers/serial/Makefile
-@@ -21,6 +21,7 @@ obj-$(CONFIG_SERIAL_8250_EXAR_ST16C554)
- obj-$(CONFIG_SERIAL_8250_HUB6) += 8250_hub6.o
- obj-$(CONFIG_SERIAL_8250_MCA) += 8250_mca.o
- obj-$(CONFIG_SERIAL_8250_AU1X00) += 8250_au1x00.o
-+obj-$(CONFIG_SERIAL_ADM5120) += adm5120_uart.o
- obj-$(CONFIG_SERIAL_AMBA_PL010) += amba-pl010.o
- obj-$(CONFIG_SERIAL_AMBA_PL011) += amba-pl011.o
- obj-$(CONFIG_SERIAL_CLPS711X) += clps711x.o
-Index: linux-2.6.23.14/include/linux/serial_core.h
-===================================================================
---- linux-2.6.23.14.orig/include/linux/serial_core.h
-+++ linux-2.6.23.14/include/linux/serial_core.h
-@@ -147,6 +147,9 @@
- #define PORT_SB1250_DUART 77
-
-
-+/* ADMtek ADM5120 SoC */
-+#define PORT_ADM5120 77
-+
- #ifdef __KERNEL__
-
- #include <linux/compiler.h>
-Index: linux-2.6.23.14/drivers/serial/Kconfig
-===================================================================
---- linux-2.6.23.14.orig/drivers/serial/Kconfig
-+++ linux-2.6.23.14/drivers/serial/Kconfig
-@@ -280,6 +280,22 @@ config SERIAL_8250_RM9K
-
- comment "Non-8250 serial port support"
-
-+config SERIAL_ADM5120
-+ bool "ADM5120 serial port support"
-+ depends on MIPS_ADM5120
-+ select SERIAL_CORE
-+ select SERIAL_CORE_CONSOLE
-+ help
-+ Driver for the on chip UARTs on the ADM5120 SoC
-+
-+config ADM5120_NR_UARTS
-+ int "Maximum number of ADM5120 serial ports"
-+ depends on SERIAL_ADM5120
-+ default "2"
-+ ---help---
-+ Set this to the number of serial ports you want the driver to
-+ support.
-+
- config SERIAL_AMBA_PL010
- tristate "ARM AMBA PL010 serial port support"
- depends on ARM_AMBA && (BROKEN || !ARCH_VERSATILE)
diff --git a/target/linux/adm5120/patches-2.6.23/009-adm5120_leds_switch_trigger.patch b/target/linux/adm5120/patches-2.6.23/009-adm5120_leds_switch_trigger.patch
deleted file mode 100644
index 248d7b38e9..0000000000
--- a/target/linux/adm5120/patches-2.6.23/009-adm5120_leds_switch_trigger.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Index: linux-2.6.23.14/drivers/leds/Kconfig
-===================================================================
---- linux-2.6.23.14.orig/drivers/leds/Kconfig
-+++ linux-2.6.23.14/drivers/leds/Kconfig
-@@ -165,4 +165,12 @@ config LEDS_TRIGGER_DEFAULT_ON
- This allows LEDs to be initialised in the ON state.
- If unsure, say Y.
-
-+config LEDS_TRIGGER_ADM5120_SWITCH
-+ tristate "LED ADM5120 Switch Port Status Trigger"
-+ depends on LEDS_TRIGGERS && LEDS_ADM5120
-+ help
-+ This allows LEDs to be controlled by the port states of
-+ the ADM5120 built-in Ethernet Switch
-+ If unsure, say N.
-+
- endif # NEW_LEDS
-Index: linux-2.6.23.14/drivers/leds/Makefile
-===================================================================
---- linux-2.6.23.14.orig/drivers/leds/Makefile
-+++ linux-2.6.23.14/drivers/leds/Makefile
-@@ -26,3 +26,4 @@ obj-$(CONFIG_LEDS_TRIGGER_IDE_DISK) += l
- obj-$(CONFIG_LEDS_TRIGGER_HEARTBEAT) += ledtrig-heartbeat.o
- obj-$(CONFIG_LEDS_TRIGGER_MORSE) += ledtrig-morse.o
- obj-$(CONFIG_LEDS_TRIGGER_DEFAULT_ON) += ledtrig-default-on.o
-+obj-$(CONFIG_LEDS_TRIGGER_ADM5120_SWITCH) += ledtrig-adm5120-switch.o
diff --git a/target/linux/adm5120/patches-2.6.23/100-mtd_myloder_partition_parser.patch b/target/linux/adm5120/patches-2.6.23/100-mtd_myloder_partition_parser.patch
deleted file mode 100644
index eaa1645fe6..0000000000
--- a/target/linux/adm5120/patches-2.6.23/100-mtd_myloder_partition_parser.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Index: linux-2.6.23.14/drivers/mtd/Kconfig
-===================================================================
---- linux-2.6.23.14.orig/drivers/mtd/Kconfig
-+++ linux-2.6.23.14/drivers/mtd/Kconfig
-@@ -160,6 +160,22 @@ 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_MYLOADER_PARTS
-+ tristate "MyLoader partition parsing"
-+ depends on MIPS_ADM5120 && MTD_PARTITIONS
-+ ---help---
-+ MyLoader is a bootloader which allows the user to define partitions
-+ in flash devices, by putting a table in the second erase block
-+ on the device, similar to a partition table. This table gives the
-+ offsets and lengths of the user defined partitions.
-+
-+ If you need code which can detect and parse these tables, and
-+ register MTD 'partitions' corresponding to each image detected,
-+ enable this option.
-+
-+ You will still need the parsing functions to be called by the driver
-+ for your particular device. It won't happen automatically.
-+
- comment "User Modules And Translation Layers"
-
- config MTD_CHAR
-Index: linux-2.6.23.14/drivers/mtd/Makefile
-===================================================================
---- linux-2.6.23.14.orig/drivers/mtd/Makefile
-+++ linux-2.6.23.14/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_MYLOADER_PARTS) += myloader.o
-
- # 'Users' - code which presents functionality to userspace.
- obj-$(CONFIG_MTD_CHAR) += mtdchar.o
diff --git a/target/linux/adm5120/patches-2.6.23/101-cfi_fixup_macronix_bootloc.patch b/target/linux/adm5120/patches-2.6.23/101-cfi_fixup_macronix_bootloc.patch
deleted file mode 100644
index f3f678eb2e..0000000000
--- a/target/linux/adm5120/patches-2.6.23/101-cfi_fixup_macronix_bootloc.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-Index: linux-2.6.23.14/drivers/mtd/chips/cfi_cmdset_0002.c
-===================================================================
---- linux-2.6.23.14.orig/drivers/mtd/chips/cfi_cmdset_0002.c
-+++ linux-2.6.23.14/drivers/mtd/chips/cfi_cmdset_0002.c
-@@ -47,12 +47,19 @@
- #define MANUFACTURER_AMD 0x0001
- #define MANUFACTURER_ATMEL 0x001F
- #define MANUFACTURER_SST 0x00BF
-+#define MANUFACTURER_MACRONIX 0x00C2
- #define SST49LF004B 0x0060
- #define SST49LF040B 0x0050
- #define SST49LF008A 0x005a
- #define AT49BV6416 0x00d6
- #define MANUFACTURER_SAMSUNG 0x00ec
-
-+/* Macronix */
-+#define MX29LV160B 0x2249 /* MX29LV160 Bottom-boot chip */
-+#define MX29LV160T 0x22C4 /* MX29LV160 Top-boot chip */
-+#define MX29LV320B 0x22A8 /* MX29LV320 Bottom-boot chip */
-+#define MX29LV320T 0x22A7 /* MX29LV320 Top-boot chip */
-+
- static int cfi_amdstd_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *);
- static int cfi_amdstd_write_words(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
- static int cfi_amdstd_write_buffers(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
-@@ -217,6 +224,41 @@ static void fixup_use_atmel_lock(struct
- mtd->flags |= MTD_STUPID_LOCK;
- }
-
-+#ifdef CONFIG_MTD_CFI_FIXUP_MACRONIX_BOOTLOC
-+/*
-+ * Some Macronix chips has no/bad bootblock information in the CFI table
-+ */
-+static void fixup_macronix_bootloc(struct mtd_info *mtd, void* param)
-+{
-+ struct map_info *map = mtd->priv;
-+ struct cfi_private *cfi = map->fldrv_priv;
-+ struct cfi_pri_amdstd *extp = cfi->cmdset_priv;
-+ __u8 t;
-+
-+ switch (cfi->id) {
-+ /* TODO: put affected chip ids here */
-+ case MX29LV160B:
-+ case MX29LV320B:
-+ t = 2; /* Bottom boot */
-+ break;
-+ case MX29LV160T:
-+ case MX29LV320T:
-+ t = 3; /* Top boot */
-+ break;
-+ default:
-+ return;
-+ }
-+
-+ if (extp->TopBottom == t)
-+ /* boot location detected by the CFI layer is correct */
-+ return;
-+
-+ extp->TopBottom = t;
-+ printk("%s: Macronix chip detected, id:0x%04X, boot location forced "
-+ "to %s\n", map->name, cfi->id, (t == 2) ? "bottom" : "top");
-+}
-+#endif /* CONFIG_MTD_CFI_FIXUP_MACRONIX_BOOTLOC */
-+
- static struct cfi_fixup cfi_fixup_table[] = {
- #ifdef AMD_BOOTLOC_BUG
- { CFI_MFR_AMD, CFI_ID_ANY, fixup_amd_bootblock, NULL },
-@@ -231,6 +273,9 @@ static struct cfi_fixup cfi_fixup_table[
- { CFI_MFR_ANY, CFI_ID_ANY, fixup_use_write_buffers, NULL, },
- #endif
- { CFI_MFR_ATMEL, CFI_ID_ANY, fixup_convert_atmel_pri, NULL },
-+#ifdef CONFIG_MTD_CFI_FIXUP_MACRONIX_BOOTLOC
-+ { MANUFACTURER_MACRONIX, CFI_ID_ANY, fixup_macronix_bootloc, NULL, },
-+#endif
- { 0, 0, NULL, NULL }
- };
- static struct cfi_fixup jedec_fixup_table[] = {
-Index: linux-2.6.23.14/drivers/mtd/chips/Kconfig
-===================================================================
---- linux-2.6.23.14.orig/drivers/mtd/chips/Kconfig
-+++ linux-2.6.23.14/drivers/mtd/chips/Kconfig
-@@ -196,6 +196,14 @@ config MTD_CFI_AMDSTD
- provides support for one of those command sets, used on chips
- including the AMD Am29LV320.
-
-+config MTD_CFI_FIXUP_MACRONIX_BOOTLOC
-+ bool "Fix boot-block location for Macronix flash chips"
-+ depends on MTD_CFI_AMDSTD
-+ help
-+ Some Macronix flash chips have no/wrong boot-block location in the
-+ CFI table, and the driver may detect the type incorrectly. Select
-+ this if your board has such chip.
-+
- config MTD_CFI_STAA
- tristate "Support for ST (Advanced Architecture) flash chips"
- depends on MTD_GEN_PROBE
diff --git a/target/linux/adm5120/patches-2.6.23/102-jedec_pmc_39lvxxx_chips.patch b/target/linux/adm5120/patches-2.6.23/102-jedec_pmc_39lvxxx_chips.patch
deleted file mode 100644
index 4c8414d7c8..0000000000
--- a/target/linux/adm5120/patches-2.6.23/102-jedec_pmc_39lvxxx_chips.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-Index: linux-2.6.23.14/drivers/mtd/chips/jedec_probe.c
-===================================================================
---- linux-2.6.23.14.orig/drivers/mtd/chips/jedec_probe.c
-+++ linux-2.6.23.14/drivers/mtd/chips/jedec_probe.c
-@@ -121,6 +121,10 @@
- #define UPD29F064115 0x221C
-
- /* PMC */
-+#define PM39LV512 0x001B
-+#define PM39LV010 0x001C
-+#define PM39LV020 0x003D
-+#define PM39LV040 0x003E
- #define PM49FL002 0x006D
- #define PM49FL004 0x006E
- #define PM49FL008 0x006A
-@@ -1246,6 +1250,58 @@ static const struct amd_flash_info jedec
- ERASEINFO(0x02000,2),
- ERASEINFO(0x04000,1),
- }
-+ }, {
-+ .mfr_id = MANUFACTURER_PMC,
-+ .dev_id = PM39LV512,
-+ .name = "PMC Pm39LV512",
-+ .uaddr = {
-+ [0] = MTD_UADDR_0x0555_0x02AA /* x8 */
-+ },
-+ .DevSize = SIZE_64KiB,
-+ .CmdSet = P_ID_AMD_STD,
-+ .NumEraseRegions= 1,
-+ .regions = {
-+ ERASEINFO(0x01000,16),
-+ }
-+ }, {
-+ .mfr_id = MANUFACTURER_PMC,
-+ .dev_id = PM39LV010,
-+ .name = "PMC Pm39LV010",
-+ .uaddr = {
-+ [0] = MTD_UADDR_0x0555_0x02AA /* x8 */
-+ },
-+ .DevSize = SIZE_128KiB,
-+ .CmdSet = P_ID_AMD_STD,
-+ .NumEraseRegions= 1,
-+ .regions = {
-+ ERASEINFO(0x01000,32),
-+ }
-+ }, {
-+ .mfr_id = MANUFACTURER_PMC,
-+ .dev_id = PM39LV020,
-+ .name = "PMC Pm39LV020",
-+ .uaddr = {
-+ [0] = MTD_UADDR_0x0555_0x02AA /* x8 */
-+ },
-+ .DevSize = SIZE_256KiB,
-+ .CmdSet = P_ID_AMD_STD,
-+ .NumEraseRegions= 1,
-+ .regions = {
-+ ERASEINFO(0x01000,64),
-+ }
-+ }, {
-+ .mfr_id = MANUFACTURER_PMC,
-+ .dev_id = PM39LV040,
-+ .name = "PMC Pm39LV040",
-+ .uaddr = {
-+ [0] = MTD_UADDR_0x0555_0x02AA /* x8 */
-+ },
-+ .DevSize = SIZE_512KiB,
-+ .CmdSet = P_ID_AMD_STD,
-+ .NumEraseRegions= 1,
-+ .regions = {
-+ ERASEINFO(0x01000,128),
-+ }
- }, {
- .mfr_id = MANUFACTURER_PMC,
- .dev_id = PM49FL002,
diff --git a/target/linux/adm5120/patches-2.6.23/103-mtd_trxsplit.patch b/target/linux/adm5120/patches-2.6.23/103-mtd_trxsplit.patch
deleted file mode 100644
index a9cad0420c..0000000000
--- a/target/linux/adm5120/patches-2.6.23/103-mtd_trxsplit.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Index: linux-2.6.23.14/drivers/mtd/Kconfig
-===================================================================
---- linux-2.6.23.14.orig/drivers/mtd/Kconfig
-+++ linux-2.6.23.14/drivers/mtd/Kconfig
-@@ -57,6 +57,11 @@ config MTD_ROOTFS_SPLIT
- depends on MTD_PARTITIONS
- default y
-
-+config MTD_TRXSPLIT
-+ bool "Automatically find and split TRX partitions"
-+ depends on MTD_PARTITIONS
-+ default n
-+
- config MTD_REDBOOT_PARTS
- tristate "RedBoot partition table parsing"
- depends on MTD_PARTITIONS
-Index: linux-2.6.23.14/drivers/mtd/Makefile
-===================================================================
---- linux-2.6.23.14.orig/drivers/mtd/Makefile
-+++ linux-2.6.23.14/drivers/mtd/Makefile
-@@ -8,6 +8,7 @@ mtd-y := mtdcore.o mtdsuper.o
- mtd-$(CONFIG_MTD_PARTITIONS) += mtdpart.o
-
- obj-$(CONFIG_MTD_CONCAT) += mtdconcat.o
-+obj-$(CONFIG_MTD_TRXSPLIT) += trxsplit.o
- obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
- obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o
- obj-$(CONFIG_MTD_AFS_PARTS) += afs.o
diff --git a/target/linux/adm5120/patches-2.6.23/120-rb153_cf_driver.patch b/target/linux/adm5120/patches-2.6.23/120-rb153_cf_driver.patch
deleted file mode 100644
index 95cf5cf31e..0000000000
--- a/target/linux/adm5120/patches-2.6.23/120-rb153_cf_driver.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Index: linux-2.6.23.14/drivers/ata/Makefile
-===================================================================
---- linux-2.6.23.14.orig/drivers/ata/Makefile
-+++ linux-2.6.23.14/drivers/ata/Makefile
-@@ -63,6 +63,7 @@ obj-$(CONFIG_PATA_IXP4XX_CF) += pata_ixp
- obj-$(CONFIG_PATA_SCC) += pata_scc.o
- obj-$(CONFIG_PATA_PLATFORM) += pata_platform.o
- obj-$(CONFIG_PATA_ICSIDE) += pata_icside.o
-+obj-$(CONFIG_PATA_RB153_CF) += pata_rb153_cf.o
- # Should be last but one libata driver
- obj-$(CONFIG_ATA_GENERIC) += ata_generic.o
- # Should be last libata driver
-Index: linux-2.6.23.14/drivers/ata/Kconfig
-===================================================================
---- linux-2.6.23.14.orig/drivers/ata/Kconfig
-+++ linux-2.6.23.14/drivers/ata/Kconfig
-@@ -596,4 +596,13 @@ config PATA_SCC
-
- If unsure, say N.
-
-+config PATA_RB153_CF
-+ tristate "RouterBOARD 153 Compact Flash support"
-+ depends on MIPS_ADM5120
-+ help
-+ This option enables support for a Compact Flash connected on
-+ the RouterBOARD 153.
-+
-+ If unsure, say N.
-+
- endif # ATA
diff --git a/target/linux/adm5120/patches-2.6.23/140-cmdline_hack.patch b/target/linux/adm5120/patches-2.6.23/140-cmdline_hack.patch
deleted file mode 100644
index d8c5363a9a..0000000000
--- a/target/linux/adm5120/patches-2.6.23/140-cmdline_hack.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Index: linux-2.6.23.14/arch/mips/kernel/head.S
-===================================================================
---- linux-2.6.23.14.orig/arch/mips/kernel/head.S
-+++ linux-2.6.23.14/arch/mips/kernel/head.S
-@@ -136,7 +136,12 @@
- /*
- * Reserved space for exception handlers.
- * Necessary for machines which link their kernels at KSEG0.
-+ * Use as temporary storage for the kernel command line, so that it
-+ * can be updated easily without having to relink the kernel.
- */
-+
-+EXPORT(_image_cmdline)
-+ .ascii "CMDLINE:"
- .fill 0x400
- #endif
-
diff --git a/target/linux/adm5120/patches-2.6.23/200-amba_pl010_hacks.patch b/target/linux/adm5120/patches-2.6.23/200-amba_pl010_hacks.patch
deleted file mode 100644
index 78277de22a..0000000000
--- a/target/linux/adm5120/patches-2.6.23/200-amba_pl010_hacks.patch
+++ /dev/null
@@ -1,297 +0,0 @@
-Index: linux-2.6.23.14/drivers/serial/amba-pl010.c
-===================================================================
---- linux-2.6.23.14.orig/drivers/serial/amba-pl010.c
-+++ linux-2.6.23.14/drivers/serial/amba-pl010.c
-@@ -52,11 +52,10 @@
-
- #include <asm/io.h>
-
--#define UART_NR 8
--
- #define SERIAL_AMBA_MAJOR 204
- #define SERIAL_AMBA_MINOR 16
--#define SERIAL_AMBA_NR UART_NR
-+#define SERIAL_AMBA_NR CONFIG_SERIAL_AMBA_PL010_NUMPORTS
-+#define SERIAL_AMBA_NAME CONFIG_SERIAL_AMBA_PL010_PORTNAME
-
- #define AMBA_ISR_PASS_LIMIT 256
-
-@@ -82,7 +81,7 @@ static void pl010_stop_tx(struct uart_po
- struct uart_amba_port *uap = (struct uart_amba_port *)port;
- unsigned int cr;
-
-- cr = readb(uap->port.membase + UART010_CR);
-+ cr = readl(uap->port.membase + UART010_CR);
- cr &= ~UART010_CR_TIE;
- writel(cr, uap->port.membase + UART010_CR);
- }
-@@ -92,7 +91,7 @@ static void pl010_start_tx(struct uart_p
- struct uart_amba_port *uap = (struct uart_amba_port *)port;
- unsigned int cr;
-
-- cr = readb(uap->port.membase + UART010_CR);
-+ cr = readl(uap->port.membase + UART010_CR);
- cr |= UART010_CR_TIE;
- writel(cr, uap->port.membase + UART010_CR);
- }
-@@ -102,7 +101,7 @@ static void pl010_stop_rx(struct uart_po
- struct uart_amba_port *uap = (struct uart_amba_port *)port;
- unsigned int cr;
-
-- cr = readb(uap->port.membase + UART010_CR);
-+ cr = readl(uap->port.membase + UART010_CR);
- cr &= ~(UART010_CR_RIE | UART010_CR_RTIE);
- writel(cr, uap->port.membase + UART010_CR);
- }
-@@ -112,7 +111,7 @@ static void pl010_enable_ms(struct uart_
- struct uart_amba_port *uap = (struct uart_amba_port *)port;
- unsigned int cr;
-
-- cr = readb(uap->port.membase + UART010_CR);
-+ cr = readl(uap->port.membase + UART010_CR);
- cr |= UART010_CR_MSIE;
- writel(cr, uap->port.membase + UART010_CR);
- }
-@@ -122,9 +121,9 @@ static void pl010_rx_chars(struct uart_a
- struct tty_struct *tty = uap->port.info->tty;
- unsigned int status, ch, flag, rsr, max_count = 256;
-
-- status = readb(uap->port.membase + UART01x_FR);
-+ status = readl(uap->port.membase + UART01x_FR);
- while (UART_RX_DATA(status) && max_count--) {
-- ch = readb(uap->port.membase + UART01x_DR);
-+ ch = readl(uap->port.membase + UART01x_DR);
- flag = TTY_NORMAL;
-
- uap->port.icount.rx++;
-@@ -133,7 +132,7 @@ static void pl010_rx_chars(struct uart_a
- * Note that the error handling code is
- * out of the main execution path
- */
-- rsr = readb(uap->port.membase + UART01x_RSR) | UART_DUMMY_RSR_RX;
-+ rsr = readl(uap->port.membase + UART01x_RSR) | UART_DUMMY_RSR_RX;
- if (unlikely(rsr & UART01x_RSR_ANY)) {
- writel(0, uap->port.membase + UART01x_ECR);
-
-@@ -165,7 +164,7 @@ static void pl010_rx_chars(struct uart_a
- uart_insert_char(&uap->port, rsr, UART01x_RSR_OE, ch, flag);
-
- ignore_char:
-- status = readb(uap->port.membase + UART01x_FR);
-+ status = readl(uap->port.membase + UART01x_FR);
- }
- spin_unlock(&uap->port.lock);
- tty_flip_buffer_push(tty);
-@@ -210,7 +209,7 @@ static void pl010_modem_status(struct ua
-
- writel(0, uap->port.membase + UART010_ICR);
-
-- status = readb(uap->port.membase + UART01x_FR) & UART01x_FR_MODEM_ANY;
-+ status = readl(uap->port.membase + UART01x_FR) & UART01x_FR_MODEM_ANY;
-
- delta = status ^ uap->old_status;
- uap->old_status = status;
-@@ -238,7 +237,7 @@ static irqreturn_t pl010_int(int irq, vo
-
- spin_lock(&uap->port.lock);
-
-- status = readb(uap->port.membase + UART010_IIR);
-+ status = readl(uap->port.membase + UART010_IIR);
- if (status) {
- do {
- if (status & (UART010_IIR_RTIS | UART010_IIR_RIS))
-@@ -251,7 +250,7 @@ static irqreturn_t pl010_int(int irq, vo
- if (pass_counter-- == 0)
- break;
-
-- status = readb(uap->port.membase + UART010_IIR);
-+ status = readl(uap->port.membase + UART010_IIR);
- } while (status & (UART010_IIR_RTIS | UART010_IIR_RIS |
- UART010_IIR_TIS));
- handled = 1;
-@@ -265,7 +264,7 @@ static irqreturn_t pl010_int(int irq, vo
- static unsigned int pl010_tx_empty(struct uart_port *port)
- {
- struct uart_amba_port *uap = (struct uart_amba_port *)port;
-- unsigned int status = readb(uap->port.membase + UART01x_FR);
-+ unsigned int status = readl(uap->port.membase + UART01x_FR);
- return status & UART01x_FR_BUSY ? 0 : TIOCSER_TEMT;
- }
-
-@@ -275,7 +274,7 @@ static unsigned int pl010_get_mctrl(stru
- unsigned int result = 0;
- unsigned int status;
-
-- status = readb(uap->port.membase + UART01x_FR);
-+ status = readl(uap->port.membase + UART01x_FR);
- if (status & UART01x_FR_DCD)
- result |= TIOCM_CAR;
- if (status & UART01x_FR_DSR)
-@@ -301,7 +300,7 @@ static void pl010_break_ctl(struct uart_
- unsigned int lcr_h;
-
- spin_lock_irqsave(&uap->port.lock, flags);
-- lcr_h = readb(uap->port.membase + UART010_LCRH);
-+ lcr_h = readl(uap->port.membase + UART010_LCRH);
- if (break_state == -1)
- lcr_h |= UART01x_LCRH_BRK;
- else
-@@ -334,7 +333,7 @@ static int pl010_startup(struct uart_por
- /*
- * initialise the old status of the modem signals
- */
-- uap->old_status = readb(uap->port.membase + UART01x_FR) & UART01x_FR_MODEM_ANY;
-+ uap->old_status = readl(uap->port.membase + UART01x_FR) & UART01x_FR_MODEM_ANY;
-
- /*
- * Finally, enable interrupts
-@@ -365,7 +364,7 @@ static void pl010_shutdown(struct uart_p
- writel(0, uap->port.membase + UART010_CR);
-
- /* disable break condition and fifos */
-- writel(readb(uap->port.membase + UART010_LCRH) &
-+ writel(readl(uap->port.membase + UART010_LCRH) &
- ~(UART01x_LCRH_BRK | UART01x_LCRH_FEN),
- uap->port.membase + UART010_LCRH);
-
-@@ -387,7 +386,7 @@ pl010_set_termios(struct uart_port *port
- /*
- * Ask the core to calculate the divisor for us.
- */
-- baud = uart_get_baud_rate(port, termios, old, 0, uap->port.uartclk/16);
-+ baud = uart_get_baud_rate(port, termios, old, 0, uap->port.uartclk/16);
- quot = uart_get_divisor(port, baud);
-
- switch (termios->c_cflag & CSIZE) {
-@@ -450,7 +449,7 @@ pl010_set_termios(struct uart_port *port
- uap->port.ignore_status_mask |= UART_DUMMY_RSR_RX;
-
- /* first, disable everything */
-- old_cr = readb(uap->port.membase + UART010_CR) & ~UART010_CR_MSIE;
-+ old_cr = readl(uap->port.membase + UART010_CR) & ~UART010_CR_MSIE;
-
- if (UART_ENABLE_MS(port, termios->c_cflag))
- old_cr |= UART010_CR_MSIE;
-@@ -540,7 +539,7 @@ static struct uart_ops amba_pl010_pops =
- .verify_port = pl010_verify_port,
- };
-
--static struct uart_amba_port *amba_ports[UART_NR];
-+static struct uart_amba_port *amba_ports[SERIAL_AMBA_NR];
-
- #ifdef CONFIG_SERIAL_AMBA_PL010_CONSOLE
-
-@@ -550,7 +549,7 @@ static void pl010_console_putchar(struct
- unsigned int status;
-
- do {
-- status = readb(uap->port.membase + UART01x_FR);
-+ status = readl(uap->port.membase + UART01x_FR);
- barrier();
- } while (!UART_TX_READY(status));
- writel(ch, uap->port.membase + UART01x_DR);
-@@ -567,7 +566,7 @@ pl010_console_write(struct console *co,
- /*
- * First save the CR then disable the interrupts
- */
-- old_cr = readb(uap->port.membase + UART010_CR);
-+ old_cr = readl(uap->port.membase + UART010_CR);
- writel(UART01x_CR_UARTEN, uap->port.membase + UART010_CR);
-
- uart_console_write(&uap->port, s, count, pl010_console_putchar);
-@@ -577,7 +576,7 @@ pl010_console_write(struct console *co,
- * and restore the TCR
- */
- do {
-- status = readb(uap->port.membase + UART01x_FR);
-+ status = readl(uap->port.membase + UART01x_FR);
- barrier();
- } while (status & UART01x_FR_BUSY);
- writel(old_cr, uap->port.membase + UART010_CR);
-@@ -589,9 +588,9 @@ static void __init
- pl010_console_get_options(struct uart_amba_port *uap, int *baud,
- int *parity, int *bits)
- {
-- if (readb(uap->port.membase + UART010_CR) & UART01x_CR_UARTEN) {
-+ if (readl(uap->port.membase + UART010_CR) & UART01x_CR_UARTEN) {
- unsigned int lcr_h, quot;
-- lcr_h = readb(uap->port.membase + UART010_LCRH);
-+ lcr_h = readl(uap->port.membase + UART010_LCRH);
-
- *parity = 'n';
- if (lcr_h & UART01x_LCRH_PEN) {
-@@ -606,8 +605,8 @@ pl010_console_get_options(struct uart_am
- else
- *bits = 8;
-
-- quot = readb(uap->port.membase + UART010_LCRL) |
-- readb(uap->port.membase + UART010_LCRM) << 8;
-+ quot = readl(uap->port.membase + UART010_LCRL) |
-+ readl(uap->port.membase + UART010_LCRM) << 8;
- *baud = uap->port.uartclk / (16 * (quot + 1));
- }
- }
-@@ -625,7 +624,7 @@ static int __init pl010_console_setup(st
- * if so, search for the first available port that does have
- * console support.
- */
-- if (co->index >= UART_NR)
-+ if (co->index >= SERIAL_AMBA_NR)
- co->index = 0;
- uap = amba_ports[co->index];
- if (!uap)
-@@ -643,7 +642,7 @@ static int __init pl010_console_setup(st
-
- static struct uart_driver amba_reg;
- static struct console amba_console = {
-- .name = "ttyAM",
-+ .name = SERIAL_AMBA_NAME,
- .write = pl010_console_write,
- .device = uart_console_device,
- .setup = pl010_console_setup,
-@@ -659,11 +658,11 @@ static struct console amba_console = {
-
- static struct uart_driver amba_reg = {
- .owner = THIS_MODULE,
-- .driver_name = "ttyAM",
-- .dev_name = "ttyAM",
-+ .driver_name = SERIAL_AMBA_NAME,
-+ .dev_name = SERIAL_AMBA_NAME,
- .major = SERIAL_AMBA_MAJOR,
- .minor = SERIAL_AMBA_MINOR,
-- .nr = UART_NR,
-+ .nr = SERIAL_AMBA_NR,
- .cons = AMBA_CONSOLE,
- };
-
-Index: linux-2.6.23.14/drivers/serial/Kconfig
-===================================================================
---- linux-2.6.23.14.orig/drivers/serial/Kconfig
-+++ linux-2.6.23.14/drivers/serial/Kconfig
-@@ -303,10 +303,25 @@ config SERIAL_AMBA_PL010
- help
- This selects the ARM(R) AMBA(R) PrimeCell PL010 UART. If you have
- an Integrator/AP or Integrator/PP2 platform, or if you have a
-- Cirrus Logic EP93xx CPU, say Y or M here.
-+ Cirrus Logic EP93xx CPU or an Infineon ADM5120 SOC, say Y or M here.
-
- If unsure, say N.
-
-+config SERIAL_AMBA_PL010_NUMPORTS
-+ int "Maximum number of AMBA PL010 serial ports"
-+ depends on SERIAL_AMBA_PL010
-+ default "8"
-+ ---help---
-+ Set this to the number of serial ports you want the AMBA PL010 driver
-+ to support.
-+
-+config SERIAL_AMBA_PL010_PORTNAME
-+ string "Name of the AMBA PL010 serial ports"
-+ depends on SERIAL_AMBA_PL010
-+ default "ttyAM"
-+ ---help---
-+ ::: To be written :::
-+
- config SERIAL_AMBA_PL010_CONSOLE
- bool "Support for console on AMBA serial port"
- depends on SERIAL_AMBA_PL010=y
diff --git a/target/linux/adm5120/patches-2.6.23/201-amba_bus_hacks.patch b/target/linux/adm5120/patches-2.6.23/201-amba_bus_hacks.patch
deleted file mode 100644
index 9ad49e0fbf..0000000000
--- a/target/linux/adm5120/patches-2.6.23/201-amba_bus_hacks.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Index: linux-2.6.23.14/drivers/amba/bus.c
-===================================================================
---- linux-2.6.23.14.orig/drivers/amba/bus.c
-+++ linux-2.6.23.14/drivers/amba/bus.c
-@@ -17,6 +17,10 @@
- #include <asm/io.h>
- #include <asm/sizes.h>
-
-+#ifndef NO_IRQ
-+#define NO_IRQ (-1)
-+#endif
-+
- #define to_amba_device(d) container_of(d, struct amba_device, dev)
- #define to_amba_driver(d) container_of(d, struct amba_driver, drv)
-
diff --git a/target/linux/adm5120/patches-2.6.23/202-pci_disable_common_quirks.patch b/target/linux/adm5120/patches-2.6.23/202-pci_disable_common_quirks.patch
deleted file mode 100644
index 4d3cc595c8..0000000000
--- a/target/linux/adm5120/patches-2.6.23/202-pci_disable_common_quirks.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-Index: linux-2.6.23.14/drivers/pci/Kconfig
-===================================================================
---- linux-2.6.23.14.orig/drivers/pci/Kconfig
-+++ linux-2.6.23.14/drivers/pci/Kconfig
-@@ -31,6 +31,12 @@ config PCI_DEBUG
-
- When in doubt, say N.
-
-+config PCI_DISABLE_COMMON_QUIRKS
-+ bool "PCI disable common quirks"
-+ depends on PCI
-+ help
-+ If you don't know what to do here, say N.
-+
- config HT_IRQ
- bool "Interrupts on hypertransport devices"
- default y
-Index: linux-2.6.23.14/drivers/pci/quirks.c
-===================================================================
---- linux-2.6.23.14.orig/drivers/pci/quirks.c
-+++ linux-2.6.23.14/drivers/pci/quirks.c
-@@ -23,6 +23,7 @@
- #include <linux/acpi.h>
- #include "pci.h"
-
-+#ifndef CONFIG_PCI_DISABLE_COMMON_QUIRKS
- /* The Mellanox Tavor device gives false positive parity errors
- * Mark this device with a broken_parity_status, to allow
- * PCI scanning code to "skip" this now blacklisted device.
-@@ -1510,6 +1511,7 @@ static void __devinit fixup_rev1_53c810(
- }
- }
- DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, fixup_rev1_53c810);
-+#endif /* !CONFIG_PCI_DISABLE_COMMON_QUIRKS */
-
- static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f, struct pci_fixup *end)
- {
-@@ -1573,6 +1575,7 @@ void pci_fixup_device(enum pci_fixup_pas
- }
- EXPORT_SYMBOL(pci_fixup_device);
-
-+#ifndef CONFIG_PCI_DISABLE_COMMON_QUIRKS
- /* Enable 1k I/O space granularity on the Intel P64H2 */
- static void __devinit quirk_p64h2_1k_io(struct pci_dev *dev)
- {
-@@ -1743,3 +1746,4 @@ static void __devinit quirk_nvidia_ck804
- DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_CK804_PCIE,
- quirk_nvidia_ck804_msi_ht_cap);
- #endif /* CONFIG_PCI_MSI */
-+#endif /* !CONFIG_PCI_DISABLE_COMMON_QUIRKS */
diff --git a/target/linux/adm5120/patches-2.6.23/203-gpio_leds_brightness.patch b/target/linux/adm5120/patches-2.6.23/203-gpio_leds_brightness.patch
deleted file mode 100644
index e5d8752a8c..0000000000
--- a/target/linux/adm5120/patches-2.6.23/203-gpio_leds_brightness.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Index: linux-2.6.23.14/drivers/leds/leds-gpio.c
-===================================================================
---- linux-2.6.23.14.orig/drivers/leds/leds-gpio.c
-+++ linux-2.6.23.14/drivers/leds/leds-gpio.c
-@@ -41,13 +41,17 @@ static void gpio_led_set(struct led_clas
- container_of(led_cdev, struct gpio_led_data, cdev);
- int level;
-
-- if (value == LED_OFF)
-- level = 0;
-- else
-- level = 1;
--
-- if (led_dat->active_low)
-- level = !level;
-+ switch (value) {
-+ case LED_OFF:
-+ level = led_dat->active_low ? 1 : 0;
-+ break;
-+ case LED_FULL:
-+ level = led_dat->active_low ? 0 : 1;
-+ break;
-+ default:
-+ level = value;
-+ break;
-+ }
-
- /* setting GPIOs with I2C/etc requires a preemptible task context */
- if (led_dat->can_sleep) {
diff --git a/target/linux/adm5120/patches-2.6.23/300-i2c_gpio_custom.patch b/target/linux/adm5120/patches-2.6.23/300-i2c_gpio_custom.patch
deleted file mode 100644
index 800742b324..0000000000
--- a/target/linux/adm5120/patches-2.6.23/300-i2c_gpio_custom.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Index: linux-2.6.23.14/drivers/i2c/busses/Kconfig
-===================================================================
---- linux-2.6.23.14.orig/drivers/i2c/busses/Kconfig
-+++ linux-2.6.23.14/drivers/i2c/busses/Kconfig
-@@ -125,6 +125,17 @@ config I2C_GPIO
- This is a very simple bitbanging I2C driver utilizing the
- arch-neutral GPIO API to control the SCL and SDA lines.
-
-+config I2C_GPIO_CUSTOM
-+ tristate "Custom GPIO-based I2C driver"
-+ depends on GENERIC_GPIO
-+ select I2C_GPIO
-+ help
-+ This is an I2C driver to register 1 to 4 custom I2C buses using
-+ GPIO lines.
-+
-+ This support is also available as a module. If so, the module
-+ will be called i2c-gpio-custom.
-+
- config I2C_HYDRA
- tristate "CHRP Apple Hydra Mac I/O I2C interface"
- depends on PCI && PPC_CHRP && EXPERIMENTAL
-Index: linux-2.6.23.14/drivers/i2c/busses/Makefile
-===================================================================
---- linux-2.6.23.14.orig/drivers/i2c/busses/Makefile
-+++ linux-2.6.23.14/drivers/i2c/busses/Makefile
-@@ -13,6 +13,7 @@ obj-$(CONFIG_I2C_AU1550) += i2c-au1550.o
- obj-$(CONFIG_I2C_BLACKFIN_TWI) += i2c-bfin-twi.o
- obj-$(CONFIG_I2C_ELEKTOR) += i2c-elektor.o
- obj-$(CONFIG_I2C_GPIO) += i2c-gpio.o
-+obj-$(CONFIG_I2C_GPIO_CUSTOM) += i2c-gpio-custom.o
- obj-$(CONFIG_I2C_HYDRA) += i2c-hydra.o
- obj-$(CONFIG_I2C_I801) += i2c-i801.o
- obj-$(CONFIG_I2C_I810) += i2c-i810.o
diff --git a/target/linux/adm5120/patches-2.6.23/310-adm5120_wdt.patch b/target/linux/adm5120/patches-2.6.23/310-adm5120_wdt.patch
deleted file mode 100644
index 202e91709f..0000000000
--- a/target/linux/adm5120/patches-2.6.23/310-adm5120_wdt.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Index: linux-2.6.23.14/drivers/char/watchdog/Kconfig
-===================================================================
---- linux-2.6.23.14.orig/drivers/char/watchdog/Kconfig
-+++ linux-2.6.23.14/drivers/char/watchdog/Kconfig
-@@ -583,6 +583,18 @@ config SBC_EPX_C3_WATCHDOG
-
- # MIPS Architecture
-
-+config ADM5120_WDT
-+ tristate "Infineon ADM5120 SoC hardware watchdog"
-+ depends on WATCHDOG && MIPS_ADM5120
-+ help
-+ This is a driver for hardware watchdog integrated in Infineon
-+ ADM5120 SoC. This watchdog simply watches your kernel to make sure
-+ it doesn't freeze, and if it does, it reboots your computer after a
-+ certain amount of time.
-+
-+ To compile this driver as a module, choose M here: the module will be
-+ called adm5120_wdt.
-+
- config INDYDOG
- tristate "Indy/I2 Hardware Watchdog"
- depends on SGI_IP22
-Index: linux-2.6.23.14/drivers/char/watchdog/Makefile
-===================================================================
---- linux-2.6.23.14.orig/drivers/char/watchdog/Makefile
-+++ linux-2.6.23.14/drivers/char/watchdog/Makefile
-@@ -87,6 +87,7 @@ obj-$(CONFIG_SBC_EPX_C3_WATCHDOG) += sbc
- # M68KNOMMU Architecture
-
- # MIPS Architecture
-+obj-$(CONFIG_ADM5120_WDT) += adm5120_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/adm5120/patches-2.6.24/004-adm5120_nand.patch b/target/linux/adm5120/patches-2.6.24/004-adm5120_nand.patch
deleted file mode 100644
index 89239d7348..0000000000
--- a/target/linux/adm5120/patches-2.6.24/004-adm5120_nand.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Index: linux-2.6.24/drivers/mtd/nand/Kconfig
-===================================================================
---- linux-2.6.24.orig/drivers/mtd/nand/Kconfig
-+++ linux-2.6.24/drivers/mtd/nand/Kconfig
-@@ -81,6 +81,16 @@ config MTD_NAND_TS7250
- help
- Support for NAND flash on Technologic Systems TS-7250 platform.
-
-+config MTD_NAND_ADM5120
-+ tristate "ADM5120 NAND support"
-+ depends on MTD_NAND && MIPS_ADM5120
-+ help
-+ This enables the driver for the ADM5120 SoC built-in
-+ NAND flash interface.
-+
-+ No board specific support is done by this driver, each board
-+ must advertise a platform_device for the driver to attach.
-+
- config MTD_NAND_IDS
- tristate
-
-Index: linux-2.6.24/drivers/mtd/nand/Makefile
-===================================================================
---- linux-2.6.24.orig/drivers/mtd/nand/Makefile
-+++ linux-2.6.24/drivers/mtd/nand/Makefile
-@@ -10,6 +10,7 @@ obj-$(CONFIG_MTD_NAND_CAFE) += cafe_nan
- obj-$(CONFIG_MTD_NAND_SPIA) += spia.o
- obj-$(CONFIG_MTD_NAND_AMS_DELTA) += ams-delta.o
- obj-$(CONFIG_MTD_NAND_TOTO) += toto.o
-+obj-$(CONFIG_MTD_NAND_ADM5120) += adm5120-nand.o
- obj-$(CONFIG_MTD_NAND_AUTCPU12) += autcpu12.o
- obj-$(CONFIG_MTD_NAND_EDB7312) += edb7312.o
- obj-$(CONFIG_MTD_NAND_AU1550) += au1550nd.o
diff --git a/target/linux/adm5120/patches-2.6.24/008-adm5120_uart.patch b/target/linux/adm5120/patches-2.6.24/008-adm5120_uart.patch
deleted file mode 100644
index c08239a39c..0000000000
--- a/target/linux/adm5120/patches-2.6.24/008-adm5120_uart.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-Index: linux-2.6.24/drivers/serial/Makefile
-===================================================================
---- linux-2.6.24.orig/drivers/serial/Makefile
-+++ linux-2.6.24/drivers/serial/Makefile
-@@ -21,6 +21,7 @@ obj-$(CONFIG_SERIAL_8250_EXAR_ST16C554)
- obj-$(CONFIG_SERIAL_8250_HUB6) += 8250_hub6.o
- obj-$(CONFIG_SERIAL_8250_MCA) += 8250_mca.o
- obj-$(CONFIG_SERIAL_8250_AU1X00) += 8250_au1x00.o
-+obj-$(CONFIG_SERIAL_ADM5120) += adm5120_uart.o
- obj-$(CONFIG_SERIAL_AMBA_PL010) += amba-pl010.o
- obj-$(CONFIG_SERIAL_AMBA_PL011) += amba-pl011.o
- obj-$(CONFIG_SERIAL_CLPS711X) += clps711x.o
-Index: linux-2.6.24/include/linux/serial_core.h
-===================================================================
---- linux-2.6.24.orig/include/linux/serial_core.h
-+++ linux-2.6.24/include/linux/serial_core.h
-@@ -150,6 +150,9 @@
- #define PORT_MCF 78
-
-
-+/* ADMtek ADM5120 SoC */
-+#define PORT_ADM5120 77
-+
- #ifdef __KERNEL__
-
- #include <linux/compiler.h>
-Index: linux-2.6.24/drivers/serial/Kconfig
-===================================================================
---- linux-2.6.24.orig/drivers/serial/Kconfig
-+++ linux-2.6.24/drivers/serial/Kconfig
-@@ -280,6 +280,22 @@ config SERIAL_8250_RM9K
-
- comment "Non-8250 serial port support"
-
-+config SERIAL_ADM5120
-+ bool "ADM5120 serial port support"
-+ depends on MIPS_ADM5120
-+ select SERIAL_CORE
-+ select SERIAL_CORE_CONSOLE
-+ help
-+ Driver for the on chip UARTs on the ADM5120 SoC
-+
-+config ADM5120_NR_UARTS
-+ int "Maximum number of ADM5120 serial ports"
-+ depends on SERIAL_ADM5120
-+ default "2"
-+ ---help---
-+ Set this to the number of serial ports you want the driver to
-+ support.
-+
- config SERIAL_AMBA_PL010
- tristate "ARM AMBA PL010 serial port support"
- depends on ARM_AMBA && (BROKEN || !ARCH_VERSATILE)
diff --git a/target/linux/adm5120/patches-2.6.24/900-adm5120_switch_napi.patch b/target/linux/adm5120/patches-2.6.24/900-adm5120_switch_napi.patch
deleted file mode 100644
index 5c757a10b4..0000000000
--- a/target/linux/adm5120/patches-2.6.24/900-adm5120_switch_napi.patch
+++ /dev/null
@@ -1,144 +0,0 @@
-Index: linux-2.6.24/drivers/net/adm5120sw.c
-===================================================================
---- linux-2.6.24.orig/drivers/net/adm5120sw.c
-+++ linux-2.6.24/drivers/net/adm5120sw.c
-@@ -93,8 +93,14 @@
- /* ------------------------------------------------------------------------ */
-
- struct adm5120_if_priv {
-+ struct net_device *dev;
-+
- unsigned int vlan_no;
- unsigned int port_mask;
-+
-+#ifdef CONFIG_ADM5120_SWITCH_NAPI
-+ struct napi_struct napi;
-+#endif
- };
-
- struct dma_desc {
-@@ -333,7 +339,6 @@ static void sw_dump_regs(void)
- SW_DBG("rlda: %08X\n", t);
- }
-
--
- /* ------------------------------------------------------------------------ */
-
- static inline void adm5120_rx_dma_update(struct dma_desc *desc,
-@@ -495,9 +500,11 @@ static void adm5120_switch_tx(void)
- }
-
- #ifdef CONFIG_ADM5120_SWITCH_NAPI
--static int adm5120_if_poll(struct net_device *dev, int *budget)
-+static int adm5120_if_poll(struct napi_struct *napi, int limit)
- {
-- int limit = min(dev->quota, *budget);
-+ struct adm5120_if_priv *priv = container_of(napi,
-+ struct adm5120_if_priv, napi);
-+ struct net_device *dev = priv->dev;
- int done;
- u32 status;
-
-@@ -509,13 +516,10 @@ static int adm5120_if_poll(struct net_de
- SW_DBG("%s: processing RX ring\n", dev->name);
- done = adm5120_switch_rx(limit);
-
-- *budget -= done;
-- dev->quota -= done;
--
- status = sw_int_status() & SWITCH_INTS_POLL;
- if ((done < limit) && (!status)) {
- SW_DBG("disable polling mode for %s\n", dev->name);
-- netif_rx_complete(dev);
-+ netif_rx_complete(dev, napi);
- sw_int_unmask(SWITCH_INTS_POLL);
- return 0;
- }
-@@ -541,10 +545,12 @@ static irqreturn_t adm5120_switch_irq(in
-
- if (status & SWITCH_INTS_POLL) {
- struct net_device *dev = dev_id;
-+ struct adm5120_if_priv *priv = netdev_priv(dev);
-+
- sw_dump_intr_mask("poll ints", status);
- SW_DBG("enable polling mode for %s\n", dev->name);
- sw_int_mask(SWITCH_INTS_POLL);
-- netif_rx_schedule(dev);
-+ netif_rx_schedule(dev, &priv->napi);
- }
- #else
- sw_int_ack(status);
-@@ -779,12 +785,31 @@ static void adm5120_switch_set_vlan_port
-
- /* ------------------------------------------------------------------------ */
-
-+#ifdef CONFIG_ADM5120_SWITCH_NAPI
-+static inline void adm5120_if_napi_enable(struct net_device *dev)
-+{
-+ struct adm5120_if_priv *priv = netdev_priv(dev);
-+ napi_enable(&priv->napi);
-+}
-+
-+static inline void adm5120_if_napi_disable(struct net_device *dev)
-+{
-+ struct adm5120_if_priv *priv = netdev_priv(dev);
-+ napi_disable(&priv->napi);
-+}
-+#else
-+static inline void adm5120_if_napi_enable(struct net_device *dev) {}
-+static inline void adm5120_if_napi_disable(struct net_device *dev) {}
-+#endif /* CONFIG_ADM5120_SWITCH_NAPI */
-+
- static int adm5120_if_open(struct net_device *dev)
- {
- u32 t;
- int err;
- int i;
-
-+ adm5120_if_napi_enable(dev);
-+
- err = request_irq(dev->irq, adm5120_switch_irq,
- (IRQF_SHARED | IRQF_DISABLED), dev->name, dev);
- if (err) {
-@@ -809,6 +834,7 @@ static int adm5120_if_open(struct net_de
- return 0;
-
- err:
-+ adm5120_if_napi_disable(dev);
- return err;
- }
-
-@@ -818,6 +844,7 @@ static int adm5120_if_stop(struct net_de
- int i;
-
- netif_stop_queue(dev);
-+ adm5120_if_napi_disable(dev);
-
- /* disable port if not assigned to other devices */
- t = sw_read_reg(SWITCH_REG_PORT_CONF0);
-@@ -1001,6 +1028,9 @@ static struct net_device *adm5120_if_all
- if (!dev)
- return NULL;
-
-+ priv = netdev_priv(dev);
-+ priv->dev = dev;
-+
- dev->irq = ADM5120_IRQ_SWITCH;
- dev->open = adm5120_if_open;
- dev->hard_start_xmit = adm5120_if_hard_start_xmit;
-@@ -1010,13 +1040,11 @@ static struct net_device *adm5120_if_all
- dev->tx_timeout = adm5120_if_tx_timeout;
- dev->watchdog_timeo = TX_TIMEOUT;
- dev->set_mac_address = adm5120_if_set_mac_address;
-+
- #ifdef CONFIG_ADM5120_SWITCH_NAPI
-- dev->poll = adm5120_if_poll;
-- dev->weight = 64;
-+ netif_napi_add(dev, &priv->napi, adm5120_if_poll, 64);
- #endif
-
-- SET_MODULE_OWNER(dev);
--
- return dev;
- }
-
diff --git a/target/linux/adm5120/patches-2.6.24/910-usb_manage_endpoint_queues.patch b/target/linux/adm5120/patches-2.6.24/910-usb_manage_endpoint_queues.patch
deleted file mode 100644
index 46b61d6377..0000000000
--- a/target/linux/adm5120/patches-2.6.24/910-usb_manage_endpoint_queues.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-Index: linux-2.6.24/drivers/usb/host/adm5120-hcd.c
-===================================================================
---- linux-2.6.24.orig/drivers/usb/host/adm5120-hcd.c
-+++ linux-2.6.24/drivers/usb/host/adm5120-hcd.c
-@@ -83,8 +83,8 @@ static void admhc_stop(struct usb_hcd *h
- /*
- * queue up an urb for anything except the root hub
- */
--static int admhc_urb_enqueue(struct usb_hcd *hcd, struct usb_host_endpoint *ep,
-- struct urb *urb, gfp_t mem_flags)
-+static int admhc_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
-+ gfp_t mem_flags)
- {
- struct admhcd *ahcd = hcd_to_admhcd(hcd);
- struct ed *ed;
-@@ -101,7 +101,7 @@ static int admhc_urb_enqueue(struct usb_
- #endif
-
- /* every endpoint has an ed, locate and maybe (re)initialize it */
-- ed = ed_get(ahcd, ep, urb->dev, pipe, urb->interval);
-+ ed = ed_get(ahcd, urb->ep, urb->dev, pipe, urb->interval);
- if (!ed)
- return -ENOMEM;
-
-@@ -161,22 +161,17 @@ static int admhc_urb_enqueue(struct usb_
- goto fail;
- }
-
-- /* in case of unlink-during-submit */
-- spin_lock(&urb->lock);
-- if (urb->status != -EINPROGRESS) {
-- spin_unlock(&urb->lock);
-- urb->hcpriv = urb_priv;
-- finish_urb(ahcd, urb);
-- ret = 0;
-+ ret = usb_hcd_link_urb_to_ep(hcd, urb);
-+ if (ret)
- goto fail;
-- }
-
- /* schedule the ed if needed */
- if (ed->state == ED_IDLE) {
- ret = ed_schedule(ahcd, ed);
-- if (ret < 0)
-- goto fail0;
--
-+ if (ret < 0) {
-+ usb_hcd_unlink_urb_from_ep(hcd, urb);
-+ goto fail;
-+ }
- if (ed->type == PIPE_ISOCHRONOUS) {
- u16 frame = admhc_frame_no(ahcd);
-
-@@ -204,8 +199,6 @@ static int admhc_urb_enqueue(struct usb_
- admhc_dump_ed(ahcd, "admhc_urb_enqueue", urb_priv->ed, 1);
- #endif
-
--fail0:
-- spin_unlock(&urb->lock);
- fail:
- if (ret)
- urb_priv_free(ahcd, urb_priv);
-@@ -220,18 +213,23 @@ fail:
- * asynchronously, and we might be dealing with an urb that's
- * partially transferred, or an ED with other urbs being unlinked.
- */
--static int admhc_urb_dequeue(struct usb_hcd *hcd, struct urb *urb)
-+static int admhc_urb_dequeue(struct usb_hcd *hcd, struct urb *urb,
-+ int status)
- {
- struct admhcd *ahcd = hcd_to_admhcd(hcd);
- unsigned long flags;
-+ int ret;
-
- spin_lock_irqsave(&ahcd->lock, flags);
-
- #ifdef ADMHC_VERBOSE_DEBUG
- urb_print(ahcd, urb, "DEQUEUE", 1);
- #endif
--
-- if (HC_IS_RUNNING(hcd->state)) {
-+ ret = usb_hcd_check_unlink_urb(hcd, urb, status);
-+ if (ret) {
-+ /* Do nothing */
-+ ;
-+ } else if (HC_IS_RUNNING(hcd->state)) {
- struct urb_priv *urb_priv;
-
- /* Unless an IRQ completed the unlink while it was being
-@@ -253,7 +251,7 @@ static int admhc_urb_dequeue(struct usb_
- }
- spin_unlock_irqrestore(&ahcd->lock, flags);
-
-- return 0;
-+ return ret;
- }
-
- /*-------------------------------------------------------------------------*/
-Index: linux-2.6.24/drivers/usb/host/adm5120-q.c
-===================================================================
---- linux-2.6.24.orig/drivers/usb/host/adm5120-q.c
-+++ linux-2.6.24/drivers/usb/host/adm5120-q.c
-@@ -63,6 +63,7 @@ __acquires(ahcd->lock)
- #endif
-
- /* urb->complete() can reenter this HCD */
-+ usb_hcd_unlink_urb_from_ep(admhcd_to_hcd(ahcd), urb);
- spin_unlock(&ahcd->lock);
- usb_hcd_giveback_urb(admhcd_to_hcd(ahcd), urb);
- spin_lock(&ahcd->lock);
diff --git a/target/linux/adm5120/patches-2.6.24/911-usb_centralize_eremoteio_handling.patch b/target/linux/adm5120/patches-2.6.24/911-usb_centralize_eremoteio_handling.patch
deleted file mode 100644
index b4e0fb089f..0000000000
--- a/target/linux/adm5120/patches-2.6.24/911-usb_centralize_eremoteio_handling.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Index: linux-2.6.24/drivers/usb/host/adm5120-q.c
-===================================================================
---- linux-2.6.24.orig/drivers/usb/host/adm5120-q.c
-+++ linux-2.6.24/drivers/usb/host/adm5120-q.c
-@@ -28,25 +28,10 @@ __releases(ahcd->lock)
- __acquires(ahcd->lock)
- {
- urb_priv_free(ahcd, urb->hcpriv);
-- urb->hcpriv = NULL;
-
- spin_lock(&urb->lock);
- if (likely(urb->status == -EINPROGRESS))
- urb->status = 0;
--
-- /* report short control reads right even though the data TD always
-- * has TD_R set. (much simpler, but creates the 1-td limit.)
-- */
-- if (unlikely(urb->transfer_flags & URB_SHORT_NOT_OK)
-- && unlikely(usb_pipecontrol(urb->pipe))
-- && urb->actual_length < urb->transfer_buffer_length
-- && usb_pipein(urb->pipe)
-- && urb->status == 0) {
-- urb->status = -EREMOTEIO;
--#ifdef ADMHC_VERBOSE_DEBUG
-- urb_print(ahcd, urb, "SHORT", usb_pipeout(urb->pipe));
--#endif
-- }
- spin_unlock(&urb->lock);
-
- switch (usb_pipetype(urb->pipe)) {
diff --git a/target/linux/adm5120/patches-2.6.24/912-usb_use_urb_unlinked_field.patch b/target/linux/adm5120/patches-2.6.24/912-usb_use_urb_unlinked_field.patch
deleted file mode 100644
index a2af8cad72..0000000000
--- a/target/linux/adm5120/patches-2.6.24/912-usb_use_urb_unlinked_field.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Index: linux-2.6.24/drivers/usb/host/adm5120-q.c
-===================================================================
---- linux-2.6.24.orig/drivers/usb/host/adm5120-q.c
-+++ linux-2.6.24/drivers/usb/host/adm5120-q.c
-@@ -616,8 +616,7 @@ static int td_done(struct admhcd *ahcd,
-
- if (cc != TD_CC_NOERROR && cc < TD_CC_HCD0) {
- spin_lock(&urb->lock);
-- if (urb->status == -EINPROGRESS)
-- urb->status = cc_to_error[cc];
-+ urb->status = cc_to_error[cc];
- spin_unlock(&urb->lock);
- }
-
-@@ -787,7 +786,7 @@ rescan_this:
- urb = td->urb;
- urb_priv = td->urb->hcpriv;
-
-- if (urb->status == -EINPROGRESS) {
-+ if (!urb->unlinked) {
- prev = &td->hwNextTD;
- continue;
- }
diff --git a/target/linux/adm5120/patches-2.6.24/913-usb_avoid_donelist_after_an_error.patch b/target/linux/adm5120/patches-2.6.24/913-usb_avoid_donelist_after_an_error.patch
deleted file mode 100644
index c6d7d6008b..0000000000
--- a/target/linux/adm5120/patches-2.6.24/913-usb_avoid_donelist_after_an_error.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Index: linux-2.6.24/drivers/usb/host/adm5120-q.c
-===================================================================
---- linux-2.6.24.orig/drivers/usb/host/adm5120-q.c
-+++ linux-2.6.24/drivers/usb/host/adm5120-q.c
-@@ -641,10 +641,11 @@ static int td_done(struct admhcd *ahcd,
-
- /*-------------------------------------------------------------------------*/
-
--static inline struct td *
-+static inline void
- ed_halted(struct admhcd *ahcd, struct td *td, int cc, struct td *rev)
- {
- struct urb *urb = td->urb;
-+ struct urb_priv *urb_priv = urb->hcpriv;
- struct ed *ed = td->ed;
- struct list_head *tmp = td->td_list.next;
- __hc32 toggle = ed->hwHeadP & cpu_to_hc32(ahcd, ED_C);
-@@ -657,13 +658,12 @@ ed_halted(struct admhcd *ahcd, struct td
- wmb();
- ed->hwHeadP &= ~cpu_to_hc32(ahcd, ED_H);
-
-- /* put any later tds from this urb onto the donelist, after 'td',
-- * order won't matter here: no errors, and nothing was transferred.
-- * also patch the ed so it looks as if those tds completed normally.
-+ /* Get rid of all later tds from this urb. We don't have
-+ * to be careful: no errors and nothing was transferred.
-+ * Also patch the ed so it looks as if those tds completed normally.
- */
- while (tmp != &ed->td_list) {
- struct td *next;
-- __hc32 info;
-
- next = list_entry(tmp, struct td, td_list);
- tmp = next->td_list.next;
-@@ -678,16 +678,8 @@ ed_halted(struct admhcd *ahcd, struct td
- * then we need to leave the control STATUS packet queued
- * and clear ED_SKIP.
- */
-- info = next->hwINFO;
--#if 0 /* FIXME */
-- info |= cpu_to_hc32(ahcd, TD_DONE);
--#endif
-- info &= ~cpu_to_hc32(ahcd, TD_CC);
-- next->hwINFO = info;
--
-- next->next_dl_td = rev;
-- rev = next;
--
-+ list_del(&next->td_list);
-+ urb_priv->td_cnt++;
- ed->hwHeadP = next->hwNextTD | toggle;
- }
-
-@@ -713,8 +705,6 @@ ed_halted(struct admhcd *ahcd, struct td
- hc32_to_cpu(ahcd, td->hwINFO),
- cc, cc_to_error [cc]);
- }
--
-- return rev;
- }
-
- /*-------------------------------------------------------------------------*/
diff --git a/target/linux/adm5120/patches-2.6.24/914-usb_reorganize_urb_status_use.patch b/target/linux/adm5120/patches-2.6.24/914-usb_reorganize_urb_status_use.patch
deleted file mode 100644
index 79a53d8012..0000000000
--- a/target/linux/adm5120/patches-2.6.24/914-usb_reorganize_urb_status_use.patch
+++ /dev/null
@@ -1,242 +0,0 @@
-Index: linux-2.6.24/drivers/usb/host/adm5120-dbg.c
-===================================================================
---- linux-2.6.24.orig/drivers/usb/host/adm5120-dbg.c
-+++ linux-2.6.24/drivers/usb/host/adm5120-dbg.c
-@@ -82,7 +82,7 @@ static inline char *td_togglestring(u32
- * small: 0) header + data packets 1) just header
- */
- static void __attribute__((unused))
--urb_print(struct admhcd *ahcd, struct urb *urb, char *str, int small)
-+urb_print(struct admhcd *ahcd, struct urb *urb, char *str, int small, int status)
- {
- unsigned int pipe = urb->pipe;
-
-@@ -92,7 +92,7 @@ urb_print(struct admhcd *ahcd, struct ur
- }
-
- #ifndef ADMHC_VERBOSE_DEBUG
-- if (urb->status != 0)
-+ if (status != 0)
- #endif
- admhc_dbg(ahcd, "URB-%s %p dev=%d ep=%d%s-%s flags=%x len=%d/%d "
- "stat=%d\n",
-@@ -105,7 +105,7 @@ urb_print(struct admhcd *ahcd, struct ur
- urb->transfer_flags,
- urb->actual_length,
- urb->transfer_buffer_length,
-- urb->status);
-+ status);
-
- #ifdef ADMHC_VERBOSE_DEBUG
- if (!small) {
-@@ -125,7 +125,7 @@ urb_print(struct admhcd *ahcd, struct ur
- urb->transfer_buffer_length: urb->actual_length;
- for (i = 0; i < 16 && i < len; i++)
- printk(" %02x", ((__u8 *)urb->transfer_buffer)[i]);
-- printk("%s stat:%d\n", i < len? "...": "", urb->status);
-+ printk("%s stat:%d\n", i < len? "...": "", status);
- }
- }
- #endif /* ADMHC_VERBOSE_DEBUG */
-Index: linux-2.6.24/drivers/usb/host/adm5120-hcd.c
-===================================================================
---- linux-2.6.24.orig/drivers/usb/host/adm5120-hcd.c
-+++ linux-2.6.24/drivers/usb/host/adm5120-hcd.c
-@@ -96,7 +96,7 @@ static int admhc_urb_enqueue(struct usb_
-
- #ifdef ADMHC_VERBOSE_DEBUG
- spin_lock_irqsave(&ahcd->lock, flags);
-- urb_print(ahcd, urb, "ENQEUE", usb_pipein(pipe));
-+ urb_print(ahcd, urb, "ENQEUE", usb_pipein(pipe), -EINPROGRESS);
- spin_unlock_irqrestore(&ahcd->lock, flags);
- #endif
-
-@@ -208,8 +208,8 @@ fail:
- }
-
- /*
-- * decouple the URB from the HC queues (TDs, urb_priv); it's
-- * already marked using urb->status. reporting is always done
-+ * decouple the URB from the HC queues (TDs, urb_priv);
-+ * reporting is always done
- * asynchronously, and we might be dealing with an urb that's
- * partially transferred, or an ED with other urbs being unlinked.
- */
-@@ -223,7 +223,7 @@ static int admhc_urb_dequeue(struct usb_
- spin_lock_irqsave(&ahcd->lock, flags);
-
- #ifdef ADMHC_VERBOSE_DEBUG
-- urb_print(ahcd, urb, "DEQUEUE", 1);
-+ urb_print(ahcd, urb, "DEQUEUE", 1, status);
- #endif
- ret = usb_hcd_check_unlink_urb(hcd, urb, status);
- if (ret) {
-@@ -247,7 +247,7 @@ static int admhc_urb_dequeue(struct usb_
- * any more ... just clean up every urb's memory.
- */
- if (urb->hcpriv)
-- finish_urb(ahcd, urb);
-+ finish_urb(ahcd, urb, status);
- }
- spin_unlock_irqrestore(&ahcd->lock, flags);
-
-Index: linux-2.6.24/drivers/usb/host/adm5120-pm.c
-===================================================================
---- linux-2.6.24.orig/drivers/usb/host/adm5120-pm.c
-+++ linux-2.6.24/drivers/usb/host/adm5120-pm.c
-@@ -383,9 +383,8 @@ static int admhc_restart(struct admhcd *
- ed, ed->state);
- }
-
-- spin_lock(&urb->lock);
-- urb->status = -ESHUTDOWN;
-- spin_unlock(&urb->lock);
-+ if (!urb->unlinked)
-+ urb->unlinked = -ESHUTDOWN;
- }
- finish_unlinks(ahcd, 0);
- spin_unlock_irq(&ahcd->lock);
-Index: linux-2.6.24/drivers/usb/host/adm5120-q.c
-===================================================================
---- linux-2.6.24.orig/drivers/usb/host/adm5120-q.c
-+++ linux-2.6.24/drivers/usb/host/adm5120-q.c
-@@ -23,16 +23,14 @@
- * PRECONDITION: ahcd lock held, irqs blocked.
- */
- static void
--finish_urb(struct admhcd *ahcd, struct urb *urb)
-+finish_urb(struct admhcd *ahcd, struct urb *urb, int status)
- __releases(ahcd->lock)
- __acquires(ahcd->lock)
- {
- urb_priv_free(ahcd, urb->hcpriv);
-
-- spin_lock(&urb->lock);
-- if (likely(urb->status == -EINPROGRESS))
-- urb->status = 0;
-- spin_unlock(&urb->lock);
-+ if (likely(status == -EINPROGRESS))
-+ status = 0;
-
- switch (usb_pipetype(urb->pipe)) {
- case PIPE_ISOCHRONOUS:
-@@ -44,12 +42,13 @@ __acquires(ahcd->lock)
- }
-
- #ifdef ADMHC_VERBOSE_DEBUG
-- urb_print(ahcd, urb, "RET", usb_pipeout (urb->pipe));
-+ urb_print(ahcd, urb, "RET", usb_pipeout (urb->pipe), status);
- #endif
-
- /* urb->complete() can reenter this HCD */
- usb_hcd_unlink_urb_from_ep(admhcd_to_hcd(ahcd), urb);
- spin_unlock(&ahcd->lock);
-+ urb->status = status;
- usb_hcd_giveback_urb(admhcd_to_hcd(ahcd), urb);
- spin_lock(&ahcd->lock);
- }
-@@ -557,9 +556,7 @@ static void td_submit_urb(struct admhcd
- * Done List handling functions
- *-------------------------------------------------------------------------*/
-
--/* calculate transfer length/status and update the urb
-- * PRECONDITION: irqsafe (only for urb->status locking)
-- */
-+/* calculate transfer length/status and update the urb */
- static int td_done(struct admhcd *ahcd, struct urb *urb, struct td *td)
- {
- struct urb_priv *urb_priv = urb->hcpriv;
-@@ -568,6 +565,7 @@ static int td_done(struct admhcd *ahcd,
- u32 tdDBP;
- int type = usb_pipetype(urb->pipe);
- int cc;
-+ int status = -EINPROGRESS;
-
- info = hc32_to_cpup(ahcd, &td->hwINFO);
- tdDBP = hc32_to_cpup(ahcd, &td->hwDBP);
-@@ -582,10 +580,9 @@ static int td_done(struct admhcd *ahcd,
- /* NOTE: assumes FC in tdINFO == 0, and that
- * only the first of 0..MAXPSW psws is used.
- */
--#if 0
-- if (tdINFO & TD_CC) /* hc didn't touch? */
-- return;
--#endif
-+ if (info & TD_CC) /* hc didn't touch? */
-+ return status;
-+
- if (usb_pipeout(urb->pipe))
- dlen = urb->iso_frame_desc[td->index].length;
- else {
-@@ -614,11 +611,9 @@ static int td_done(struct admhcd *ahcd,
- && !(urb->transfer_flags & URB_SHORT_NOT_OK))
- cc = TD_CC_NOERROR;
-
-- if (cc != TD_CC_NOERROR && cc < TD_CC_HCD0) {
-- spin_lock(&urb->lock);
-- urb->status = cc_to_error[cc];
-- spin_unlock(&urb->lock);
-- }
-+ if (cc != TD_CC_NOERROR && cc < TD_CC_HCD0)
-+ status = cc_to_error[cc];
-+
-
- /* count all non-empty packets except control SETUP packet */
- if ((type != PIPE_CONTROL || td->index != 0) && tdDBP != 0) {
-@@ -636,7 +631,7 @@ static int td_done(struct admhcd *ahcd,
- list_del(&td->td_list);
- urb_priv->td_idx++;
-
-- return cc;
-+ return status;
- }
-
- /*-------------------------------------------------------------------------*/
-@@ -771,6 +766,7 @@ rescan_this:
- struct urb *urb;
- struct urb_priv *urb_priv;
- __hc32 savebits;
-+ int status;
-
- td = list_entry(entry, struct td, td_list);
- urb = td->urb;
-@@ -792,12 +788,12 @@ rescan_this:
- #ifdef ADMHC_VERBOSE_DEBUG
- urb_print(ahcd, urb, "PARTIAL", 0);
- #endif
-- td_done(ahcd, urb, td);
-+ status = td_done(ahcd, urb, td);
-
- /* if URB is done, clean up */
- if (urb_priv->td_idx == urb_priv->td_cnt) {
- modified = completed = 1;
-- finish_urb(ahcd, urb);
-+ finish_urb(ahcd, urb, status);
- }
- }
- if (completed && !list_empty(&ed->td_list))
-@@ -895,13 +891,13 @@ static void ed_update(struct admhcd *ahc
- struct td *td = list_entry(entry, struct td, td_list);
- struct urb *urb = td->urb;
- struct urb_priv *urb_priv = urb->hcpriv;
-- int cc;
-+ int status;
-
- if (hc32_to_cpup(ahcd, &td->hwINFO) & TD_OWN)
- break;
-
- /* update URB's length and status from TD */
-- cc = td_done(ahcd, urb, td);
-+ status = td_done(ahcd, urb, td);
- if (is_ed_halted(ahcd, ed) && is_td_halted(ahcd, ed, td))
- ed_unhalt(ahcd, ed, urb);
-
-@@ -910,7 +906,7 @@ static void ed_update(struct admhcd *ahc
-
- /* If all this urb's TDs are done, call complete() */
- if (urb_priv->td_idx == urb_priv->td_cnt)
-- finish_urb(ahcd, urb);
-+ finish_urb(ahcd, urb, status);
-
- /* clean schedule: unlink EDs that are no longer busy */
- if (list_empty(&ed->td_list)) {
diff --git a/target/linux/adm5120/patches-2.6.24/915-usb_eliminate_urb_status.patch b/target/linux/adm5120/patches-2.6.24/915-usb_eliminate_urb_status.patch
deleted file mode 100644
index 291b1ade55..0000000000
--- a/target/linux/adm5120/patches-2.6.24/915-usb_eliminate_urb_status.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Index: linux-2.6.24/drivers/usb/host/adm5120-q.c
-===================================================================
---- linux-2.6.24.orig/drivers/usb/host/adm5120-q.c
-+++ linux-2.6.24/drivers/usb/host/adm5120-q.c
-@@ -48,8 +48,7 @@ __acquires(ahcd->lock)
- /* urb->complete() can reenter this HCD */
- usb_hcd_unlink_urb_from_ep(admhcd_to_hcd(ahcd), urb);
- spin_unlock(&ahcd->lock);
-- urb->status = status;
-- usb_hcd_giveback_urb(admhcd_to_hcd(ahcd), urb);
-+ usb_hcd_giveback_urb(admhcd_to_hcd(ahcd), urb, status);
- spin_lock(&ahcd->lock);
- }
-
diff --git a/target/linux/adm5120/patches-2.6.24/916-usb_bump_version_number.patch b/target/linux/adm5120/patches-2.6.24/916-usb_bump_version_number.patch
deleted file mode 100644
index 312c1f322a..0000000000
--- a/target/linux/adm5120/patches-2.6.24/916-usb_bump_version_number.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: linux-2.6.24/drivers/usb/host/adm5120-hcd.c
-===================================================================
---- linux-2.6.24.orig/drivers/usb/host/adm5120-hcd.c
-+++ linux-2.6.24/drivers/usb/host/adm5120-hcd.c
-@@ -45,7 +45,7 @@
- #include "../core/hcd.h"
- #include "../core/hub.h"
-
--#define DRIVER_VERSION "0.16.3"
-+#define DRIVER_VERSION "0.24.0"
- #define DRIVER_AUTHOR "Gabor Juhos <juhosg at openwrt.org>"
- #define DRIVER_DESC "ADMtek USB 1.1 Host Controller Driver"
-
diff --git a/target/linux/adm5120/patches-2.6.24/001-adm5120.patch b/target/linux/adm5120/patches/001-adm5120.patch
index 7ff58add9c..1deda1a083 100644
--- a/target/linux/adm5120/patches-2.6.24/001-adm5120.patch
+++ b/target/linux/adm5120/patches/001-adm5120.patch
@@ -23,7 +23,7 @@ Index: linux-2.6.24/arch/mips/Kconfig
config MACH_ALCHEMY
bool "Alchemy processor based machines"
-@@ -689,6 +701,7 @@ config WR_PPMC
+@@ -689,6 +703,7 @@ config WR_PPMC
endchoice
diff --git a/target/linux/adm5120/patches-2.6.24/002-adm5120_flash.patch b/target/linux/adm5120/patches/002-adm5120_flash.patch
index a1eea9f0da..a1eea9f0da 100644
--- a/target/linux/adm5120/patches-2.6.24/002-adm5120_flash.patch
+++ b/target/linux/adm5120/patches/002-adm5120_flash.patch
diff --git a/target/linux/adm5120/patches-2.6.24/003-adm5120_switch.patch b/target/linux/adm5120/patches/003-adm5120_switch.patch
index 6a14c2b376..6a14c2b376 100644
--- a/target/linux/adm5120/patches-2.6.24/003-adm5120_switch.patch
+++ b/target/linux/adm5120/patches/003-adm5120_switch.patch
diff --git a/target/linux/adm5120/patches-2.6.24/005-adm5120_usb.patch b/target/linux/adm5120/patches/005-adm5120_usb.patch
index a2e43b4f66..a2e43b4f66 100644
--- a/target/linux/adm5120/patches-2.6.24/005-adm5120_usb.patch
+++ b/target/linux/adm5120/patches/005-adm5120_usb.patch
diff --git a/target/linux/adm5120/patches-2.6.24/006-adm5120_leds.patch b/target/linux/adm5120/patches/006-adm5120_leds.patch
index a055b3560f..a055b3560f 100644
--- a/target/linux/adm5120/patches-2.6.24/006-adm5120_leds.patch
+++ b/target/linux/adm5120/patches/006-adm5120_leds.patch
diff --git a/target/linux/adm5120/patches-2.6.24/007-adm5120_pci.patch b/target/linux/adm5120/patches/007-adm5120_pci.patch
index bce0c814b9..bce0c814b9 100644
--- a/target/linux/adm5120/patches-2.6.24/007-adm5120_pci.patch
+++ b/target/linux/adm5120/patches/007-adm5120_pci.patch
diff --git a/target/linux/adm5120/patches-2.6.24/009-adm5120_leds_switch_trigger.patch b/target/linux/adm5120/patches/009-adm5120_leds_switch_trigger.patch
index 60b78ebf73..60b78ebf73 100644
--- a/target/linux/adm5120/patches-2.6.24/009-adm5120_leds_switch_trigger.patch
+++ b/target/linux/adm5120/patches/009-adm5120_leds_switch_trigger.patch
diff --git a/target/linux/adm5120/patches-2.6.24/100-mtd_myloder_partition_parser.patch b/target/linux/adm5120/patches/100-mtd_myloder_partition_parser.patch
index 519b1c2392..519b1c2392 100644
--- a/target/linux/adm5120/patches-2.6.24/100-mtd_myloder_partition_parser.patch
+++ b/target/linux/adm5120/patches/100-mtd_myloder_partition_parser.patch
diff --git a/target/linux/adm5120/patches-2.6.24/101-cfi_fixup_macronix_bootloc.patch b/target/linux/adm5120/patches/101-cfi_fixup_macronix_bootloc.patch
index 19c87a90bf..19c87a90bf 100644
--- a/target/linux/adm5120/patches-2.6.24/101-cfi_fixup_macronix_bootloc.patch
+++ b/target/linux/adm5120/patches/101-cfi_fixup_macronix_bootloc.patch
diff --git a/target/linux/adm5120/patches-2.6.24/102-jedec_pmc_39lvxxx_chips.patch b/target/linux/adm5120/patches/102-jedec_pmc_39lvxxx_chips.patch
index 772c92f79f..772c92f79f 100644
--- a/target/linux/adm5120/patches-2.6.24/102-jedec_pmc_39lvxxx_chips.patch
+++ b/target/linux/adm5120/patches/102-jedec_pmc_39lvxxx_chips.patch
diff --git a/target/linux/adm5120/patches-2.6.24/103-mtd_trxsplit.patch b/target/linux/adm5120/patches/103-mtd_trxsplit.patch
index c709123428..c709123428 100644
--- a/target/linux/adm5120/patches-2.6.24/103-mtd_trxsplit.patch
+++ b/target/linux/adm5120/patches/103-mtd_trxsplit.patch
diff --git a/target/linux/adm5120/patches-2.6.24/120-rb153_cf_driver.patch b/target/linux/adm5120/patches/120-rb153_cf_driver.patch
index e382871871..e382871871 100644
--- a/target/linux/adm5120/patches-2.6.24/120-rb153_cf_driver.patch
+++ b/target/linux/adm5120/patches/120-rb153_cf_driver.patch
diff --git a/target/linux/adm5120/patches-2.6.24/140-cmdline_hack.patch b/target/linux/adm5120/patches/140-cmdline_hack.patch
index 58a63ba2a9..58a63ba2a9 100644
--- a/target/linux/adm5120/patches-2.6.24/140-cmdline_hack.patch
+++ b/target/linux/adm5120/patches/140-cmdline_hack.patch
diff --git a/target/linux/adm5120/patches-2.6.24/200-amba_pl010_hacks.patch b/target/linux/adm5120/patches/200-amba_pl010_hacks.patch
index 22f5083465..22f5083465 100644
--- a/target/linux/adm5120/patches-2.6.24/200-amba_pl010_hacks.patch
+++ b/target/linux/adm5120/patches/200-amba_pl010_hacks.patch
diff --git a/target/linux/adm5120/patches-2.6.24/201-amba_bus_hacks.patch b/target/linux/adm5120/patches/201-amba_bus_hacks.patch
index 0f1c3b2e38..0f1c3b2e38 100644
--- a/target/linux/adm5120/patches-2.6.24/201-amba_bus_hacks.patch
+++ b/target/linux/adm5120/patches/201-amba_bus_hacks.patch
diff --git a/target/linux/adm5120/patches-2.6.24/202-pci_disable_common_quirks.patch b/target/linux/adm5120/patches/202-pci_disable_common_quirks.patch
index 2aa86e2b13..2aa86e2b13 100644
--- a/target/linux/adm5120/patches-2.6.24/202-pci_disable_common_quirks.patch
+++ b/target/linux/adm5120/patches/202-pci_disable_common_quirks.patch
diff --git a/target/linux/adm5120/patches-2.6.24/203-gpio_leds_brightness.patch b/target/linux/adm5120/patches/203-gpio_leds_brightness.patch
index 37eb0ab5fa..37eb0ab5fa 100644
--- a/target/linux/adm5120/patches-2.6.24/203-gpio_leds_brightness.patch
+++ b/target/linux/adm5120/patches/203-gpio_leds_brightness.patch
diff --git a/target/linux/adm5120/patches-2.6.24/300-i2c_gpio_custom.patch b/target/linux/adm5120/patches/300-i2c_gpio_custom.patch
index d0736f3616..d0736f3616 100644
--- a/target/linux/adm5120/patches-2.6.24/300-i2c_gpio_custom.patch
+++ b/target/linux/adm5120/patches/300-i2c_gpio_custom.patch
diff --git a/target/linux/adm5120/patches-2.6.24/310-adm5120_wdt.patch b/target/linux/adm5120/patches/310-adm5120_wdt.patch
index 2f1ac5387a..2f1ac5387a 100644
--- a/target/linux/adm5120/patches-2.6.24/310-adm5120_wdt.patch
+++ b/target/linux/adm5120/patches/310-adm5120_wdt.patch
diff --git a/target/linux/adm5120/router_be/config-2.6.23 b/target/linux/adm5120/router_be/config-2.6.23
deleted file mode 100644
index 3ff67e4595..0000000000
--- a/target/linux/adm5120/router_be/config-2.6.23
+++ /dev/null
@@ -1,247 +0,0 @@
-CONFIG_32BIT=y
-# CONFIG_64BIT is not set
-CONFIG_ADM5120_CPU_OVERRIDES=y
-CONFIG_ADM5120_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_ARM_AMBA=y
-CONFIG_BASE_SMALL=0
-CONFIG_BAYCOM_SER_FDX=m
-CONFIG_BAYCOM_SER_HDX=m
-CONFIG_BINFMT_MISC=m
-CONFIG_BITREVERSE=y
-CONFIG_CIFS_DEBUG2=y
-CONFIG_CIFS_EXPERIMENTAL=y
-CONFIG_CIFS_STATS2=y
-CONFIG_CIFS_WEAK_PW_HASH=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CMDLINE="console=ttyS0,115200 rootfstype=squashfs,jffs2 init=/etc/preinit"
-CONFIG_CPU_BIG_ENDIAN=y
-CONFIG_CPU_HAS_LLSC=y
-CONFIG_CPU_HAS_PREFETCH=y
-CONFIG_CPU_HAS_SYNC=y
-# CONFIG_CPU_LITTLE_ENDIAN is not set
-# 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_HW is not set
-CONFIG_DEVPORT=y
-# CONFIG_DM9000 is not set
-CONFIG_DMA_NEED_PCI_MAP_STATE=y
-CONFIG_DMA_NONCOHERENT=y
-CONFIG_EARLY_PRINTK=y
-CONFIG_ELF_CORE=y
-# CONFIG_EXT3_FS_POSIX_ACL is not set
-# CONFIG_EXT3_FS_SECURITY is not set
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_FS_MBCACHE=m
-CONFIG_FS_POSIX_ACL=y
-CONFIG_GENERIC_ACL=y
-CONFIG_GENERIC_FIND_NEXT_BIT=y
-CONFIG_GENERIC_GPIO=y
-# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
-CONFIG_HAS_DMA=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-CONFIG_HID=m
-CONFIG_HID_SUPPORT=y
-CONFIG_HW_HAS_PCI=y
-CONFIG_HW_RANDOM=y
-CONFIG_HZ=250
-# CONFIG_HZ_100 is not set
-CONFIG_HZ_250=y
-# CONFIG_I2C is not set
-# CONFIG_IDE is not set
-CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_INOTIFY=y
-CONFIG_INOTIFY_USER=y
-CONFIG_INPUT=y
-# CONFIG_INPUT_EVDEV is not set
-CONFIG_IPV6_MIP6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_IPV6_ROUTE_INFO=y
-CONFIG_IPV6_TUNNEL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IRQ_CPU=y
-# CONFIG_JOLIET is not set
-CONFIG_LEDS_ADM5120=m
-# CONFIG_LEDS_ADM5120_DIAG is not set
-# CONFIG_LEDS_ADM5120_EXPERIMENTAL is not set
-# CONFIG_LEDS_ALIX is not set
-CONFIG_LEDS_GPIO=m
-CONFIG_LEDS_TRIGGER_ADM5120_SWITCH=m
-CONFIG_LEGACY_PTYS=y
-CONFIG_LEGACY_PTY_COUNT=256
-# 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_MII=m
-# CONFIG_MINIX_FS is not set
-CONFIG_MIPS=y
-CONFIG_MIPS_ADM5120=y
-CONFIG_MIPS_ADM5120_ENET=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_MODULE_FORCE_UNLOAD=y
-CONFIG_MTD=y
-# CONFIG_MTD_ABSENT is not set
-CONFIG_MTD_ADM5120=y
-CONFIG_MTD_BLKDEVS=y
-CONFIG_MTD_BLOCK=y
-CONFIG_MTD_BLOCK2MTD=y
-CONFIG_MTD_CFI=y
-# CONFIG_MTD_CFI_ADV_OPTIONS is not set
-CONFIG_MTD_CFI_AMDSTD=y
-CONFIG_MTD_CFI_FIXUP_MACRONIX_BOOTLOC=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 is not set
-# CONFIG_MTD_CFI_STAA is not set
-CONFIG_MTD_CFI_UTIL=y
-CONFIG_MTD_CHAR=y
-CONFIG_MTD_CMDLINE_PARTS=y
-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_MYLOADER_PARTS is not set
-# CONFIG_MTD_ONENAND is not set
-CONFIG_MTD_PARTITIONS=y
-# CONFIG_MTD_PCI is not set
-# CONFIG_MTD_PHRAM is not set
-# CONFIG_MTD_PHYSMAP is not set
-# CONFIG_MTD_PLATRAM is not set
-# CONFIG_MTD_PMC551 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_MTD_TRXSPLIT=y
-CONFIG_NETDEV_1000=y
-# CONFIG_NET_PCI is not set
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_NET_VENDOR_3COM is not set
-# 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_PARTITION_ADVANCED is not set
-# CONFIG_PCIPCWATCHDOG is not set
-CONFIG_PCI_ADM5120=y
-CONFIG_PCI_DISABLE_COMMON_QUIRKS=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_RTC is not set
-CONFIG_RWSEM_GENERIC_SPINLOCK=y
-CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
-CONFIG_SCSI_WAIT_SCAN=m
-# CONFIG_SERIAL_8250 is not set
-# CONFIG_SERIAL_ADM5120 is not set
-CONFIG_SERIAL_AMBA_PL010=y
-CONFIG_SERIAL_AMBA_PL010_CONSOLE=y
-CONFIG_SERIAL_AMBA_PL010_NUMPORTS=2
-CONFIG_SERIAL_AMBA_PL010_PORTNAME="ttyS"
-# CONFIG_SERIAL_AMBA_PL011 is not set
-CONFIG_SERIO=y
-# CONFIG_SERIO_AMBAKMI is not set
-# CONFIG_SERIO_I8042 is not set
-# CONFIG_SERIO_LIBPS2 is not set
-# CONFIG_SERIO_PCIPS2 is not set
-# CONFIG_SERIO_RAW is not set
-CONFIG_SERIO_SERPORT=y
-# 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_SND_USB_AUDIO is not set
-CONFIG_SOFT_WATCHDOG=m
-# CONFIG_SPARSEMEM_STATIC is not set
-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_LITTLE_ENDIAN=y
-CONFIG_TMPFS_POSIX_ACL=y
-# CONFIG_TOSHIBA_JMR3927 is not set
-# CONFIG_TOSHIBA_RBTX4927 is not set
-# CONFIG_TOSHIBA_RBTX4938 is not set
-CONFIG_TRAD_SIGNALS=y
-# CONFIG_USBPCWATCHDOG is not set
-# CONFIG_USB_ACM is not set
-CONFIG_USB_ADM5120_HCD=m
-# CONFIG_USB_ATM is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_DEVICEFS is not set
-# CONFIG_USB_EHCI_HCD is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_PRINTER is not set
-# CONFIG_USB_R8A66597_HCD is not set
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_UHCI_HCD is not set
-# CONFIG_USB_USBNET is not set
-# CONFIG_USB_USBNET_MII is not set
-# CONFIG_USER_NS is not set
-# CONFIG_VGASTATE is not set
-CONFIG_VM_EVENT_COUNTERS=y
-# CONFIG_ZD1211RW is not set
-CONFIG_ZONE_DMA_FLAG=0
diff --git a/target/linux/adm5120/router_be/config-2.6.24 b/target/linux/adm5120/router_be/config-default
index 6204566d6c..3c57df1e65 100644
--- a/target/linux/adm5120/router_be/config-2.6.24
+++ b/target/linux/adm5120/router_be/config-default
@@ -202,7 +202,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
CONFIG_SCSI_WAIT_SCAN=m
# CONFIG_SERIAL_8250 is not set
-# CONFIG_SERIAL_ADM5120 is not set
CONFIG_SERIAL_AMBA_PL010=y
CONFIG_SERIAL_AMBA_PL010_CONSOLE=y
CONFIG_SERIAL_AMBA_PL010_NUMPORTS=2
diff --git a/target/linux/adm5120/router_le/config-2.6.23 b/target/linux/adm5120/router_le/config-2.6.23
deleted file mode 100644
index f84dc99c14..0000000000
--- a/target/linux/adm5120/router_le/config-2.6.23
+++ /dev/null
@@ -1,271 +0,0 @@
-CONFIG_32BIT=y
-# CONFIG_64BIT is not set
-CONFIG_ADM5120_CPU_OVERRIDES=y
-CONFIG_ADM5120_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_ARM_AMBA=y
-CONFIG_BASE_SMALL=0
-CONFIG_BAYCOM_SER_FDX=m
-CONFIG_BAYCOM_SER_HDX=m
-CONFIG_BINFMT_MISC=m
-CONFIG_BITREVERSE=y
-CONFIG_CIFS_DEBUG2=y
-CONFIG_CIFS_EXPERIMENTAL=y
-CONFIG_CIFS_STATS2=y
-CONFIG_CIFS_WEAK_PW_HASH=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CMDLINE="console=ttyS0,115200 rootfstype=squashfs,yaffs2,jffs2 init=/etc/preinit"
-# 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_HW is not set
-CONFIG_DEVPORT=y
-# CONFIG_DM9000 is not set
-CONFIG_DMA_NEED_PCI_MAP_STATE=y
-CONFIG_DMA_NONCOHERENT=y
-CONFIG_EARLY_PRINTK=y
-CONFIG_ELF_CORE=y
-# CONFIG_EXT3_FS_POSIX_ACL is not set
-# CONFIG_EXT3_FS_SECURITY is not set
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_FS_MBCACHE=m
-CONFIG_FS_POSIX_ACL=y
-CONFIG_GENERIC_ACL=y
-CONFIG_GENERIC_FIND_NEXT_BIT=y
-CONFIG_GENERIC_GPIO=y
-# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
-CONFIG_HAS_DMA=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-CONFIG_HID=m
-CONFIG_HID_SUPPORT=y
-CONFIG_HW_HAS_PCI=y
-CONFIG_HW_RANDOM=y
-CONFIG_HZ=250
-# CONFIG_HZ_100 is not set
-CONFIG_HZ_250=y
-# CONFIG_I2C is not set
-# CONFIG_IDE is not set
-CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_INOTIFY=y
-CONFIG_INOTIFY_USER=y
-CONFIG_INPUT=y
-# CONFIG_INPUT_EVDEV is not set
-CONFIG_IPV6_MIP6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_IPV6_ROUTE_INFO=y
-CONFIG_IPV6_TUNNEL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IRQ_CPU=y
-# CONFIG_JOLIET is not set
-CONFIG_LEDS_ADM5120=m
-# CONFIG_LEDS_ADM5120_DIAG is not set
-# CONFIG_LEDS_ADM5120_EXPERIMENTAL is not set
-# CONFIG_LEDS_ALIX is not set
-CONFIG_LEDS_GPIO=m
-CONFIG_LEDS_TRIGGER_ADM5120_SWITCH=m
-CONFIG_LEGACY_PTYS=y
-CONFIG_LEGACY_PTY_COUNT=256
-# 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_MII=m
-# CONFIG_MINIX_FS is not set
-CONFIG_MIPS=y
-CONFIG_MIPS_ADM5120=y
-CONFIG_MIPS_ADM5120_ENET=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_MODULE_FORCE_UNLOAD=y
-CONFIG_MTD=y
-# CONFIG_MTD_ABSENT is not set
-CONFIG_MTD_ADM5120=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_FIXUP_MACRONIX_BOOTLOC=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 is not set
-# CONFIG_MTD_CFI_STAA is not set
-CONFIG_MTD_CFI_UTIL=y
-CONFIG_MTD_CHAR=y
-CONFIG_MTD_CMDLINE_PARTS=y
-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=y
-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_MYLOADER_PARTS=y
-CONFIG_MTD_NAND=y
-# CONFIG_MTD_NAND_ADM5120 is not set
-# CONFIG_MTD_NAND_CAFE is not set
-# CONFIG_MTD_NAND_DISKONCHIP is not set
-# CONFIG_MTD_NAND_ECC_SMC is not set
-CONFIG_MTD_NAND_IDS=y
-# CONFIG_MTD_NAND_MUSEUM_IDS is not set
-# CONFIG_MTD_NAND_NANDSIM is not set
-CONFIG_MTD_NAND_PLATFORM=y
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-# CONFIG_MTD_ONENAND is not set
-CONFIG_MTD_PARTITIONS=y
-# CONFIG_MTD_PCI is not set
-# CONFIG_MTD_PHRAM is not set
-# CONFIG_MTD_PHYSMAP is not set
-# CONFIG_MTD_PLATRAM is not set
-# CONFIG_MTD_PMC551 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_MTD_TRXSPLIT=y
-# CONFIG_NETFILTER_XT_TARGET_TARPIT is not set
-# CONFIG_NET_PCI is not set
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_NET_VENDOR_3COM is not set
-# 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_PARTITION_ADVANCED is not set
-# CONFIG_PCIPCWATCHDOG is not set
-CONFIG_PCI_ADM5120=y
-CONFIG_PCI_DISABLE_COMMON_QUIRKS=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_RTC is not set
-CONFIG_RWSEM_GENERIC_SPINLOCK=y
-CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
-CONFIG_SCSI_WAIT_SCAN=m
-# CONFIG_SERIAL_8250 is not set
-# CONFIG_SERIAL_ADM5120 is not set
-CONFIG_SERIAL_AMBA_PL010=y
-CONFIG_SERIAL_AMBA_PL010_CONSOLE=y
-CONFIG_SERIAL_AMBA_PL010_NUMPORTS=2
-CONFIG_SERIAL_AMBA_PL010_PORTNAME="ttyS"
-# CONFIG_SERIAL_AMBA_PL011 is not set
-CONFIG_SERIO=y
-# CONFIG_SERIO_AMBAKMI is not set
-# CONFIG_SERIO_I8042 is not set
-# CONFIG_SERIO_LIBPS2 is not set
-# CONFIG_SERIO_PCIPS2 is not set
-# CONFIG_SERIO_RAW is not set
-CONFIG_SERIO_SERPORT=y
-# 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_SOFT_WATCHDOG=m
-# CONFIG_SPARSEMEM_STATIC is not set
-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_LITTLE_ENDIAN=y
-CONFIG_TMPFS_POSIX_ACL=y
-# CONFIG_TOSHIBA_JMR3927 is not set
-# CONFIG_TOSHIBA_RBTX4927 is not set
-# CONFIG_TOSHIBA_RBTX4938 is not set
-CONFIG_TRAD_SIGNALS=y
-# CONFIG_USBPCWATCHDOG is not set
-CONFIG_USB_ADM5120_HCD=m
-# CONFIG_USB_ALI_M5632 is not set
-# CONFIG_USB_AN2720 is not set
-# CONFIG_USB_CATC is not set
-CONFIG_USB_DEBUG=y
-CONFIG_USB_EHCI_HCD=m
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_NET_DM9601 is not set
-# CONFIG_USB_NET_GL620A is not set
-# CONFIG_USB_NET_MCS7830 is not set
-# CONFIG_USB_NET_PLUSB is not set
-# CONFIG_USB_NET_RNDIS_HOST is not set
-# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
-# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_R8A66597_HCD is not set
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_UHCI_HCD is not set
-# CONFIG_USER_NS is not set
-# CONFIG_VGASTATE is not set
-CONFIG_VIDEO_V4L1=y
-CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_YAFFS_9BYTE_TAGS=y
-# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set
-CONFIG_YAFFS_AUTO_YAFFS2=y
-CONFIG_YAFFS_CHECKPOINT_RESERVED_BLOCKS=0
-# CONFIG_YAFFS_DISABLE_LAZY_LOAD is not set
-# CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set
-CONFIG_YAFFS_FS=y
-CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y
-CONFIG_YAFFS_YAFFS1=y
-CONFIG_YAFFS_YAFFS2=y
-# CONFIG_ZD1211RW is not set
-CONFIG_ZONE_DMA_FLAG=0
diff --git a/target/linux/adm5120/router_le/config-2.6.24 b/target/linux/adm5120/router_le/config-default
index 096586c2ad..a35ef4aa95 100644
--- a/target/linux/adm5120/router_le/config-2.6.24
+++ b/target/linux/adm5120/router_le/config-default
@@ -166,7 +166,6 @@ CONFIG_MTD_MAP_BANK_WIDTH_4=y
# CONFIG_MTD_MTDRAM is not set
CONFIG_MTD_MYLOADER_PARTS=y
CONFIG_MTD_NAND=y
-# CONFIG_MTD_NAND_ADM5120 is not set
# CONFIG_MTD_NAND_CAFE is not set
# CONFIG_MTD_NAND_DISKONCHIP is not set
# CONFIG_MTD_NAND_ECC_SMC is not set
@@ -211,7 +210,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
CONFIG_SCSI_WAIT_SCAN=m
# CONFIG_SERIAL_8250 is not set
-# CONFIG_SERIAL_ADM5120 is not set
CONFIG_SERIAL_AMBA_PL010=y
CONFIG_SERIAL_AMBA_PL010_CONSOLE=y
CONFIG_SERIAL_AMBA_PL010_NUMPORTS=2