From da94b00df54ec23656b4d8a785b1e9af5da1d207 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 25 Oct 2015 17:32:01 +0000 Subject: kernel: update kernel 4.1 to version 4.1.11 https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.1.11 Signed-off-by: Hauke Mehrtens SVN-Revision: 47252 --- .../linux/ar7/patches-4.1/500-serial_kludge.patch | 6 +- .../799-MIPS-ath79-add-minibox-v1-support.patch | 28 ++++---- .../814-MIPS-ath79-add-blackswift.patch | 2 +- ...PS-ath79-add-tplink-tl-wdr6500-v2-support.patch | 6 +- .../815-MIPS-ath79-add-mr1750-support.patch | 6 +- .../816-MIPS-ath79-add-tl-wdr3320-v2-support.patch | 6 +- ...-xhci-add-Broadcom-specific-fake-doorbell.patch | 4 +- .../0001-Main-bcm2708-bcm2709-linux-port.patch | 2 +- .../0011-bcm2708-alsa-sound-driver.patch | 2 +- ...erial-8250-Don-t-crash-when-nr_uarts-is-0.patch | 2 +- ...spidev-compatible-string-to-silence-warni.patch | 2 +- .../patches-4.1/760-8139cp-fixes-from-4.3.patch | 30 ++++----- .../patches-4.1/761-8139cp-fixes-from-4.4.patch | 10 ++- .../810-pci_disable_common_quirks.patch | 6 +- .../generic/patches-4.1/902-debloat_proc.patch | 10 +-- .../patches-4.1/903-debloat_direct_io.patch | 4 +- .../300-arch-arm-force-ZRELADDR-on-arch-qcom.patch | 2 +- .../ixp4xx/patches-4.1/160-delayed_uart_io.patch | 14 ++-- .../0033-SPI-MIPS-lantiq-adds-spi-xway.patch | 4 +- .../patches-4.1/300-introduce-oxnas-platform.patch | 2 +- .../122-mtd-nand-sunxi-add-partition-support.patch | 16 ++--- ...-mtd-nand-sunxi-add-hw-randomizer-support.patch | 78 ++++++++++------------ ...24-mtd-nand-sunxi-fallback-to-chip-config.patch | 2 +- .../125-mtd-nand-sunxi-extend-bbt_options.patch | 2 +- .../128-1-mtd-nand-store-timing-in-nand_chip.patch | 4 +- ...129-nand-sunxi-fix-write-to-USER_DATA-a13.patch | 26 ++------ 26 files changed, 125 insertions(+), 151 deletions(-) (limited to 'target') diff --git a/target/linux/ar7/patches-4.1/500-serial_kludge.patch b/target/linux/ar7/patches-4.1/500-serial_kludge.patch index 4baf4aaf64..23214491a1 100644 --- a/target/linux/ar7/patches-4.1/500-serial_kludge.patch +++ b/target/linux/ar7/patches-4.1/500-serial_kludge.patch @@ -1,7 +1,7 @@ --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c -@@ -339,6 +339,13 @@ configured less than Maximum supported f - UART_FCR7_64BYTE, +@@ -347,6 +347,13 @@ configured less than Maximum supported f + .rxtrig_bytes = {1, 4, 8, 14}, .flags = UART_CAP_FIFO, }, + [PORT_AR7] = { @@ -14,7 +14,7 @@ }; /* Uart divisor latch read */ -@@ -3340,7 +3347,11 @@ static void serial8250_console_putchar(s +@@ -3348,7 +3355,11 @@ static void serial8250_console_putchar(s { struct uart_8250_port *up = up_to_u8250p(port); diff --git a/target/linux/ar71xx/patches-4.1/799-MIPS-ath79-add-minibox-v1-support.patch b/target/linux/ar71xx/patches-4.1/799-MIPS-ath79-add-minibox-v1-support.patch index 4a8f4fcde5..55a0248ca7 100644 --- a/target/linux/ar71xx/patches-4.1/799-MIPS-ath79-add-minibox-v1-support.patch +++ b/target/linux/ar71xx/patches-4.1/799-MIPS-ath79-add-minibox-v1-support.patch @@ -1,19 +1,19 @@ --- a/arch/mips/ath79/machtypes.h +++ b/arch/mips/ath79/machtypes.h -@@ -64,6 +64,7 @@ enum ath79_mach_type { - ATH79_MACH_EPG5000, /* EnGenius EPG5000 */ - ATH79_MACH_F9K1115V2, /* Belkin AC1750DB */ - ATH79_MACH_GL_INET, /* GL-CONNECT GL-INET */ +@@ -69,6 +69,7 @@ enum ath79_mach_type { + ATH79_MACH_EPG5000, /* EnGenius EPG5000 */ + ATH79_MACH_F9K1115V2, /* Belkin AC1750DB */ + ATH79_MACH_GL_INET, /* GL-CONNECT GL-INET */ + ATH79_MACH_GS_MINIBOX_V1, /* Gainstrong MiniBox V1.0 */ - ATH79_MACH_GS_OOLITE, /* GS OOLITE V1.0 */ - ATH79_MACH_HIWIFI_HC6361, /* HiWiFi HC6361 */ - ATH79_MACH_JA76PF, /* jjPlus JA76PF */ + ATH79_MACH_GS_OOLITE, /* GS OOLITE V1.0 */ + ATH79_MACH_HIWIFI_HC6361, /* HiWiFi HC6361 */ + ATH79_MACH_JA76PF, /* jjPlus JA76PF */ --- a/arch/mips/ath79/Kconfig +++ b/arch/mips/ath79/Kconfig -@@ -511,6 +511,16 @@ - select ATH79_DEV_M25P80 - select ATH79_DEV_WMAC - +@@ -556,6 +556,16 @@ config ATH79_MACH_EAP300V2 + select ATH79_DEV_M25P80 + select ATH79_DEV_WMAC + +config ATH79_MACH_GS_MINIBOX_V1 + bool "Gainstrong MiniBox V1.0 support" + select SOC_AR933X @@ -27,9 +27,9 @@ config ATH79_MACH_GS_OOLITE bool "GS Oolite V1 support" select SOC_AR933X ---- a/arch/mips/ath79/Makefile 2015-08-10 23:27:44.599500173 +0200 -+++ b/arch/mips/ath79/Makefile 2015-08-10 23:29:25.090929262 +0200 -@@ -75,6 +75,7 @@ +--- a/arch/mips/ath79/Makefile ++++ b/arch/mips/ath79/Makefile +@@ -80,6 +80,7 @@ obj-$(CONFIG_ATH79_MACH_EPG5000) += mach obj-$(CONFIG_ATH79_MACH_ESR1750) += mach-esr1750.o obj-$(CONFIG_ATH79_MACH_F9K1115V2) += mach-f9k1115v2.o obj-$(CONFIG_ATH79_MACH_GL_INET) += mach-gl-inet.o diff --git a/target/linux/ar71xx/patches-4.1/814-MIPS-ath79-add-blackswift.patch b/target/linux/ar71xx/patches-4.1/814-MIPS-ath79-add-blackswift.patch index cc01cd6bd2..cfa0a6bca5 100644 --- a/target/linux/ar71xx/patches-4.1/814-MIPS-ath79-add-blackswift.patch +++ b/target/linux/ar71xx/patches-4.1/814-MIPS-ath79-add-blackswift.patch @@ -1,6 +1,6 @@ --- a/arch/mips/ath79/Kconfig +++ b/arch/mips/ath79/Kconfig -@@ -904,6 +904,16 @@ config ATH79_MACH_EAP7660D +@@ -914,6 +914,16 @@ config ATH79_MACH_EAP7660D select ATH79_DEV_LEDS_GPIO select ATH79_DEV_M25P80 diff --git a/target/linux/ar71xx/patches-4.1/814-MIPS-ath79-add-tplink-tl-wdr6500-v2-support.patch b/target/linux/ar71xx/patches-4.1/814-MIPS-ath79-add-tplink-tl-wdr6500-v2-support.patch index 1955bfaa7b..675489f516 100644 --- a/target/linux/ar71xx/patches-4.1/814-MIPS-ath79-add-tplink-tl-wdr6500-v2-support.patch +++ b/target/linux/ar71xx/patches-4.1/814-MIPS-ath79-add-tplink-tl-wdr6500-v2-support.patch @@ -1,6 +1,6 @@ --- a/arch/mips/ath79/Kconfig +++ b/arch/mips/ath79/Kconfig -@@ -1053,6 +1053,17 @@ config ATH79_MACH_TL_WDR4300 +@@ -1063,6 +1063,17 @@ config ATH79_MACH_TL_WDR4300 select ATH79_DEV_USB select ATH79_DEV_WMAC @@ -20,7 +20,7 @@ select SOC_AR933X --- a/arch/mips/ath79/machtypes.h +++ b/arch/mips/ath79/machtypes.h -@@ -155,6 +155,7 @@ enum ath79_mach_type { +@@ -156,6 +156,7 @@ enum ath79_mach_type { ATH79_MACH_TL_WA901ND_V3, /* TP-LINK TL-WA901ND v3 */ ATH79_MACH_TL_WDR3500, /* TP-LINK TL-WDR3500 */ ATH79_MACH_TL_WDR4300, /* TP-LINK TL-WDR4300 */ @@ -30,7 +30,7 @@ ATH79_MACH_TL_WR1043ND, /* TP-LINK TL-WR1043ND */ --- a/arch/mips/ath79/Makefile +++ b/arch/mips/ath79/Makefile -@@ -131,6 +131,7 @@ obj-$(CONFIG_ATH79_MACH_TL_WA901ND) += m +@@ -132,6 +132,7 @@ obj-$(CONFIG_ATH79_MACH_TL_WA901ND) += m obj-$(CONFIG_ATH79_MACH_TL_WA901ND_V2) += mach-tl-wa901nd-v2.o obj-$(CONFIG_ATH79_MACH_TL_WDR3500) += mach-tl-wdr3500.o obj-$(CONFIG_ATH79_MACH_TL_WDR4300) += mach-tl-wdr4300.o diff --git a/target/linux/ar71xx/patches-4.1/815-MIPS-ath79-add-mr1750-support.patch b/target/linux/ar71xx/patches-4.1/815-MIPS-ath79-add-mr1750-support.patch index ec6f08ae43..6f280860b9 100644 --- a/target/linux/ar71xx/patches-4.1/815-MIPS-ath79-add-mr1750-support.patch +++ b/target/linux/ar71xx/patches-4.1/815-MIPS-ath79-add-mr1750-support.patch @@ -1,6 +1,6 @@ --- a/arch/mips/ath79/Kconfig +++ b/arch/mips/ath79/Kconfig -@@ -900,6 +900,16 @@ config ATH79_MACH_CAP4200AG +@@ -910,6 +910,16 @@ config ATH79_MACH_CAP4200AG select ATH79_DEV_M25P80 select ATH79_DEV_WMAC @@ -19,7 +19,7 @@ select SOC_QCA955X --- a/arch/mips/ath79/Makefile +++ b/arch/mips/ath79/Makefile -@@ -91,6 +91,7 @@ obj-$(CONFIG_ATH79_MACH_HORNET_UB) += ma +@@ -92,6 +92,7 @@ obj-$(CONFIG_ATH79_MACH_HORNET_UB) += ma obj-$(CONFIG_ATH79_MACH_MC_MAC1200R) += mach-mc-mac1200r.o obj-$(CONFIG_ATH79_MACH_MR12) += mach-mr12.o obj-$(CONFIG_ATH79_MACH_MR16) += mach-mr16.o @@ -29,7 +29,7 @@ obj-$(CONFIG_ATH79_MACH_MYNET_N600) += mach-mynet-n600.o --- a/arch/mips/ath79/machtypes.h +++ b/arch/mips/ath79/machtypes.h -@@ -80,6 +80,7 @@ enum ath79_mach_type { +@@ -81,6 +81,7 @@ enum ath79_mach_type { ATH79_MACH_HORNET_UB, /* ALFA Networks Hornet-UB */ ATH79_MACH_MR12, /* Cisco Meraki MR12 */ ATH79_MACH_MR16, /* Cisco Meraki MR16 */ diff --git a/target/linux/ar71xx/patches-4.1/816-MIPS-ath79-add-tl-wdr3320-v2-support.patch b/target/linux/ar71xx/patches-4.1/816-MIPS-ath79-add-tl-wdr3320-v2-support.patch index 5c58fd7527..aa78d599d5 100644 --- a/target/linux/ar71xx/patches-4.1/816-MIPS-ath79-add-tl-wdr3320-v2-support.patch +++ b/target/linux/ar71xx/patches-4.1/816-MIPS-ath79-add-tl-wdr3320-v2-support.patch @@ -1,6 +1,6 @@ --- a/arch/mips/ath79/Kconfig +++ b/arch/mips/ath79/Kconfig -@@ -1055,6 +1055,17 @@ config ATH79_MACH_TL_WA901ND_V2 +@@ -1065,6 +1065,17 @@ config ATH79_MACH_TL_WA901ND_V2 select ATH79_DEV_M25P80 select ATH79_DEV_WMAC @@ -20,7 +20,7 @@ select SOC_AR934X --- a/arch/mips/ath79/machtypes.h +++ b/arch/mips/ath79/machtypes.h -@@ -155,6 +155,7 @@ enum ath79_mach_type { +@@ -156,6 +156,7 @@ enum ath79_mach_type { ATH79_MACH_TL_WA901ND, /* TP-LINK TL-WA901ND */ ATH79_MACH_TL_WA901ND_V2, /* TP-LINK TL-WA901ND v2 */ ATH79_MACH_TL_WA901ND_V3, /* TP-LINK TL-WA901ND v3 */ @@ -30,7 +30,7 @@ ATH79_MACH_TL_WDR6500_V2, /* TP-LINK TL-WDR6500 v2 */ --- a/arch/mips/ath79/Makefile +++ b/arch/mips/ath79/Makefile -@@ -131,6 +131,7 @@ obj-$(CONFIG_ATH79_MACH_TL_WA7210N_V2) + +@@ -132,6 +132,7 @@ obj-$(CONFIG_ATH79_MACH_TL_WA7210N_V2) + obj-$(CONFIG_ATH79_MACH_TL_WA830RE_V2) += mach-tl-wa830re-v2.o obj-$(CONFIG_ATH79_MACH_TL_WA901ND) += mach-tl-wa901nd.o obj-$(CONFIG_ATH79_MACH_TL_WA901ND_V2) += mach-tl-wa901nd-v2.o diff --git a/target/linux/bcm53xx/patches-4.1/191-usb-xhci-add-Broadcom-specific-fake-doorbell.patch b/target/linux/bcm53xx/patches-4.1/191-usb-xhci-add-Broadcom-specific-fake-doorbell.patch index 0209e68476..f25a9e5f12 100644 --- a/target/linux/bcm53xx/patches-4.1/191-usb-xhci-add-Broadcom-specific-fake-doorbell.patch +++ b/target/linux/bcm53xx/patches-4.1/191-usb-xhci-add-Broadcom-specific-fake-doorbell.patch @@ -74,7 +74,7 @@ Signed-off-by: Hauke Mehrtens /* * Set the run bit and wait for the host to be running. */ -@@ -556,10 +589,25 @@ int xhci_init(struct usb_hcd *hcd) +@@ -557,10 +590,25 @@ int xhci_init(struct usb_hcd *hcd) static int xhci_run_finished(struct xhci_hcd *xhci) { @@ -103,7 +103,7 @@ Signed-off-by: Hauke Mehrtens xhci->shared_hcd->state = HC_STATE_RUNNING; xhci->cmd_ring_state = CMD_RING_STATE_RUNNING; -@@ -569,6 +617,9 @@ static int xhci_run_finished(struct xhci +@@ -570,6 +618,9 @@ static int xhci_run_finished(struct xhci xhci_dbg_trace(xhci, trace_xhci_dbg_init, "Finished xhci_run for USB3 roothub"); return 0; diff --git a/target/linux/brcm2708/patches-4.1/0001-Main-bcm2708-bcm2709-linux-port.patch b/target/linux/brcm2708/patches-4.1/0001-Main-bcm2708-bcm2709-linux-port.patch index 79891f8504..a969282e1b 100644 --- a/target/linux/brcm2708/patches-4.1/0001-Main-bcm2708-bcm2709-linux-port.patch +++ b/target/linux/brcm2708/patches-4.1/0001-Main-bcm2708-bcm2709-linux-port.patch @@ -197,7 +197,7 @@ Signed-off-by: Noralf Trønnes config DEBUG_AT91_UART --- a/arch/arm/Makefile +++ b/arch/arm/Makefile -@@ -147,6 +147,8 @@ textofs-$(CONFIG_ARCH_AXXIA) := 0x003080 +@@ -155,6 +155,8 @@ textofs-$(CONFIG_ARCH_AXXIA) := 0x003080 # Machine directory name. This list is sorted alphanumerically # by CONFIG_* macro name. diff --git a/target/linux/brcm2708/patches-4.1/0011-bcm2708-alsa-sound-driver.patch b/target/linux/brcm2708/patches-4.1/0011-bcm2708-alsa-sound-driver.patch index 7e6555dc81..31c06cfc46 100644 --- a/target/linux/brcm2708/patches-4.1/0011-bcm2708-alsa-sound-driver.patch +++ b/target/linux/brcm2708/patches-4.1/0011-bcm2708-alsa-sound-driver.patch @@ -197,7 +197,7 @@ Signed-off-by: Noralf Trønnes for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { --- a/sound/arm/Kconfig +++ b/sound/arm/Kconfig -@@ -39,5 +39,13 @@ config SND_PXA2XX_AC97 +@@ -40,5 +40,13 @@ config SND_PXA2XX_AC97 Say Y or M if you want to support any AC97 codec attached to the PXA2xx AC97 interface. diff --git a/target/linux/brcm2708/patches-4.1/0097-serial-8250-Don-t-crash-when-nr_uarts-is-0.patch b/target/linux/brcm2708/patches-4.1/0097-serial-8250-Don-t-crash-when-nr_uarts-is-0.patch index 856658402a..4f0ceab235 100644 --- a/target/linux/brcm2708/patches-4.1/0097-serial-8250-Don-t-crash-when-nr_uarts-is-0.patch +++ b/target/linux/brcm2708/patches-4.1/0097-serial-8250-Don-t-crash-when-nr_uarts-is-0.patch @@ -9,7 +9,7 @@ Subject: [PATCH 097/171] serial: 8250: Don't crash when nr_uarts is 0 --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c -@@ -3262,6 +3262,8 @@ static void __init serial8250_isa_init_p +@@ -3270,6 +3270,8 @@ static void __init serial8250_isa_init_p if (nr_uarts > UART_NR) nr_uarts = UART_NR; diff --git a/target/linux/brcm2708/patches-4.1/0121-spidev-Add-spidev-compatible-string-to-silence-warni.patch b/target/linux/brcm2708/patches-4.1/0121-spidev-Add-spidev-compatible-string-to-silence-warni.patch index 5db9588bc4..22f418ad14 100644 --- a/target/linux/brcm2708/patches-4.1/0121-spidev-Add-spidev-compatible-string-to-silence-warni.patch +++ b/target/linux/brcm2708/patches-4.1/0121-spidev-Add-spidev-compatible-string-to-silence-warni.patch @@ -11,7 +11,7 @@ See: https://github.com/raspberrypi/linux/issues/1054 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c -@@ -706,6 +706,7 @@ static struct class *spidev_class; +@@ -707,6 +707,7 @@ static struct class *spidev_class; #ifdef CONFIG_OF static const struct of_device_id spidev_dt_ids[] = { { .compatible = "rohm,dh2228fv" }, diff --git a/target/linux/generic/patches-4.1/760-8139cp-fixes-from-4.3.patch b/target/linux/generic/patches-4.1/760-8139cp-fixes-from-4.3.patch index 6cbcf2e9f7..832e425632 100644 --- a/target/linux/generic/patches-4.1/760-8139cp-fixes-from-4.3.patch +++ b/target/linux/generic/patches-4.1/760-8139cp-fixes-from-4.3.patch @@ -113,8 +113,6 @@ Date: Fri Sep 18 00:19:08 2015 +0100 Signed-off-by: David Woodhouse Signed-off-by: David S. Miller -diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c -index d79e33b..686334f 100644 --- a/drivers/net/ethernet/realtek/8139cp.c +++ b/drivers/net/ethernet/realtek/8139cp.c @@ -157,6 +157,7 @@ enum { @@ -133,7 +131,7 @@ index d79e33b..686334f 100644 unsigned rx_buf_sz; unsigned wol_enabled : 1; /* Is Wake-on-LAN enabled? */ -@@ -665,7 +667,7 @@ static void cp_tx (struct cp_private *cp) +@@ -665,7 +667,7 @@ static void cp_tx (struct cp_private *cp BUG_ON(!skb); dma_unmap_single(&cp->pdev->dev, le64_to_cpu(txd->addr), @@ -142,7 +140,7 @@ index d79e33b..686334f 100644 PCI_DMA_TODEVICE); if (status & LastFrag) { -@@ -733,7 +735,7 @@ static netdev_tx_t cp_start_xmit (struct sk_buff *skb, +@@ -733,7 +735,7 @@ static netdev_tx_t cp_start_xmit (struct { struct cp_private *cp = netdev_priv(dev); unsigned entry; @@ -151,7 +149,7 @@ index d79e33b..686334f 100644 unsigned long intr_flags; __le32 opts2; int mss = 0; -@@ -753,6 +755,21 @@ static netdev_tx_t cp_start_xmit (struct sk_buff *skb, +@@ -753,6 +755,21 @@ static netdev_tx_t cp_start_xmit (struct mss = skb_shinfo(skb)->gso_size; opts2 = cpu_to_le32(cp_tx_vlan_tag(skb)); @@ -173,7 +171,7 @@ index d79e33b..686334f 100644 if (skb_shinfo(skb)->nr_frags == 0) { struct cp_desc *txd = &cp->tx_ring[entry]; -@@ -768,31 +785,20 @@ static netdev_tx_t cp_start_xmit (struct sk_buff *skb, +@@ -768,31 +785,20 @@ static netdev_tx_t cp_start_xmit (struct txd->addr = cpu_to_le64(mapping); wmb(); @@ -211,7 +209,7 @@ index d79e33b..686334f 100644 /* We must give this initial chunk to the device last. * Otherwise we could race with the device. -@@ -805,14 +811,14 @@ static netdev_tx_t cp_start_xmit (struct sk_buff *skb, +@@ -805,14 +811,14 @@ static netdev_tx_t cp_start_xmit (struct goto out_dma_error; cp->tx_skb[entry] = skb; @@ -228,7 +226,7 @@ index d79e33b..686334f 100644 len = skb_frag_size(this_frag); mapping = dma_map_single(&cp->pdev->dev, skb_frag_address(this_frag), -@@ -824,19 +830,7 @@ static netdev_tx_t cp_start_xmit (struct sk_buff *skb, +@@ -824,19 +830,7 @@ static netdev_tx_t cp_start_xmit (struct eor = (entry == (CP_TX_RING_SIZE - 1)) ? RingEnd : 0; @@ -249,7 +247,7 @@ index d79e33b..686334f 100644 if (frag == skb_shinfo(skb)->nr_frags - 1) ctrl |= LastFrag; -@@ -849,8 +843,8 @@ static netdev_tx_t cp_start_xmit (struct sk_buff *skb, +@@ -849,8 +843,8 @@ static netdev_tx_t cp_start_xmit (struct txd->opts1 = cpu_to_le32(ctrl); wmb(); @@ -259,7 +257,7 @@ index d79e33b..686334f 100644 } txd = &cp->tx_ring[first_entry]; -@@ -858,27 +852,17 @@ static netdev_tx_t cp_start_xmit (struct sk_buff *skb, +@@ -858,27 +852,17 @@ static netdev_tx_t cp_start_xmit (struct txd->addr = cpu_to_le64(first_mapping); wmb(); @@ -294,7 +292,7 @@ index d79e33b..686334f 100644 if (TX_BUFFS_AVAIL(cp) <= (MAX_SKB_FRAGS + 1)) netif_stop_queue(dev); -@@ -1115,6 +1099,7 @@ static int cp_init_rings (struct cp_private *cp) +@@ -1115,6 +1099,7 @@ static int cp_init_rings (struct cp_priv { memset(cp->tx_ring, 0, sizeof(struct cp_desc) * CP_TX_RING_SIZE); cp->tx_ring[CP_TX_RING_SIZE - 1].opts1 = cpu_to_le32(RingEnd); @@ -302,7 +300,7 @@ index d79e33b..686334f 100644 cp_init_rings_index(cp); -@@ -1151,7 +1136,7 @@ static void cp_clean_rings (struct cp_private *cp) +@@ -1151,7 +1136,7 @@ static void cp_clean_rings (struct cp_pr desc = cp->rx_ring + i; dma_unmap_single(&cp->pdev->dev,le64_to_cpu(desc->addr), cp->rx_buf_sz, PCI_DMA_FROMDEVICE); @@ -311,7 +309,7 @@ index d79e33b..686334f 100644 } } -@@ -1164,7 +1149,7 @@ static void cp_clean_rings (struct cp_private *cp) +@@ -1164,7 +1149,7 @@ static void cp_clean_rings (struct cp_pr le32_to_cpu(desc->opts1) & 0xffff, PCI_DMA_TODEVICE); if (le32_to_cpu(desc->opts1) & LastFrag) @@ -320,7 +318,7 @@ index d79e33b..686334f 100644 cp->dev->stats.tx_dropped++; } } -@@ -1172,6 +1157,7 @@ static void cp_clean_rings (struct cp_private *cp) +@@ -1172,6 +1157,7 @@ static void cp_clean_rings (struct cp_pr memset(cp->rx_ring, 0, sizeof(struct cp_desc) * CP_RX_RING_SIZE); memset(cp->tx_ring, 0, sizeof(struct cp_desc) * CP_TX_RING_SIZE); @@ -328,7 +326,7 @@ index d79e33b..686334f 100644 memset(cp->rx_skb, 0, sizeof(struct sk_buff *) * CP_RX_RING_SIZE); memset(cp->tx_skb, 0, sizeof(struct sk_buff *) * CP_TX_RING_SIZE); -@@ -1249,7 +1235,7 @@ static void cp_tx_timeout(struct net_device *dev) +@@ -1249,7 +1235,7 @@ static void cp_tx_timeout(struct net_dev { struct cp_private *cp = netdev_priv(dev); unsigned long flags; @@ -337,7 +335,7 @@ index d79e33b..686334f 100644 netdev_warn(dev, "Transmit timeout, status %2x %4x %4x %4x\n", cpr8(Cmd), cpr16(CpCmd), -@@ -1257,13 +1243,26 @@ static void cp_tx_timeout(struct net_device *dev) +@@ -1257,13 +1243,26 @@ static void cp_tx_timeout(struct net_dev spin_lock_irqsave(&cp->lock, flags); diff --git a/target/linux/generic/patches-4.1/761-8139cp-fixes-from-4.4.patch b/target/linux/generic/patches-4.1/761-8139cp-fixes-from-4.4.patch index cb605e531c..8fdf5f382f 100644 --- a/target/linux/generic/patches-4.1/761-8139cp-fixes-from-4.4.patch +++ b/target/linux/generic/patches-4.1/761-8139cp-fixes-from-4.4.patch @@ -33,8 +33,6 @@ Date: Wed Sep 23 09:46:09 2015 +0100 Signed-off-by: David Woodhouse Signed-off-by: David S. Miller -diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c -index 686334f..deae10d 100644 --- a/drivers/net/ethernet/realtek/8139cp.c +++ b/drivers/net/ethernet/realtek/8139cp.c @@ -175,7 +175,7 @@ enum { @@ -46,7 +44,7 @@ index 686334f..deae10d 100644 TxError = (1 << 23), /* Tx error summary */ RxError = (1 << 20), /* Rx error summary */ IPCS = (1 << 18), /* Calculate IP checksum */ -@@ -754,10 +754,16 @@ static netdev_tx_t cp_start_xmit (struct sk_buff *skb, +@@ -754,10 +754,16 @@ static netdev_tx_t cp_start_xmit (struct eor = (entry == (CP_TX_RING_SIZE - 1)) ? RingEnd : 0; mss = skb_shinfo(skb)->gso_size; @@ -64,7 +62,7 @@ index 686334f..deae10d 100644 else if (skb->ip_summed == CHECKSUM_PARTIAL) { const struct iphdr *ip = ip_hdr(skb); if (ip->protocol == IPPROTO_TCP) -@@ -1852,6 +1858,15 @@ static void cp_set_d3_state (struct cp_private *cp) +@@ -1852,6 +1858,15 @@ static void cp_set_d3_state (struct cp_p pci_set_power_state (cp->pdev, PCI_D3hot); } @@ -80,7 +78,7 @@ index 686334f..deae10d 100644 static const struct net_device_ops cp_netdev_ops = { .ndo_open = cp_open, .ndo_stop = cp_close, -@@ -1864,6 +1879,7 @@ static const struct net_device_ops cp_netdev_ops = { +@@ -1864,6 +1879,7 @@ static const struct net_device_ops cp_ne .ndo_tx_timeout = cp_tx_timeout, .ndo_set_features = cp_set_features, .ndo_change_mtu = cp_change_mtu, @@ -88,7 +86,7 @@ index 686334f..deae10d 100644 #ifdef CONFIG_NET_POLL_CONTROLLER .ndo_poll_controller = cp_poll_controller, -@@ -1983,12 +1999,12 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) +@@ -1983,12 +1999,12 @@ static int cp_init_one (struct pci_dev * dev->ethtool_ops = &cp_ethtool_ops; dev->watchdog_timeo = TX_TIMEOUT; diff --git a/target/linux/generic/patches-4.1/810-pci_disable_common_quirks.patch b/target/linux/generic/patches-4.1/810-pci_disable_common_quirks.patch index 325d189912..89d93e1a9e 100644 --- a/target/linux/generic/patches-4.1/810-pci_disable_common_quirks.patch +++ b/target/linux/generic/patches-4.1/810-pci_disable_common_quirks.patch @@ -23,7 +23,7 @@ /* The Mellanox Tavor device gives false positive parity errors * Mark this device with a broken_parity_status, to allow * PCI scanning code to "skip" this now blacklisted device. -@@ -2949,6 +2950,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I +@@ -2965,6 +2966,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata); @@ -31,7 +31,7 @@ /* * Ivytown NTB BAR sizes are misreported by the hardware due to an erratum. To -@@ -3005,6 +3007,8 @@ static void fixup_debug_report(struct pc +@@ -3021,6 +3023,8 @@ static void fixup_debug_report(struct pc } } @@ -40,7 +40,7 @@ /* * Some BIOS implementations leave the Intel GPU interrupts enabled, * even though no one is handling them (f.e. i915 driver is never loaded). -@@ -3039,6 +3043,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN +@@ -3055,6 +3059,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0152, disable_igfx_irq); diff --git a/target/linux/generic/patches-4.1/902-debloat_proc.patch b/target/linux/generic/patches-4.1/902-debloat_proc.patch index bf85100283..8207dadffe 100644 --- a/target/linux/generic/patches-4.1/902-debloat_proc.patch +++ b/target/linux/generic/patches-4.1/902-debloat_proc.patch @@ -79,17 +79,17 @@ } --- a/kernel/irq/proc.c +++ b/kernel/irq/proc.c -@@ -325,6 +325,9 @@ void register_irq_proc(unsigned int irq, - { +@@ -327,6 +327,9 @@ void register_irq_proc(unsigned int irq, + static DEFINE_MUTEX(register_lock); char name [MAX_NAMELEN]; + if (IS_ENABLED(CONFIG_PROC_STRIPPED) && !IS_ENABLED(CONFIG_SMP)) + return; + - if (!root_irq_dir || (desc->irq_data.chip == &no_irq_chip) || desc->dir) + if (!root_irq_dir || (desc->irq_data.chip == &no_irq_chip)) return; -@@ -361,6 +364,9 @@ void unregister_irq_proc(unsigned int ir +@@ -376,6 +379,9 @@ void unregister_irq_proc(unsigned int ir { char name [MAX_NAMELEN]; @@ -99,7 +99,7 @@ if (!root_irq_dir || !desc->dir) return; #ifdef CONFIG_SMP -@@ -396,6 +402,9 @@ void init_irq_proc(void) +@@ -411,6 +417,9 @@ void init_irq_proc(void) unsigned int irq; struct irq_desc *desc; diff --git a/target/linux/generic/patches-4.1/903-debloat_direct_io.patch b/target/linux/generic/patches-4.1/903-debloat_direct_io.patch index b428a0cffc..0bc9040170 100644 --- a/target/linux/generic/patches-4.1/903-debloat_direct_io.patch +++ b/target/linux/generic/patches-4.1/903-debloat_direct_io.patch @@ -26,7 +26,7 @@ endif --- a/include/linux/fs.h +++ b/include/linux/fs.h -@@ -2649,6 +2649,7 @@ enum { +@@ -2647,6 +2647,7 @@ enum { DIO_SKIP_DIO_COUNT = 0x08, }; @@ -34,7 +34,7 @@ void dio_end_io(struct bio *bio, int error); ssize_t __blockdev_direct_IO(struct kiocb *iocb, struct inode *inode, -@@ -2656,6 +2657,18 @@ ssize_t __blockdev_direct_IO(struct kioc +@@ -2654,6 +2655,18 @@ ssize_t __blockdev_direct_IO(struct kioc loff_t offset, get_block_t get_block, dio_iodone_t end_io, dio_submit_t submit_io, int flags); diff --git a/target/linux/ipq806x/patches-4.1/300-arch-arm-force-ZRELADDR-on-arch-qcom.patch b/target/linux/ipq806x/patches-4.1/300-arch-arm-force-ZRELADDR-on-arch-qcom.patch index 51ebc193b0..18b7a80b12 100644 --- a/target/linux/ipq806x/patches-4.1/300-arch-arm-force-ZRELADDR-on-arch-qcom.patch +++ b/target/linux/ipq806x/patches-4.1/300-arch-arm-force-ZRELADDR-on-arch-qcom.patch @@ -44,7 +44,7 @@ Signed-off-by: Mathieu Olivari select GENERIC_CLOCKEVENTS --- a/arch/arm/Makefile +++ b/arch/arm/Makefile -@@ -240,9 +240,11 @@ MACHINE := arch/arm/mach-$(word 1,$(mac +@@ -248,9 +248,11 @@ MACHINE := arch/arm/mach-$(word 1,$(mac else MACHINE := endif diff --git a/target/linux/ixp4xx/patches-4.1/160-delayed_uart_io.patch b/target/linux/ixp4xx/patches-4.1/160-delayed_uart_io.patch index e44740d6f7..9dc184bf2c 100644 --- a/target/linux/ixp4xx/patches-4.1/160-delayed_uart_io.patch +++ b/target/linux/ixp4xx/patches-4.1/160-delayed_uart_io.patch @@ -1,6 +1,6 @@ --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c -@@ -438,6 +438,20 @@ static void mem_serial_out(struct uart_p +@@ -446,6 +446,20 @@ static void mem_serial_out(struct uart_p writeb(value, p->membase + offset); } @@ -21,7 +21,7 @@ static void mem32_serial_out(struct uart_port *p, int offset, int value) { offset = offset << p->regshift; -@@ -505,6 +519,11 @@ static void set_io_from_upio(struct uart +@@ -513,6 +527,11 @@ static void set_io_from_upio(struct uart p->serial_out = mem32be_serial_out; break; @@ -33,7 +33,7 @@ #if defined(CONFIG_MIPS_ALCHEMY) || defined(CONFIG_SERIAL_8250_RT288X) case UPIO_AU: p->serial_in = au_serial_in; -@@ -531,6 +550,7 @@ serial_port_out_sync(struct uart_port *p +@@ -539,6 +558,7 @@ serial_port_out_sync(struct uart_port *p case UPIO_MEM: case UPIO_MEM32: case UPIO_MEM32BE: @@ -41,7 +41,7 @@ case UPIO_AU: p->serial_out(p, offset, value); p->serial_in(p, UART_LCR); /* safe, no side-effects */ -@@ -2768,6 +2788,7 @@ static int serial8250_request_std_resour +@@ -2776,6 +2796,7 @@ static int serial8250_request_std_resour case UPIO_MEM32: case UPIO_MEM32BE: case UPIO_MEM: @@ -49,7 +49,7 @@ if (!port->mapbase) break; -@@ -2805,6 +2826,7 @@ static void serial8250_release_std_resou +@@ -2813,6 +2834,7 @@ static void serial8250_release_std_resou case UPIO_MEM32: case UPIO_MEM32BE: case UPIO_MEM: @@ -57,7 +57,7 @@ if (!port->mapbase) break; -@@ -3693,6 +3715,7 @@ static int serial8250_probe(struct platf +@@ -3701,6 +3723,7 @@ static int serial8250_probe(struct platf uart.port.set_termios = p->set_termios; uart.port.pm = p->pm; uart.port.dev = &dev->dev; @@ -65,7 +65,7 @@ uart.port.irqflags |= irqflag; ret = serial8250_register_8250_port(&uart); if (ret < 0) { -@@ -3849,6 +3872,7 @@ int serial8250_register_8250_port(struct +@@ -3857,6 +3880,7 @@ int serial8250_register_8250_port(struct uart->bugs = up->bugs; uart->port.mapbase = up->port.mapbase; uart->port.mapsize = up->port.mapsize; diff --git a/target/linux/lantiq/patches-4.1/0033-SPI-MIPS-lantiq-adds-spi-xway.patch b/target/linux/lantiq/patches-4.1/0033-SPI-MIPS-lantiq-adds-spi-xway.patch index 5325b83373..7806f64370 100644 --- a/target/linux/lantiq/patches-4.1/0033-SPI-MIPS-lantiq-adds-spi-xway.patch +++ b/target/linux/lantiq/patches-4.1/0033-SPI-MIPS-lantiq-adds-spi-xway.patch @@ -18,7 +18,7 @@ Signed-off-by: John Crispin --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig -@@ -626,6 +626,14 @@ +@@ -626,6 +626,14 @@ config SPI_NUC900 help SPI driver for Nuvoton NUC900 series ARM SoCs @@ -35,7 +35,7 @@ Signed-off-by: John Crispin # --- a/drivers/spi/Makefile +++ b/drivers/spi/Makefile -@@ -90,3 +90,4 @@ +@@ -90,3 +90,4 @@ obj-$(CONFIG_SPI_TXX9) += spi-txx9.o obj-$(CONFIG_SPI_XCOMM) += spi-xcomm.o obj-$(CONFIG_SPI_XILINX) += spi-xilinx.o obj-$(CONFIG_SPI_XTENSA_XTFPGA) += spi-xtensa-xtfpga.o diff --git a/target/linux/oxnas/patches-4.1/300-introduce-oxnas-platform.patch b/target/linux/oxnas/patches-4.1/300-introduce-oxnas-platform.patch index 3130a021e8..9f78d3c56c 100644 --- a/target/linux/oxnas/patches-4.1/300-introduce-oxnas-platform.patch +++ b/target/linux/oxnas/patches-4.1/300-introduce-oxnas-platform.patch @@ -30,7 +30,7 @@ source "arch/arm/mach-pxa/Kconfig" --- a/arch/arm/Makefile +++ b/arch/arm/Makefile -@@ -187,6 +187,7 @@ machine-$(CONFIG_ARCH_NSPIRE) += nspire +@@ -195,6 +195,7 @@ machine-$(CONFIG_ARCH_NSPIRE) += nspire machine-$(CONFIG_ARCH_OMAP1) += omap1 machine-$(CONFIG_ARCH_OMAP2PLUS) += omap2 machine-$(CONFIG_ARCH_ORION5X) += orion5x diff --git a/target/linux/sunxi/patches-4.1/122-mtd-nand-sunxi-add-partition-support.patch b/target/linux/sunxi/patches-4.1/122-mtd-nand-sunxi-add-partition-support.patch index f61e4a0787..cdf573891f 100644 --- a/target/linux/sunxi/patches-4.1/122-mtd-nand-sunxi-add-partition-support.patch +++ b/target/linux/sunxi/patches-4.1/122-mtd-nand-sunxi-add-partition-support.patch @@ -24,7 +24,7 @@ Signed-off-by: Hans de Goede --- a/drivers/mtd/nand/sunxi_nand.c +++ b/drivers/mtd/nand/sunxi_nand.c -@@ -202,6 +202,23 @@ struct sunxi_nand_hw_ecc { +@@ -206,6 +206,23 @@ struct sunxi_nand_hw_ecc { }; /* @@ -48,7 +48,7 @@ Signed-off-by: Hans de Goede * NAND chip structure: stores NAND chip device related information * * @node: used to store NAND chips into a list -@@ -521,7 +538,7 @@ static int sunxi_nfc_hw_ecc_read_page(st +@@ -525,7 +542,7 @@ static int sunxi_nfc_hw_ecc_read_page(st int oob_required, int page) { struct sunxi_nfc *nfc = to_sunxi_nfc(chip->controller); @@ -57,7 +57,7 @@ Signed-off-by: Hans de Goede struct nand_ecclayout *layout = ecc->layout; struct sunxi_nand_hw_ecc *data = ecc->priv; unsigned int max_bitflips = 0; -@@ -607,7 +624,7 @@ static int sunxi_nfc_hw_ecc_write_page(s +@@ -611,7 +628,7 @@ static int sunxi_nfc_hw_ecc_write_page(s const uint8_t *buf, int oob_required) { struct sunxi_nfc *nfc = to_sunxi_nfc(chip->controller); @@ -66,7 +66,7 @@ Signed-off-by: Hans de Goede struct nand_ecclayout *layout = ecc->layout; struct sunxi_nand_hw_ecc *data = ecc->priv; int offset; -@@ -681,7 +698,7 @@ static int sunxi_nfc_hw_syndrome_ecc_rea +@@ -679,7 +696,7 @@ static int sunxi_nfc_hw_syndrome_ecc_rea int page) { struct sunxi_nfc *nfc = to_sunxi_nfc(chip->controller); @@ -75,7 +75,7 @@ Signed-off-by: Hans de Goede struct sunxi_nand_hw_ecc *data = ecc->priv; unsigned int max_bitflips = 0; uint8_t *oob = chip->oob_poi; -@@ -749,7 +766,7 @@ static int sunxi_nfc_hw_syndrome_ecc_wri +@@ -747,7 +764,7 @@ static int sunxi_nfc_hw_syndrome_ecc_wri int oob_required) { struct sunxi_nfc *nfc = to_sunxi_nfc(chip->controller); @@ -84,7 +84,7 @@ Signed-off-by: Hans de Goede struct sunxi_nand_hw_ecc *data = ecc->priv; uint8_t *oob = chip->oob_poi; int offset = 0; -@@ -1099,8 +1116,13 @@ static int sunxi_nand_ecc_init(struct mt +@@ -1091,8 +1108,13 @@ static int sunxi_nand_ecc_init(struct mt ecc->strength = nand->ecc_strength_ds; } @@ -100,7 +100,7 @@ Signed-off-by: Hans de Goede ecc->mode = NAND_ECC_HW; -@@ -1135,12 +1157,39 @@ static int sunxi_nand_ecc_init(struct mt +@@ -1127,12 +1149,39 @@ static int sunxi_nand_ecc_init(struct mt return 0; } @@ -141,7 +141,7 @@ Signed-off-by: Hans de Goede struct mtd_info *mtd; struct nand_chip *nand; int nsels; -@@ -1269,8 +1318,14 @@ static int sunxi_nand_chip_init(struct d +@@ -1261,8 +1310,14 @@ static int sunxi_nand_chip_init(struct d return ret; } diff --git a/target/linux/sunxi/patches-4.1/123-mtd-nand-sunxi-add-hw-randomizer-support.patch b/target/linux/sunxi/patches-4.1/123-mtd-nand-sunxi-add-hw-randomizer-support.patch index e169bfae1f..4590b8f842 100644 --- a/target/linux/sunxi/patches-4.1/123-mtd-nand-sunxi-add-hw-randomizer-support.patch +++ b/target/linux/sunxi/patches-4.1/123-mtd-nand-sunxi-add-hw-randomizer-support.patch @@ -13,7 +13,7 @@ Signed-off-by: Hans de Goede --- a/drivers/mtd/nand/sunxi_nand.c +++ b/drivers/mtd/nand/sunxi_nand.c -@@ -206,10 +206,12 @@ struct sunxi_nand_hw_ecc { +@@ -210,10 +210,12 @@ struct sunxi_nand_hw_ecc { * * @part: base paritition structure * @ecc: per-partition ECC info @@ -26,7 +26,7 @@ Signed-off-by: Hans de Goede }; static inline struct sunxi_nand_part * -@@ -219,6 +221,29 @@ to_sunxi_nand_part(struct nand_part *par +@@ -223,6 +225,29 @@ to_sunxi_nand_part(struct nand_part *par } /* @@ -56,7 +56,7 @@ Signed-off-by: Hans de Goede * NAND chip structure: stores NAND chip device related information * * @node: used to store NAND chips into a list -@@ -233,6 +258,7 @@ struct sunxi_nand_chip { +@@ -237,6 +262,7 @@ struct sunxi_nand_chip { struct list_head node; struct nand_chip nand; struct mtd_info mtd; @@ -64,7 +64,7 @@ Signed-off-by: Hans de Goede unsigned long clk_rate; int selected; int nsels; -@@ -489,6 +515,185 @@ static void sunxi_nfc_write_buf(struct m +@@ -493,6 +519,185 @@ static void sunxi_nfc_write_buf(struct m } } @@ -250,7 +250,7 @@ Signed-off-by: Hans de Goede static uint8_t sunxi_nfc_read_byte(struct mtd_info *mtd) { uint8_t ret; -@@ -538,16 +743,43 @@ static int sunxi_nfc_hw_ecc_read_page(st +@@ -542,16 +747,43 @@ static int sunxi_nfc_hw_ecc_read_page(st int oob_required, int page) { struct sunxi_nfc *nfc = to_sunxi_nfc(chip->controller); @@ -294,7 +294,7 @@ Signed-off-by: Hans de Goede tmp = readl(nfc->regs + NFC_REG_ECC_CTL); tmp &= ~(NFC_ECC_MODE | NFC_ECC_PIPELINE | NFC_ECC_BLOCK_SIZE); tmp |= NFC_ECC_EN | (data->mode << NFC_ECC_MODE_SHIFT) | -@@ -556,12 +788,15 @@ static int sunxi_nfc_hw_ecc_read_page(st +@@ -560,12 +792,15 @@ static int sunxi_nfc_hw_ecc_read_page(st writel(tmp, nfc->regs + NFC_REG_ECC_CTL); for (i = 0; i < ecc->steps; i++) { @@ -311,7 +311,7 @@ Signed-off-by: Hans de Goede chip->cmdfunc(mtd, NAND_CMD_RNDOUT, offset, -1); -@@ -569,6 +804,25 @@ static int sunxi_nfc_hw_ecc_read_page(st +@@ -573,6 +808,25 @@ static int sunxi_nfc_hw_ecc_read_page(st if (ret) return ret; @@ -337,7 +337,7 @@ Signed-off-by: Hans de Goede tmp = NFC_DATA_TRANS | NFC_DATA_SWAP_METHOD | (1 << 30); writel(tmp, nfc->regs + NFC_REG_CMD); -@@ -579,6 +833,9 @@ static int sunxi_nfc_hw_ecc_read_page(st +@@ -583,6 +837,9 @@ static int sunxi_nfc_hw_ecc_read_page(st memcpy_fromio(buf + (i * ecc->size), nfc->regs + NFC_RAM0_BASE, ecc->size); @@ -347,7 +347,7 @@ Signed-off-by: Hans de Goede if (readl(nfc->regs + NFC_REG_ECC_ST) & 0x1) { mtd->ecc_stats.failed++; } else { -@@ -594,9 +851,10 @@ static int sunxi_nfc_hw_ecc_read_page(st +@@ -598,9 +855,10 @@ static int sunxi_nfc_hw_ecc_read_page(st if (ret) return ret; @@ -360,7 +360,7 @@ Signed-off-by: Hans de Goede } } -@@ -606,11 +864,14 @@ static int sunxi_nfc_hw_ecc_read_page(st +@@ -610,11 +868,14 @@ static int sunxi_nfc_hw_ecc_read_page(st offset = mtd->writesize + ecc->layout->oobfree[ecc->steps].offset; chip->cmdfunc(mtd, NAND_CMD_RNDOUT, offset, -1); @@ -376,7 +376,7 @@ Signed-off-by: Hans de Goede tmp = readl(nfc->regs + NFC_REG_ECC_CTL); tmp &= ~NFC_ECC_EN; -@@ -627,6 +888,7 @@ static int sunxi_nfc_hw_ecc_write_page(s +@@ -631,6 +892,7 @@ static int sunxi_nfc_hw_ecc_write_page(s struct nand_ecc_ctrl *ecc = chip->cur_ecc; struct nand_ecclayout *layout = ecc->layout; struct sunxi_nand_hw_ecc *data = ecc->priv; @@ -384,7 +384,7 @@ Signed-off-by: Hans de Goede int offset; int ret; u32 tmp; -@@ -641,22 +903,56 @@ static int sunxi_nfc_hw_ecc_write_page(s +@@ -645,17 +907,57 @@ static int sunxi_nfc_hw_ecc_write_page(s writel(tmp, nfc->regs + NFC_REG_ECC_CTL); for (i = 0; i < ecc->steps; i++) { @@ -401,10 +401,9 @@ Signed-off-by: Hans de Goede offset = layout->eccpos[i * ecc->bytes] - 4 + mtd->writesize; /* Fill OOB data in */ -- if (oob_required) { -- tmp = 0xffffffff; -- memcpy_toio(nfc->regs + NFC_REG_USER_DATA_BASE, &tmp, -- 4); +- writel(NFC_BUF_TO_USER_DATA(chip->oob_poi + +- layout->oobfree[i].offset), +- nfc->regs + NFC_REG_USER_DATA_BASE); + if (!oob_required) + memset(oob_buf, 0xff, 4); + else @@ -421,10 +420,7 @@ Signed-off-by: Hans de Goede + nand_rnd_is_activ(mtd, -1, offset, &cnt) > 0 && + cnt == ecc->bytes + 4) + rndactiv = true; - } else { -- memcpy_toio(nfc->regs + NFC_REG_USER_DATA_BASE, -- chip->oob_poi + offset - mtd->writesize, -- 4); ++ } else { + cnt = ecc->bytes + 2; + if (rnd && + nand_rnd_is_activ(mtd, -1, offset + 2, &cnt) > 0 && @@ -446,10 +442,11 @@ Signed-off-by: Hans de Goede + tmp &= ~(NFC_RANDOM_DIRECTION | NFC_ECC_EXCEPTION); + tmp |= NFC_RANDOM_EN; + writel(tmp, nfc->regs + NFC_REG_ECC_CTL); - } ++ } chip->cmdfunc(mtd, NAND_CMD_RNDIN, offset, -1); -@@ -671,6 +967,9 @@ static int sunxi_nfc_hw_ecc_write_page(s + +@@ -669,6 +971,9 @@ static int sunxi_nfc_hw_ecc_write_page(s ret = sunxi_nfc_wait_int(nfc, NFC_CMD_INT_FLAG, 0); if (ret) return ret; @@ -459,7 +456,7 @@ Signed-off-by: Hans de Goede } if (oob_required) { -@@ -679,11 +978,14 @@ static int sunxi_nfc_hw_ecc_write_page(s +@@ -677,11 +982,14 @@ static int sunxi_nfc_hw_ecc_write_page(s offset = mtd->writesize + ecc->layout->oobfree[i].offset; chip->cmdfunc(mtd, NAND_CMD_RNDIN, offset, -1); @@ -475,7 +472,7 @@ Signed-off-by: Hans de Goede tmp = readl(nfc->regs + NFC_REG_ECC_CTL); tmp &= ~NFC_ECC_EN; -@@ -692,22 +994,76 @@ static int sunxi_nfc_hw_ecc_write_page(s +@@ -690,22 +998,76 @@ static int sunxi_nfc_hw_ecc_write_page(s return 0; } @@ -552,7 +549,7 @@ Signed-off-by: Hans de Goede tmp = readl(nfc->regs + NFC_REG_ECC_CTL); tmp &= ~(NFC_ECC_MODE | NFC_ECC_PIPELINE | NFC_ECC_BLOCK_SIZE); tmp |= NFC_ECC_EN | (data->mode << NFC_ECC_MODE_SHIFT) | -@@ -716,7 +1072,17 @@ static int sunxi_nfc_hw_syndrome_ecc_rea +@@ -714,7 +1076,17 @@ static int sunxi_nfc_hw_syndrome_ecc_rea writel(tmp, nfc->regs + NFC_REG_ECC_CTL); for (i = 0; i < ecc->steps; i++) { @@ -571,7 +568,7 @@ Signed-off-by: Hans de Goede tmp = NFC_DATA_TRANS | NFC_DATA_SWAP_METHOD | (1 << 30); writel(tmp, nfc->regs + NFC_REG_CMD); -@@ -729,6 +1095,9 @@ static int sunxi_nfc_hw_syndrome_ecc_rea +@@ -727,6 +1099,9 @@ static int sunxi_nfc_hw_syndrome_ecc_rea buf += ecc->size; offset += ecc->size; @@ -581,7 +578,7 @@ Signed-off-by: Hans de Goede if (readl(nfc->regs + NFC_REG_ECC_ST) & 0x1) { mtd->ecc_stats.failed++; } else { -@@ -739,7 +1108,8 @@ static int sunxi_nfc_hw_syndrome_ecc_rea +@@ -737,7 +1112,8 @@ static int sunxi_nfc_hw_syndrome_ecc_rea if (oob_required) { chip->cmdfunc(mtd, NAND_CMD_RNDOUT, offset, -1); @@ -591,7 +588,7 @@ Signed-off-by: Hans de Goede oob += ecc->bytes + ecc->prepad; } -@@ -750,10 +1120,13 @@ static int sunxi_nfc_hw_syndrome_ecc_rea +@@ -748,10 +1124,13 @@ static int sunxi_nfc_hw_syndrome_ecc_rea cnt = mtd->oobsize - (oob - chip->oob_poi); if (cnt > 0) { chip->cmdfunc(mtd, NAND_CMD_RNDOUT, offset, -1); @@ -606,7 +603,7 @@ Signed-off-by: Hans de Goede writel(readl(nfc->regs + NFC_REG_ECC_CTL) & ~NFC_ECC_EN, nfc->regs + NFC_REG_ECC_CTL); -@@ -768,6 +1141,7 @@ static int sunxi_nfc_hw_syndrome_ecc_wri +@@ -766,6 +1145,7 @@ static int sunxi_nfc_hw_syndrome_ecc_wri struct sunxi_nfc *nfc = to_sunxi_nfc(chip->controller); struct nand_ecc_ctrl *ecc = chip->cur_ecc; struct sunxi_nand_hw_ecc *data = ecc->priv; @@ -614,7 +611,7 @@ Signed-off-by: Hans de Goede uint8_t *oob = chip->oob_poi; int offset = 0; int ret; -@@ -783,7 +1157,8 @@ static int sunxi_nfc_hw_syndrome_ecc_wri +@@ -781,13 +1161,24 @@ static int sunxi_nfc_hw_syndrome_ecc_wri writel(tmp, nfc->regs + NFC_REG_ECC_CTL); for (i = 0; i < ecc->steps; i++) { @@ -624,9 +621,8 @@ Signed-off-by: Hans de Goede offset += ecc->size; /* Fill OOB data in */ -@@ -796,6 +1171,16 @@ static int sunxi_nfc_hw_syndrome_ecc_wri - 4); - } + writel(NFC_BUF_TO_USER_DATA(oob), + nfc->regs + NFC_REG_USER_DATA_BASE); + cnt = ecc->bytes + 4; + if (rnd && @@ -641,7 +637,7 @@ Signed-off-by: Hans de Goede tmp = NFC_DATA_TRANS | NFC_DATA_SWAP_METHOD | NFC_ACCESS_DIR | (1 << 30); writel(tmp, nfc->regs + NFC_REG_CMD); -@@ -804,6 +1189,9 @@ static int sunxi_nfc_hw_syndrome_ecc_wri +@@ -796,6 +1187,9 @@ static int sunxi_nfc_hw_syndrome_ecc_wri if (ret) return ret; @@ -651,7 +647,7 @@ Signed-off-by: Hans de Goede offset += ecc->bytes + ecc->prepad; oob += ecc->bytes + ecc->prepad; } -@@ -812,9 +1200,11 @@ static int sunxi_nfc_hw_syndrome_ecc_wri +@@ -804,9 +1198,11 @@ static int sunxi_nfc_hw_syndrome_ecc_wri cnt = mtd->oobsize - (oob - chip->oob_poi); if (cnt > 0) { chip->cmdfunc(mtd, NAND_CMD_RNDIN, offset, -1); @@ -664,7 +660,7 @@ Signed-off-by: Hans de Goede tmp = readl(nfc->regs + NFC_REG_ECC_CTL); tmp &= ~NFC_ECC_EN; -@@ -824,6 +1214,128 @@ static int sunxi_nfc_hw_syndrome_ecc_wri +@@ -816,6 +1212,128 @@ static int sunxi_nfc_hw_syndrome_ecc_wri return 0; } @@ -793,7 +789,7 @@ Signed-off-by: Hans de Goede static int sunxi_nand_chip_set_timings(struct sunxi_nand_chip *chip, const struct nand_sdr_timings *timings) { -@@ -1084,6 +1596,40 @@ static int sunxi_nand_hw_syndrome_ecc_ct +@@ -1076,6 +1594,40 @@ static int sunxi_nand_hw_syndrome_ecc_ct return 0; } @@ -834,7 +830,7 @@ Signed-off-by: Hans de Goede static void sunxi_nand_ecc_cleanup(struct nand_ecc_ctrl *ecc) { switch (ecc->mode) { -@@ -1175,7 +1721,14 @@ struct nand_part *sunxi_ofnandpart_parse +@@ -1167,7 +1719,14 @@ struct nand_part *sunxi_ofnandpart_parse if (ret) goto err; @@ -849,7 +845,7 @@ Signed-off-by: Hans de Goede return &part->part; -@@ -1300,18 +1853,30 @@ static int sunxi_nand_chip_init(struct d +@@ -1292,18 +1851,30 @@ static int sunxi_nand_chip_init(struct d if (ret) return ret; @@ -880,10 +876,10 @@ Signed-off-by: Hans de Goede ret = nand_scan_tail(mtd); if (ret) { dev_err(dev, "nand_scan_tail failed: %d\n", ret); -@@ -1367,6 +1932,8 @@ static void sunxi_nand_chips_cleanup(str - node); +@@ -1360,6 +1931,8 @@ static void sunxi_nand_chips_cleanup(str nand_release(&chip->mtd); sunxi_nand_ecc_cleanup(&chip->nand.ecc); + list_del(&chip->node); + sunxi_nand_rnd_cleanup(&chip->nand.rnd); + kfree(chip->buffer); } diff --git a/target/linux/sunxi/patches-4.1/124-mtd-nand-sunxi-fallback-to-chip-config.patch b/target/linux/sunxi/patches-4.1/124-mtd-nand-sunxi-fallback-to-chip-config.patch index 126998f4b5..cba30d27f5 100644 --- a/target/linux/sunxi/patches-4.1/124-mtd-nand-sunxi-fallback-to-chip-config.patch +++ b/target/linux/sunxi/patches-4.1/124-mtd-nand-sunxi-fallback-to-chip-config.patch @@ -15,7 +15,7 @@ Signed-off-by: Hans de Goede --- a/drivers/mtd/nand/sunxi_nand.c +++ b/drivers/mtd/nand/sunxi_nand.c -@@ -1711,28 +1711,37 @@ static void sunxi_nand_part_release(stru +@@ -1709,28 +1709,37 @@ static void sunxi_nand_part_release(stru struct nand_part *sunxi_ofnandpart_parse(void *priv, struct mtd_info *master, struct device_node *pp) { diff --git a/target/linux/sunxi/patches-4.1/125-mtd-nand-sunxi-extend-bbt_options.patch b/target/linux/sunxi/patches-4.1/125-mtd-nand-sunxi-extend-bbt_options.patch index 25b9359daa..136cabc58a 100644 --- a/target/linux/sunxi/patches-4.1/125-mtd-nand-sunxi-extend-bbt_options.patch +++ b/target/linux/sunxi/patches-4.1/125-mtd-nand-sunxi-extend-bbt_options.patch @@ -16,7 +16,7 @@ Signed-off-by: Hans de Goede --- a/drivers/mtd/nand/sunxi_nand.c +++ b/drivers/mtd/nand/sunxi_nand.c -@@ -1853,6 +1853,15 @@ static int sunxi_nand_chip_init(struct d +@@ -1851,6 +1851,15 @@ static int sunxi_nand_chip_init(struct d if (of_get_nand_on_flash_bbt(np)) nand->bbt_options |= NAND_BBT_USE_FLASH | NAND_BBT_NO_OOB; diff --git a/target/linux/sunxi/patches-4.1/128-1-mtd-nand-store-timing-in-nand_chip.patch b/target/linux/sunxi/patches-4.1/128-1-mtd-nand-store-timing-in-nand_chip.patch index ff047fca92..5867dbbab6 100644 --- a/target/linux/sunxi/patches-4.1/128-1-mtd-nand-store-timing-in-nand_chip.patch +++ b/target/linux/sunxi/patches-4.1/128-1-mtd-nand-store-timing-in-nand_chip.patch @@ -23,7 +23,7 @@ --- a/drivers/mtd/nand/sunxi_nand.c +++ b/drivers/mtd/nand/sunxi_nand.c -@@ -1427,7 +1427,7 @@ static int sunxi_nand_chip_init_timings( +@@ -1425,7 +1425,7 @@ static int sunxi_nand_chip_init_timings( mode = onfi_get_async_timing_mode(&chip->nand); if (mode == ONFI_TIMING_MODE_UNKNOWN) { @@ -32,7 +32,7 @@ } else { uint8_t feature[ONFI_SUBFEATURE_PARAM_LEN] = {}; -@@ -1441,9 +1441,10 @@ static int sunxi_nand_chip_init_timings( +@@ -1439,9 +1439,10 @@ static int sunxi_nand_chip_init_timings( feature); if (ret) return ret; diff --git a/target/linux/sunxi/patches-4.1/129-nand-sunxi-fix-write-to-USER_DATA-a13.patch b/target/linux/sunxi/patches-4.1/129-nand-sunxi-fix-write-to-USER_DATA-a13.patch index 8c49dee746..ae2775df22 100644 --- a/target/linux/sunxi/patches-4.1/129-nand-sunxi-fix-write-to-USER_DATA-a13.patch +++ b/target/linux/sunxi/patches-4.1/129-nand-sunxi-fix-write-to-USER_DATA-a13.patch @@ -15,7 +15,7 @@ Signed-off-by: Boris Brezillon --- a/drivers/mtd/nand/sunxi_nand.c +++ b/drivers/mtd/nand/sunxi_nand.c -@@ -904,7 +904,7 @@ static int sunxi_nfc_hw_ecc_write_page(s +@@ -908,7 +908,7 @@ static int sunxi_nfc_hw_ecc_write_page(s for (i = 0; i < ecc->steps; i++) { bool rndactiv = false; @@ -24,7 +24,7 @@ Signed-off-by: Boris Brezillon if (i) chip->cmdfunc(mtd, NAND_CMD_RNDIN, i * ecc->size, -1); -@@ -915,15 +915,13 @@ static int sunxi_nfc_hw_ecc_write_page(s +@@ -919,15 +919,13 @@ static int sunxi_nfc_hw_ecc_write_page(s offset = layout->eccpos[i * ecc->bytes] - 4 + mtd->writesize; /* Fill OOB data in */ @@ -47,7 +47,7 @@ Signed-off-by: Boris Brezillon if (i) { cnt = ecc->bytes + 4; -@@ -942,12 +940,16 @@ static int sunxi_nfc_hw_ecc_write_page(s +@@ -946,12 +944,16 @@ static int sunxi_nfc_hw_ecc_write_page(s if (rndactiv) { /* pre randomize to generate FF patterns on the NAND */ if (!i) { @@ -67,7 +67,7 @@ Signed-off-by: Boris Brezillon } tmp = readl(nfc->regs + NFC_REG_ECC_CTL); tmp &= ~(NFC_RANDOM_DIRECTION | NFC_ECC_EXCEPTION); -@@ -955,6 +957,8 @@ static int sunxi_nfc_hw_ecc_write_page(s +@@ -959,6 +961,8 @@ static int sunxi_nfc_hw_ecc_write_page(s writel(tmp, nfc->regs + NFC_REG_ECC_CTL); } @@ -76,21 +76,3 @@ Signed-off-by: Boris Brezillon chip->cmdfunc(mtd, NAND_CMD_RNDIN, offset, -1); ret = sunxi_nfc_wait_cmd_fifo_empty(nfc); -@@ -1164,13 +1168,13 @@ static int sunxi_nfc_hw_syndrome_ecc_wri - /* Fill OOB data in */ - if (oob_required) { - tmp = 0xffffffff; -- memcpy_toio(nfc->regs + NFC_REG_USER_DATA_BASE, &tmp, -- 4); - } else { -- memcpy_toio(nfc->regs + NFC_REG_USER_DATA_BASE, oob, -- 4); -+ memcpy(&tmp, oob, sizeof(tmp)); -+ tmp = le32_to_cpu(tmp); - } - -+ writel(tmp, nfc->regs + NFC_REG_USER_DATA_BASE); -+ - cnt = ecc->bytes + 4; - if (rnd && - nand_rnd_is_activ(mtd, rnd->page, offset, &cnt) > 0 && -- cgit v1.2.3