From 07c8d27309c0b6a734a012f7b6913a8e815f49eb Mon Sep 17 00:00:00 2001 From: juhosg Date: Mon, 13 Feb 2012 15:17:59 +0000 Subject: ramips: add preliminary support for the RT3662/RT3883 SoCs git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30495 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../101-rt288x_serial_driver_hack.patch | 4 +-- .../patches-3.2/104-ramips-watchdog-driver.patch | 2 +- .../ramips/patches-3.2/200-rt3883-ehci-glue.patch | 32 ++++++++++++++++++++++ .../ramips/patches-3.2/201-rt3883-ohci-glue.patch | 31 +++++++++++++++++++++ .../patches-3.2/301-rt3883-ehci-3.2-fix.patch | 11 ++++++++ 5 files changed, 77 insertions(+), 3 deletions(-) create mode 100644 target/linux/ramips/patches-3.2/200-rt3883-ehci-glue.patch create mode 100644 target/linux/ramips/patches-3.2/201-rt3883-ohci-glue.patch create mode 100644 target/linux/ramips/patches-3.2/301-rt3883-ehci-3.2-fix.patch (limited to 'target/linux/ramips/patches-3.2') diff --git a/target/linux/ramips/patches-3.2/101-rt288x_serial_driver_hack.patch b/target/linux/ramips/patches-3.2/101-rt288x_serial_driver_hack.patch index 3ba1e5323..c393f19e7 100644 --- a/target/linux/ramips/patches-3.2/101-rt288x_serial_driver_hack.patch +++ b/target/linux/ramips/patches-3.2/101-rt288x_serial_driver_hack.patch @@ -68,8 +68,8 @@ cards. If unsure, say N. +config SERIAL_8250_RT288X -+ bool "Ralink RT288x/RT305x serial port support" -+ depends on SERIAL_8250 != n && (SOC_RT288X || SOC_RT305X) ++ 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 diff --git a/target/linux/ramips/patches-3.2/104-ramips-watchdog-driver.patch b/target/linux/ramips/patches-3.2/104-ramips-watchdog-driver.patch index 293044dab..430c7cf30 100644 --- a/target/linux/ramips/patches-3.2/104-ramips-watchdog-driver.patch +++ b/target/linux/ramips/patches-3.2/104-ramips-watchdog-driver.patch @@ -6,7 +6,7 @@ +config RAMIPS_WDT + tristate "Ralink RT288X/RT305X Watchdog Timer" -+ depends on SOC_RT288X || SOC_RT305X ++ depends on (SOC_RT288X || SOC_RT305X || SOC_RT3883) + help + Hardware driver for the built-in watchdog timer on the + Ralink RT288X/RT305X SoCs. diff --git a/target/linux/ramips/patches-3.2/200-rt3883-ehci-glue.patch b/target/linux/ramips/patches-3.2/200-rt3883-ehci-glue.patch new file mode 100644 index 000000000..db59785a2 --- /dev/null +++ b/target/linux/ramips/patches-3.2/200-rt3883-ehci-glue.patch @@ -0,0 +1,32 @@ +--- a/drivers/usb/host/Kconfig ++++ b/drivers/usb/host/Kconfig +@@ -217,6 +217,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 +@@ -1329,6 +1329,11 @@ MODULE_LICENSE ("GPL"); + #define PLATFORM_DRIVER ehci_xls_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.2/201-rt3883-ohci-glue.patch b/target/linux/ramips/patches-3.2/201-rt3883-ohci-glue.patch new file mode 100644 index 000000000..e93da3212 --- /dev/null +++ b/target/linux/ramips/patches-3.2/201-rt3883-ohci-glue.patch @@ -0,0 +1,31 @@ +--- a/drivers/usb/host/Kconfig ++++ b/drivers/usb/host/Kconfig +@@ -319,6 +319,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 +@@ -1116,6 +1116,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) && \ diff --git a/target/linux/ramips/patches-3.2/301-rt3883-ehci-3.2-fix.patch b/target/linux/ramips/patches-3.2/301-rt3883-ehci-3.2-fix.patch new file mode 100644 index 000000000..e2ba05dff --- /dev/null +++ b/target/linux/ramips/patches-3.2/301-rt3883-ehci-3.2-fix.patch @@ -0,0 +1,11 @@ +--- a/drivers/usb/host/ehci-rt3883.c ++++ b/drivers/usb/host/ehci-rt3883.c +@@ -21,7 +21,7 @@ static int ehci_rt3883_init(struct usb_h + + ehci->caps = hcd->regs; + ehci->regs = hcd->regs + +- HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase)); ++ HC_LENGTH(ehci, ehci_readl(ehci, &ehci->caps->hc_capbase)); + dbg_hcs_params(ehci, "reset"); + dbg_hcc_params(ehci, "reset"); + -- cgit v1.2.3