aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/oxnas/patches-4.4
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2016-01-18 23:34:59 +0000
committerFelix Fietkau <nbd@openwrt.org>2016-01-18 23:34:59 +0000
commit89d37aaa5c757ef70c75fd3aa2bc5b720c8ae77f (patch)
tree848a9021c421e17836fcedad1b9154e9e7729556 /target/linux/oxnas/patches-4.4
parentcee6c07cf32302ad71cc8c540f997b552a3ba4aa (diff)
downloadupstream-89d37aaa5c757ef70c75fd3aa2bc5b720c8ae77f.tar.gz
upstream-89d37aaa5c757ef70c75fd3aa2bc5b720c8ae77f.tar.bz2
upstream-89d37aaa5c757ef70c75fd3aa2bc5b720c8ae77f.zip
oxnas: add patches and config for Linux 4.4
Signed-off-by: Daniel Golle <daniel@makrotopia.org> SVN-Revision: 48339
Diffstat (limited to 'target/linux/oxnas/patches-4.4')
-rw-r--r--target/linux/oxnas/patches-4.4/010-arm_introduce-dma-fiq-irq-broadcast.patch68
-rw-r--r--target/linux/oxnas/patches-4.4/250-add-plxtech-vendor-prefix.patch10
-rw-r--r--target/linux/oxnas/patches-4.4/300-introduce-oxnas-platform.patch71
-rw-r--r--target/linux/oxnas/patches-4.4/310-oxnas-clocksource.patch25
-rw-r--r--target/linux/oxnas/patches-4.4/320-oxnas-irqchip.patch34
-rw-r--r--target/linux/oxnas/patches-4.4/330-oxnas-pinctrl.patch28
-rw-r--r--target/linux/oxnas/patches-4.4/340-oxnas-pcie.patch22
-rw-r--r--target/linux/oxnas/patches-4.4/350-oxnas-reset.patch20
-rw-r--r--target/linux/oxnas/patches-4.4/400-oxnas-nand.patch25
-rw-r--r--target/linux/oxnas/patches-4.4/500-oxnas-sata.patch26
-rw-r--r--target/linux/oxnas/patches-4.4/700-oxnas-dwmac.patch29
-rw-r--r--target/linux/oxnas/patches-4.4/800-oxnas-ehci.patch26
-rw-r--r--target/linux/oxnas/patches-4.4/900-more-boards.patch14
-rw-r--r--target/linux/oxnas/patches-4.4/999-libata-hacks.patch57
14 files changed, 455 insertions, 0 deletions
diff --git a/target/linux/oxnas/patches-4.4/010-arm_introduce-dma-fiq-irq-broadcast.patch b/target/linux/oxnas/patches-4.4/010-arm_introduce-dma-fiq-irq-broadcast.patch
new file mode 100644
index 0000000000..b59c06e2ab
--- /dev/null
+++ b/target/linux/oxnas/patches-4.4/010-arm_introduce-dma-fiq-irq-broadcast.patch
@@ -0,0 +1,68 @@
+--- a/arch/arm/include/asm/glue-cache.h
++++ b/arch/arm/include/asm/glue-cache.h
+@@ -156,9 +156,15 @@ static inline void nop_dma_unmap_area(co
+ #define __cpuc_flush_user_range __glue(_CACHE,_flush_user_cache_range)
+ #define __cpuc_coherent_kern_range __glue(_CACHE,_coherent_kern_range)
+ #define __cpuc_coherent_user_range __glue(_CACHE,_coherent_user_range)
++#ifndef CONFIG_DMA_CACHE_FIQ_BROADCAST
+ #define __cpuc_flush_dcache_area __glue(_CACHE,_flush_kern_dcache_area)
+
+ #define dmac_flush_range __glue(_CACHE,_dma_flush_range)
++#else
++#define __cpuc_flush_dcache_area __glue(fiq,_flush_kern_dcache_area)
++
++#define dmac_flush_range __glue(fiq,_dma_flush_range)
++#endif /* CONFIG_DMA_CACHE_FIQ_BROADCAST */
+ #endif
+
+ #endif
+--- a/arch/arm/mm/Kconfig
++++ b/arch/arm/mm/Kconfig
+@@ -866,6 +866,17 @@ config DMA_CACHE_RWFO
+ in hardware, other workarounds are needed (e.g. cache
+ maintenance broadcasting in software via FIQ).
+
++config DMA_CACHE_FIQ_BROADCAST
++ bool "Enable fiq broadcast DMA cache maintenance"
++ depends on CPU_V6K && SMP
++ select FIQ
++ help
++ The Snoop Control Unit on ARM11MPCore does not detect the
++ cache maintenance operations and the dma_{map,unmap}_area()
++ functions may leave stale cache entries on other CPUs. By
++ enabling this option, fiq broadcast in the ARMv6
++ DMA cache maintenance functions is performed.
++
+ config OUTER_CACHE
+ bool
+
+--- a/arch/arm/mm/flush.c
++++ b/arch/arm/mm/flush.c
+@@ -329,7 +329,11 @@ void flush_dcache_page(struct page *page
+
+ mapping = page_mapping(page);
+
++#ifndef CONFIG_DMA_CACHE_FIQ_BROADCAST
+ if (!cache_ops_need_broadcast() &&
++#else
++ if (
++#endif
+ mapping && !page_mapped(page))
+ clear_bit(PG_dcache_clean, &page->flags);
+ else {
+--- a/arch/arm/mm/dma.h
++++ b/arch/arm/mm/dma.h
+@@ -4,8 +4,13 @@
+ #include <asm/glue-cache.h>
+
+ #ifndef MULTI_CACHE
++#ifndef CONFIG_DMA_CACHE_FIQ_BROADCAST
+ #define dmac_map_area __glue(_CACHE,_dma_map_area)
+ #define dmac_unmap_area __glue(_CACHE,_dma_unmap_area)
++#else
++#define dmac_map_area __glue(fiq,_dma_map_area)
++#define dmac_unmap_area __glue(fiq,_dma_unmap_area)
++#endif /* CONFIG_DMA_CACHE_FIQ_BROADCAST */
+
+ /*
+ * These are private to the dma-mapping API. Do not use directly.
diff --git a/target/linux/oxnas/patches-4.4/250-add-plxtech-vendor-prefix.patch b/target/linux/oxnas/patches-4.4/250-add-plxtech-vendor-prefix.patch
new file mode 100644
index 0000000000..d6c5c627a6
--- /dev/null
+++ b/target/linux/oxnas/patches-4.4/250-add-plxtech-vendor-prefix.patch
@@ -0,0 +1,10 @@
+--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
++++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
+@@ -174,6 +174,7 @@ picochip Picochip Ltd
+ plathome Plat'Home Co., Ltd.
+ plda PLDA
+ pixcir PIXCIR MICROELECTRONICS Co., Ltd
++plxtech PLX Technology, Inc.
+ pulsedlight PulsedLight, Inc
+ powervr PowerVR (deprecated, use img)
+ qca Qualcomm Atheros, Inc.
diff --git a/target/linux/oxnas/patches-4.4/300-introduce-oxnas-platform.patch b/target/linux/oxnas/patches-4.4/300-introduce-oxnas-platform.patch
new file mode 100644
index 0000000000..b3a8dc0f90
--- /dev/null
+++ b/target/linux/oxnas/patches-4.4/300-introduce-oxnas-platform.patch
@@ -0,0 +1,71 @@
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -602,6 +602,19 @@ config ARCH_LPC32XX
+ help
+ Support for the NXP LPC32XX family of processors
+
++config ARCH_OXNAS
++ bool "Oxford Semiconductor 815/820/825 NAS SoC"
++ select ARM_GIC
++ select ARCH_REQUIRE_GPIOLIB
++ select CLKDEV_LOOKUP
++ select GENERIC_CLOCKEVENTS
++ select COMMON_CLK
++ select MIGHT_HAVE_PCI
++ select ARCH_HAS_RESET_CONTROLLER
++ help
++ This enables support for Oxford 815/820/825 NAS SoC
++ later renamed to PLXTECH NAS782x.
++
+ config ARCH_PXA
+ bool "PXA2xx/PXA3xx-based"
+ depends on MMU
+@@ -882,6 +895,8 @@ source "arch/arm/mach-omap2/Kconfig"
+
+ source "arch/arm/mach-orion5x/Kconfig"
+
++source "arch/arm/mach-oxnas/Kconfig"
++
+ source "arch/arm/mach-picoxcell/Kconfig"
+
+ source "arch/arm/mach-pxa/Kconfig"
+--- a/arch/arm/Makefile
++++ b/arch/arm/Makefile
+@@ -200,6 +200,7 @@ machine-$(CONFIG_ARCH_NSPIRE) += nspire
+ machine-$(CONFIG_ARCH_OMAP1) += omap1
+ machine-$(CONFIG_ARCH_OMAP2PLUS) += omap2
+ machine-$(CONFIG_ARCH_ORION5X) += orion5x
++machine-$(CONFIG_ARCH_OXNAS) += oxnas
+ machine-$(CONFIG_ARCH_PICOXCELL) += picoxcell
+ machine-$(CONFIG_ARCH_PXA) += pxa
+ machine-$(CONFIG_ARCH_QCOM) += qcom
+--- a/arch/arm/boot/dts/Makefile
++++ b/arch/arm/boot/dts/Makefile
+@@ -497,6 +497,7 @@ dtb-$(CONFIG_ARCH_ORION5X) += \
+ orion5x-lswsgl.dtb \
+ orion5x-maxtor-shared-storage-2.dtb \
+ orion5x-rd88f5182-nas.dtb
++dtb-$(CONFIG_ARCH_OXNAS) += ox820-pogoplug-pro.dtb
+ dtb-$(CONFIG_ARCH_PRIMA2) += \
+ prima2-evb.dtb
+ dtb-$(CONFIG_ARCH_QCOM) += \
+--- a/arch/arm/tools/mach-types
++++ b/arch/arm/tools/mach-types
+@@ -228,6 +228,7 @@ edb9302a MACH_EDB9302A EDB9302A 1127
+ edb9307a MACH_EDB9307A EDB9307A 1128
+ omap_3430sdp MACH_OMAP_3430SDP OMAP_3430SDP 1138
+ vstms MACH_VSTMS VSTMS 1140
++ox820 MACH_OX820 OX820 1152
+ micro9m MACH_MICRO9M MICRO9M 1169
+ bug MACH_BUG BUG 1179
+ at91sam9263ek MACH_AT91SAM9263EK AT91SAM9263EK 1202
+--- a/drivers/clk/Makefile
++++ b/drivers/clk/Makefile
+@@ -32,6 +32,7 @@ obj-$(CONFIG_ARCH_MB86S7X) += clk-mb86s
+ obj-$(CONFIG_ARCH_MOXART) += clk-moxart.o
+ obj-$(CONFIG_ARCH_NOMADIK) += clk-nomadik.o
+ obj-$(CONFIG_ARCH_NSPIRE) += clk-nspire.o
++obj-$(CONFIG_ARCH_OXNAS) += clk-oxnas.o
+ obj-$(CONFIG_COMMON_CLK_PALMAS) += clk-palmas.o
+ obj-$(CONFIG_CLK_QORIQ) += clk-qoriq.o
+ obj-$(CONFIG_COMMON_CLK_RK808) += clk-rk808.o
diff --git a/target/linux/oxnas/patches-4.4/310-oxnas-clocksource.patch b/target/linux/oxnas/patches-4.4/310-oxnas-clocksource.patch
new file mode 100644
index 0000000000..efb058dbb4
--- /dev/null
+++ b/target/linux/oxnas/patches-4.4/310-oxnas-clocksource.patch
@@ -0,0 +1,25 @@
+--- a/drivers/clocksource/Kconfig
++++ b/drivers/clocksource/Kconfig
+@@ -222,6 +222,12 @@ config VF_PIT_TIMER
+ help
+ Support for Period Interrupt Timer on Freescale Vybrid Family SoCs.
+
++config CLKSRC_RPS_TIMER
++ def_bool y if ARCH_OXNAS
++ select CLKSRC_MMIO
++ help
++ This option enables support for the oxnas rps timers.
++
+ config SYS_SUPPORTS_SH_CMT
+ bool
+
+--- a/drivers/clocksource/Makefile
++++ b/drivers/clocksource/Makefile
+@@ -41,6 +41,7 @@ obj-$(CONFIG_CLKSRC_EXYNOS_MCT) += exyno
+ obj-$(CONFIG_CLKSRC_LPC32XX) += time-lpc32xx.o
+ obj-$(CONFIG_CLKSRC_SAMSUNG_PWM) += samsung_pwm_timer.o
+ obj-$(CONFIG_FSL_FTM_TIMER) += fsl_ftm_timer.o
++obj-$(CONFIG_CLKSRC_RPS_TIMER) += oxnas_rps_timer.o
+ obj-$(CONFIG_VF_PIT_TIMER) += vf_pit_timer.o
+ obj-$(CONFIG_CLKSRC_QCOM) += qcom-timer.o
+ obj-$(CONFIG_MTK_TIMER) += mtk_timer.o
diff --git a/target/linux/oxnas/patches-4.4/320-oxnas-irqchip.patch b/target/linux/oxnas/patches-4.4/320-oxnas-irqchip.patch
new file mode 100644
index 0000000000..62224b63b1
--- /dev/null
+++ b/target/linux/oxnas/patches-4.4/320-oxnas-irqchip.patch
@@ -0,0 +1,34 @@
+--- a/drivers/irqchip/Kconfig
++++ b/drivers/irqchip/Kconfig
+@@ -27,6 +27,11 @@ config ARM_GIC_V3_ITS
+ bool
+ select PCI_MSI_IRQ_DOMAIN
+
++config PLXTECH_RPS
++ def_bool y if ARHC_OXNAS
++ depends on ARCH_OXNAS
++ select IRQ_DOMAIN
++
+ config ARM_NVIC
+ bool
+ select IRQ_DOMAIN
+--- a/drivers/irqchip/Makefile
++++ b/drivers/irqchip/Makefile
+@@ -34,6 +34,7 @@ obj-$(CONFIG_IRQ_MIPS_CPU) += irq-mips-
+ obj-$(CONFIG_SIRF_IRQ) += irq-sirfsoc.o
+ obj-$(CONFIG_RENESAS_INTC_IRQPIN) += irq-renesas-intc-irqpin.o
+ obj-$(CONFIG_RENESAS_IRQC) += irq-renesas-irqc.o
++obj-$(CONFIG_PLXTECH_RPS) += irq-rps.o
+ obj-$(CONFIG_VERSATILE_FPGA_IRQ) += irq-versatile-fpga.o
+ obj-$(CONFIG_ARCH_NSPIRE) += irq-zevio.o
+ obj-$(CONFIG_ARCH_VT8500) += irq-vt8500.o
+--- a/drivers/irqchip/irq-gic.c
++++ b/drivers/irqchip/irq-gic.c
+@@ -1245,6 +1245,7 @@ IRQCHIP_DECLARE(arm1176jzf_dc_gic, "arm,
+ IRQCHIP_DECLARE(cortex_a15_gic, "arm,cortex-a15-gic", gic_of_init);
+ IRQCHIP_DECLARE(cortex_a9_gic, "arm,cortex-a9-gic", gic_of_init);
+ IRQCHIP_DECLARE(cortex_a7_gic, "arm,cortex-a7-gic", gic_of_init);
++IRQCHIP_DECLARE(arm11_mpcore_gic, "arm,arm11mp-gic", gic_of_init);
+ IRQCHIP_DECLARE(msm_8660_qgic, "qcom,msm-8660-qgic", gic_of_init);
+ IRQCHIP_DECLARE(msm_qgic2, "qcom,msm-qgic2", gic_of_init);
+ IRQCHIP_DECLARE(pl390, "arm,pl390", gic_of_init);
diff --git a/target/linux/oxnas/patches-4.4/330-oxnas-pinctrl.patch b/target/linux/oxnas/patches-4.4/330-oxnas-pinctrl.patch
new file mode 100644
index 0000000000..479bfddc50
--- /dev/null
+++ b/target/linux/oxnas/patches-4.4/330-oxnas-pinctrl.patch
@@ -0,0 +1,28 @@
+--- a/drivers/pinctrl/Kconfig
++++ b/drivers/pinctrl/Kconfig
+@@ -227,6 +227,15 @@ config PINCTRL_COH901
+ COH 901 335 and COH 901 571/3. They contain 3, 5 or 7
+ ports of 8 GPIO pins each.
+
++config PINCTRL_OXNAS
++ bool "OXNAS pinctrl driver"
++ depends on OF
++ depends on ARCH_OXNAS
++ select PINMUX
++ select PINCONF
++ help
++ Say Y here to enable the oxnas pinctrl driver
++
+ config PINCTRL_PALMAS
+ bool "Pinctrl driver for the PALMAS Series MFD devices"
+ depends on OF && MFD_PALMAS
+--- a/drivers/pinctrl/Makefile
++++ b/drivers/pinctrl/Makefile
+@@ -17,6 +17,7 @@ obj-$(CONFIG_PINCTRL_AMD) += pinctrl-amd
+ obj-$(CONFIG_PINCTRL_DIGICOLOR) += pinctrl-digicolor.o
+ obj-$(CONFIG_PINCTRL_FALCON) += pinctrl-falcon.o
+ obj-$(CONFIG_PINCTRL_MESON) += meson/
++obj-$(CONFIG_PINCTRL_OXNAS) += pinctrl-oxnas.o
+ obj-$(CONFIG_PINCTRL_PALMAS) += pinctrl-palmas.o
+ obj-$(CONFIG_PINCTRL_PISTACHIO) += pinctrl-pistachio.o
+ obj-$(CONFIG_PINCTRL_ROCKCHIP) += pinctrl-rockchip.o
diff --git a/target/linux/oxnas/patches-4.4/340-oxnas-pcie.patch b/target/linux/oxnas/patches-4.4/340-oxnas-pcie.patch
new file mode 100644
index 0000000000..374f9b96f3
--- /dev/null
+++ b/target/linux/oxnas/patches-4.4/340-oxnas-pcie.patch
@@ -0,0 +1,22 @@
+--- a/drivers/pci/host/Kconfig
++++ b/drivers/pci/host/Kconfig
+@@ -172,4 +172,9 @@ config PCI_HISI
+ help
+ Say Y here if you want PCIe controller support on HiSilicon HIP05 SoC
+
++config PCI_OXNAS
++ bool "PLX Oxnas PCIe controller"
++ depends on ARCH_OXNAS
++ select PCIEPORTBUS
++
+ endmenu
+--- a/drivers/pci/host/Makefile
++++ b/drivers/pci/host/Makefile
+@@ -3,6 +3,7 @@ obj-$(CONFIG_PCI_DRA7XX) += pci-dra7xx.o
+ obj-$(CONFIG_PCI_EXYNOS) += pci-exynos.o
+ obj-$(CONFIG_PCI_IMX6) += pci-imx6.o
+ obj-$(CONFIG_PCI_MVEBU) += pci-mvebu.o
++obj-$(CONFIG_PCI_OXNAS) += pcie-oxnas.o
+ obj-$(CONFIG_PCI_TEGRA) += pci-tegra.o
+ obj-$(CONFIG_PCI_RCAR_GEN2) += pci-rcar-gen2.o
+ obj-$(CONFIG_PCI_RCAR_GEN2_PCIE) += pcie-rcar.o
diff --git a/target/linux/oxnas/patches-4.4/350-oxnas-reset.patch b/target/linux/oxnas/patches-4.4/350-oxnas-reset.patch
new file mode 100644
index 0000000000..e9aaf4b430
--- /dev/null
+++ b/target/linux/oxnas/patches-4.4/350-oxnas-reset.patch
@@ -0,0 +1,20 @@
+--- a/drivers/reset/Kconfig
++++ b/drivers/reset/Kconfig
+@@ -12,4 +12,9 @@ menuconfig RESET_CONTROLLER
+
+ If unsure, say no.
+
++config RESET_CONTROLLER_OXNAS
++ bool
++ select RESET_CONTROLLER
++
+ source "drivers/reset/sti/Kconfig"
++
+--- a/drivers/reset/Makefile
++++ b/drivers/reset/Makefile
+@@ -1,4 +1,5 @@
+ obj-$(CONFIG_RESET_CONTROLLER) += core.o
++obj-$(CONFIG_RESET_CONTROLLER_OXNAS) += reset-ox820.o
+ obj-$(CONFIG_ARCH_LPC18XX) += reset-lpc18xx.o
+ obj-$(CONFIG_ARCH_SOCFPGA) += reset-socfpga.o
+ obj-$(CONFIG_ARCH_BERLIN) += reset-berlin.o
diff --git a/target/linux/oxnas/patches-4.4/400-oxnas-nand.patch b/target/linux/oxnas/patches-4.4/400-oxnas-nand.patch
new file mode 100644
index 0000000000..4e742786e0
--- /dev/null
+++ b/target/linux/oxnas/patches-4.4/400-oxnas-nand.patch
@@ -0,0 +1,25 @@
+--- a/drivers/mtd/nand/Kconfig
++++ b/drivers/mtd/nand/Kconfig
+@@ -546,4 +546,12 @@ config MTD_NAND_HISI504
+ help
+ Enables support for NAND controller on Hisilicon SoC Hip04.
+
++config MTD_NAND_OXNAS
++ tristate "Support for NAND on Plxtech NAS782X SoC"
++ depends on ARCH_OXNAS
++ select MTD_NAND_PLATFORM
++ help
++ Enables support for NAND Flash chips on Plxtech NAS782X SoCs. NAND is attached
++ to the STATIC Unit.
++
+ endif # MTD_NAND
+--- a/drivers/mtd/nand/Makefile
++++ b/drivers/mtd/nand/Makefile
+@@ -46,6 +46,7 @@ obj-$(CONFIG_MTD_NAND_SOCRATES) += socr
+ obj-$(CONFIG_MTD_NAND_TXX9NDFMC) += txx9ndfmc.o
+ obj-$(CONFIG_MTD_NAND_NUC900) += nuc900_nand.o
+ obj-$(CONFIG_MTD_NAND_MPC5121_NFC) += mpc5121_nfc.o
++obj-$(CONFIG_MTD_NAND_OXNAS) += oxnas_nand.o
+ obj-$(CONFIG_MTD_NAND_VF610_NFC) += vf610_nfc.o
+ obj-$(CONFIG_MTD_NAND_RICOH) += r852.o
+ obj-$(CONFIG_MTD_NAND_JZ4740) += jz4740_nand.o
diff --git a/target/linux/oxnas/patches-4.4/500-oxnas-sata.patch b/target/linux/oxnas/patches-4.4/500-oxnas-sata.patch
new file mode 100644
index 0000000000..3891dc1bc2
--- /dev/null
+++ b/target/linux/oxnas/patches-4.4/500-oxnas-sata.patch
@@ -0,0 +1,26 @@
+--- a/drivers/ata/Kconfig
++++ b/drivers/ata/Kconfig
+@@ -429,6 +429,13 @@ config SATA_VITESSE
+
+ If unsure, say N.
+
++config SATA_OXNAS
++ tristate "PLXTECH NAS782X SATA support"
++ help
++ This option enables support for Nas782x Serial ATA controller.
++
++ If unsure, say N.
++
+ comment "PATA SFF controllers with BMDMA"
+
+ config PATA_ALI
+--- a/drivers/ata/Makefile
++++ b/drivers/ata/Makefile
+@@ -40,6 +40,7 @@ obj-$(CONFIG_SATA_SVW) += sata_svw.o
+ obj-$(CONFIG_SATA_ULI) += sata_uli.o
+ obj-$(CONFIG_SATA_VIA) += sata_via.o
+ obj-$(CONFIG_SATA_VITESSE) += sata_vsc.o
++obj-$(CONFIG_SATA_OXNAS) += sata_oxnas.o
+
+ # SFF PATA w/ BMDMA
+ obj-$(CONFIG_PATA_ALI) += pata_ali.o
diff --git a/target/linux/oxnas/patches-4.4/700-oxnas-dwmac.patch b/target/linux/oxnas/patches-4.4/700-oxnas-dwmac.patch
new file mode 100644
index 0000000000..5de25d2e82
--- /dev/null
+++ b/target/linux/oxnas/patches-4.4/700-oxnas-dwmac.patch
@@ -0,0 +1,29 @@
+--- a/drivers/net/ethernet/stmicro/stmmac/Kconfig
++++ b/drivers/net/ethernet/stmicro/stmmac/Kconfig
+@@ -69,6 +69,16 @@ config DWMAC_MESON
+ the stmmac device driver. This driver is used for Meson6 and
+ Meson8 SoCs.
+
++config DWMAC_OXNAS
++ tristate "Oxnas gmac support"
++ default ARCH_OXNAS
++ depends on OF && ARCH_OXNAS
++ help
++ Support for Ethernet controller on Oxnas SoCs.
++
++ This selects the Oxford OX82x SoC glue layer support for
++ the stmmac device driver.
++
+ config DWMAC_ROCKCHIP
+ tristate "Rockchip dwmac support"
+ default ARCH_ROCKCHIP
+--- a/drivers/net/ethernet/stmicro/stmmac/Makefile
++++ b/drivers/net/ethernet/stmicro/stmmac/Makefile
+@@ -9,6 +9,7 @@ obj-$(CONFIG_STMMAC_PLATFORM) += stmmac-
+ obj-$(CONFIG_DWMAC_IPQ806X) += dwmac-ipq806x.o
+ obj-$(CONFIG_DWMAC_LPC18XX) += dwmac-lpc18xx.o
+ obj-$(CONFIG_DWMAC_MESON) += dwmac-meson.o
++obj-$(CONFIG_DWMAC_OXNAS) += dwmac-oxnas.o
+ obj-$(CONFIG_DWMAC_ROCKCHIP) += dwmac-rk.o
+ obj-$(CONFIG_DWMAC_SOCFPGA) += dwmac-socfpga.o
+ obj-$(CONFIG_DWMAC_STI) += dwmac-sti.o
diff --git a/target/linux/oxnas/patches-4.4/800-oxnas-ehci.patch b/target/linux/oxnas/patches-4.4/800-oxnas-ehci.patch
new file mode 100644
index 0000000000..5b25afc953
--- /dev/null
+++ b/target/linux/oxnas/patches-4.4/800-oxnas-ehci.patch
@@ -0,0 +1,26 @@
+--- a/drivers/usb/host/Kconfig
++++ b/drivers/usb/host/Kconfig
+@@ -313,6 +313,13 @@ config USB_OCTEON_EHCI
+ USB 2.0 device support. All CN6XXX based chips with USB are
+ supported.
+
++config USB_EHCI_OXNAS
++ tristate "OXNAS EHCI Module"
++ depends on USB_EHCI_HCD && ARCH_OXNAS
++ select USB_EHCI_ROOT_HUB_TT
++ ---help---
++ Enable support for the OX820 SOC's on-chip EHCI controller.
++
+ endif # USB_EHCI_HCD
+
+ config USB_OXU210HP_HCD
+--- a/drivers/usb/host/Makefile
++++ b/drivers/usb/host/Makefile
+@@ -41,6 +41,7 @@ obj-$(CONFIG_USB_EHCI_HCD_AT91) += ehci-
+ obj-$(CONFIG_USB_EHCI_MSM) += ehci-msm.o
+ obj-$(CONFIG_USB_EHCI_TEGRA) += ehci-tegra.o
+ obj-$(CONFIG_USB_W90X900_EHCI) += ehci-w90x900.o
++obj-$(CONFIG_USB_EHCI_OXNAS) += ehci-oxnas.o
+
+ obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o
+ obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o
diff --git a/target/linux/oxnas/patches-4.4/900-more-boards.patch b/target/linux/oxnas/patches-4.4/900-more-boards.patch
new file mode 100644
index 0000000000..19e1e8275b
--- /dev/null
+++ b/target/linux/oxnas/patches-4.4/900-more-boards.patch
@@ -0,0 +1,14 @@
+--- a/arch/arm/boot/dts/Makefile
++++ b/arch/arm/boot/dts/Makefile
+@@ -497,7 +497,10 @@ dtb-$(CONFIG_ARCH_ORION5X) += \
+ orion5x-lswsgl.dtb \
+ orion5x-maxtor-shared-storage-2.dtb \
+ orion5x-rd88f5182-nas.dtb
+-dtb-$(CONFIG_ARCH_OXNAS) += ox820-pogoplug-pro.dtb
++dtb-$(CONFIG_ARCH_OXNAS) += ox820-pogoplug-pro.dtb \
++ ox820-pogoplug-v3.dtb \
++ ox820-stg212.dtb \
++ ox820-kd20.dtb
+ dtb-$(CONFIG_ARCH_PRIMA2) += \
+ prima2-evb.dtb
+ dtb-$(CONFIG_ARCH_QCOM) += \
diff --git a/target/linux/oxnas/patches-4.4/999-libata-hacks.patch b/target/linux/oxnas/patches-4.4/999-libata-hacks.patch
new file mode 100644
index 0000000000..e9208aea4c
--- /dev/null
+++ b/target/linux/oxnas/patches-4.4/999-libata-hacks.patch
@@ -0,0 +1,57 @@
+--- a/drivers/ata/libata-core.c
++++ b/drivers/ata/libata-core.c
+@@ -1589,6 +1589,14 @@ unsigned ata_exec_internal_sg(struct ata
+ return AC_ERR_SYSTEM;
+ }
+
++ if (ap->ops->acquire_hw && !ap->ops->acquire_hw(ap, 0, 0)) {
++ spin_unlock_irqrestore(ap->lock, flags);
++ if (!ap->ops->acquire_hw(ap, 1, (2*HZ))) {
++ return AC_ERR_TIMEOUT;
++ }
++ spin_lock_irqsave(ap->lock, flags);
++ }
++
+ /* initialize internal qc */
+
+ /* XXX: Tag 0 is used for drivers with legacy EH as some
+@@ -4781,6 +4789,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
+ if (unlikely(ap->pflags & ATA_PFLAG_FROZEN))
+ return NULL;
+
++ if (ap->ops->qc_new && ap->ops->qc_new(ap))
++ return NULL;
++
+ /* libsas case */
+ if (ap->flags & ATA_FLAG_SAS_HOST) {
+ tag = ata_sas_allocate_tag(ap);
+@@ -4826,6 +4837,8 @@ void ata_qc_free(struct ata_queued_cmd *
+ qc->tag = ATA_TAG_POISON;
+ if (ap->flags & ATA_FLAG_SAS_HOST)
+ ata_sas_free_tag(tag, ap);
++ if (ap->ops->qc_free)
++ ap->ops->qc_free(qc);
+ }
+ }
+
+--- a/include/linux/libata.h
++++ b/include/linux/libata.h
+@@ -906,6 +906,8 @@ struct ata_port_operations {
+ void (*qc_prep)(struct ata_queued_cmd *qc);
+ unsigned int (*qc_issue)(struct ata_queued_cmd *qc);
+ bool (*qc_fill_rtf)(struct ata_queued_cmd *qc);
++ int (*qc_new)(struct ata_port *ap);
++ void (*qc_free)(struct ata_queued_cmd *qc);
+
+ /*
+ * Configuration and exception handling
+@@ -996,6 +998,9 @@ struct ata_port_operations {
+ void (*phy_reset)(struct ata_port *ap);
+ void (*eng_timeout)(struct ata_port *ap);
+
++ int (*acquire_hw)(struct ata_port *ap, int may_sleep,
++ int timeout_jiffies);
++
+ /*
+ * ->inherits must be the last field and all the preceding
+ * fields must be pointers.