aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mcs814x/patches-3.3
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/mcs814x/patches-3.3')
-rw-r--r--target/linux/mcs814x/patches-3.3/001-platform.patch43
-rw-r--r--target/linux/mcs814x/patches-3.3/003-ethernet.patch16
-rw-r--r--target/linux/mcs814x/patches-3.3/004-usb.patch29
-rw-r--r--target/linux/mcs814x/patches-3.3/005-mcs814x_rng.patch31
-rw-r--r--target/linux/mcs814x/patches-3.3/006-mcs814x_wdt.patch25
-rw-r--r--target/linux/mcs814x/patches-3.3/008-mcs814x_gpio.patch25
-rw-r--r--target/linux/mcs814x/patches-3.3/010-fdt_config_cmdline_extend.patch140
-rw-r--r--target/linux/mcs814x/patches-3.3/011-mcs814x_internal_phy.patch20
-rw-r--r--target/linux/mcs814x/patches-3.3/012-mtd-cfi_cmdset_0002-force-word-write.patch14
-rw-r--r--target/linux/mcs814x/patches-3.3/013-ohci_workarounds.patch64
10 files changed, 0 insertions, 407 deletions
diff --git a/target/linux/mcs814x/patches-3.3/001-platform.patch b/target/linux/mcs814x/patches-3.3/001-platform.patch
deleted file mode 100644
index 8cfed8ca9a..0000000000
--- a/target/linux/mcs814x/patches-3.3/001-platform.patch
+++ /dev/null
@@ -1,43 +0,0 @@
---- a/arch/arm/Kconfig
-+++ b/arch/arm/Kconfig
-@@ -869,6 +869,21 @@ config ARCH_EXYNOS
- help
- Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5)
-
-+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 NEED_MACH_MEMORY_H
-+ select USB_ARCH_HAS_OHCI
-+ select USB_ARCH_HAS_EHCI
-+ select MULTI_IRQ_HANDLER
-+ help
-+ Support for Moschip MCS814x SoCs (MCS8140).
-+
- config ARCH_SHARK
- bool "Shark"
- select CPU_SA110
-@@ -1065,6 +1080,8 @@ source "arch/arm/plat-samsung/Kconfig"
- source "arch/arm/plat-s3c24xx/Kconfig"
- source "arch/arm/plat-s5p/Kconfig"
-
-+source "arch/arm/mach-mcs814x/Kconfig"
-+
- source "arch/arm/plat-spear/Kconfig"
-
- if ARCH_S3C2410
---- a/arch/arm/Makefile
-+++ b/arch/arm/Makefile
-@@ -179,6 +179,7 @@ machine-$(CONFIG_ARCH_S3C64XX) := s3c64
- machine-$(CONFIG_ARCH_S5P64X0) := s5p64x0
- machine-$(CONFIG_ARCH_S5PC100) := s5pc100
- machine-$(CONFIG_ARCH_S5PV210) := s5pv210
-+machine-$(CONFIG_ARCH_MCS814X) := mcs814x
- machine-$(CONFIG_ARCH_EXYNOS4) := exynos
- machine-$(CONFIG_ARCH_SA1100) := sa1100
- machine-$(CONFIG_ARCH_SHARK) := shark
diff --git a/target/linux/mcs814x/patches-3.3/003-ethernet.patch b/target/linux/mcs814x/patches-3.3/003-ethernet.patch
deleted file mode 100644
index ff4faabfb8..0000000000
--- a/target/linux/mcs814x/patches-3.3/003-ethernet.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/drivers/net/ethernet/Kconfig
-+++ b/drivers/net/ethernet/Kconfig
-@@ -176,4 +176,6 @@ source "drivers/net/ethernet/via/Kconfig
- 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
-@@ -74,3 +74,4 @@ obj-$(CONFIG_NET_VENDOR_TUNDRA) += tundr
- obj-$(CONFIG_NET_VENDOR_VIA) += via/
- 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.3/004-usb.patch b/target/linux/mcs814x/patches-3.3/004-usb.patch
deleted file mode 100644
index 47f747852c..0000000000
--- a/target/linux/mcs814x/patches-3.3/004-usb.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- a/drivers/usb/host/ehci-hcd.c
-+++ b/drivers/usb/host/ehci-hcd.c
-@@ -1381,6 +1381,11 @@ MODULE_LICENSE ("GPL");
- #define PLATFORM_DRIVER ehci_mv_driver
- #endif
-
-+#ifdef CONFIG_ARCH_MCS814X
-+#include "ehci-mcs814x.c"
-+#define PLATFORM_DRIVER mcs814x_ehci_driver
-+#endif
-+
- #if !defined(PCI_DRIVER) && !defined(PLATFORM_DRIVER) && \
- !defined(PS3_SYSTEM_BUS_DRIVER) && !defined(OF_PLATFORM_DRIVER) && \
- !defined(XILINX_OF_PLATFORM_DRIVER)
---- a/drivers/usb/host/ohci-hcd.c
-+++ b/drivers/usb/host/ohci-hcd.c
-@@ -1121,6 +1121,12 @@ MODULE_LICENSE ("GPL");
- #define PLATFORM_DRIVER ohci_xls_driver
- #endif
-
-+#ifdef CONFIG_ARCH_MCS814X
-+#include "ohci-mcs814x.c"
-+#define PLATFORM_DRIVER ohci_hcd_mcs814x_driver
-+#endif
-+
-+
- #if !defined(PCI_DRIVER) && \
- !defined(PLATFORM_DRIVER) && \
- !defined(OMAP1_PLATFORM_DRIVER) && \
diff --git a/target/linux/mcs814x/patches-3.3/005-mcs814x_rng.patch b/target/linux/mcs814x/patches-3.3/005-mcs814x_rng.patch
deleted file mode 100644
index 7f7ce8e44c..0000000000
--- a/target/linux/mcs814x/patches-3.3/005-mcs814x_rng.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- a/drivers/char/hw_random/Kconfig
-+++ b/drivers/char/hw_random/Kconfig
-@@ -188,6 +188,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 HW_RANDOM && ARCH_HAS_RNGA
---- a/drivers/char/hw_random/Makefile
-+++ b/drivers/char/hw_random/Makefile
-@@ -17,6 +17,7 @@ obj-$(CONFIG_HW_RANDOM_OMAP) += omap-rng
- 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.3/006-mcs814x_wdt.patch b/target/linux/mcs814x/patches-3.3/006-mcs814x_wdt.patch
deleted file mode 100644
index 83547aab78..0000000000
--- a/target/linux/mcs814x/patches-3.3/006-mcs814x_wdt.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- a/drivers/watchdog/Kconfig
-+++ b/drivers/watchdog/Kconfig
-@@ -343,6 +343,12 @@ config IMX2_WDT
- To compile this driver as a module, choose M here: the
- module will be called imx2_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
-@@ -53,6 +53,7 @@ obj-$(CONFIG_STMP3XXX_WATCHDOG) += stmp3
- obj-$(CONFIG_NUC900_WATCHDOG) += nuc900_wdt.o
- obj-$(CONFIG_TS72XX_WATCHDOG) += ts72xx_wdt.o
- obj-$(CONFIG_IMX2_WDT) += imx2_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.3/008-mcs814x_gpio.patch b/target/linux/mcs814x/patches-3.3/008-mcs814x_gpio.patch
deleted file mode 100644
index c19a9bae72..0000000000
--- a/target/linux/mcs814x/patches-3.3/008-mcs814x_gpio.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- a/drivers/gpio/Kconfig
-+++ b/drivers/gpio/Kconfig
-@@ -450,6 +450,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
---- a/drivers/gpio/Makefile
-+++ b/drivers/gpio/Makefile
-@@ -26,6 +26,7 @@ obj-$(CONFIG_GPIO_MAX7300) += gpio-max73
- obj-$(CONFIG_GPIO_MAX7301) += gpio-max7301.o
- obj-$(CONFIG_GPIO_MAX732X) += gpio-max732x.o
- obj-$(CONFIG_GPIO_MC33880) += gpio-mc33880.o
-+obj-$(CONFIG_GPIO_MCS814X) += gpio-mcs814x.o
- obj-$(CONFIG_GPIO_MCP23S08) += gpio-mcp23s08.o
- obj-$(CONFIG_GPIO_ML_IOH) += gpio-ml-ioh.o
- obj-$(CONFIG_GPIO_MPC5200) += gpio-mpc5200.o
diff --git a/target/linux/mcs814x/patches-3.3/010-fdt_config_cmdline_extend.patch b/target/linux/mcs814x/patches-3.3/010-fdt_config_cmdline_extend.patch
deleted file mode 100644
index 8735fd8e95..0000000000
--- a/target/linux/mcs814x/patches-3.3/010-fdt_config_cmdline_extend.patch
+++ /dev/null
@@ -1,140 +0,0 @@
-The old logic assumes CMDLINE_FROM_BOOTLOADER vs. CMDLINE_FORCE and
-ignores CMDLINE_EXTEND. Here's the old logic:
-
-- CONFIG_CMDLINE_FORCE=true
- CONFIG_CMDLINE
-- dt bootargs=non-empty:
- dt bootargs
-- dt bootargs=empty, @data is non-empty string
- @data is left unchanged
-- dt bootargs=empty, @data is empty string
- CONFIG_CMDLINE (or "" if that's not defined)
-
-The new logic is now documented in of_fdt.h and is copied here for
-reference:
-
-- CONFIG_CMDLINE_FORCE=true
- CONFIG_CMDLINE
-- CONFIG_CMDLINE_EXTEND=true, @data is non-empty string
- @data + dt bootargs (even if dt bootargs are empty)
-- CONFIG_CMDLINE_EXTEND=true, @data is empty string
- CONFIG_CMDLINE + dt bootargs (even if dt bootargs are empty)
-- CMDLINE_FROM_BOOTLOADER=true, dt bootargs=non-empty:
- dt bootargs
-- CMDLINE_FROM_BOOTLOADER=true, dt bootargs=empty, @data is non-empty string
- @data is left unchanged
-- CMDLINE_FROM_BOOTLOADER=true, dt bootargs=empty, @data is empty string
- CONFIG_CMDLINE (or "" if that's not defined)
-
-Signed-off-by: Doug Anderson <diand...@chromium.org>
-CC: devicetree-discuss@lists.ozlabs.org
-CC: Grant Likely <grant.lik...@secretlab.ca>
-CC: Benjamin Herrenschmidt <b...@kernel.crashing.org>
-CC: Rob Herring <rob.herr...@calxeda.com>
----
-
---- a/drivers/of/fdt.c
-+++ b/drivers/of/fdt.c
-@@ -663,6 +663,29 @@ int __init early_init_dt_scan_memory(uns
- return 0;
- }
-
-+/*
-+ * Convert configs to something easy to use in C code
-+ */
-+#if defined(CONFIG_CMDLINE_FORCE)
-+static const int overwrite_incoming_cmdline = 1;
-+static const int read_dt_cmdline;
-+static const int concat_cmdline;
-+#elif defined(CONFIG_CMDLINE_EXTEND)
-+static const int overwrite_incoming_cmdline;
-+static const int read_dt_cmdline = 1;
-+static const int concat_cmdline = 1;
-+#else /* CMDLINE_FROM_BOOTLOADER */
-+static const int overwrite_incoming_cmdline;
-+static const int read_dt_cmdline = 1;
-+static const int concat_cmdline;
-+#endif
-+
-+#ifdef CONFIG_CMDLINE
-+static const char *config_cmdline = CONFIG_CMDLINE;
-+#else
-+static const char *config_cmdline = "";
-+#endif
-+
- int __init early_init_dt_scan_chosen(unsigned long node, const char *uname,
- int depth, void *data)
- {
-@@ -677,22 +700,26 @@ int __init early_init_dt_scan_chosen(uns
-
- early_init_dt_check_for_initrd(node);
-
-- /* Retrieve command line */
-- p = of_get_flat_dt_prop(node, "bootargs", &l);
-- if (p != NULL && l > 0)
-- strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE));
--
-- /*
-- * CONFIG_CMDLINE is meant to be a default in case nothing else
-- * managed to set the command line, unless CONFIG_CMDLINE_FORCE
-- * is set in which case we override whatever was found earlier.
-- */
--#ifdef CONFIG_CMDLINE
--#ifndef CONFIG_CMDLINE_FORCE
-- if (!((char *)data)[0])
--#endif
-- strlcpy(data, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
--#endif /* CONFIG_CMDLINE */
-+ /* Put CONFIG_CMDLINE in if forced or if data had nothing in it to start */
-+ if (overwrite_incoming_cmdline || !((char *)data)[0])
-+ strlcpy(data, config_cmdline, COMMAND_LINE_SIZE);
-+
-+ /* Retrieve command line unless forcing */
-+ if (read_dt_cmdline) {
-+ p = of_get_flat_dt_prop(node, "bootargs", &l);
-+ if (p != NULL && l > 0) {
-+ if (concat_cmdline) {
-+ strlcat(data, " ", COMMAND_LINE_SIZE);
-+ strlcat(data, p, min_t(int, (int)l,
-+ COMMAND_LINE_SIZE));
-+ } else
-+ strlcpy(data, p, min_t(int, (int)l,
-+ COMMAND_LINE_SIZE));
-+ }
-+ }
-+
-+ pr_debug("Command line is: %s\n", (char*)data);
-+
-
- pr_debug("Command line is: %s\n", (char*)data);
-
---- a/include/linux/of_fdt.h
-+++ b/include/linux/of_fdt.h
-@@ -91,6 +91,27 @@ extern int of_flat_dt_is_compatible(unsi
- extern int of_flat_dt_match(unsigned long node, const char *const *matches);
- extern unsigned long of_get_flat_dt_root(void);
-
-+/*
-+ * early_init_dt_scan_chosen - scan the device tree for ramdisk and bootargs
-+ *
-+ * The boot arguments will be placed into the memory pointed to by @data.
-+ * That memory should be COMMAND_LINE_SIZE big and initialized to be a valid
-+ * (possibly empty) string. Logic for what will be in @data after this
-+ * function finishes:
-+ *
-+ * - CONFIG_CMDLINE_FORCE=true
-+ * CONFIG_CMDLINE
-+ * - CONFIG_CMDLINE_EXTEND=true, @data is non-empty string
-+ * @data + dt bootargs (even if dt bootargs are empty)
-+ * - CONFIG_CMDLINE_EXTEND=true, @data is empty string
-+ * CONFIG_CMDLINE + dt bootargs (even if dt bootargs are empty)
-+ * - CMDLINE_FROM_BOOTLOADER=true, dt bootargs=non-empty:
-+ * dt bootargs
-+ * - CMDLINE_FROM_BOOTLOADER=true, dt bootargs=empty, @data is non-empty string
-+ * @data is left unchanged
-+ * - CMDLINE_FROM_BOOTLOADER=true, dt bootargs=empty, @data is empty string
-+ * CONFIG_CMDLINE (or "" if that's not defined)
-+ */
- extern int early_init_dt_scan_chosen(unsigned long node, const char *uname,
- int depth, void *data);
- extern void early_init_dt_check_for_initrd(unsigned long node);
diff --git a/target/linux/mcs814x/patches-3.3/011-mcs814x_internal_phy.patch b/target/linux/mcs814x/patches-3.3/011-mcs814x_internal_phy.patch
deleted file mode 100644
index 1b546d7448..0000000000
--- a/target/linux/mcs814x/patches-3.3/011-mcs814x_internal_phy.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/drivers/net/phy/Kconfig
-+++ b/drivers/net/phy/Kconfig
-@@ -135,6 +135,10 @@ config MICREL_PHY
- ---help---
- Currently has a driver for the KSZ8041
-
-+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
-@@ -38,3 +38,4 @@ obj-$(CONFIG_STE10XP) += ste10Xp.o
- obj-$(CONFIG_MICREL_PHY) += micrel.o
- obj-$(CONFIG_MDIO_OCTEON) += mdio-octeon.o
- obj-$(CONFIG_MICREL_KS8995MA) += spi_ks8995.o
-+obj-$(CONFIG_MCS814X_PHY) += mcs814x.o
diff --git a/target/linux/mcs814x/patches-3.3/012-mtd-cfi_cmdset_0002-force-word-write.patch b/target/linux/mcs814x/patches-3.3/012-mtd-cfi_cmdset_0002-force-word-write.patch
deleted file mode 100644
index 89738a3fcd..0000000000
--- a/target/linux/mcs814x/patches-3.3/012-mtd-cfi_cmdset_0002-force-word-write.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/drivers/mtd/chips/cfi_cmdset_0002.c
-+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
-@@ -39,9 +39,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.3/013-ohci_workarounds.patch b/target/linux/mcs814x/patches-3.3/013-ohci_workarounds.patch
deleted file mode 100644
index 9b905a7529..0000000000
--- a/target/linux/mcs814x/patches-3.3/013-ohci_workarounds.patch
+++ /dev/null
@@ -1,64 +0,0 @@
---- a/drivers/usb/host/ohci.h
-+++ b/drivers/usb/host/ohci.h
-@@ -114,7 +114,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
-@@ -497,6 +497,7 @@ static int ohci_init (struct ohci_hcd *o
- {
- int ret;
- struct usb_hcd *hcd = ohci_to_hcd(ohci);
-+ u32 hcca_area;
-
- if (distrust_firmware)
- ohci->flags |= OHCI_QUIRK_HUB_POWER;
-@@ -550,11 +551,13 @@ static int ohci_init (struct ohci_hcd *o
- if (ohci->hcca)
- return 0;
-
-- ohci->hcca = dma_alloc_coherent (hcd->self.controller,
-- sizeof *ohci->hcca, &ohci->hcca_dma, 0);
-+ 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 {
-@@ -572,6 +575,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);
-@@ -622,6 +626,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);
-@@ -909,9 +915,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;
- }