diff options
author | Florian Fainelli <florian@openwrt.org> | 2015-04-04 18:01:07 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2015-04-04 18:01:07 +0000 |
commit | b1ba4c50963db865b57092cd2ff9676e629aacf1 (patch) | |
tree | 605e14b700c9dacd60dc44b322fb2cc1b30b59d5 /target/linux/mcs814x/patches-3.18 | |
parent | c31df6e995c36e2b14b74f727b8392e6c1c10afc (diff) | |
download | upstream-b1ba4c50963db865b57092cd2ff9676e629aacf1.tar.gz upstream-b1ba4c50963db865b57092cd2ff9676e629aacf1.tar.bz2 upstream-b1ba4c50963db865b57092cd2ff9676e629aacf1.zip |
mcs814x: add support for 3.18
Signed-off-by: Florian Fainelli <florian@openwrt.org>
SVN-Revision: 45273
Diffstat (limited to 'target/linux/mcs814x/patches-3.18')
9 files changed, 287 insertions, 0 deletions
diff --git a/target/linux/mcs814x/patches-3.18/001-platform.patch b/target/linux/mcs814x/patches-3.18/001-platform.patch new file mode 100644 index 0000000000..25369b8b69 --- /dev/null +++ b/target/linux/mcs814x/patches-3.18/001-platform.patch @@ -0,0 +1,64 @@ +--- a/arch/arm/Kconfig ++++ b/arch/arm/Kconfig +@@ -267,7 +267,8 @@ config PHYS_OFFSET + ARCH_INTEGRATOR || \ + ARCH_IOP13XX || \ + ARCH_KS8695 || \ +- (ARCH_REALVIEW && !REALVIEW_HIGH_PHYS_OFFSET) ++ (ARCH_REALVIEW && !REALVIEW_HIGH_PHYS_OFFSET) || \ ++ ARCH_MCS814X + default 0x10000000 if ARCH_OMAP1 || ARCH_RPC + default 0x20000000 if ARCH_S5PV210 + default 0x70000000 if REALVIEW_HIGH_PHYS_OFFSET +@@ -786,6 +787,21 @@ config ARCH_OMAP1 + help + Support for older TI OMAP1 (omap7xx, omap15xx or omap16xx) + ++config ARCH_MCS814X ++ bool "Moschip MCS814x" ++ select FIQ ++ select GENERIC_IRQ_CHIP ++ select GENERIC_GPIO ++ select ARCH_REQUIRE_GPIOLIB ++ select CLKDEV_LOOKUP ++ select ARCH_USES_GETTIMEOFFSET ++ select USB_ARCH_HAS_OHCI ++ select USB_ARCH_HAS_EHCI ++ select MULTI_IRQ_HANDLER ++ help ++ Support for Moschip MCS814x SoCs (MCS8140). ++ ++ + endchoice + + menu "Multiple platform selection" +@@ -927,6 +944,8 @@ source "arch/arm/mach-picoxcell/Kconfig" + source "arch/arm/mach-pxa/Kconfig" + source "arch/arm/plat-pxa/Kconfig" + ++source "arch/arm/mach-mcs814x/Kconfig" ++ + source "arch/arm/mach-mmp/Kconfig" + + source "arch/arm/mach-qcom/Kconfig" +--- a/arch/arm/Makefile ++++ b/arch/arm/Makefile +@@ -172,6 +172,7 @@ machine-$(CONFIG_ARCH_IXP4XX) += ixp4xx + machine-$(CONFIG_ARCH_KEYSTONE) += keystone + machine-$(CONFIG_ARCH_KS8695) += ks8695 + machine-$(CONFIG_ARCH_LPC32XX) += lpc32xx ++machine-$(CONFIG_ARCH_MCS814X) += mcs814x + machine-$(CONFIG_ARCH_MESON) += meson + machine-$(CONFIG_ARCH_MMP) += mmp + machine-$(CONFIG_ARCH_MOXART) += moxart +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -163,6 +163,8 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += kirkwood- + kirkwood-ts419-6282.dtb + dtb-$(CONFIG_ARCH_LPC32XX) += ea3250.dtb phy3250.dtb + dtb-$(CONFIG_ARCH_MARCO) += marco-evb.dtb ++dtb-$(CONFIG_ARCH_MCS814X) += dlan-usb-extender.dtb \ ++ rbt-832.dtb + dtb-$(CONFIG_MACH_MESON6) += meson6-atv1200.dtb + dtb-$(CONFIG_ARCH_MOXART) += moxart-uc7112lx.dtb + dtb-$(CONFIG_ARCH_MXC) += \ diff --git a/target/linux/mcs814x/patches-3.18/003-ethernet.patch b/target/linux/mcs814x/patches-3.18/003-ethernet.patch new file mode 100644 index 0000000000..3ee8cd6b35 --- /dev/null +++ b/target/linux/mcs814x/patches-3.18/003-ethernet.patch @@ -0,0 +1,16 @@ +--- a/drivers/net/ethernet/Kconfig ++++ b/drivers/net/ethernet/Kconfig +@@ -186,4 +186,6 @@ source "drivers/net/ethernet/wiznet/Kcon + source "drivers/net/ethernet/xilinx/Kconfig" + source "drivers/net/ethernet/xircom/Kconfig" + ++source "drivers/net/ethernet/mcs8140/Kconfig" ++ + endif # ETHERNET +--- a/drivers/net/ethernet/Makefile ++++ b/drivers/net/ethernet/Makefile +@@ -84,3 +84,4 @@ obj-$(CONFIG_NET_VENDOR_VIA) += via/ + obj-$(CONFIG_NET_VENDOR_WIZNET) += wiznet/ + obj-$(CONFIG_NET_VENDOR_XILINX) += xilinx/ + obj-$(CONFIG_NET_VENDOR_XIRCOM) += xircom/ ++obj-$(CONFIG_NUPORT_ETHERNET_DRIVER) += mcs8140/ diff --git a/target/linux/mcs814x/patches-3.18/004-usb.patch b/target/linux/mcs814x/patches-3.18/004-usb.patch new file mode 100644 index 0000000000..d69ec211a5 --- /dev/null +++ b/target/linux/mcs814x/patches-3.18/004-usb.patch @@ -0,0 +1,28 @@ +--- a/drivers/usb/host/ehci-hcd.c ++++ b/drivers/usb/host/ehci-hcd.c +@@ -1298,6 +1298,11 @@ MODULE_LICENSE ("GPL"); + #define PLATFORM_DRIVER ehci_hcd_sead3_driver + #endif + ++#ifdef CONFIG_ARCH_MCS814X ++#include "ehci-mcs814x.c" ++#define PLATFORM_DRIVER mcs814x_ehci_driver ++#endif ++ + static int __init ehci_hcd_init(void) + { + int retval = 0; +--- a/drivers/usb/host/ohci-hcd.c ++++ b/drivers/usb/host/ohci-hcd.c +@@ -1259,6 +1259,11 @@ MODULE_LICENSE ("GPL"); + #define PLATFORM_DRIVER ohci_hcd_tilegx_driver + #endif + ++#ifdef CONFIG_ARCH_MCS814X ++#include "ohci-mcs814x.c" ++#define PLATFORM_DRIVER ohci_hcd_mcs814x_driver ++#endif ++ + static int __init ohci_hcd_mod_init(void) + { + int retval = 0; diff --git a/target/linux/mcs814x/patches-3.18/005-mcs814x_rng.patch b/target/linux/mcs814x/patches-3.18/005-mcs814x_rng.patch new file mode 100644 index 0000000000..4af3d86839 --- /dev/null +++ b/target/linux/mcs814x/patches-3.18/005-mcs814x_rng.patch @@ -0,0 +1,31 @@ +--- a/drivers/char/hw_random/Kconfig ++++ b/drivers/char/hw_random/Kconfig +@@ -229,6 +229,18 @@ config HW_RANDOM_TX4939 + + If unsure, say Y. + ++config HW_RANDOM_MCS814X ++ tristate "Moschip MCS814x Random Number Generator" ++ depends on HW_RANDOM && ARCH_MCS814X ++ ---help--- ++ This driver provides kernel-side support for the Random Number ++ Generator hardware found on Moschip MCS814x processors. ++ ++ To compile this driver as a module, choose M here: the ++ module will be called mcs814x-rng. ++ ++ If unusure, say Y. ++ + config HW_RANDOM_MXC_RNGA + tristate "Freescale i.MX RNGA Random Number Generator" + depends on ARCH_HAS_RNGA +--- a/drivers/char/hw_random/Makefile ++++ b/drivers/char/hw_random/Makefile +@@ -19,6 +19,7 @@ obj-$(CONFIG_HW_RANDOM_OMAP3_ROM) += oma + obj-$(CONFIG_HW_RANDOM_PASEMI) += pasemi-rng.o + obj-$(CONFIG_HW_RANDOM_VIRTIO) += virtio-rng.o + obj-$(CONFIG_HW_RANDOM_TX4939) += tx4939-rng.o ++obj-$(CONFIG_HW_RANDOM_MCS814X) += mcs814x-rng.o + obj-$(CONFIG_HW_RANDOM_MXC_RNGA) += mxc-rnga.o + obj-$(CONFIG_HW_RANDOM_OCTEON) += octeon-rng.o + obj-$(CONFIG_HW_RANDOM_NOMADIK) += nomadik-rng.o diff --git a/target/linux/mcs814x/patches-3.18/006-mcs814x_wdt.patch b/target/linux/mcs814x/patches-3.18/006-mcs814x_wdt.patch new file mode 100644 index 0000000000..72481f6b89 --- /dev/null +++ b/target/linux/mcs814x/patches-3.18/006-mcs814x_wdt.patch @@ -0,0 +1,25 @@ +--- a/drivers/watchdog/Kconfig ++++ b/drivers/watchdog/Kconfig +@@ -505,6 +505,12 @@ config MESON_WATCHDOG + To compile this driver as a module, choose M here: the + module will be called meson_wdt. + ++config MCS814X_WATCHDOG ++ tristate "Moschip MCS814x watchdog" ++ depends on WATCHDOG_CORE && ARCH_MCS814X ++ help ++ Support for the Moschip MCS814x SoCs on-chip watchdog timer. ++ + # AVR32 Architecture + + config AT32AP700X_WDT +--- a/drivers/watchdog/Makefile ++++ b/drivers/watchdog/Makefile +@@ -63,6 +63,7 @@ obj-$(CONFIG_QCOM_WDT) += qcom-wdt.o + obj-$(CONFIG_BCM_KONA_WDT) += bcm_kona_wdt.o + obj-$(CONFIG_TEGRA_WATCHDOG) += tegra_wdt.o + obj-$(CONFIG_MESON_WATCHDOG) += meson_wdt.o ++obj-$(CONFIG_MCS814X_WATCHDOG) += mcs814x_wdt.o + + # AVR32 Architecture + obj-$(CONFIG_AT32AP700X_WDT) += at32ap700x_wdt.o diff --git a/target/linux/mcs814x/patches-3.18/008-mcs814x_gpio.patch b/target/linux/mcs814x/patches-3.18/008-mcs814x_gpio.patch new file mode 100644 index 0000000000..92c85a700f --- /dev/null +++ b/target/linux/mcs814x/patches-3.18/008-mcs814x_gpio.patch @@ -0,0 +1,25 @@ +--- a/drivers/gpio/Kconfig ++++ b/drivers/gpio/Kconfig +@@ -819,6 +819,12 @@ config GPIO_MC33880 + SPI driver for Freescale MC33880 high-side/low-side switch. + This provides GPIO interface supporting inputs and outputs. + ++config GPIO_MCS814X ++ tristate "Moschip MCS814x GPIO support" ++ depends on ARCH_MCS814X ++ help ++ GPIO driver for Moschip MCS814x SoC gpio controllers. ++ + config GPIO_74X164 + tristate "74x164 serial-in/parallel-out 8-bits shift register" + depends on SPI_MASTER && OF +--- a/drivers/gpio/Makefile ++++ b/drivers/gpio/Makefile +@@ -49,6 +49,7 @@ obj-$(CONFIG_GPIO_MAX732X) += gpio-max73 + obj-$(CONFIG_GPIO_MC33880) += gpio-mc33880.o + obj-$(CONFIG_GPIO_MC9S08DZ60) += gpio-mc9s08dz60.o + obj-$(CONFIG_GPIO_MCP23S08) += gpio-mcp23s08.o ++obj-$(CONFIG_GPIO_MCS814X) += gpio-mcs814x.o + obj-$(CONFIG_GPIO_ML_IOH) += gpio-ml-ioh.o + obj-$(CONFIG_GPIO_MM_LANTIQ) += gpio-mm-lantiq.o + obj-$(CONFIG_GPIO_MOXART) += gpio-moxart.o diff --git a/target/linux/mcs814x/patches-3.18/011-mcs814x_internal_phy.patch b/target/linux/mcs814x/patches-3.18/011-mcs814x_internal_phy.patch new file mode 100644 index 0000000000..20d5add206 --- /dev/null +++ b/target/linux/mcs814x/patches-3.18/011-mcs814x_internal_phy.patch @@ -0,0 +1,20 @@ +--- a/drivers/net/phy/Kconfig ++++ b/drivers/net/phy/Kconfig +@@ -164,6 +164,10 @@ config RTL8306_PHY + tristate "Driver for Realtek RTL8306S switches" + select SWCONFIG + ++config MCS814X_PHY ++ tristate "Driver for the Moschip MCS814x internal PHY" ++ depends on ARCH_MCS814X ++ + config FIXED_PHY + bool "Driver for MDIO Bus/PHY emulation with fixed speed/link PHYs" + depends on PHYLIB=y +--- a/drivers/net/phy/Makefile ++++ b/drivers/net/phy/Makefile +@@ -51,3 +51,4 @@ obj-$(CONFIG_MDIO_SUN4I) += mdio-sun4i.o + obj-$(CONFIG_MDIO_MOXART) += mdio-moxart.o + obj-$(CONFIG_AMD_XGBE_PHY) += amd-xgbe-phy.o + obj-$(CONFIG_MDIO_BCM_UNIMAC) += mdio-bcm-unimac.o ++obj-$(CONFIG_MCS814X_PHY) += mcs814x.o diff --git a/target/linux/mcs814x/patches-3.18/012-mtd-cfi_cmdset_0002-force-word-write.patch b/target/linux/mcs814x/patches-3.18/012-mtd-cfi_cmdset_0002-force-word-write.patch new file mode 100644 index 0000000000..10593ce70d --- /dev/null +++ b/target/linux/mcs814x/patches-3.18/012-mtd-cfi_cmdset_0002-force-word-write.patch @@ -0,0 +1,14 @@ +--- a/drivers/mtd/chips/cfi_cmdset_0002.c ++++ b/drivers/mtd/chips/cfi_cmdset_0002.c +@@ -40,9 +40,9 @@ + #include <linux/mtd/xip.h> + + #define AMD_BOOTLOC_BUG +-#define FORCE_WORD_WRITE 0 ++#define FORCE_WORD_WRITE 1 + +-#define MAX_WORD_RETRIES 3 ++#define MAX_WORD_RETRIES 10 + + #define SST49LF004B 0x0060 + #define SST49LF040B 0x0050 diff --git a/target/linux/mcs814x/patches-3.18/013-ohci_workarounds.patch b/target/linux/mcs814x/patches-3.18/013-ohci_workarounds.patch new file mode 100644 index 0000000000..8697f03386 --- /dev/null +++ b/target/linux/mcs814x/patches-3.18/013-ohci_workarounds.patch @@ -0,0 +1,64 @@ +--- a/drivers/usb/host/ohci.h ++++ b/drivers/usb/host/ohci.h +@@ -122,7 +122,7 @@ struct td { + /* PSW is only for ISO. Only 1 PSW entry is used, but on + * big-endian PPC hardware that's the second entry. + */ +-#define MAXPSW 2 ++#define MAXPSW 8 + __hc16 hwPSW [MAXPSW]; + + /* rest are purely for the driver's use */ +--- a/drivers/usb/host/ohci-hcd.c ++++ b/drivers/usb/host/ohci-hcd.c +@@ -441,6 +441,7 @@ static int ohci_init (struct ohci_hcd *o + { + int ret; + struct usb_hcd *hcd = ohci_to_hcd(ohci); ++ u32 hcca_area; + + /* Accept arbitrarily long scatter-gather lists */ + hcd->self.sg_tablesize = ~0; +@@ -501,11 +502,13 @@ static int ohci_init (struct ohci_hcd *o + (unsigned long) ohci); + set_timer_slack(&ohci->io_watchdog, msecs_to_jiffies(20)); + +- ohci->hcca = dma_alloc_coherent (hcd->self.controller, +- sizeof(*ohci->hcca), &ohci->hcca_dma, GFP_KERNEL); ++ hcca_area = ohci_readl(ohci, &ohci->regs->hcca); ++ ohci->hcca = ioremap_nocache(hcca_area, sizeof *ohci->hcca); + if (!ohci->hcca) + return -ENOMEM; + ++ ohci->hcca_dma = hcca_area; ++ + if ((ret = ohci_mem_init (ohci)) < 0) + ohci_stop (hcd); + else { +@@ -523,6 +526,7 @@ static int ohci_init (struct ohci_hcd *o + */ + static int ohci_run (struct ohci_hcd *ohci) + { ++ int i = 0; + u32 mask, val; + int first = ohci->fminterval == 0; + struct usb_hcd *hcd = ohci_to_hcd(ohci); +@@ -573,6 +577,8 @@ static int ohci_run (struct ohci_hcd *oh + msleep(val); + + memset (ohci->hcca, 0, sizeof (struct ohci_hcca)); ++ for (i = 0; i < NUM_INTS; i++) ++ ohci->hcca->int_table[i] = 0; + + /* 2msec timelimit here means no irqs/preempt */ + spin_lock_irq (&ohci->lock); +@@ -984,9 +990,6 @@ static void ohci_stop (struct usb_hcd *h + remove_debug_files (ohci); + ohci_mem_cleanup (ohci); + if (ohci->hcca) { +- dma_free_coherent (hcd->self.controller, +- sizeof *ohci->hcca, +- ohci->hcca, ohci->hcca_dma); + ohci->hcca = NULL; + ohci->hcca_dma = 0; + } |