[OpenWrt-Devel,4/4] gemini: Delete kernel 4.4 patches

Message ID 20180404203406.25197-5-linus.walleij@linaro.org
State New
Headers show
Series
  • Gemini forward-port to kernel v4.14
Related show

Commit Message

Linus Walleij April 4, 2018, 8:34 p.m.
The v4.14 kernel is what we should be using so get rid of those
old patches. The old patches doesn't even support using device
tree.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 target/linux/gemini/config-4.4                     | 165 ---------------
 .../linux/gemini/patches-4.4/050-gpio-to-irq.patch |  21 --
 target/linux/gemini/patches-4.4/060-cache-fa.patch |  41 ----
 .../110-watchdog-add-gemini_wdt-driver.patch       |  29 ---
 .../111-arm-gemini-add-watchdog-device.patch       |  33 ---
 .../112-arm-gemini-register-watchdog-devices.patch |  40 ----
 .../120-net-add-gemini-gmac-driver.patch           |  20 --
 .../121-arm-gemini-add-gmac-device.patch           |  85 --------
 .../122-arm-gemini-register-ethernet.patch         | 227 ---------------------
 .../130-usb-ehci-add-fot2g-driver.patch            | 133 ------------
 .../131-arm-gemini-add-usb-device.patch            |  77 -------
 .../patches-4.4/132-arm-gemini-register-usb.patch  |  65 ------
 .../140-arm-gemini-add-pci-support.patch           |  66 ------
 .../linux/gemini/patches-4.4/150-gemini-pata.patch | 192 -----------------
 14 files changed, 1194 deletions(-)
 delete mode 100644 target/linux/gemini/config-4.4
 delete mode 100644 target/linux/gemini/patches-4.4/050-gpio-to-irq.patch
 delete mode 100644 target/linux/gemini/patches-4.4/060-cache-fa.patch
 delete mode 100644 target/linux/gemini/patches-4.4/110-watchdog-add-gemini_wdt-driver.patch
 delete mode 100644 target/linux/gemini/patches-4.4/111-arm-gemini-add-watchdog-device.patch
 delete mode 100644 target/linux/gemini/patches-4.4/112-arm-gemini-register-watchdog-devices.patch
 delete mode 100644 target/linux/gemini/patches-4.4/120-net-add-gemini-gmac-driver.patch
 delete mode 100644 target/linux/gemini/patches-4.4/121-arm-gemini-add-gmac-device.patch
 delete mode 100644 target/linux/gemini/patches-4.4/122-arm-gemini-register-ethernet.patch
 delete mode 100644 target/linux/gemini/patches-4.4/130-usb-ehci-add-fot2g-driver.patch
 delete mode 100644 target/linux/gemini/patches-4.4/131-arm-gemini-add-usb-device.patch
 delete mode 100644 target/linux/gemini/patches-4.4/132-arm-gemini-register-usb.patch
 delete mode 100644 target/linux/gemini/patches-4.4/140-arm-gemini-add-pci-support.patch
 delete mode 100644 target/linux/gemini/patches-4.4/150-gemini-pata.patch

Patch

