aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/patches-3.3
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ramips/patches-3.3')
-rw-r--r--target/linux/ramips/patches-3.3/001-mips-add-cp0-compare-irq-function.patch29
-rw-r--r--target/linux/ramips/patches-3.3/010-mtd_fix_cfi_cmdset_0002_erase_status_check.patch20
-rw-r--r--target/linux/ramips/patches-3.3/011-mtd-cfi_cmdset_0002-force-word-write.patch61
-rw-r--r--target/linux/ramips/patches-3.3/100-mips-ralink-core.patch39
-rw-r--r--target/linux/ramips/patches-3.3/101-rt288x_serial_driver_hack.patch91
-rw-r--r--target/linux/ramips/patches-3.3/102-rt288x-pci-driver-hook.patch10
-rw-r--r--target/linux/ramips/patches-3.3/103-ethernet.patch20
-rw-r--r--target/linux/ramips/patches-3.3/104-ramips-watchdog-driver.patch26
-rw-r--r--target/linux/ramips/patches-3.3/105-ramips-spi-driver.patch25
-rw-r--r--target/linux/ramips/patches-3.3/105-usb_dwc_otg.patch20
-rw-r--r--target/linux/ramips/patches-3.3/106-rt3883-pci-support.patch10
-rw-r--r--target/linux/ramips/patches-3.3/200-rt3883-ehci-glue.patch32
-rw-r--r--target/linux/ramips/patches-3.3/201-rt3883-ohci-glue.patch31
13 files changed, 414 insertions, 0 deletions
diff --git a/target/linux/ramips/patches-3.3/001-mips-add-cp0-compare-irq-function.patch b/target/linux/ramips/patches-3.3/001-mips-add-cp0-compare-irq-function.patch
new file mode 100644
index 0000000000..fde9869f12
--- /dev/null
+++ b/target/linux/ramips/patches-3.3/001-mips-add-cp0-compare-irq-function.patch
@@ -0,0 +1,29 @@
+--- a/arch/mips/kernel/traps.c
++++ b/arch/mips/kernel/traps.c
+@@ -54,6 +54,7 @@
+ #include <asm/types.h>
+ #include <asm/stacktrace.h>
+ #include <asm/uasm.h>
++#include <asm/time.h>
+
+ extern void check_wait(void);
+ extern asmlinkage void r4k_wait(void);
+@@ -1593,6 +1594,8 @@ void __cpuinit per_cpu_trap_init(void)
+ if (cpu_has_mips_r2) {
+ cp0_compare_irq_shift = CAUSEB_TI - CAUSEB_IP;
+ cp0_compare_irq = (read_c0_intctl() >> INTCTLB_IPTI) & 7;
++ if (get_c0_compare_irq)
++ cp0_compare_irq = get_c0_compare_irq();
+ cp0_perfcount_irq = (read_c0_intctl() >> INTCTLB_IPPCI) & 7;
+ if (cp0_perfcount_irq == cp0_compare_irq)
+ cp0_perfcount_irq = -1;
+--- a/arch/mips/include/asm/time.h
++++ b/arch/mips/include/asm/time.h
+@@ -52,6 +52,7 @@ extern int (*perf_irq)(void);
+ */
+ #ifdef CONFIG_CEVT_R4K_LIB
+ extern unsigned int __weak get_c0_compare_int(void);
++extern unsigned int __weak get_c0_compare_irq(void);
+ extern int r4k_clockevent_init(void);
+ #endif
+
diff --git a/target/linux/ramips/patches-3.3/010-mtd_fix_cfi_cmdset_0002_erase_status_check.patch b/target/linux/ramips/patches-3.3/010-mtd_fix_cfi_cmdset_0002_erase_status_check.patch
new file mode 100644
index 0000000000..494b790ae2
--- /dev/null
+++ b/target/linux/ramips/patches-3.3/010-mtd_fix_cfi_cmdset_0002_erase_status_check.patch
@@ -0,0 +1,20 @@
+--- a/drivers/mtd/chips/cfi_cmdset_0002.c
++++ b/drivers/mtd/chips/cfi_cmdset_0002.c
+@@ -1627,7 +1627,7 @@ static int __xipram do_erase_chip(struct
+ chip->erase_suspended = 0;
+ }
+
+- if (chip_ready(map, adr))
++ if (chip_good(map, adr, map_word_ff(map)))
+ break;
+
+ if (time_after(jiffies, timeo)) {
+@@ -1715,7 +1715,7 @@ static int __xipram do_erase_oneblock(st
+ chip->erase_suspended = 0;
+ }
+
+- if (chip_ready(map, adr)) {
++ if (chip_good(map, adr, map_word_ff(map))) {
+ xip_enable(map, chip, adr);
+ break;
+ }
diff --git a/target/linux/ramips/patches-3.3/011-mtd-cfi_cmdset_0002-force-word-write.patch b/target/linux/ramips/patches-3.3/011-mtd-cfi_cmdset_0002-force-word-write.patch
new file mode 100644
index 0000000000..d2aa0858b9
--- /dev/null
+++ b/target/linux/ramips/patches-3.3/011-mtd-cfi_cmdset_0002-force-word-write.patch
@@ -0,0 +1,61 @@
+--- a/drivers/mtd/chips/cfi_cmdset_0002.c
++++ b/drivers/mtd/chips/cfi_cmdset_0002.c
+@@ -39,7 +39,7 @@
+ #include <linux/mtd/xip.h>
+
+ #define AMD_BOOTLOC_BUG
+-#define FORCE_WORD_WRITE 0
++#define FORCE_WORD_WRITE 1
+
+ #define MAX_WORD_RETRIES 3
+
+@@ -50,7 +50,9 @@
+
+ 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 *);
++#if !FORCE_WORD_WRITE
+ static int cfi_amdstd_write_buffers(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
++#endif
+ static int cfi_amdstd_erase_chip(struct mtd_info *, struct erase_info *);
+ static int cfi_amdstd_erase_varsize(struct mtd_info *, struct erase_info *);
+ static void cfi_amdstd_sync (struct mtd_info *);
+@@ -183,6 +185,7 @@ static void fixup_amd_bootblock(struct m
+ }
+ #endif
+
++#if !FORCE_WORD_WRITE
+ static void fixup_use_write_buffers(struct mtd_info *mtd)
+ {
+ struct map_info *map = mtd->priv;
+@@ -192,6 +195,7 @@ static void fixup_use_write_buffers(stru
+ mtd->write = cfi_amdstd_write_buffers;
+ }
+ }
++#endif /* !FORCE_WORD_WRITE */
+
+ /* Atmel chips don't use the same PRI format as AMD chips */
+ static void fixup_convert_atmel_pri(struct mtd_info *mtd)
+@@ -1372,6 +1376,7 @@ static int cfi_amdstd_write_words(struct
+ /*
+ * FIXME: interleaved mode not tested, and probably not supported!
+ */
++#if !FORCE_WORD_WRITE
+ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip,
+ unsigned long adr, const u_char *buf,
+ int len)
+@@ -1483,7 +1488,6 @@ static int __xipram do_write_buffer(stru
+ return ret;
+ }
+
+-
+ static int cfi_amdstd_write_buffers(struct mtd_info *mtd, loff_t to, size_t len,
+ size_t *retlen, const u_char *buf)
+ {
+@@ -1562,6 +1566,7 @@ static int cfi_amdstd_write_buffers(stru
+
+ return 0;
+ }
++#endif /* !FORCE_WORD_WRITE */
+
+
+ /*
diff --git a/target/linux/ramips/patches-3.3/100-mips-ralink-core.patch b/target/linux/ramips/patches-3.3/100-mips-ralink-core.patch
new file mode 100644
index 0000000000..43a2856319
--- /dev/null
+++ b/target/linux/ramips/patches-3.3/100-mips-ralink-core.patch
@@ -0,0 +1,39 @@
+--- a/arch/mips/Kconfig
++++ b/arch/mips/Kconfig
+@@ -90,6 +90,9 @@ config ATH79
+ help
+ Support for the Atheros AR71XX/AR724X/AR913X SoCs.
+
++config MIPS_RALINK
++ bool "Ralink MIPS SoC based boards"
++
+ config BCM47XX
+ bool "Broadcom BCM47XX based boards"
+ select CEVT_R4K
+@@ -822,6 +825,7 @@ source "arch/mips/jz4740/Kconfig"
+ source "arch/mips/lantiq/Kconfig"
+ source "arch/mips/lasat/Kconfig"
+ source "arch/mips/pmc-sierra/Kconfig"
++source "arch/mips/ralink/Kconfig"
+ source "arch/mips/powertv/Kconfig"
+ source "arch/mips/sgi-ip27/Kconfig"
+ source "arch/mips/sibyte/Kconfig"
+@@ -1171,7 +1175,7 @@ config BOOT_ELF32
+
+ config MIPS_L1_CACHE_SHIFT
+ int
+- default "4" if MACH_DECSTATION || MIKROTIK_RB532 || PMC_MSP4200_EVAL
++ default "4" if MACH_DECSTATION || MIKROTIK_RB532 || PMC_MSP4200_EVAL || RALINK_RT288X
+ default "6" if MIPS_CPU_SCACHE
+ default "7" if SGI_IP22 || SGI_IP27 || SGI_IP28 || SNI_RM || CPU_CAVIUM_OCTEON
+ default "5"
+--- a/arch/mips/Kbuild.platforms
++++ b/arch/mips/Kbuild.platforms
+@@ -21,6 +21,7 @@ platforms += pmc-sierra
+ platforms += pnx833x
+ platforms += pnx8550
+ platforms += powertv
++platforms += ralink
+ platforms += rb532
+ platforms += sgi-ip22
+ platforms += sgi-ip27
diff --git a/target/linux/ramips/patches-3.3/101-rt288x_serial_driver_hack.patch b/target/linux/ramips/patches-3.3/101-rt288x_serial_driver_hack.patch
new file mode 100644
index 0000000000..3aac8e8982
--- /dev/null
+++ b/target/linux/ramips/patches-3.3/101-rt288x_serial_driver_hack.patch
@@ -0,0 +1,91 @@
+--- a/drivers/tty/serial/8250/Kconfig
++++ b/drivers/tty/serial/8250/Kconfig
+@@ -258,6 +258,14 @@ config SERIAL_8250_ACORN
+ system, say Y to this option. The driver can handle 1, 2, or 3 port
+ cards. If unsure, say N.
+
++config SERIAL_8250_RT288X
++ bool "Ralink RT288x/RT305x/RT3662/RT3883 serial port support"
++ depends on SERIAL_8250 != n && (SOC_RT288X || SOC_RT305X || SOC_RT3883)
++ help
++ If you have a Ralink RT288x/RT305x SoC based board and want to use the
++ serial port, say Y to this option. The driver can handle up to 2 serial
++ ports. If unsure, say N.
++
+ config SERIAL_8250_RM9K
+ bool "Support for MIPS RM9xxx integrated serial port"
+ depends on SERIAL_8250 != n && SERIAL_RM9000
+--- a/include/linux/serial_core.h
++++ b/include/linux/serial_core.h
+@@ -321,7 +321,7 @@ struct uart_port {
+ #define UPIO_HUB6 (1)
+ #define UPIO_MEM (2)
+ #define UPIO_MEM32 (3)
+-#define UPIO_AU (4) /* Au1x00 type IO */
++#define UPIO_AU (4) /* Au1x00 and RT288x type IO */
+ #define UPIO_TSI (5) /* Tsi108/109 type IO */
+ #define UPIO_RM9000 (6) /* RM9000 type IO */
+
+--- a/drivers/tty/serial/8250/8250.c
++++ b/drivers/tty/serial/8250/8250.c
+@@ -292,9 +292,9 @@ static const struct serial8250_config ua
+ },
+ };
+
+-#if defined(CONFIG_MIPS_ALCHEMY)
++#if defined(CONFIG_MIPS_ALCHEMY) || defined (CONFIG_SERIAL_8250_RT288X)
+
+-/* Au1x00 UART hardware has a weird register layout */
++/* Au1x00 and RT288x UART hardware has a weird register layout */
+ static const u8 au_io_in_map[] = {
+ [UART_RX] = 0,
+ [UART_IER] = 2,
+@@ -516,8 +516,8 @@ static inline void _serial_dl_write(stru
+ serial_outp(up, UART_DLM, value >> 8 & 0xff);
+ }
+
+-#if defined(CONFIG_MIPS_ALCHEMY)
+-/* Au1x00 haven't got a standard divisor latch */
++#if defined(CONFIG_MIPS_ALCHEMY) || defined (CONFIG_SERIAL_8250_RT288X)
++/* Au1x00 and RT288x haven't got a standard divisor latch */
+ static int serial_dl_read(struct uart_8250_port *up)
+ {
+ if (up->port.iotype == UPIO_AU)
+@@ -724,22 +724,19 @@ static int size_fifo(struct uart_8250_po
+ */
+ static unsigned int autoconfig_read_divisor_id(struct uart_8250_port *p)
+ {
+- unsigned char old_dll, old_dlm, old_lcr;
++ unsigned char old_lcr;
++ unsigned int old_dl;
+ unsigned int id;
+
+ old_lcr = serial_inp(p, UART_LCR);
+ serial_outp(p, UART_LCR, UART_LCR_CONF_MODE_A);
+
+- old_dll = serial_inp(p, UART_DLL);
+- old_dlm = serial_inp(p, UART_DLM);
++ old_dl = serial_dl_read(p);
+
+- serial_outp(p, UART_DLL, 0);
+- serial_outp(p, UART_DLM, 0);
++ serial_dl_write(p, 0);
++ id = serial_dl_read(p);
+
+- id = serial_inp(p, UART_DLL) | serial_inp(p, UART_DLM) << 8;
+-
+- serial_outp(p, UART_DLL, old_dll);
+- serial_outp(p, UART_DLM, old_dlm);
++ serial_dl_write(p, old_dl);
+ serial_outp(p, UART_LCR, old_lcr);
+
+ return id;
+@@ -865,7 +862,7 @@ static int broken_efr(struct uart_8250_p
+ /*
+ * Exar ST16C2550 "A2" devices incorrectly detect as
+ * having an EFR, and report an ID of 0x0201. See
+- * http://linux.derkeiler.com/Mailing-Lists/Kernel/2004-11/4812.html
++ * http://linux.derkeiler.com/Mailing-Lists/Kernel/2004-11/4812.html
+ */
+ if (autoconfig_read_divisor_id(up) == 0x0201 && size_fifo(up) == 16)
+ return 1;
diff --git a/target/linux/ramips/patches-3.3/102-rt288x-pci-driver-hook.patch b/target/linux/ramips/patches-3.3/102-rt288x-pci-driver-hook.patch
new file mode 100644
index 0000000000..3987ef2e8b
--- /dev/null
+++ b/target/linux/ramips/patches-3.3/102-rt288x-pci-driver-hook.patch
@@ -0,0 +1,10 @@
+--- a/arch/mips/pci/Makefile
++++ b/arch/mips/pci/Makefile
+@@ -20,6 +20,7 @@ obj-$(CONFIG_BCM63XX) += pci-bcm63xx.o
+ ops-bcm63xx.o
+ obj-$(CONFIG_MIPS_ALCHEMY) += pci-alchemy.o
+ obj-$(CONFIG_SOC_AR724X) += pci-ath724x.o
++obj-$(CONFIG_SOC_RT288X) += pci-rt288x.o
+
+ #
+ # These are still pretty much in the old state, watch, go blind.
diff --git a/target/linux/ramips/patches-3.3/103-ethernet.patch b/target/linux/ramips/patches-3.3/103-ethernet.patch
new file mode 100644
index 0000000000..e13248780b
--- /dev/null
+++ b/target/linux/ramips/patches-3.3/103-ethernet.patch
@@ -0,0 +1,20 @@
+--- a/drivers/net/ethernet/Kconfig
++++ b/drivers/net/ethernet/Kconfig
+@@ -144,6 +144,7 @@ source "drivers/net/ethernet/packetengin
+ source "drivers/net/ethernet/pasemi/Kconfig"
+ source "drivers/net/ethernet/qlogic/Kconfig"
+ source "drivers/net/ethernet/racal/Kconfig"
++source "drivers/net/ethernet/ramips/Kconfig"
+ source "drivers/net/ethernet/realtek/Kconfig"
+ source "drivers/net/ethernet/renesas/Kconfig"
+ source "drivers/net/ethernet/rdc/Kconfig"
+--- a/drivers/net/ethernet/Makefile
++++ b/drivers/net/ethernet/Makefile
+@@ -54,6 +54,7 @@ obj-$(CONFIG_NET_PACKET_ENGINE) += packe
+ obj-$(CONFIG_NET_VENDOR_PASEMI) += pasemi/
+ obj-$(CONFIG_NET_VENDOR_QLOGIC) += qlogic/
+ obj-$(CONFIG_NET_VENDOR_RACAL) += racal/
++obj-$(CONFIG_NET_RAMIPS) += ramips/
+ obj-$(CONFIG_NET_VENDOR_REALTEK) += realtek/
+ obj-$(CONFIG_SH_ETH) += renesas/
+ obj-$(CONFIG_NET_VENDOR_RDC) += rdc/
diff --git a/target/linux/ramips/patches-3.3/104-ramips-watchdog-driver.patch b/target/linux/ramips/patches-3.3/104-ramips-watchdog-driver.patch
new file mode 100644
index 0000000000..6a9cefa862
--- /dev/null
+++ b/target/linux/ramips/patches-3.3/104-ramips-watchdog-driver.patch
@@ -0,0 +1,26 @@
+--- a/drivers/watchdog/Kconfig
++++ b/drivers/watchdog/Kconfig
+@@ -1033,6 +1033,13 @@ config LANTIQ_WDT
+ help
+ Hardware driver for the Lantiq SoC Watchdog Timer.
+
++config RAMIPS_WDT
++ tristate "Ralink RT288X/RT305X Watchdog Timer"
++ depends on (SOC_RT288X || SOC_RT305X || SOC_RT3883)
++ help
++ Hardware driver for the built-in watchdog timer on the
++ Ralink RT288X/RT305X SoCs.
++
+ # PARISC Architecture
+
+ # POWERPC Architecture
+--- a/drivers/watchdog/Makefile
++++ b/drivers/watchdog/Makefile
+@@ -132,6 +132,7 @@ obj-$(CONFIG_TXX9_WDT) += txx9wdt.o
+ obj-$(CONFIG_OCTEON_WDT) += octeon-wdt.o
+ octeon-wdt-y := octeon-wdt-main.o octeon-wdt-nmi.o
+ obj-$(CONFIG_LANTIQ_WDT) += lantiq_wdt.o
++obj-$(CONFIG_RAMIPS_WDT) += ramips_wdt.o
+
+ # PARISC Architecture
+
diff --git a/target/linux/ramips/patches-3.3/105-ramips-spi-driver.patch b/target/linux/ramips/patches-3.3/105-ramips-spi-driver.patch
new file mode 100644
index 0000000000..31600e9643
--- /dev/null
+++ b/target/linux/ramips/patches-3.3/105-ramips-spi-driver.patch
@@ -0,0 +1,25 @@
+--- a/drivers/spi/Kconfig
++++ b/drivers/spi/Kconfig
+@@ -288,6 +288,12 @@ config SPI_PXA2XX
+ config SPI_PXA2XX_PCI
+ def_bool SPI_PXA2XX && X86_32 && PCI
+
++config SPI_RAMIPS
++ tristate "Ralink RT288x/RT305x SPI Controller"
++ depends on (SOC_RT288X || SOC_RT305X) && SPI_MASTER
++ help
++ This selects a driver for the Ralink RT288x/RT305x SPI Controller.
++
+ config SPI_S3C24XX
+ tristate "Samsung S3C24XX series SPI"
+ depends on ARCH_S3C2410 && EXPERIMENTAL
+--- a/drivers/spi/Makefile
++++ b/drivers/spi/Makefile
+@@ -45,6 +45,7 @@ obj-$(CONFIG_SPI_PL022) += spi-pl022.o
+ obj-$(CONFIG_SPI_PPC4xx) += spi-ppc4xx.o
+ obj-$(CONFIG_SPI_PXA2XX) += spi-pxa2xx.o
+ obj-$(CONFIG_SPI_PXA2XX_PCI) += spi-pxa2xx-pci.o
++obj-$(CONFIG_SPI_RAMIPS) += spi-ramips.o
+ obj-$(CONFIG_SPI_S3C24XX) += spi-s3c24xx-hw.o
+ spi-s3c24xx-hw-y := spi-s3c24xx.o
+ spi-s3c24xx-hw-$(CONFIG_SPI_S3C24XX_FIQ) += spi-s3c24xx-fiq.o
diff --git a/target/linux/ramips/patches-3.3/105-usb_dwc_otg.patch b/target/linux/ramips/patches-3.3/105-usb_dwc_otg.patch
new file mode 100644
index 0000000000..1d9ecd920b
--- /dev/null
+++ b/target/linux/ramips/patches-3.3/105-usb_dwc_otg.patch
@@ -0,0 +1,20 @@
+--- a/drivers/usb/Kconfig
++++ b/drivers/usb/Kconfig
+@@ -182,4 +182,6 @@ source "drivers/usb/gadget/Kconfig"
+
+ source "drivers/usb/otg/Kconfig"
+
++source "drivers/usb/dwc_otg/Kconfig"
++
+ endif # USB_SUPPORT
+--- a/drivers/usb/Makefile
++++ b/drivers/usb/Makefile
+@@ -51,6 +51,8 @@ obj-$(CONFIG_EARLY_PRINTK_DBGP) += early
+ obj-$(CONFIG_USB_ATM) += atm/
+ obj-$(CONFIG_USB_SPEEDTOUCH) += atm/
+
++obj-$(CONFIG_DWC_OTG) += dwc_otg/
++
+ obj-$(CONFIG_USB_MUSB_HDRC) += musb/
+ obj-$(CONFIG_USB_RENESAS_USBHS) += renesas_usbhs/
+ obj-$(CONFIG_USB_GADGET) += gadget/
diff --git a/target/linux/ramips/patches-3.3/106-rt3883-pci-support.patch b/target/linux/ramips/patches-3.3/106-rt3883-pci-support.patch
new file mode 100644
index 0000000000..5f049a2af5
--- /dev/null
+++ b/target/linux/ramips/patches-3.3/106-rt3883-pci-support.patch
@@ -0,0 +1,10 @@
+--- a/arch/mips/pci/Makefile
++++ b/arch/mips/pci/Makefile
+@@ -21,6 +21,7 @@ obj-$(CONFIG_BCM63XX) += pci-bcm63xx.o
+ obj-$(CONFIG_MIPS_ALCHEMY) += pci-alchemy.o
+ obj-$(CONFIG_SOC_AR724X) += pci-ath724x.o
+ obj-$(CONFIG_SOC_RT288X) += pci-rt288x.o
++obj-$(CONFIG_SOC_RT3883) += pci-rt3883.o
+
+ #
+ # These are still pretty much in the old state, watch, go blind.
diff --git a/target/linux/ramips/patches-3.3/200-rt3883-ehci-glue.patch b/target/linux/ramips/patches-3.3/200-rt3883-ehci-glue.patch
new file mode 100644
index 0000000000..63560e8fa7
--- /dev/null
+++ b/target/linux/ramips/patches-3.3/200-rt3883-ehci-glue.patch
@@ -0,0 +1,32 @@
+--- a/drivers/usb/host/Kconfig
++++ b/drivers/usb/host/Kconfig
+@@ -226,6 +226,15 @@ config USB_EHCI_ATH79
+ Enables support for the built-in EHCI controller present
+ on the Atheros AR7XXX/AR9XXX SoCs.
+
++config USB_EHCI_RT3883
++ bool "EHCI support for Ralink RT3662/RT3883 SoCs"
++ depends on USB_EHCI_HCD && SOC_RT3883
++ select USB_EHCI_ROOT_HUB_TT
++ default y
++ ---help---
++ Enables support for the built-in EHCI controller present
++ on the Ralink RT3883 SoC.
++
+ config USB_OXU210HP_HCD
+ tristate "OXU210HP HCD support"
+ depends on USB
+--- a/drivers/usb/host/ehci-hcd.c
++++ b/drivers/usb/host/ehci-hcd.c
+@@ -1376,6 +1376,11 @@ MODULE_LICENSE ("GPL");
+ #define PLATFORM_DRIVER ehci_mv_driver
+ #endif
+
++#ifdef CONFIG_USB_EHCI_RT3883
++#include "ehci-rt3883.c"
++#define PLATFORM_DRIVER ehci_rt3883_driver
++#endif
++
+ #if !defined(PCI_DRIVER) && !defined(PLATFORM_DRIVER) && \
+ !defined(PS3_SYSTEM_BUS_DRIVER) && !defined(OF_PLATFORM_DRIVER) && \
+ !defined(XILINX_OF_PLATFORM_DRIVER)
diff --git a/target/linux/ramips/patches-3.3/201-rt3883-ohci-glue.patch b/target/linux/ramips/patches-3.3/201-rt3883-ohci-glue.patch
new file mode 100644
index 0000000000..983e4f97e2
--- /dev/null
+++ b/target/linux/ramips/patches-3.3/201-rt3883-ohci-glue.patch
@@ -0,0 +1,31 @@
+--- a/drivers/usb/host/Kconfig
++++ b/drivers/usb/host/Kconfig
+@@ -328,6 +328,14 @@ config USB_OHCI_ATH79
+ Enables support for the built-in OHCI controller present on the
+ Atheros AR71XX/AR7240 SoCs.
+
++config USB_OHCI_RT3883
++ bool "USB OHCI support for the Ralink RT3883 SoCs"
++ depends on USB_OHCI_HCD && SOC_RT3883
++ default y
++ help
++ Enables support for the built-in OHCI controller present on the
++ Ralink RT3883 SoC.
++
+ config USB_OHCI_HCD_PPC_SOC
+ bool "OHCI support for on-chip PPC USB controller"
+ depends on USB_OHCI_HCD && (STB03xxx || PPC_MPC52xx)
+--- a/drivers/usb/host/ohci-hcd.c
++++ b/drivers/usb/host/ohci-hcd.c
+@@ -1121,6 +1121,11 @@ MODULE_LICENSE ("GPL");
+ #define PLATFORM_DRIVER ohci_xls_driver
+ #endif
+
++#ifdef CONFIG_USB_OHCI_RT3883
++#include "ohci-rt3883.c"
++#define PLATFORM_DRIVER ohci_rt3883_driver
++#endif
++
+ #if !defined(PCI_DRIVER) && \
+ !defined(PLATFORM_DRIVER) && \
+ !defined(OMAP1_PLATFORM_DRIVER) && \