diff --git a/target/linux/gemini/config-4.4 b/target/linux/gemini/config-4.4
deleted file mode 100644
index 9572196ae8b9..000000000000
--- a/target/linux/gemini/config-4.4
+++ /dev/null
@@ -1,165 +0,0 @@ 
-CONFIG_ALIGNMENT_TRAP=y
-CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
-CONFIG_ARCH_GEMINI=y
-CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
-CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
-CONFIG_ARCH_NR_GPIO=0
-CONFIG_ARCH_REQUIRE_GPIOLIB=y
-# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
-# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
-CONFIG_ARCH_USES_GETTIMEOFFSET=y
-CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
-CONFIG_ARM=y
-# CONFIG_ARM_CPU_SUSPEND is not set
-CONFIG_ARM_L1_CACHE_SHIFT=5
-CONFIG_ARM_NR_BANKS=8
-CONFIG_ARM_PATCH_PHYS_VIRT=y
-# CONFIG_ARPD is not set
-CONFIG_ATA=y
-CONFIG_ATAGS=y
-# CONFIG_CACHE_L2X0 is not set
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-CONFIG_CLONE_BACKWARDS=y
-CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,19200 mem=32M"
-CONFIG_CMDLINE_FROM_BOOTLOADER=y
-CONFIG_CPU_32v4=y
-CONFIG_CPU_ABRT_EV4=y
-# CONFIG_CPU_BPREDICT_DISABLE is not set
-CONFIG_CPU_CACHE_FA=y
-CONFIG_CPU_CACHE_VIVT=y
-CONFIG_CPU_COPY_FA=y
-CONFIG_CPU_CP15=y
-CONFIG_CPU_CP15_MMU=y
-# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
-CONFIG_CPU_FA526=y
-# CONFIG_CPU_ICACHE_DISABLE is not set
-CONFIG_CPU_PABRT_LEGACY=y
-CONFIG_CPU_TLB_FA=y
-CONFIG_CPU_USE_DOMAINS=y
-CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
-# CONFIG_DEBUG_USER is not set
-CONFIG_DEBUG_UART_PHYS=0x42000000
-CONFIG_DEBUG_UART_VIRT=0xf4200000
-CONFIG_DEBUG_UART_8250_SHIFT=2
-# CONFIG_DEBUG_UART_8250_WORD is not set
-# CONFIG_DEBUG_UART_8250_FLOW_CONTROL is not set
-# CONFIG_DLCI is not set
-CONFIG_DMADEVICES=y
-CONFIG_DNOTIFY=y
-# CONFIG_DW_DMAC_CORE is not set
-# CONFIG_DW_DMAC_PCI is not set
-CONFIG_FRAME_POINTER=y
-CONFIG_GEMINI_MEM_SWAP=y
-CONFIG_GEMINI_SL351X=y
-CONFIG_GEMINI_WATCHDOG=y
-CONFIG_GENERIC_ATOMIC64=y
-CONFIG_GENERIC_BUG=y
-CONFIG_GENERIC_IDLE_POLL_SETUP=y
-CONFIG_GENERIC_IO=y
-CONFIG_GENERIC_IRQ_SHOW=y
-CONFIG_GENERIC_PCI_IOMAP=y
-CONFIG_GENERIC_SMP_IDLE_THREAD=y
-CONFIG_GENERIC_STRNCPY_FROM_USER=y
-CONFIG_GENERIC_STRNLEN_USER=y
-CONFIG_GPIOLIB=y
-CONFIG_GPIO_DEVRES=y
-CONFIG_GPIO_SYSFS=y
-CONFIG_HARDIRQS_SW_RESEND=y
-CONFIG_HAS_DMA=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set
-CONFIG_HAVE_ARCH_JUMP_LABEL=y
-CONFIG_HAVE_ARCH_KGDB=y
-CONFIG_HAVE_ARCH_PFN_VALID=y
-CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
-CONFIG_HAVE_ARCH_TRACEHOOK=y
-# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set
-CONFIG_HAVE_BPF_JIT=y
-CONFIG_HAVE_CONTEXT_TRACKING=y
-CONFIG_HAVE_C_RECORDMCOUNT=y
-CONFIG_HAVE_DEBUG_KMEMLEAK=y
-CONFIG_HAVE_DMA_API_DEBUG=y
-CONFIG_HAVE_DMA_ATTRS=y
-CONFIG_HAVE_DMA_CONTIGUOUS=y
-CONFIG_HAVE_DYNAMIC_FTRACE=y
-CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
-CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
-CONFIG_HAVE_FUNCTION_TRACER=y
-CONFIG_HAVE_GENERIC_DMA_COHERENT=y
-CONFIG_HAVE_GENERIC_HARDIRQS=y
-CONFIG_HAVE_IDE=y
-CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y
-CONFIG_HAVE_KERNEL_GZIP=y
-CONFIG_HAVE_KERNEL_LZMA=y
-CONFIG_HAVE_KERNEL_LZO=y
-CONFIG_HAVE_KERNEL_XZ=y
-CONFIG_HAVE_LATENCYTOP_SUPPORT=y
-CONFIG_HAVE_MEMBLOCK=y
-CONFIG_HAVE_NET_DSA=y
-CONFIG_HAVE_OPROFILE=y
-CONFIG_HAVE_PERF_EVENTS=y
-CONFIG_HAVE_PROC_CPU=y
-CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
-CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
-CONFIG_HAVE_UID16=y
-# CONFIG_HSU_DMA_PCI is not set
-CONFIG_HWMON=y
-CONFIG_HW_RANDOM=y
-CONFIG_I2C=y
-CONFIG_I2C_BOARDINFO=y
-CONFIG_I2C_CHARDEV=y
-CONFIG_INITRAMFS_SOURCE=""
-# CONFIG_IP_ADVANCED_ROUTER is not set
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-CONFIG_IRQ_WORK=y
-CONFIG_KTIME_SCALAR=y
-CONFIG_LEGACY_PTYS=y
-CONFIG_LEGACY_PTY_COUNT=256
-# CONFIG_MACH_NAS4220B is not set
-# CONFIG_MACH_RUT100 is not set
-CONFIG_MACH_WBD111=y
-CONFIG_MACH_WBD222=y
-CONFIG_MDIO_BITBANG=y
-CONFIG_MDIO_BOARDINFO=y
-CONFIG_MDIO_GPIO=y
-CONFIG_MIGHT_HAVE_PCI=y
-CONFIG_MODULES_USE_ELF_REL=y
-CONFIG_MTD_PHYSMAP=y
-CONFIG_NEED_DMA_MAP_STATE=y
-CONFIG_NEED_KUSER_HELPERS=y
-CONFIG_NEED_MACH_GPIO_H=y
-CONFIG_NEED_PER_CPU_KM=y
-CONFIG_NET_VENDOR_GEMINI=y
-# CONFIG_OF is not set
-CONFIG_OLD_SIGACTION=y
-CONFIG_OLD_SIGSUSPEND3=y
-CONFIG_PAGEFLAGS_EXTENDED=y
-CONFIG_PAGE_OFFSET=0xC0000000
-CONFIG_PATA_GEMINI=y
-CONFIG_PCI=y
-CONFIG_PERF_USE_VMALLOC=y
-CONFIG_PHYLIB=y
-# CONFIG_PREEMPT_RCU is not set
-# CONFIG_RCU_STALL_COMMON is not set
-CONFIG_RTC_CLASS=y
-CONFIG_RTC_DRV_GEMINI=y
-# CONFIG_SCHED_HRTICK is not set
-# CONFIG_SCSI_DMA is not set
-CONFIG_SPLIT_PTLOCK_CPUS=999999
-CONFIG_SYS_SUPPORTS_APM_EMULATION=y
-CONFIG_TICK_CPU_ACCOUNTING=y
-CONFIG_UID16=y
-CONFIG_UIDGID_CONVERTED=y
-CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h"
-CONFIG_USB_ARCH_HAS_XHCI=y
-CONFIG_USB_SUPPORT=y
-CONFIG_VECTORS_BASE=0xffff0000
-CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_WAN=y
-CONFIG_XZ_DEC_ARM=y
-CONFIG_XZ_DEC_BCJ=y
-CONFIG_ZBOOT_ROM_BSS=0x0
-CONFIG_ZBOOT_ROM_TEXT=0x0
-CONFIG_ZONE_DMA_FLAG=0
diff --git a/target/linux/gemini/patches-4.4/050-gpio-to-irq.patch b/target/linux/gemini/patches-4.4/050-gpio-to-irq.patch
deleted file mode 100644
index 757284986438..000000000000
--- a/target/linux/gemini/patches-4.4/050-gpio-to-irq.patch
+++ /dev/null
@@ -1,21 +0,0 @@ 
---- a/arch/arm/mach-gemini/gpio.c
-+++ b/arch/arm/mach-gemini/gpio.c
-@@ -196,12 +196,18 @@ static int gemini_gpio_direction_output(
- 	return 0;
- }
- 
-+static int gemini_gpio_to_irq(struct gpio_chip *chip, unsigned gpio)
-+{
-+	return gpio + GPIO_IRQ_BASE;
-+}
-+
- static struct gpio_chip gemini_gpio_chip = {
- 	.label			= "Gemini",
- 	.direction_input	= gemini_gpio_direction_input,
- 	.get			= gemini_gpio_get,
- 	.direction_output	= gemini_gpio_direction_output,
- 	.set			= gemini_gpio_set,
-+	.to_irq			= gemini_gpio_to_irq,
- 	.base			= 0,
- 	.ngpio			= GPIO_PORT_NUM * 32,
- };
diff --git a/target/linux/gemini/patches-4.4/060-cache-fa.patch b/target/linux/gemini/patches-4.4/060-cache-fa.patch
deleted file mode 100644
index fc74c0af8882..000000000000
--- a/target/linux/gemini/patches-4.4/060-cache-fa.patch
+++ /dev/null
@@ -1,41 +0,0 @@ 
---- a/arch/arm/mm/cache-fa.S
-+++ b/arch/arm/mm/cache-fa.S
-@@ -24,7 +24,8 @@
- /*
-  * The size of one data cache line.
-  */
--#define CACHE_DLINESIZE	16
-+#define CACHE_DLINESIZE		16
-+#define CACHE_DLINESHIFT	4
- 
- /*
-  * The total size of the data cache.
-@@ -169,7 +170,17 @@ ENTRY(fa_flush_kern_dcache_area)
-  *	- start  - virtual start address
-  *	- end	 - virtual end address
-  */
-+__flush_whole_dcache:
-+	mcr	p15, 0, r0, c7, c14, 0		@ clean/invalidate D cache
-+	mov	r0, #0
-+	mcr	p15, 0, r0, c7, c10, 4		@ drain write buffer
-+	mov	pc, lr
-+
- fa_dma_inv_range:
-+	sub	r3, r1, r0			@ calculate total size
-+	cmp	r3, #CACHE_DLIMIT		@ total size >= limit?
-+	bhs	__flush_whole_dcache		@ flush whole D cache
-+
- 	tst	r0, #CACHE_DLINESIZE - 1
- 	bic	r0, r0, #CACHE_DLINESIZE - 1
- 	mcrne	p15, 0, r0, c7, c14, 1		@ clean & invalidate D entry
-@@ -193,6 +204,10 @@ fa_dma_inv_range:
-  *	- end	 - virtual end address
-  */
- fa_dma_clean_range:
-+	sub	r3, r1, r0			@ calculate total size
-+	cmp	r3, #CACHE_DLIMIT		@ total size >= limit?
-+	bhs	__flush_whole_dcache		@ flush whole D cache
-+
- 	bic	r0, r0, #CACHE_DLINESIZE - 1
- 1:	mcr	p15, 0, r0, c7, c10, 1		@ clean D entry
- 	add	r0, r0, #CACHE_DLINESIZE
diff --git a/target/linux/gemini/patches-4.4/110-watchdog-add-gemini_wdt-driver.patch b/target/linux/gemini/patches-4.4/110-watchdog-add-gemini_wdt-driver.patch
deleted file mode 100644
index bb66ae4dd0bd..000000000000
--- a/target/linux/gemini/patches-4.4/110-watchdog-add-gemini_wdt-driver.patch
+++ /dev/null
@@ -1,29 +0,0 @@ 
---- a/drivers/watchdog/Kconfig
-+++ b/drivers/watchdog/Kconfig
-@@ -229,6 +229,16 @@ config 977_WATCHDOG
- 
- 	  Not sure? It's safe to say N.
- 
-+config GEMINI_WATCHDOG
-+	tristate "Gemini watchdog"
-+	depends on ARCH_GEMINI
-+	help
-+	  Say Y here if to include support for the watchdog timer
-+	  embedded in the Cortina Systems Gemini family of devices.
-+
-+	  To compile this driver as a module, choose M here: the
-+	  module will be called gemini_wdt.
-+
- config IXP4XX_WATCHDOG
- 	tristate "IXP4xx Watchdog"
- 	depends on ARCH_IXP4XX
---- a/drivers/watchdog/Makefile
-+++ b/drivers/watchdog/Makefile
-@@ -37,6 +37,7 @@ obj-$(CONFIG_OMAP_WATCHDOG) += omap_wdt.
- obj-$(CONFIG_TWL4030_WATCHDOG) += twl4030_wdt.o
- obj-$(CONFIG_21285_WATCHDOG) += wdt285.o
- obj-$(CONFIG_977_WATCHDOG) += wdt977.o
-+obj-$(CONFIG_GEMINI_WATCHDOG) += gemini_wdt.o
- obj-$(CONFIG_IXP4XX_WATCHDOG) += ixp4xx_wdt.o
- obj-$(CONFIG_KS8695_WATCHDOG) += ks8695_wdt.o
- obj-$(CONFIG_S3C2410_WATCHDOG) += s3c2410_wdt.o
diff --git a/target/linux/gemini/patches-4.4/111-arm-gemini-add-watchdog-device.patch b/target/linux/gemini/patches-4.4/111-arm-gemini-add-watchdog-device.patch
deleted file mode 100644
index ab32e9e84441..000000000000
--- a/target/linux/gemini/patches-4.4/111-arm-gemini-add-watchdog-device.patch
+++ /dev/null
@@ -1,33 +0,0 @@ 
---- a/arch/arm/mach-gemini/devices.c
-+++ b/arch/arm/mach-gemini/devices.c
-@@ -116,3 +116,20 @@ int __init platform_register_rtc(void)
- 	return platform_device_register(&gemini_rtc_device);
- }
- 
-+static struct resource wdt_resource = {
-+	.start	= GEMINI_WAQTCHDOG_BASE,
-+	.end	= GEMINI_WAQTCHDOG_BASE + 0x18,
-+	.flags  = IORESOURCE_MEM,
-+};
-+
-+static struct platform_device wdt_device = {
-+	.name		= "gemini-wdt",
-+	.id		= 0,
-+	.resource	= &wdt_resource,
-+	.num_resources	= 1,
-+};
-+
-+int __init platform_register_watchdog(void)
-+{
-+	return platform_device_register(&wdt_device);
-+}
---- a/arch/arm/mach-gemini/common.h
-+++ b/arch/arm/mach-gemini/common.h
-@@ -27,6 +27,7 @@ extern int platform_register_uart(void);
- extern int platform_register_pflash(unsigned int size,
- 				    struct mtd_partition *parts,
- 				    unsigned int nr_parts);
-+extern int platform_register_watchdog(void);
- 
- extern void gemini_restart(enum reboot_mode mode, const char *cmd);
- 
diff --git a/target/linux/gemini/patches-4.4/112-arm-gemini-register-watchdog-devices.patch b/target/linux/gemini/patches-4.4/112-arm-gemini-register-watchdog-devices.patch
deleted file mode 100644
index d7660be4ec98..000000000000
--- a/target/linux/gemini/patches-4.4/112-arm-gemini-register-watchdog-devices.patch
+++ /dev/null
@@ -1,40 +0,0 @@ 
---- a/arch/arm/mach-gemini/board-nas4220b.c
-+++ b/arch/arm/mach-gemini/board-nas4220b.c
-@@ -94,6 +94,7 @@ static void __init ib4220b_init(void)
- 	platform_device_register(&ib4220b_led_device);
- 	platform_device_register(&ib4220b_key_device);
- 	platform_register_rtc();
-+	platform_register_watchdog();
- }
- 
- MACHINE_START(NAS4220B, "Raidsonic NAS IB-4220-B")
---- a/arch/arm/mach-gemini/board-wbd111.c
-+++ b/arch/arm/mach-gemini/board-wbd111.c
-@@ -121,6 +121,7 @@ static void __init wbd111_init(void)
- 	platform_device_register(&wbd111_leds_device);
- 	platform_device_register(&wbd111_keys_device);
- 	platform_register_rtc();
-+	platform_register_watchdog();
- }
- 
- MACHINE_START(WBD111, "Wiliboard WBD-111")
---- a/arch/arm/mach-gemini/board-wbd222.c
-+++ b/arch/arm/mach-gemini/board-wbd222.c
-@@ -121,6 +121,7 @@ static void __init wbd222_init(void)
- 	platform_device_register(&wbd222_leds_device);
- 	platform_device_register(&wbd222_keys_device);
- 	platform_register_rtc();
-+	platform_register_watchdog();
- }
- 
- MACHINE_START(WBD222, "Wiliboard WBD-222")
---- a/arch/arm/mach-gemini/board-rut1xx.c
-+++ b/arch/arm/mach-gemini/board-rut1xx.c
-@@ -80,6 +80,7 @@ static void __init rut1xx_init(void)
- 	platform_device_register(&rut1xx_leds);
- 	platform_device_register(&rut1xx_keys_device);
- 	platform_register_rtc();
-+	platform_register_watchdog();
- }
- 
- MACHINE_START(RUT100, "Teltonika RUT100")
diff --git a/target/linux/gemini/patches-4.4/120-net-add-gemini-gmac-driver.patch b/target/linux/gemini/patches-4.4/120-net-add-gemini-gmac-driver.patch
deleted file mode 100644
index be11ae2423d5..000000000000
--- a/target/linux/gemini/patches-4.4/120-net-add-gemini-gmac-driver.patch
+++ /dev/null
@@ -1,20 +0,0 @@ 
---- a/drivers/net/ethernet/Kconfig
-+++ b/drivers/net/ethernet/Kconfig
-@@ -73,6 +73,7 @@ source "drivers/net/ethernet/neterion/Kc
- source "drivers/net/ethernet/faraday/Kconfig"
- source "drivers/net/ethernet/freescale/Kconfig"
- source "drivers/net/ethernet/fujitsu/Kconfig"
-+source "drivers/net/ethernet/gemini/Kconfig"
- source "drivers/net/ethernet/hisilicon/Kconfig"
- source "drivers/net/ethernet/hp/Kconfig"
- source "drivers/net/ethernet/ibm/Kconfig"
---- a/drivers/net/ethernet/Makefile
-+++ b/drivers/net/ethernet/Makefile
-@@ -36,6 +36,7 @@ obj-$(CONFIG_NET_VENDOR_EXAR) += neterio
- obj-$(CONFIG_NET_VENDOR_FARADAY) += faraday/
- obj-$(CONFIG_NET_VENDOR_FREESCALE) += freescale/
- obj-$(CONFIG_NET_VENDOR_FUJITSU) += fujitsu/
-+obj-$(CONFIG_NET_VENDOR_GEMINI) += gemini/
- obj-$(CONFIG_NET_VENDOR_HISILICON) += hisilicon/
- obj-$(CONFIG_NET_VENDOR_HP) += hp/
- obj-$(CONFIG_NET_VENDOR_IBM) += ibm/
diff --git a/target/linux/gemini/patches-4.4/121-arm-gemini-add-gmac-device.patch b/target/linux/gemini/patches-4.4/121-arm-gemini-add-gmac-device.patch
deleted file mode 100644
index 6e77224906de..000000000000
--- a/target/linux/gemini/patches-4.4/121-arm-gemini-add-gmac-device.patch
+++ /dev/null
@@ -1,85 +0,0 @@ 
---- a/arch/arm/mach-gemini/common.h
-+++ b/arch/arm/mach-gemini/common.h
-@@ -15,6 +15,7 @@
- #include <linux/reboot.h>
- 
- struct mtd_partition;
-+struct gemini_gmac_platform_data;
- 
- extern void gemini_map_io(void);
- extern void gemini_init_irq(void);
-@@ -28,6 +29,7 @@ extern int platform_register_pflash(unsi
- 				    struct mtd_partition *parts,
- 				    unsigned int nr_parts);
- extern int platform_register_watchdog(void);
-+extern int platform_register_ethernet(struct gemini_gmac_platform_data *pdata);
- 
- extern void gemini_restart(enum reboot_mode mode, const char *cmd);
- 
---- a/arch/arm/mach-gemini/devices.c
-+++ b/arch/arm/mach-gemini/devices.c
-@@ -17,6 +17,7 @@
- #include <mach/irqs.h>
- #include <mach/hardware.h>
- #include <mach/global_reg.h>
-+#include <mach/gmac.h>
- 
- static struct plat_serial8250_port serial_platform_data[] = {
- 	{
-@@ -133,3 +134,56 @@ int __init platform_register_watchdog(vo
- {
- 	return platform_device_register(&wdt_device);
- }
-+
-+static struct resource gmac_resources[] = {
-+	{
-+		.start	= GEMINI_TOE_BASE,
-+		.end	= GEMINI_TOE_BASE + 0xffff,
-+		.flags	= IORESOURCE_MEM,
-+	},
-+	{
-+		.start	= IRQ_GMAC0,
-+		.end	= IRQ_GMAC0,
-+		.flags	= IORESOURCE_IRQ,
-+	},
-+	{
-+		.start	= IRQ_GMAC1,
-+		.end	= IRQ_GMAC1,
-+		.flags	= IORESOURCE_IRQ,
-+	},
-+};
-+
-+static u64 gmac_dmamask = 0xffffffffUL;
-+
-+static struct platform_device ethernet_device = {
-+	.name	= "gmac-gemini",
-+	.id	= 0,
-+	.dev	= {
-+		.dma_mask		= &gmac_dmamask,
-+		.coherent_dma_mask	= 0xffffffff,
-+	},
-+	.num_resources	= ARRAY_SIZE(gmac_resources),
-+	.resource	= gmac_resources,
-+};
-+
-+int platform_register_ethernet(struct gemini_gmac_platform_data *pdata)
-+{
-+	unsigned int reg;
-+
-+	reg = readl((void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
-+		GLOBAL_MISC_CTRL));
-+
-+	reg &= ~(GMAC_GMII | GMAC_1_ENABLE);
-+
-+	if (pdata->bus_id[1])
-+		reg |= GMAC_1_ENABLE;
-+	else if (pdata->interface[0] == PHY_INTERFACE_MODE_GMII)
-+		reg |= GMAC_GMII;
-+
-+	writel(reg, (void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
-+		GLOBAL_MISC_CTRL));
-+
-+	ethernet_device.dev.platform_data = pdata;
-+
-+	return platform_device_register(&ethernet_device);
-+}
diff --git a/target/linux/gemini/patches-4.4/122-arm-gemini-register-ethernet.patch b/target/linux/gemini/patches-4.4/122-arm-gemini-register-ethernet.patch
deleted file mode 100644
index 1cd9efc20f63..000000000000
--- a/target/linux/gemini/patches-4.4/122-arm-gemini-register-ethernet.patch
+++ /dev/null
@@ -1,227 +0,0 @@ 
---- a/arch/arm/mach-gemini/board-nas4220b.c
-+++ b/arch/arm/mach-gemini/board-nas4220b.c
-@@ -19,6 +19,7 @@
- #include <linux/input.h>
- #include <linux/gpio_keys.h>
- #include <linux/io.h>
-+#include <linux/platform_data/mdio-gpio.h>
- 
- #include <asm/setup.h>
- #include <asm/mach-types.h>
-@@ -27,9 +28,27 @@
- 
- #include <mach/hardware.h>
- #include <mach/global_reg.h>
-+#include <mach/gmac.h>
- 
- #include "common.h"
- 
-+static struct mdio_gpio_platform_data ib4220b_mdio = {
-+	.mdc		= 22,
-+	.mdio		= 21,
-+	.phy_mask	= ~(1 << 1),
-+};
-+
-+static struct platform_device ib4220b_phy_device = {
-+	.name	= "mdio-gpio",
-+	.id	= 0,
-+	.dev	= { .platform_data = &ib4220b_mdio, },
-+};
-+
-+static struct gemini_gmac_platform_data ib4220b_gmac_data = {
-+	.bus_id[0]	= "gpio-0:01",
-+	.interface[0]	= PHY_INTERFACE_MODE_RGMII,
-+};
-+
- static struct gpio_led ib4220b_leds[] = {
- 	{
- 		.name			= "nas4220b:orange:hdd",
-@@ -86,15 +105,47 @@ static struct platform_device ib4220b_ke
- 	},
- };
- 
-+static void __init ib4220b_gmac_init(void)
-+{
-+	unsigned int val;
-+
-+	val = readl((void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
-+		GLOBAL_IO_DRIVING_CTRL));
-+	val |= (0x3 << GMAC0_PADS_SHIFT) | (0x3 << GMAC1_PADS_SHIFT);
-+	writel(val, (void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
-+		GLOBAL_IO_DRIVING_CTRL));
-+
-+	val = (0x0 << GMAC0_RXDV_SKEW_SHIFT) | (0xf << GMAC0_RXC_SKEW_SHIFT) |
-+		(0x7 << GMAC0_TXEN_SKEW_SHIFT) | (0xb << GMAC0_TXC_SKEW_SHIFT) |
-+		(0x0 << GMAC1_RXDV_SKEW_SHIFT) | (0xf << GMAC1_RXC_SKEW_SHIFT) |
-+		(0x7 << GMAC1_TXEN_SKEW_SHIFT) | (0xa << GMAC1_TXC_SKEW_SHIFT);
-+	writel(val, (void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
-+		GLOBAL_GMAC_CTRL_SKEW_CTRL));
-+
-+	writel(0x77777777, (void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
-+		GLOBAL_GMAC0_DATA_SKEW_CTRL));
-+	writel(0x77777777, (void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
-+		GLOBAL_GMAC1_DATA_SKEW_CTRL));
-+
-+	val = readl((void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
-+		GLOBAL_ARBITRATION1_CTRL)) & ~BURST_LENGTH_MASK;
-+	val |= (0x20 << BURST_LENGTH_SHIFT) | GMAC0_HIGH_PRIO | GMAC1_HIGH_PRIO;
-+	writel(val, (void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
-+		GLOBAL_ARBITRATION1_CTRL));
-+}
-+
- static void __init ib4220b_init(void)
- {
- 	gemini_gpio_init();
-+	ib4220b_gmac_init();
- 	platform_register_uart();
- 	platform_register_pflash(SZ_16M, NULL, 0);
- 	platform_device_register(&ib4220b_led_device);
- 	platform_device_register(&ib4220b_key_device);
- 	platform_register_rtc();
- 	platform_register_watchdog();
-+	platform_device_register(&ib4220b_phy_device);
-+	platform_register_ethernet(&ib4220b_gmac_data);
- }
- 
- MACHINE_START(NAS4220B, "Raidsonic NAS IB-4220-B")
---- a/arch/arm/mach-gemini/board-wbd111.c
-+++ b/arch/arm/mach-gemini/board-wbd111.c
-@@ -17,13 +17,34 @@
- #include <linux/gpio_keys.h>
- #include <linux/mtd/mtd.h>
- #include <linux/mtd/partitions.h>
-+#include <linux/platform_data/mdio-gpio.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- #include <asm/mach/time.h>
- 
-+#include <mach/gmac.h>
- 
- #include "common.h"
- 
-+static struct mdio_gpio_platform_data wbd111_mdio = {
-+	.mdc		= 22,
-+	.mdio		= 21,
-+	.phy_mask	= ~(1 << 1),
-+};
-+
-+static struct platform_device wbd111_phy_device = {
-+	.name	= "mdio-gpio",
-+	.id	= 0,
-+	.dev	= {
-+		.platform_data = &wbd111_mdio,
-+	},
-+};
-+
-+static struct gemini_gmac_platform_data gmac_data = {
-+	.bus_id[0] = "gpio-0:01",
-+	.interface[0] = PHY_INTERFACE_MODE_MII,
-+};
-+
- static struct gpio_keys_button wbd111_keys[] = {
- 	{
- 		.code		= KEY_SETUP,
-@@ -122,6 +143,8 @@ static void __init wbd111_init(void)
- 	platform_device_register(&wbd111_keys_device);
- 	platform_register_rtc();
- 	platform_register_watchdog();
-+	platform_device_register(&wbd111_phy_device);
-+	platform_register_ethernet(&gmac_data);
- }
- 
- MACHINE_START(WBD111, "Wiliboard WBD-111")
---- a/arch/arm/mach-gemini/board-wbd222.c
-+++ b/arch/arm/mach-gemini/board-wbd222.c
-@@ -17,13 +17,36 @@
- #include <linux/gpio_keys.h>
- #include <linux/mtd/mtd.h>
- #include <linux/mtd/partitions.h>
-+#include <linux/platform_data/mdio-gpio.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- #include <asm/mach/time.h>
- 
-+#include <mach/gmac.h>
- 
- #include "common.h"
- 
-+static struct mdio_gpio_platform_data wbd222_mdio = {
-+	.mdc		= 22,
-+	.mdio		= 21,
-+	.phy_mask	= ~((1 << 1) | (1 << 3)),
-+};
-+
-+static struct platform_device wbd222_phy_device = {
-+	.name	= "mdio-gpio",
-+	.id	= 0,
-+	.dev	= {
-+		.platform_data = &wbd222_mdio,
-+	},
-+};
-+
-+static struct gemini_gmac_platform_data gmac_data = {
-+	.bus_id[0] = "gpio-0:01",
-+	.interface[0] = PHY_INTERFACE_MODE_MII,
-+	.bus_id[1] = "gpio-0:03",
-+        .interface[1] = PHY_INTERFACE_MODE_MII,
-+};
-+
- static struct gpio_keys_button wbd222_keys[] = {
- 	{
- 		.code		= KEY_SETUP,
-@@ -122,6 +145,8 @@ static void __init wbd222_init(void)
- 	platform_device_register(&wbd222_keys_device);
- 	platform_register_rtc();
- 	platform_register_watchdog();
-+	platform_device_register(&wbd222_phy_device);
-+	platform_register_ethernet(&gmac_data);
- }
- 
- MACHINE_START(WBD222, "Wiliboard WBD-222")
---- a/arch/arm/mach-gemini/board-rut1xx.c
-+++ b/arch/arm/mach-gemini/board-rut1xx.c
-@@ -15,13 +15,35 @@
- #include <linux/input.h>
- #include <linux/gpio_keys.h>
- #include <linux/sizes.h>
-+#include <linux/platform_data/mdio-gpio.h>
- 
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- #include <asm/mach/time.h>
- 
-+#include <mach/gmac.h>
-+
- #include "common.h"
- 
-+static struct mdio_gpio_platform_data rut1xx_mdio = {
-+	.mdc		= 22,
-+	.mdio		= 21,
-+	.phy_mask	= ~(1 << 1),
-+};
-+
-+static struct platform_device rut1xx_phy_device = {
-+	.name	= "mdio-gpio",
-+	.id	= 0,
-+	.dev	= {
-+		.platform_data = &rut1xx_mdio,
-+	},
-+};
-+
-+static struct gemini_gmac_platform_data gmac_data = {
-+	.bus_id[0] = "gpio-0:01",
-+	.interface[0] = PHY_INTERFACE_MODE_MII,
-+};
-+
- static struct gpio_keys_button rut1xx_keys[] = {
- 	{
- 		.code		= KEY_SETUP,
-@@ -81,6 +103,8 @@ static void __init rut1xx_init(void)
- 	platform_device_register(&rut1xx_keys_device);
- 	platform_register_rtc();
- 	platform_register_watchdog();
-+	platform_device_register(&rut1xx_phy_device);
-+	platform_register_ethernet(&gmac_data);
- }
- 
- MACHINE_START(RUT100, "Teltonika RUT100")
diff --git a/target/linux/gemini/patches-4.4/130-usb-ehci-add-fot2g-driver.patch b/target/linux/gemini/patches-4.4/130-usb-ehci-add-fot2g-driver.patch
deleted file mode 100644
index 2192ad69bad0..000000000000
--- a/target/linux/gemini/patches-4.4/130-usb-ehci-add-fot2g-driver.patch
+++ /dev/null
@@ -1,133 +0,0 @@ 
---- a/drivers/usb/host/ehci-hcd.c
-+++ b/drivers/usb/host/ehci-hcd.c
-@@ -352,11 +352,13 @@ static void ehci_silence_controller(stru
- 	ehci->rh_state = EHCI_RH_HALTED;
- 	ehci_turn_off_all_ports(ehci);
- 
-+#ifndef CONFIG_ARCH_GEMINI
- 	/* make BIOS/etc use companion controller during reboot */
- 	ehci_writel(ehci, 0, &ehci->regs->configured_flag);
- 
- 	/* unblock posted writes */
- 	ehci_readl(ehci, &ehci->regs->configured_flag);
-+#endif
- 	spin_unlock_irq(&ehci->lock);
- }
- 
-@@ -608,7 +610,9 @@ static int ehci_run (struct usb_hcd *hcd
- 	// Philips, Intel, and maybe others need CMD_RUN before the
- 	// root hub will detect new devices (why?); NEC doesn't
- 	ehci->command &= ~(CMD_LRESET|CMD_IAAD|CMD_PSE|CMD_ASE|CMD_RESET);
-+#ifndef CONFIG_ARCH_GEMINI
- 	ehci->command |= CMD_RUN;
-+#endif
- 	ehci_writel(ehci, ehci->command, &ehci->regs->command);
- 	dbg_cmd (ehci, "init", ehci->command);
- 
-@@ -628,9 +632,11 @@ static int ehci_run (struct usb_hcd *hcd
- 	 */
- 	down_write(&ehci_cf_port_reset_rwsem);
- 	ehci->rh_state = EHCI_RH_RUNNING;
-+#ifndef CONFIG_ARCH_GEMINI
- 	ehci_writel(ehci, FLAG_CF, &ehci->regs->configured_flag);
- 	ehci_readl(ehci, &ehci->regs->command);	/* unblock posted writes */
- 	msleep(5);
-+#endif
- 	up_write(&ehci_cf_port_reset_rwsem);
- 	ehci->last_periodic_enable = ktime_get_real();
- 
-@@ -768,9 +774,10 @@ static irqreturn_t ehci_irq (struct usb_
- 		pcd_status = status;
- 
- 		/* resume root hub? */
-+#ifndef CONFIG_ARCH_GEMINI
- 		if (ehci->rh_state == EHCI_RH_SUSPENDED)
- 			usb_hcd_resume_root_hub(hcd);
--
-+#endif
- 		/* get per-port change detect bits */
- 		if (ehci->has_ppcd)
- 			ppcd = status >> 16;
-@@ -1296,6 +1303,11 @@ MODULE_LICENSE ("GPL");
- #define	PLATFORM_DRIVER		ehci_hcd_sead3_driver
- #endif
- 
-+#ifdef CONFIG_ARCH_GEMINI
-+#include "ehci-fotg2.c"
-+#define PLATFORM_DRIVER		ehci_fotg2_driver
-+#endif
-+
- static int __init ehci_hcd_init(void)
- {
- 	int retval = 0;
---- a/drivers/usb/host/ehci-timer.c
-+++ b/drivers/usb/host/ehci-timer.c
-@@ -208,7 +208,9 @@ static void ehci_handle_controller_death
- 
- 	/* Clean up the mess */
- 	ehci->rh_state = EHCI_RH_HALTED;
-+#ifndef CONFIG_ARCH_GEMINI
- 	ehci_writel(ehci, 0, &ehci->regs->configured_flag);
-+#endif
- 	ehci_writel(ehci, 0, &ehci->regs->intr_enable);
- 	ehci_work(ehci);
- 	end_unlink_async(ehci);
---- a/drivers/usb/host/ehci.h
-+++ b/drivers/usb/host/ehci.h
-@@ -657,7 +657,12 @@ static inline unsigned int
- ehci_port_speed(struct ehci_hcd *ehci, unsigned int portsc)
- {
- 	if (ehci_is_TDI(ehci)) {
--		switch ((portsc >> (ehci->has_hostpc ? 25 : 26)) & 3) {
-+#ifdef CONFIG_ARCH_GEMINI
-+		portsc = readl(ehci_to_hcd(ehci)->regs + 0x80);
-+		switch ((portsc>>22)&3) {
-+#else
-+		switch ((portsc>>26)&3) {
-+#endif
- 		case 0:
- 			return 0;
- 		case 1:
---- a/drivers/usb/host/ehci-hub.c
-+++ b/drivers/usb/host/ehci-hub.c
-@@ -1076,6 +1076,11 @@ int ehci_hub_control(
- 			/* see what we found out */
- 			temp = check_reset_complete (ehci, wIndex, status_reg,
- 					ehci_readl(ehci, status_reg));
-+#ifdef CONFIG_ARCH_GEMINI
-+			/* restart schedule */
-+		 	ehci->command |= CMD_RUN;
-+			ehci_writel(ehci, ehci->command, &ehci->regs->command);
-+#endif
- 		}
- 
- 		/* transfer dedicated ports to the companion hc */
---- a/include/linux/usb/ehci_def.h
-+++ b/include/linux/usb/ehci_def.h
-@@ -112,8 +112,13 @@ struct ehci_regs {
- 	u32		frame_list;	/* points to periodic list */
- 	/* ASYNCLISTADDR: offset 0x18 */
- 	u32		async_next;	/* address of next async queue head */
--
-+#ifndef CONFIG_ARCH_GEMINI
- 	u32		reserved1[2];
-+#else
-+	u32		reserved1;
-+	/* PORTSC: offset 0x20 for Faraday OTG */
-+	u32		port_status[1];
-+#endif
- 
- 	/* TXFILLTUNING: offset 0x24 */
- 	u32		txfill_tuning;	/* TX FIFO Tuning register */
-@@ -125,8 +130,11 @@ struct ehci_regs {
- 	u32		configured_flag;
- #define FLAG_CF		(1<<0)		/* true: we'll support "high speed" */
- 
-+#ifndef CONFIG_ARCH_GEMINI
- 	/* PORTSC: offset 0x44 */
- 	u32		port_status[0];	/* up to N_PORTS */
-+#endif
-+
- /* EHCI 1.1 addendum */
- #define PORTSC_SUSPEND_STS_ACK 0
- #define PORTSC_SUSPEND_STS_NYET 1
diff --git a/target/linux/gemini/patches-4.4/131-arm-gemini-add-usb-device.patch b/target/linux/gemini/patches-4.4/131-arm-gemini-add-usb-device.patch
deleted file mode 100644
index a75a5c1c6ca1..000000000000
--- a/target/linux/gemini/patches-4.4/131-arm-gemini-add-usb-device.patch
+++ /dev/null
@@ -1,77 +0,0 @@ 
---- a/arch/arm/mach-gemini/devices.c
-+++ b/arch/arm/mach-gemini/devices.c
-@@ -187,3 +187,64 @@ int platform_register_ethernet(struct ge
- 
- 	return platform_device_register(&ethernet_device);
- }
-+
-+static struct resource usb0_resources[] = {
-+	{
-+		.start  = GEMINI_USB0_BASE,
-+		.end    = GEMINI_USB0_BASE + 0xfff,
-+		.flags  = IORESOURCE_MEM,
-+	},
-+	{
-+		.start  = IRQ_USB0,
-+		.end    = IRQ_USB0,
-+		.flags  = IORESOURCE_IRQ,
-+	},
-+};
-+
-+static struct resource usb1_resources[] = {
-+	{
-+		.start  = GEMINI_USB1_BASE,
-+		.end    = GEMINI_USB1_BASE + 0xfff,
-+		.flags  = IORESOURCE_MEM,
-+	},
-+	{
-+		.start  = IRQ_USB1,
-+		.end    = IRQ_USB1,
-+		.flags  = IORESOURCE_IRQ,
-+	},
-+};
-+
-+static u64 usb0_dmamask = 0xffffffffUL;
-+static u64 usb1_dmamask = 0xffffffffUL;
-+
-+static struct platform_device usb_device[] = {
-+	{
-+		.name   = "ehci-fotg2",
-+		.id     = 0,
-+		.dev    = {
-+			.dma_mask = &usb0_dmamask,
-+			.coherent_dma_mask = 0xffffffff,
-+		},
-+		.num_resources  = ARRAY_SIZE(usb0_resources),
-+		.resource       = usb0_resources,
-+	},
-+	{
-+		.name   = "ehci-fotg2",
-+		.id     = 1,
-+		.dev    = {
-+			.dma_mask = &usb1_dmamask,
-+			.coherent_dma_mask = 0xffffffff,
-+		},
-+		.num_resources  = ARRAY_SIZE(usb1_resources),
-+		.resource       = usb1_resources,
-+	},
-+};
-+
-+int __init platform_register_usb(unsigned int id)
-+{
-+	if (id > 1)
-+		return -EINVAL;
-+
-+	return platform_device_register(&usb_device[id]);
-+}
-+
---- a/arch/arm/mach-gemini/common.h
-+++ b/arch/arm/mach-gemini/common.h
-@@ -30,6 +30,7 @@ extern int platform_register_pflash(unsi
- 				    unsigned int nr_parts);
- extern int platform_register_watchdog(void);
- extern int platform_register_ethernet(struct gemini_gmac_platform_data *pdata);
-+extern int platform_register_usb(unsigned int id);
- 
- extern void gemini_restart(enum reboot_mode mode, const char *cmd);
- 
diff --git a/target/linux/gemini/patches-4.4/132-arm-gemini-register-usb.patch b/target/linux/gemini/patches-4.4/132-arm-gemini-register-usb.patch
deleted file mode 100644
index 2a61d828eade..000000000000
--- a/target/linux/gemini/patches-4.4/132-arm-gemini-register-usb.patch
+++ /dev/null
@@ -1,65 +0,0 @@ 
---- a/arch/arm/mach-gemini/board-wbd111.c
-+++ b/arch/arm/mach-gemini/board-wbd111.c
-@@ -145,6 +145,7 @@ static void __init wbd111_init(void)
- 	platform_register_watchdog();
- 	platform_device_register(&wbd111_phy_device);
- 	platform_register_ethernet(&gmac_data);
-+	platform_register_usb(0);
- }
- 
- MACHINE_START(WBD111, "Wiliboard WBD-111")
---- a/arch/arm/mach-gemini/board-wbd222.c
-+++ b/arch/arm/mach-gemini/board-wbd222.c
-@@ -147,6 +147,7 @@ static void __init wbd222_init(void)
- 	platform_register_watchdog();
- 	platform_device_register(&wbd222_phy_device);
- 	platform_register_ethernet(&gmac_data);
-+	platform_register_usb(0);
- }
- 
- MACHINE_START(WBD222, "Wiliboard WBD-222")
---- a/arch/arm/mach-gemini/board-rut1xx.c
-+++ b/arch/arm/mach-gemini/board-rut1xx.c
-@@ -105,6 +105,7 @@ static void __init rut1xx_init(void)
- 	platform_register_watchdog();
- 	platform_device_register(&rut1xx_phy_device);
- 	platform_register_ethernet(&gmac_data);
-+	platform_register_usb(0);
- }
- 
- MACHINE_START(RUT100, "Teltonika RUT100")
---- a/arch/arm/mach-gemini/board-nas4220b.c
-+++ b/arch/arm/mach-gemini/board-nas4220b.c
-@@ -134,10 +134,23 @@ static void __init ib4220b_gmac_init(voi
- 		GLOBAL_ARBITRATION1_CTRL));
- }
- 
-+static void __init usb_ib4220b_init(void)
-+{
-+	unsigned int val;
-+
-+	val = readl((void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
-+		GLOBAL_MISC_CTRL));
-+	val &= ~(USB0_PLUG_MINIB | USB1_PLUG_MINIB);
-+	val |= USB0_VBUS_ON | USB1_VBUS_ON;
-+	writel(val, (void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
-+		GLOBAL_MISC_CTRL));
-+}
-+
- static void __init ib4220b_init(void)
- {
- 	gemini_gpio_init();
- 	ib4220b_gmac_init();
-+	usb_ib4220b_init();
- 	platform_register_uart();
- 	platform_register_pflash(SZ_16M, NULL, 0);
- 	platform_device_register(&ib4220b_led_device);
-@@ -146,6 +159,8 @@ static void __init ib4220b_init(void)
- 	platform_register_watchdog();
- 	platform_device_register(&ib4220b_phy_device);
- 	platform_register_ethernet(&ib4220b_gmac_data);
-+	platform_register_usb(0);
-+	platform_register_usb(1);
- }
- 
- MACHINE_START(NAS4220B, "Raidsonic NAS IB-4220-B")
diff --git a/target/linux/gemini/patches-4.4/140-arm-gemini-add-pci-support.patch b/target/linux/gemini/patches-4.4/140-arm-gemini-add-pci-support.patch
deleted file mode 100644
index d17b1a1f8e41..000000000000
--- a/target/linux/gemini/patches-4.4/140-arm-gemini-add-pci-support.patch
+++ /dev/null
@@ -1,66 +0,0 @@ 
---- a/arch/arm/Kconfig
-+++ b/arch/arm/Kconfig
-@@ -399,6 +399,7 @@ config ARCH_GEMINI
- 	select CLKSRC_MMIO
- 	select CPU_FA526
- 	select GENERIC_CLOCKEVENTS
-+	select MIGHT_HAVE_PCI
- 	help
- 	  Support for the Cortina Systems Gemini family SoCs
- 
---- a/arch/arm/mach-gemini/include/mach/hardware.h
-+++ b/arch/arm/mach-gemini/include/mach/hardware.h
-@@ -68,4 +68,9 @@
-  */
- #define IO_ADDRESS(x)	IOMEM((((x) & 0xFFF00000) >> 4) | ((x) & 0x000FFFFF) | 0xF0000000)
- 
-+/*
-+ * PCI subsystem macros
-+ */
-+#define pcibios_assign_all_busses()	1
-+
- #endif
---- a/arch/arm/mach-gemini/include/mach/irqs.h
-+++ b/arch/arm/mach-gemini/include/mach/irqs.h
-@@ -43,11 +43,14 @@
- 
- #define NORMAL_IRQ_NUM	32
- 
--#define GPIO_IRQ_BASE	NORMAL_IRQ_NUM
-+#define PCI_IRQ_BASE	NORMAL_IRQ_NUM
-+#define PCI_IRQ_NUM	4
-+
-+#define GPIO_IRQ_BASE	(NORMAL_IRQ_NUM + PCI_IRQ_NUM)
- #define GPIO_IRQ_NUM	(3 * 32)
- 
- #define ARCH_TIMER_IRQ	IRQ_TIMER2
- 
--#define NR_IRQS		(NORMAL_IRQ_NUM + GPIO_IRQ_NUM)
-+#define NR_IRQS		(NORMAL_IRQ_NUM + PCI_IRQ_NUM + GPIO_IRQ_NUM)
- 
- #endif /* __MACH_IRQS_H__ */
---- a/arch/arm/mach-gemini/Makefile
-+++ b/arch/arm/mach-gemini/Makefile
-@@ -6,6 +6,8 @@
- 
- obj-y			:= irq.o mm.o time.o devices.o gpio.o idle.o reset.o
- 
-+obj-$(CONFIG_PCI)	+= pci.o
-+
- # Board-specific support
- obj-$(CONFIG_MACH_NAS4220B)	+= board-nas4220b.o
- obj-$(CONFIG_MACH_RUT100)	+= board-rut1xx.o
---- a/arch/arm/mach-gemini/mm.c
-+++ b/arch/arm/mach-gemini/mm.c
-@@ -59,6 +59,11 @@ static struct map_desc gemini_io_desc[]
- 		.length		= SZ_512K,
- 		.type 		= MT_DEVICE,
- 	}, {
-+		.virtual	= (unsigned long)IO_ADDRESS(GEMINI_PCI_IO_BASE),
-+		.pfn		= __phys_to_pfn(GEMINI_PCI_IO_BASE),
-+		.length		= SZ_512K,
-+		.type 		= MT_DEVICE,
-+	}, {
- 		.virtual	= (unsigned long)IO_ADDRESS(GEMINI_FLASH_CTRL_BASE),
- 		.pfn		= __phys_to_pfn(GEMINI_FLASH_CTRL_BASE),
- 		.length		= SZ_512K,
diff --git a/target/linux/gemini/patches-4.4/150-gemini-pata.patch b/target/linux/gemini/patches-4.4/150-gemini-pata.patch
deleted file mode 100644
index 1054be08b5a4..000000000000
--- a/target/linux/gemini/patches-4.4/150-gemini-pata.patch
+++ /dev/null
@@ -1,192 +0,0 @@ 
---- a/arch/arm/mach-gemini/include/mach/global_reg.h
-+++ b/arch/arm/mach-gemini/include/mach/global_reg.h
-@@ -227,7 +227,13 @@
- #define USB0_PLUG_MINIB			(1 << 29)
- #define GMAC_GMII			(1 << 28)
- #define GMAC_1_ENABLE			(1 << 27)
--/* TODO: define ATA/SATA bits */
-+/* 011 - ata0 <-> sata0, sata1; bring out ata1
-+ * 010 - ata1 <-> sata1, sata0; bring out ata0
-+ * 001 - ata0 <-> sata0, ata1 <-> sata1; bring out ata1
-+ * 000 - ata0 <-> sata0, ata1 <-> sata1; bring out ata0 */
-+#define IDE_IOMUX_MASK			(7 << 24)
-+#define IDE_IOMUX_SATA1_SATA0	(2 << 24)
-+#define IDE_IOMUX_SATA0_SATA1	(3 << 24)
- #define USB1_VBUS_ON			(1 << 23)
- #define USB0_VBUS_ON			(1 << 22)
- #define APB_CLKOUT_ENABLE		(1 << 21)
---- a/arch/arm/mach-gemini/irq.c
-+++ b/arch/arm/mach-gemini/irq.c
-@@ -89,6 +89,9 @@ void __init gemini_init_irq(void)
- 			irq_set_handler(i, handle_edge_irq);
- 			mode |= 1 << i;
- 			level |= 1 << i;
-+ 		} else if (i >= IRQ_IDE0 && i <= IRQ_IDE1) {
-+ 			irq_set_handler(i, handle_edge_irq);
-+ 			mode |= 1 << i;
- 		} else {			
- 			irq_set_handler(i, handle_level_irq);
- 		}
---- a/arch/arm/mach-gemini/common.h
-+++ b/arch/arm/mach-gemini/common.h
-@@ -31,6 +31,7 @@ extern int platform_register_pflash(unsi
- extern int platform_register_watchdog(void);
- extern int platform_register_ethernet(struct gemini_gmac_platform_data *pdata);
- extern int platform_register_usb(unsigned int id);
-+extern int platform_register_pata(unsigned int id);
- 
- extern void gemini_restart(enum reboot_mode mode, const char *cmd);
- 
---- a/arch/arm/mach-gemini/devices.c
-+++ b/arch/arm/mach-gemini/devices.c
-@@ -248,3 +248,67 @@ int __init platform_register_usb(unsigne
- 	return platform_device_register(&usb_device[id]);
- }
- 
-+static u64 pata_gemini_dmamask0 = 0xffffffffUL;
-+static u64 pata_gemini_dmamask1 = 0xffffffffUL;
-+
-+static struct resource pata_gemini_resources0[] =
-+{
-+	[0] =	{
-+			.start	= GEMINI_IDE0_BASE,
-+			.end	= GEMINI_IDE0_BASE + 0x40,
-+			.flags	= IORESOURCE_MEM,
-+		},
-+	[1] =	{
-+			.start	= IRQ_IDE0,
-+			.end	= IRQ_IDE0,
-+			.flags  = IORESOURCE_IRQ,
-+		},
-+};
-+
-+static struct resource pata_gemini_resources1[] =
-+{
-+	[0] =	{
-+			.start	= GEMINI_IDE1_BASE,
-+			.end	= GEMINI_IDE1_BASE + 0x40,
-+			.flags	= IORESOURCE_MEM,
-+		},
-+	[1] =	{
-+			.start  = IRQ_IDE1,
-+			.end    = IRQ_IDE1,
-+			.flags  = IORESOURCE_IRQ,
-+		},
-+};
-+
-+static struct platform_device pata_gemini_devices[] =
-+{
-+	{
-+		.name		= "pata-gemini",
-+		.id		= 0,
-+		.dev		=
-+		{
-+			.dma_mask		= &pata_gemini_dmamask0,
-+			.coherent_dma_mask	= 0xffffffff,
-+		},
-+		.num_resources	= ARRAY_SIZE(pata_gemini_resources0),
-+		.resource	= pata_gemini_resources0,
-+	},
-+	{
-+		.name		= "pata-gemini",
-+		.id		= 1,
-+		.dev		=
-+		{
-+			.dma_mask		= &pata_gemini_dmamask1,
-+			.coherent_dma_mask	= 0xffffffff,
-+		},
-+		.num_resources	= ARRAY_SIZE(pata_gemini_resources1),
-+		.resource	= pata_gemini_resources1,
-+	},
-+};
-+
-+int __init platform_register_pata(unsigned int id)
-+{
-+	if (id > 1)
-+		return -EINVAL;
-+
-+	return platform_device_register(&pata_gemini_devices[id]);
-+}
---- a/arch/arm/mach-gemini/mm.c
-+++ b/arch/arm/mach-gemini/mm.c
-@@ -24,6 +24,11 @@ static struct map_desc gemini_io_desc[]
- 		.length		= SZ_512K,
- 		.type 		= MT_DEVICE,
- 	}, {
-+		.virtual	= (unsigned long)IO_ADDRESS(GEMINI_SATA_BASE),
-+		.pfn		= __phys_to_pfn(GEMINI_SATA_BASE),
-+		.length		= SZ_512K,
-+		.type		= MT_DEVICE,
-+	}, {
- 		.virtual	= (unsigned long)IO_ADDRESS(GEMINI_UART_BASE),
- 		.pfn		= __phys_to_pfn(GEMINI_UART_BASE),
- 		.length		= SZ_512K,
---- a/drivers/ata/Kconfig
-+++ b/drivers/ata/Kconfig
-@@ -567,6 +567,16 @@ config PATA_EP93XX
- 
- 	  If unsure, say N.
- 
-+config PATA_GEMINI
-+	tristate "Gemini PATA support (Experimental)"
-+	depends on ARCH_GEMINI
-+	help
-+	  This option enables support for the Gemini PATA-Controller.
-+	  Note that the Gemini SoC has no native SATA-Controller but an
-+	  onboard PATA-SATA bridge.
-+
-+	  If unsure, say N.
-+
- config PATA_HPT366
- 	tristate "HPT 366/368 PATA support"
- 	depends on PCI
---- a/drivers/ata/Makefile
-+++ b/drivers/ata/Makefile
-@@ -56,6 +56,7 @@ obj-$(CONFIG_PATA_CS5536)	+= pata_cs5536
- obj-$(CONFIG_PATA_CYPRESS)	+= pata_cypress.o
- obj-$(CONFIG_PATA_EFAR)		+= pata_efar.o
- obj-$(CONFIG_PATA_EP93XX)	+= pata_ep93xx.o
-+obj-$(CONFIG_PATA_GEMINI)	+= pata_gemini.o
- obj-$(CONFIG_PATA_HPT366)	+= pata_hpt366.o
- obj-$(CONFIG_PATA_HPT37X)	+= pata_hpt37x.o
- obj-$(CONFIG_PATA_HPT3X2N)	+= pata_hpt3x2n.o
---- a/arch/arm/mach-gemini/board-nas4220b.c
-+++ b/arch/arm/mach-gemini/board-nas4220b.c
-@@ -146,11 +146,28 @@ static void __init usb_ib4220b_init(void
- 		GLOBAL_MISC_CTRL));
- }
- 
-+static void __init sata_ib4220b_init(void)
-+{
-+	unsigned val;
-+
-+	val = readl((void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
-+		GLOBAL_MISC_CTRL));
-+	val &= ~(IDE_IOMUX_MASK | PFLASH_PADS_DISABLE);
-+	val |= IDE_PADS_ENABLE;
-+	writel(val, (void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
-+		GLOBAL_MISC_CTRL));
-+
-+	/* enabling ports for presence detection, master only */
-+	writel(0x00000001, (void __iomem*)(IO_ADDRESS(GEMINI_SATA_BASE) + 0x18));
-+	writel(0x00000001, (void __iomem*)(IO_ADDRESS(GEMINI_SATA_BASE) + 0x1c));
-+}
-+
- static void __init ib4220b_init(void)
- {
- 	gemini_gpio_init();
- 	ib4220b_gmac_init();
- 	usb_ib4220b_init();
-+	sata_ib4220b_init();
- 	platform_register_uart();
- 	platform_register_pflash(SZ_16M, NULL, 0);
- 	platform_device_register(&ib4220b_led_device);
-@@ -161,6 +178,8 @@ static void __init ib4220b_init(void)
- 	platform_register_ethernet(&ib4220b_gmac_data);
- 	platform_register_usb(0);
- 	platform_register_usb(1);
-+	platform_register_pata(0);
-+	platform_register_pata(1);
- }
- 
- MACHINE_START(NAS4220B, "Raidsonic NAS IB-4220-B")