From d2fdece2e17a756959e4ee1ae63e5de1c1b687ef Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Sun, 8 Oct 2017 16:34:37 +0300 Subject: [PATCH] layerscape: refresh patches Signed-off-by: Stijn Tintel --- .../201-config-support-layerscape.patch | 50 +- .../301-arch-support-layerscape.patch | 81 +- .../302-dts-support-layercape.patch | 507 +++--- .../401-mtd-spi-nor-support-layerscape.patch | 108 +- .../402-mtd-support-layerscape.patch | 23 +- .../601-net-support-layerscape.patch | 510 ++---- .../701-sdk_dpaa-support-layerscape.patch | 774 ---------- .../702-pci-support-layerscape.patch | 82 +- .../703-phy-support-layerscape.patch | 57 +- .../704-fsl-mc-layerscape-support.patch | 544 +++---- .../705-dpaa2-support-layerscape.patch | 120 -- .../801-ata-support-layerscape.patch | 11 +- .../802-clk-support-layerscape.patch | 35 +- .../803-cpufreq-support-layerscape.patch | 31 +- .../804-crypto-support-layerscape.patch | 1366 ++++++++--------- .../805-dma-support-layerscape.patch | 31 - .../806-flextimer-support-layerscape.patch | 10 +- .../807-gpu-support-layerscape.patch | 15 +- .../808-guts-support-layerscape.patch | 12 +- .../809-i2c-support-layerscape.patch | 21 +- .../810-iommu-support-layerscape.patch | 114 +- .../811-irqchip-support-layerscape.patch | 35 +- .../812-mmc-layerscape-support.patch | 62 +- .../813-qe-support-layerscape.patch | 1262 +++++++++++---- .../814-rtc-support-layerscape.patch | 6 - .../815-spi-support-layerscape.patch | 21 +- .../816-tty-serial-support-layerscape.patch | 23 +- .../817-usb-support-layerscape.patch | 127 +- .../818-vfio-support-layerscape.patch | 36 +- 29 files changed, 2439 insertions(+), 3635 deletions(-) diff --git a/target/linux/layerscape/patches-4.9/201-config-support-layerscape.patch b/target/linux/layerscape/patches-4.9/201-config-support-layerscape.patch index 0105f5930b..939880fd14 100644 --- a/target/linux/layerscape/patches-4.9/201-config-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/201-config-support-layerscape.patch @@ -43,8 +43,6 @@ Signed-off-by: Yangbo Lu create mode 100644 drivers/staging/fsl-dpaa2/Kconfig create mode 100644 drivers/staging/fsl-dpaa2/Makefile -diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig -index e1c0e2e0..4211a7fd 100644 --- a/drivers/base/Kconfig +++ b/drivers/base/Kconfig @@ -237,6 +237,7 @@ config GENERIC_CPU_AUTOPROBE @@ -55,11 +53,9 @@ index e1c0e2e0..4211a7fd 100644 source "drivers/base/regmap/Kconfig" -diff --git a/drivers/crypto/Makefile b/drivers/crypto/Makefile -index ad7250fa..6d788fd7 100644 --- a/drivers/crypto/Makefile +++ b/drivers/crypto/Makefile -@@ -3,7 +3,7 @@ obj-$(CONFIG_CRYPTO_DEV_ATMEL_SHA) += atmel-sha.o +@@ -3,7 +3,7 @@ obj-$(CONFIG_CRYPTO_DEV_ATMEL_SHA) += at obj-$(CONFIG_CRYPTO_DEV_ATMEL_TDES) += atmel-tdes.o obj-$(CONFIG_CRYPTO_DEV_BFIN_CRC) += bfin_crc.o obj-$(CONFIG_CRYPTO_DEV_CCP) += ccp/ @@ -68,8 +64,6 @@ index ad7250fa..6d788fd7 100644 obj-$(CONFIG_CRYPTO_DEV_GEODE) += geode-aes.o obj-$(CONFIG_CRYPTO_DEV_HIFN_795X) += hifn_795x.o obj-$(CONFIG_CRYPTO_DEV_IMGTEC_HASH) += img-hash.o -diff --git a/drivers/net/ethernet/freescale/Kconfig b/drivers/net/ethernet/freescale/Kconfig -index d1ca45fb..74a2864e 100644 --- a/drivers/net/ethernet/freescale/Kconfig +++ b/drivers/net/ethernet/freescale/Kconfig @@ -5,7 +5,7 @@ @@ -88,8 +82,6 @@ index d1ca45fb..74a2864e 100644 +source "drivers/net/ethernet/freescale/sdk_fman/Kconfig" +source "drivers/net/ethernet/freescale/sdk_dpaa/Kconfig" endif # NET_VENDOR_FREESCALE -diff --git a/drivers/net/ethernet/freescale/Makefile b/drivers/net/ethernet/freescale/Makefile -index cbe21dc7..a5d4405f 100644 --- a/drivers/net/ethernet/freescale/Makefile +++ b/drivers/net/ethernet/freescale/Makefile @@ -21,4 +21,6 @@ gianfar_driver-objs := gianfar.o \ @@ -99,8 +91,6 @@ index cbe21dc7..a5d4405f 100644 +obj-$(if $(CONFIG_FSL_SDK_FMAN),y) += sdk_fman/ +obj-$(if $(CONFIG_FSL_SDK_DPAA_ETH),y) += sdk_dpaa/ obj-$(CONFIG_FSL_FMAN) += fman/ -diff --git a/drivers/ptp/Kconfig b/drivers/ptp/Kconfig -index ee3de342..4c45beda 100644 --- a/drivers/ptp/Kconfig +++ b/drivers/ptp/Kconfig @@ -39,6 +39,35 @@ config PTP_1588_CLOCK_GIANFAR @@ -139,8 +129,6 @@ index ee3de342..4c45beda 100644 config PTP_1588_CLOCK_IXP46X tristate "Intel IXP46x as PTP clock" depends on IXP4XX_ETH -diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig -index 0723c97e..df610dcd 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -414,6 +414,14 @@ config RTC_DRV_PCF85063 @@ -158,11 +146,9 @@ index 0723c97e..df610dcd 100644 config RTC_DRV_PCF8563 tristate "Philips PCF8563/Epson RTC8564" help -diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile -index 1ac694a3..7675b8a7 100644 --- a/drivers/rtc/Makefile +++ b/drivers/rtc/Makefile -@@ -111,6 +111,7 @@ obj-$(CONFIG_RTC_DRV_PCF2127) += rtc-pcf2127.o +@@ -111,6 +111,7 @@ obj-$(CONFIG_RTC_DRV_PCF2127) += rtc-pcf obj-$(CONFIG_RTC_DRV_PCF50633) += rtc-pcf50633.o obj-$(CONFIG_RTC_DRV_PCF85063) += rtc-pcf85063.o obj-$(CONFIG_RTC_DRV_PCF8523) += rtc-pcf8523.o @@ -170,8 +156,6 @@ index 1ac694a3..7675b8a7 100644 obj-$(CONFIG_RTC_DRV_PCF8563) += rtc-pcf8563.o obj-$(CONFIG_RTC_DRV_PCF8583) += rtc-pcf8583.o obj-$(CONFIG_RTC_DRV_PIC32) += rtc-pic32.o -diff --git a/drivers/soc/Kconfig b/drivers/soc/Kconfig -index e6e90e80..f31bceb6 100644 --- a/drivers/soc/Kconfig +++ b/drivers/soc/Kconfig @@ -1,8 +1,7 @@ @@ -184,9 +168,6 @@ index e6e90e80..f31bceb6 100644 source "drivers/soc/mediatek/Kconfig" source "drivers/soc/qcom/Kconfig" source "drivers/soc/rockchip/Kconfig" -diff --git a/drivers/soc/fsl/Kconfig b/drivers/soc/fsl/Kconfig -new file mode 100644 -index 00000000..d4cd25f1 --- /dev/null +++ b/drivers/soc/fsl/Kconfig @@ -0,0 +1,22 @@ @@ -212,9 +193,6 @@ index 00000000..d4cd25f1 +if ARM || ARM64 +source "drivers/soc/fsl/Kconfig.arm" +endif -diff --git a/drivers/soc/fsl/Kconfig.arm b/drivers/soc/fsl/Kconfig.arm -new file mode 100644 -index 00000000..106c9b98 --- /dev/null +++ b/drivers/soc/fsl/Kconfig.arm @@ -0,0 +1,16 @@ @@ -234,8 +212,6 @@ index 00000000..106c9b98 +if LS_SOC_DRIVERS + source "drivers/soc/fsl/layerscape/Kconfig" +endif -diff --git a/drivers/soc/fsl/Makefile b/drivers/soc/fsl/Makefile -index 75e1f533..b8708569 100644 --- a/drivers/soc/fsl/Makefile +++ b/drivers/soc/fsl/Makefile @@ -5,3 +5,7 @@ @@ -246,9 +222,6 @@ index 75e1f533..b8708569 100644 +obj-$(CONFIG_FSL_LS2_CONSOLE) += ls2-console/ +obj-$(CONFIG_SUSPEND) += rcpm.o +obj-$(CONFIG_LS_SOC_DRIVERS) += layerscape/ -diff --git a/drivers/soc/fsl/layerscape/Kconfig b/drivers/soc/fsl/layerscape/Kconfig -new file mode 100644 -index 00000000..e1373aa1 --- /dev/null +++ b/drivers/soc/fsl/layerscape/Kconfig @@ -0,0 +1,10 @@ @@ -262,16 +235,10 @@ index 00000000..e1373aa1 + Say y here to enable FTM alarm support. The FTM alarm provides + alarm functions for wakeup system from deep sleep. There is only + one FTM can be used in ALARM(FTM 0). -diff --git a/drivers/soc/fsl/layerscape/Makefile b/drivers/soc/fsl/layerscape/Makefile -new file mode 100644 -index 00000000..6299aa1d --- /dev/null +++ b/drivers/soc/fsl/layerscape/Makefile @@ -0,0 +1 @@ +obj-$(CONFIG_FTM_ALARM) += ftm_alarm.o -diff --git a/drivers/soc/fsl/rcpm.c b/drivers/soc/fsl/rcpm.c -new file mode 100644 -index 00000000..a6a31c87 --- /dev/null +++ b/drivers/soc/fsl/rcpm.c @@ -0,0 +1,154 @@ @@ -429,8 +396,6 @@ index 00000000..a6a31c87 +} + +subsys_initcall(layerscape_rcpm_init); -diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig -index 58a7b350..f8e54860 100644 --- a/drivers/staging/Kconfig +++ b/drivers/staging/Kconfig @@ -94,6 +94,8 @@ source "drivers/staging/fbtft/Kconfig" @@ -449,8 +414,6 @@ index 58a7b350..f8e54860 100644 +source "drivers/staging/fsl_qbman/Kconfig" + endif # STAGING -diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile -index 2fa9745d..cbd7b089 100644 --- a/drivers/staging/Makefile +++ b/drivers/staging/Makefile @@ -36,9 +36,11 @@ obj-$(CONFIG_UNISYSSPAR) += unisys/ @@ -465,9 +428,6 @@ index 2fa9745d..cbd7b089 100644 obj-$(CONFIG_GREYBUS) += greybus/ obj-$(CONFIG_BCM2708_VCHIQ) += vc04_services/ +obj-$(CONFIG_FSL_SDK_DPA) += fsl_qbman/ -diff --git a/drivers/staging/fsl-dpaa2/Kconfig b/drivers/staging/fsl-dpaa2/Kconfig -new file mode 100644 -index 00000000..8042d9cc --- /dev/null +++ b/drivers/staging/fsl-dpaa2/Kconfig @@ -0,0 +1,41 @@ @@ -512,9 +472,6 @@ index 00000000..8042d9cc +source "drivers/staging/fsl-dpaa2/mac/Kconfig" +source "drivers/staging/fsl-dpaa2/evb/Kconfig" +source "drivers/staging/fsl-dpaa2/ethsw/Kconfig" -diff --git a/drivers/staging/fsl-dpaa2/Makefile b/drivers/staging/fsl-dpaa2/Makefile -new file mode 100644 -index 00000000..cbaa8c20 --- /dev/null +++ b/drivers/staging/fsl-dpaa2/Makefile @@ -0,0 +1,9 @@ @@ -527,6 +484,3 @@ index 00000000..cbaa8c20 +obj-$(CONFIG_FSL_DPAA2_EVB) += evb/ +obj-$(CONFIG_FSL_DPAA2_ETHSW) += ethsw/ +obj-$(CONFIG_PTP_1588_CLOCK_DPAA2) += rtc/ --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/301-arch-support-layerscape.patch b/target/linux/layerscape/patches-4.9/301-arch-support-layerscape.patch index da3dc120b7..3a2e9c64bc 100644 --- a/target/linux/layerscape/patches-4.9/301-arch-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/301-arch-support-layerscape.patch @@ -37,8 +37,6 @@ Signed-off-by: Yangbo Lu arch/arm64/mm/dma-mapping.c | 6 ++++ 15 files changed, 197 insertions(+), 3 deletions(-) -diff --git a/arch/arm/include/asm/delay.h b/arch/arm/include/asm/delay.h -index b1ce037e..1445b0ca 100644 --- a/arch/arm/include/asm/delay.h +++ b/arch/arm/include/asm/delay.h @@ -57,6 +57,22 @@ extern void __bad_udelay(void); @@ -64,11 +62,9 @@ index b1ce037e..1445b0ca 100644 /* Loop-based definitions for assembly code. */ extern void __loop_delay(unsigned long loops); extern void __loop_udelay(unsigned long usecs); -diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h -index 021692c6..172a4f2e 100644 --- a/arch/arm/include/asm/io.h +++ b/arch/arm/include/asm/io.h -@@ -129,6 +129,7 @@ static inline u32 __raw_readl(const volatile void __iomem *addr) +@@ -129,6 +129,7 @@ static inline u32 __raw_readl(const vola #define MT_DEVICE_NONSHARED 1 #define MT_DEVICE_CACHED 2 #define MT_DEVICE_WC 3 @@ -76,7 +72,7 @@ index 021692c6..172a4f2e 100644 /* * types 4 onwards can be found in asm/mach/map.h and are undefined * for ioremap -@@ -220,6 +221,34 @@ extern int pci_ioremap_io(unsigned int offset, phys_addr_t phys_addr); +@@ -220,6 +221,34 @@ extern int pci_ioremap_io(unsigned int o #endif #endif @@ -111,7 +107,7 @@ index 021692c6..172a4f2e 100644 /* * IO port access primitives * ------------------------- -@@ -408,6 +437,8 @@ void __iomem *ioremap_wc(resource_size_t res_cookie, size_t size); +@@ -408,6 +437,8 @@ void __iomem *ioremap_wc(resource_size_t #define ioremap_wc ioremap_wc #define ioremap_wt ioremap_wc @@ -120,8 +116,6 @@ index 021692c6..172a4f2e 100644 void iounmap(volatile void __iomem *iomem_cookie); #define iounmap iounmap -diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h -index 9b7c328f..27f3df7d 100644 --- a/arch/arm/include/asm/mach/map.h +++ b/arch/arm/include/asm/mach/map.h @@ -21,9 +21,9 @@ struct map_desc { @@ -136,8 +130,6 @@ index 9b7c328f..27f3df7d 100644 MT_CACHECLEAN, MT_MINICLEAN, MT_LOW_VECTORS, -diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h -index a8d656d9..4ab57b37 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h @@ -118,6 +118,13 @@ extern pgprot_t pgprot_s2_device; @@ -154,8 +146,6 @@ index a8d656d9..4ab57b37 100644 #define pgprot_writecombine(prot) \ __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_BUFFERABLE) -diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c -index 2f0e0773..d2f4869a 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c @@ -11,6 +11,8 @@ @@ -167,11 +157,10 @@ index 2f0e0773..d2f4869a 100644 #include #include -@@ -63,6 +65,47 @@ void pcibios_report_status(u_int status_mask, int warn) - pcibios_bus_report_status(bus, status_mask, warn); +@@ -64,6 +66,47 @@ void pcibios_report_status(u_int status_ } -+/* + /* + * Check device tree if the service interrupts are there + */ +int pcibios_check_service_irqs(struct pci_dev *dev, int *irqs, int mask) @@ -212,14 +201,13 @@ index 2f0e0773..d2f4869a 100644 + return count; +} + - /* ++/* * We don't use this to fix the device, but initialisation of it. * It's not the correct use for this, but it works. -diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c -index ab771000..9b5f4465 100644 + * Note that the arbiter/ISA bridge appears to be buggy, specifically in --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c -@@ -2392,6 +2392,7 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, +@@ -2392,6 +2392,7 @@ void arch_setup_dma_ops(struct device *d set_dma_ops(dev, dma_ops); } @@ -227,11 +215,9 @@ index ab771000..9b5f4465 100644 void arch_teardown_dma_ops(struct device *dev) { -diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c -index ff0eed23..2f2f4269 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c -@@ -398,6 +398,13 @@ void __iomem *ioremap_wc(resource_size_t res_cookie, size_t size) +@@ -398,6 +398,13 @@ void __iomem *ioremap_wc(resource_size_t } EXPORT_SYMBOL(ioremap_wc); @@ -245,11 +231,9 @@ index ff0eed23..2f2f4269 100644 /* * Remap an arbitrary physical address space into the kernel virtual * address space as memory. Needed when the kernel wants to execute -diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c -index f7c74135..4a2fb704 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c -@@ -313,6 +313,13 @@ static struct mem_type mem_types[] __ro_after_init = { +@@ -313,6 +313,13 @@ static struct mem_type mem_types[] __ro_ .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE, .domain = DOMAIN_KERNEL, }, @@ -263,7 +247,7 @@ index f7c74135..4a2fb704 100644 [MT_ROM] = { .prot_sect = PMD_TYPE_SECT, .domain = DOMAIN_KERNEL, -@@ -644,6 +651,7 @@ static void __init build_mem_type_table(void) +@@ -644,6 +651,7 @@ static void __init build_mem_type_table( } kern_pgprot |= PTE_EXT_AF; vecs_pgprot |= PTE_EXT_AF; @@ -271,7 +255,7 @@ index f7c74135..4a2fb704 100644 /* * Set PXN for user mappings -@@ -672,6 +680,7 @@ static void __init build_mem_type_table(void) +@@ -672,6 +680,7 @@ static void __init build_mem_type_table( mem_types[MT_MEMORY_RWX].prot_pte |= kern_pgprot; mem_types[MT_MEMORY_RW].prot_sect |= ecc_mask | cp->pmd; mem_types[MT_MEMORY_RW].prot_pte |= kern_pgprot; @@ -279,8 +263,6 @@ index f7c74135..4a2fb704 100644 mem_types[MT_MEMORY_DMA_READY].prot_pte |= kern_pgprot; mem_types[MT_MEMORY_RWX_NONCACHED].prot_sect |= ecc_mask; mem_types[MT_ROM].prot_sect |= cp->pmd; -diff --git a/arch/arm64/include/asm/cache.h b/arch/arm64/include/asm/cache.h -index 5082b30b..bde44993 100644 --- a/arch/arm64/include/asm/cache.h +++ b/arch/arm64/include/asm/cache.h @@ -18,7 +18,7 @@ @@ -292,11 +274,9 @@ index 5082b30b..bde44993 100644 #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) /* -diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h -index 0bba427b..36c1fbf3 100644 --- a/arch/arm64/include/asm/io.h +++ b/arch/arm64/include/asm/io.h -@@ -171,6 +171,8 @@ extern void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size); +@@ -171,6 +171,8 @@ extern void __iomem *ioremap_cache(phys_ #define ioremap_nocache(addr, size) __ioremap((addr), (size), __pgprot(PROT_DEVICE_nGnRE)) #define ioremap_wc(addr, size) __ioremap((addr), (size), __pgprot(PROT_NORMAL_NC)) #define ioremap_wt(addr, size) __ioremap((addr), (size), __pgprot(PROT_DEVICE_nGnRE)) @@ -305,11 +285,9 @@ index 0bba427b..36c1fbf3 100644 #define iounmap __iounmap /* -diff --git a/arch/arm64/include/asm/pci.h b/arch/arm64/include/asm/pci.h -index b9a7ba9c..8a189159 100644 --- a/arch/arm64/include/asm/pci.h +++ b/arch/arm64/include/asm/pci.h -@@ -31,6 +31,10 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) +@@ -31,6 +31,10 @@ static inline int pci_get_legacy_ide_irq return -ENODEV; } @@ -320,8 +298,6 @@ index b9a7ba9c..8a189159 100644 static inline int pci_proc_domain(struct pci_bus *bus) { return 1; -diff --git a/arch/arm64/include/asm/pgtable-prot.h b/arch/arm64/include/asm/pgtable-prot.h -index 2142c772..cdf8b25d 100644 --- a/arch/arm64/include/asm/pgtable-prot.h +++ b/arch/arm64/include/asm/pgtable-prot.h @@ -42,6 +42,7 @@ @@ -332,11 +308,9 @@ index 2142c772..cdf8b25d 100644 #define PROT_SECT_DEVICE_nGnRE (PROT_SECT_DEFAULT | PMD_SECT_PXN | PMD_SECT_UXN | PMD_ATTRINDX(MT_DEVICE_nGnRE)) #define PROT_SECT_NORMAL (PROT_SECT_DEFAULT | PMD_SECT_PXN | PMD_SECT_UXN | PMD_ATTRINDX(MT_NORMAL)) -diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h -index 61e21401..b8c876fb 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h -@@ -356,6 +356,11 @@ static inline int pmd_protnone(pmd_t pmd) +@@ -356,6 +356,11 @@ static inline int pmd_protnone(pmd_t pmd __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRnE) | PTE_PXN | PTE_UXN) #define pgprot_writecombine(prot) \ __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN) @@ -348,8 +322,6 @@ index 61e21401..b8c876fb 100644 #define pgprot_device(prot) \ __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRE) | PTE_PXN | PTE_UXN) #define __HAVE_PHYS_MEM_ACCESS_PROT -diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c -index 409abc45..0568ec3a 100644 --- a/arch/arm64/kernel/pci.c +++ b/arch/arm64/kernel/pci.c @@ -17,6 +17,8 @@ @@ -361,10 +333,11 @@ index 409abc45..0568ec3a 100644 #include #include #include -@@ -54,6 +56,66 @@ int pcibios_alloc_irq(struct pci_dev *dev) +@@ -53,6 +55,66 @@ int pcibios_alloc_irq(struct pci_dev *de + return 0; } - ++ +/* + * Check device tree if the service interrupts are there + */ @@ -424,12 +397,9 @@ index 409abc45..0568ec3a 100644 + + return 0; +} -+ + /* * raw_pci_read/write - Platform-specific PCI config space access. - */ -diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c -index b5bf46ce..1ef0d6df 100644 --- a/arch/arm64/mm/dma-mapping.c +++ b/arch/arm64/mm/dma-mapping.c @@ -30,6 +30,7 @@ @@ -440,22 +410,19 @@ index b5bf46ce..1ef0d6df 100644 static int swiotlb __ro_after_init; -@@ -917,6 +918,10 @@ static int __init __iommu_dma_init(void) - #ifdef CONFIG_PCI +@@ -918,6 +919,10 @@ static int __init __iommu_dma_init(void) if (!ret) ret = register_iommu_dma_ops_notifier(&pci_bus_type); -+#endif + #endif +#ifdef CONFIG_FSL_MC_BUS + if (!ret) + ret = register_iommu_dma_ops_notifier(&fsl_mc_bus_type); - #endif ++#endif return ret; } -@@ -971,3 +976,4 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, + arch_initcall(__iommu_dma_init); +@@ -971,3 +976,4 @@ void arch_setup_dma_ops(struct device *d dev->archdata.dma_coherent = coherent; __iommu_setup_dma_ops(dev, dma_base, size, iommu); } +EXPORT_SYMBOL(arch_setup_dma_ops); --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/302-dts-support-layercape.patch b/target/linux/layerscape/patches-4.9/302-dts-support-layercape.patch index c820c9f9c9..a7a3a48e61 100644 --- a/target/linux/layerscape/patches-4.9/302-dts-support-layercape.patch +++ b/target/linux/layerscape/patches-4.9/302-dts-support-layercape.patch @@ -133,8 +133,6 @@ Signed-off-by: Yangbo Lu create mode 100644 arch/arm64/boot/dts/freescale/qoriq-fman3-0.dtsi create mode 100644 arch/arm64/boot/dts/freescale/qoriq-qman1-portals.dtsi -diff --git a/arch/arm/boot/dts/alpine.dtsi b/arch/arm/boot/dts/alpine.dtsi -index db8752fc..d0eefc3b 100644 --- a/arch/arm/boot/dts/alpine.dtsi +++ b/arch/arm/boot/dts/alpine.dtsi @@ -93,7 +93,7 @@ @@ -146,8 +144,6 @@ index db8752fc..d0eefc3b 100644 <0x0 0xfb006000 0x0 0x2000>; interrupts = ; -diff --git a/arch/arm/boot/dts/axm55xx.dtsi b/arch/arm/boot/dts/axm55xx.dtsi -index a9d6d593..47799f59 100644 --- a/arch/arm/boot/dts/axm55xx.dtsi +++ b/arch/arm/boot/dts/axm55xx.dtsi @@ -62,7 +62,7 @@ @@ -159,8 +155,6 @@ index a9d6d593..47799f59 100644 <0x20 0x01004000 0 0x2000>, <0x20 0x01006000 0 0x2000>; interrupts = , <0xfff16000 0x2000>; }; -diff --git a/arch/arm/boot/dts/imx6ul.dtsi b/arch/arm/boot/dts/imx6ul.dtsi -index c5c05fdc..c1396873 100644 --- a/arch/arm/boot/dts/imx6ul.dtsi +++ b/arch/arm/boot/dts/imx6ul.dtsi @@ -89,11 +89,11 @@ @@ -190,8 +182,6 @@ index c5c05fdc..c1396873 100644 <0x00a04000 0x2000>, <0x00a06000 0x2000>; }; -diff --git a/arch/arm/boot/dts/keystone.dtsi b/arch/arm/boot/dts/keystone.dtsi -index 02708ba2..e30c83fc 100644 --- a/arch/arm/boot/dts/keystone.dtsi +++ b/arch/arm/boot/dts/keystone.dtsi @@ -30,12 +30,12 @@ @@ -209,8 +199,6 @@ index 02708ba2..e30c83fc 100644 <0x0 0x02566000 0x0 0x2000>; interrupts = ; -diff --git a/arch/arm/boot/dts/ls1021a-qds.dts b/arch/arm/boot/dts/ls1021a-qds.dts -index 94087531..5611a9c9 100644 --- a/arch/arm/boot/dts/ls1021a-qds.dts +++ b/arch/arm/boot/dts/ls1021a-qds.dts @@ -124,6 +124,19 @@ @@ -233,8 +221,6 @@ index 94087531..5611a9c9 100644 &enet0 { tbi-handle = <&tbi0>; phy-handle = <&sgmii_phy1c>; -diff --git a/arch/arm/boot/dts/ls1021a-twr.dts b/arch/arm/boot/dts/ls1021a-twr.dts -index a8b148ad..907e5392 100644 --- a/arch/arm/boot/dts/ls1021a-twr.dts +++ b/arch/arm/boot/dts/ls1021a-twr.dts @@ -142,6 +142,19 @@ @@ -257,8 +243,6 @@ index a8b148ad..907e5392 100644 &enet0 { tbi-handle = <&tbi1>; phy-handle = <&sgmii_phy2>; -diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi -index 368e2193..def82fef 100644 --- a/arch/arm/boot/dts/ls1021a.dtsi +++ b/arch/arm/boot/dts/ls1021a.dtsi @@ -74,17 +74,24 @@ @@ -625,8 +609,6 @@ index 368e2193..def82fef 100644 #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 7>; interrupt-map = <0000 0 0 1 &gic GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>, -diff --git a/arch/arm/boot/dts/mt6580.dtsi b/arch/arm/boot/dts/mt6580.dtsi -index 06fdf6c2..a349dba5 100644 --- a/arch/arm/boot/dts/mt6580.dtsi +++ b/arch/arm/boot/dts/mt6580.dtsi @@ -91,7 +91,7 @@ @@ -638,8 +620,6 @@ index 06fdf6c2..a349dba5 100644 <0x10214000 0x2000>, <0x10216000 0x2000>; }; -diff --git a/arch/arm/boot/dts/mt6589.dtsi b/arch/arm/boot/dts/mt6589.dtsi -index 88b3cb12..0d6f60af 100644 --- a/arch/arm/boot/dts/mt6589.dtsi +++ b/arch/arm/boot/dts/mt6589.dtsi @@ -102,7 +102,7 @@ @@ -651,8 +631,6 @@ index 88b3cb12..0d6f60af 100644 <0x10214000 0x2000>, <0x10216000 0x2000>; }; -diff --git a/arch/arm/boot/dts/mt8127.dtsi b/arch/arm/boot/dts/mt8127.dtsi -index 52086c80..916c095d 100644 --- a/arch/arm/boot/dts/mt8127.dtsi +++ b/arch/arm/boot/dts/mt8127.dtsi @@ -129,7 +129,7 @@ @@ -664,8 +642,6 @@ index 52086c80..916c095d 100644 <0 0x10214000 0 0x2000>, <0 0x10216000 0 0x2000>; }; -diff --git a/arch/arm/boot/dts/mt8135.dtsi b/arch/arm/boot/dts/mt8135.dtsi -index 1d7f92bd..a97b4ee4 100644 --- a/arch/arm/boot/dts/mt8135.dtsi +++ b/arch/arm/boot/dts/mt8135.dtsi @@ -221,7 +221,7 @@ @@ -677,8 +653,6 @@ index 1d7f92bd..a97b4ee4 100644 <0 0x10214000 0 0x2000>, <0 0x10216000 0 0x2000>; }; -diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi -index 17ec2e2d..559fc549 100644 --- a/arch/arm/boot/dts/rk3288.dtsi +++ b/arch/arm/boot/dts/rk3288.dtsi @@ -1109,7 +1109,7 @@ @@ -690,8 +664,6 @@ index 17ec2e2d..559fc549 100644 <0xffc04000 0x2000>, <0xffc06000 0x2000>; interrupts = ; -diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi -index ce196045..97f28399 100644 --- a/arch/arm/boot/dts/sun6i-a31.dtsi +++ b/arch/arm/boot/dts/sun6i-a31.dtsi @@ -791,7 +791,7 @@ @@ -703,8 +675,6 @@ index ce196045..97f28399 100644 <0x01c84000 0x2000>, <0x01c86000 0x2000>; interrupt-controller; -diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi -index 94cf5a1c..81e5a44c 100644 --- a/arch/arm/boot/dts/sun7i-a20.dtsi +++ b/arch/arm/boot/dts/sun7i-a20.dtsi @@ -1685,9 +1685,9 @@ @@ -719,8 +689,6 @@ index 94cf5a1c..81e5a44c 100644 <0x01c84000 0x2000>, <0x01c86000 0x2000>; interrupt-controller; -diff --git a/arch/arm/boot/dts/sun8i-a23-a33.dtsi b/arch/arm/boot/dts/sun8i-a23-a33.dtsi -index 300a1bd5..cdff5888 100644 --- a/arch/arm/boot/dts/sun8i-a23-a33.dtsi +++ b/arch/arm/boot/dts/sun8i-a23-a33.dtsi @@ -488,7 +488,7 @@ @@ -732,8 +700,6 @@ index 300a1bd5..cdff5888 100644 <0x01c84000 0x2000>, <0x01c86000 0x2000>; interrupt-controller; -diff --git a/arch/arm/boot/dts/sun9i-a80.dtsi b/arch/arm/boot/dts/sun9i-a80.dtsi -index 3c5214cb..ba7e7c71 100644 --- a/arch/arm/boot/dts/sun9i-a80.dtsi +++ b/arch/arm/boot/dts/sun9i-a80.dtsi @@ -613,7 +613,7 @@ @@ -745,8 +711,6 @@ index 3c5214cb..ba7e7c71 100644 <0x01c44000 0x2000>, <0x01c46000 0x2000>; interrupt-controller; -diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile -index 1b7783db..2d7986a1 100644 --- a/arch/arm64/boot/dts/freescale/Makefile +++ b/arch/arm64/boot/dts/freescale/Makefile @@ -1,8 +1,24 @@ @@ -774,9 +738,6 @@ index 1b7783db..2d7986a1 100644 always := $(dtb-y) subdir-y := $(dts-dirs) -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dts b/arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dts -new file mode 100644 -index 00000000..e1274c18 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dts @@ -0,0 +1,134 @@ @@ -914,9 +875,6 @@ index 00000000..e1274c18 +&sata { + status = "okay"; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts -new file mode 100644 -index 00000000..1e1b2802 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts @@ -0,0 +1,155 @@ @@ -1075,9 +1033,6 @@ index 00000000..1e1b2802 +&esdhc1 { + status = "okay"; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts -new file mode 100644 -index 00000000..90bd2307 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts @@ -0,0 +1,91 @@ @@ -1172,9 +1127,6 @@ index 00000000..90bd2307 + mmc-hs200-1_8v; + status = "okay"; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi -new file mode 100644 -index 00000000..9ede9d52 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi @@ -0,0 +1,517 @@ @@ -1695,9 +1647,6 @@ index 00000000..9ede9d52 + }; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043-post.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1043-post.dtsi -new file mode 100644 -index 00000000..169e1714 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1043-post.dtsi @@ -0,0 +1,45 @@ @@ -1746,9 +1695,6 @@ index 00000000..169e1714 + enet6: ethernet@f0000 { + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds-sdk.dts b/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds-sdk.dts -new file mode 100644 -index 00000000..6c13b416 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds-sdk.dts @@ -0,0 +1,69 @@ @@ -1821,8 +1767,6 @@ index 00000000..6c13b416 +&fman0 { + compatible = "fsl,fman", "simple-bus"; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts -index dd9e9194..08abff73 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts +++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts @@ -1,7 +1,7 @@ @@ -2029,9 +1973,6 @@ index dd9e9194..08abff73 100644 + }; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb-sdk.dts b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb-sdk.dts -new file mode 100644 -index 00000000..ac4b9a41 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb-sdk.dts @@ -0,0 +1,69 @@ @@ -2104,9 +2045,6 @@ index 00000000..ac4b9a41 +&fman0 { + compatible = "fsl,fman", "simple-bus"; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb-usdpaa.dts b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb-usdpaa.dts -new file mode 100644 -index 00000000..4e46a0a5 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb-usdpaa.dts @@ -0,0 +1,117 @@ @@ -2227,8 +2165,6 @@ index 00000000..4e46a0a5 + reg = <0x83000 0x1000>; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts -index d2313e05..f92ae325 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts +++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts @@ -1,7 +1,7 @@ @@ -2376,8 +2312,6 @@ index d2313e05..f92ae325 100644 + }; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi -index 97d331ec..8b27faaf 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi @@ -1,7 +1,7 @@ @@ -2873,9 +2807,6 @@ index 97d331ec..8b27faaf 100644 + +#include "qoriq-qman1-portals.dtsi" +#include "qoriq-bman1-portals.dtsi" -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046-post.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1046-post.dtsi -new file mode 100644 -index 00000000..f5017dba --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1046-post.dtsi @@ -0,0 +1,48 @@ @@ -2927,9 +2858,6 @@ index 00000000..f5017dba + enet7: ethernet@f2000 { + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046a-qds-sdk.dts b/arch/arm64/boot/dts/freescale/fsl-ls1046a-qds-sdk.dts -new file mode 100644 -index 00000000..c375af47 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a-qds-sdk.dts @@ -0,0 +1,109 @@ @@ -3042,9 +2970,6 @@ index 00000000..c375af47 + spi-max-frequency = <10000000>; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts -new file mode 100644 -index 00000000..3b8e9b7e --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts @@ -0,0 +1,363 @@ @@ -3411,9 +3336,6 @@ index 00000000..3b8e9b7e + }; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb-sdk.dts b/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb-sdk.dts -new file mode 100644 -index 00000000..bfe2f36c --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb-sdk.dts @@ -0,0 +1,76 @@ @@ -3493,9 +3415,6 @@ index 00000000..bfe2f36c +&fman0 { + compatible = "fsl,fman", "simple-bus"; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb-usdpaa.dts b/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb-usdpaa.dts -new file mode 100644 -index 00000000..54336aa6 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb-usdpaa.dts @@ -0,0 +1,110 @@ @@ -3609,9 +3528,6 @@ index 00000000..54336aa6 + reg = <0x83000 0x1000>; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts -new file mode 100644 -index 00000000..be9b62ca --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts @@ -0,0 +1,218 @@ @@ -3833,9 +3749,6 @@ index 00000000..be9b62ca + }; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi -new file mode 100644 -index 00000000..6b87266f --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi @@ -0,0 +1,793 @@ @@ -4632,9 +4545,6 @@ index 00000000..6b87266f + +#include "qoriq-qman1-portals.dtsi" +#include "qoriq-bman1-portals.dtsi" -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dts -new file mode 100644 -index 00000000..f61ec261 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dts @@ -0,0 +1,173 @@ @@ -4811,9 +4721,6 @@ index 00000000..f61ec261 +&sata { + status = "okay"; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1088a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls1088a-rdb.dts -new file mode 100644 -index 00000000..a4cbc2d5 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1088a-rdb.dts @@ -0,0 +1,236 @@ @@ -5053,9 +4960,6 @@ index 00000000..a4cbc2d5 +&dpmac10 { + phy-handle = <&mdio1_phy4>; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi -new file mode 100644 -index 00000000..14585ab2 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi @@ -0,0 +1,816 @@ @@ -5875,8 +5779,6 @@ index 00000000..14585ab2 + }; + +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls2080a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls2080a-qds.dts -index b0dd0109..ba1a79dd 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls2080a-qds.dts +++ b/arch/arm64/boot/dts/freescale/fsl-ls2080a-qds.dts @@ -1,8 +1,10 @@ @@ -6108,8 +6010,6 @@ index b0dd0109..ba1a79dd 100644 +&dpmac12 { + phy-handle = <&mdio0_phy15>; }; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls2080a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls2080a-rdb.dts -index ad0ebb8a..025f0f54 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls2080a-rdb.dts +++ b/arch/arm64/boot/dts/freescale/fsl-ls2080a-rdb.dts @@ -1,8 +1,10 @@ @@ -6165,29 +6065,17 @@ index ad0ebb8a..025f0f54 100644 - reg = <0x0 0x0 0x8000000>; - bank-width = <2>; - device-width = <1>; -+&emdio1 { -+ status = "disabled"; -+ /* CS4340 PHYs */ -+ mdio1_phy1: emdio1_phy@1 { -+ reg = <0x10>; -+ phy-connection-type = "xfi"; - }; +- }; - - nand@2,0 { - compatible = "fsl,ifc-nand"; - reg = <0x2 0x0 0x10000>; -+ mdio1_phy2: emdio1_phy@2 { -+ reg = <0x11>; -+ phy-connection-type = "xfi"; - }; +- }; - - cpld@3,0 { - reg = <0x3 0x0 0x10000>; - compatible = "fsl,ls2080aqds-fpga", "fsl,fpga-qixis"; -+ mdio1_phy3: emdio1_phy@3 { -+ reg = <0x12>; -+ phy-connection-type = "xfi"; - }; +- }; - -}; - @@ -6219,12 +6107,9 @@ index ad0ebb8a..025f0f54 100644 - reg = <0x4c>; - }; - }; -+ mdio1_phy4: emdio1_phy@4 { -+ reg = <0x13>; -+ phy-connection-type = "xfi"; - }; - }; - +- }; +-}; +- -&i2c1 { - status = "disabled"; -}; @@ -6234,9 +6119,27 @@ index ad0ebb8a..025f0f54 100644 -}; - -&i2c3 { -- status = "disabled"; --}; -- ++&emdio1 { + status = "disabled"; ++ /* CS4340 PHYs */ ++ mdio1_phy1: emdio1_phy@1 { ++ reg = <0x10>; ++ phy-connection-type = "xfi"; ++ }; ++ mdio1_phy2: emdio1_phy@2 { ++ reg = <0x11>; ++ phy-connection-type = "xfi"; ++ }; ++ mdio1_phy3: emdio1_phy@3 { ++ reg = <0x12>; ++ phy-connection-type = "xfi"; ++ }; ++ mdio1_phy4: emdio1_phy@4 { ++ reg = <0x13>; ++ phy-connection-type = "xfi"; ++ }; + }; + -&dspi { - status = "okay"; - dflash0: n25q512a { @@ -6317,8 +6220,6 @@ index ad0ebb8a..025f0f54 100644 +&dpmac8 { + phy-handle = <&mdio2_phy4>; }; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls2080a-simu.dts b/arch/arm64/boot/dts/freescale/fsl-ls2080a-simu.dts -index 505d0380..fbbb73e5 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls2080a-simu.dts +++ b/arch/arm64/boot/dts/freescale/fsl-ls2080a-simu.dts @@ -1,7 +1,7 @@ @@ -6349,8 +6250,6 @@ index 505d0380..fbbb73e5 100644 ethernet@2210000 { compatible = "smsc,lan91c111"; reg = <0x0 0x2210000 0x0 0x100>; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi -index 7f0dc13b..71f15fab 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi @@ -1,8 +1,9 @@ @@ -6373,8 +6272,7 @@ index 7f0dc13b..71f15fab 100644 - interrupt-parent = <&gic>; - #address-cells = <2>; - #size-cells = <2>; -+#include "fsl-ls208xa.dtsi" - +- - cpus { - #address-cells = <1>; - #size-cells = <0>; @@ -6466,42 +6364,21 @@ index 7f0dc13b..71f15fab 100644 - cluster3_l2: l2-cache3 { - compatible = "cache"; - }; -+&cpu { -+ cpu0: cpu@0 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a57"; -+ reg = <0x0>; -+ clocks = <&clockgen 1 0>; -+ next-level-cache = <&cluster0_l2>; -+ #cooling-cells = <2>; - }; - +- }; +- - memory@80000000 { - device_type = "memory"; - reg = <0x00000000 0x80000000 0 0x80000000>; - /* DRAM space - 1, size : 2 GB DRAM */ -+ cpu1: cpu@1 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a57"; -+ reg = <0x1>; -+ clocks = <&clockgen 1 0>; -+ next-level-cache = <&cluster0_l2>; - }; - +- }; +- - sysclk: sysclk { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <100000000>; - clock-output-names = "sysclk"; -+ cpu2: cpu@100 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a57"; -+ reg = <0x100>; -+ clocks = <&clockgen 1 1>; -+ next-level-cache = <&cluster1_l2>; -+ #cooling-cells = <2>; - }; - +- }; +- - gic: interrupt-controller@6000000 { - compatible = "arm,gic-v3"; - reg = <0x0 0x06000000 0 0x10000>, /* GIC Dist */ @@ -6521,39 +6398,20 @@ index 7f0dc13b..71f15fab 100644 - msi-controller; - reg = <0x0 0x6020000 0 0x20000>; - }; -+ cpu3: cpu@101 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a57"; -+ reg = <0x101>; -+ clocks = <&clockgen 1 1>; -+ next-level-cache = <&cluster1_l2>; - }; - +- }; +- - rstcr: syscon@1e60000 { - compatible = "fsl,ls2080a-rstcr", "syscon"; - reg = <0x0 0x1e60000 0x0 0x4>; -+ cpu4: cpu@200 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a57"; -+ reg = <0x200>; -+ clocks = <&clockgen 1 2>; -+ next-level-cache = <&cluster2_l2>; -+ #cooling-cells = <2>; - }; - +- }; +- - reboot { - compatible ="syscon-reboot"; - regmap = <&rstcr>; - offset = <0x0>; - mask = <0x2>; -+ cpu5: cpu@201 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a57"; -+ reg = <0x201>; -+ clocks = <&clockgen 1 2>; -+ next-level-cache = <&cluster2_l2>; - }; - +- }; +- - timer { - compatible = "arm,armv8-timer"; - interrupts = <1 13 4>, /* Physical Secure PPI, active-low */ @@ -6561,26 +6419,13 @@ index 7f0dc13b..71f15fab 100644 - <1 11 4>, /* Virtual PPI, active-low */ - <1 10 4>; /* Hypervisor PPI, active-low */ - fsl,erratum-a008585; -+ cpu6: cpu@300 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a57"; -+ reg = <0x300>; -+ clocks = <&clockgen 1 3>; -+ next-level-cache = <&cluster3_l2>; -+ #cooling-cells = <2>; - }; - +- }; +- - pmu { - compatible = "arm,armv8-pmuv3"; - interrupts = <1 7 0x8>; /* PMU PPI, Level low type */ -+ cpu7: cpu@301 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a57"; -+ reg = <0x301>; -+ clocks = <&clockgen 1 3>; -+ next-level-cache = <&cluster3_l2>; - }; - +- }; +- - soc { - compatible = "simple-bus"; - #address-cells = <2>; @@ -6937,18 +6782,12 @@ index 7f0dc13b..71f15fab 100644 - little-endian; - #address-cells = <2>; - #size-cells = <1>; -+ cluster0_l2: l2-cache0 { -+ compatible = "cache"; -+ }; - +- - ranges = <0 0 0x5 0x80000000 0x08000000 - 2 0 0x5 0x30000000 0x00010000 - 3 0 0x5 0x20000000 0x00010000>; - }; -+ cluster1_l2: l2-cache1 { -+ compatible = "cache"; -+ }; - +- - qspi: quadspi@20c0000 { - status = "disabled"; - compatible = "fsl,ls2080a-qspi", "fsl,ls1021a-qspi"; @@ -6961,10 +6800,7 @@ index 7f0dc13b..71f15fab 100644 - clocks = <&clockgen 4 3>, <&clockgen 4 3>; - clock-names = "qspi_en", "qspi"; - }; -+ cluster2_l2: l2-cache2 { -+ compatible = "cache"; -+ }; - +- - pcie@3400000 { - compatible = "fsl,ls2080a-pcie", "fsl,ls2085a-pcie", - "snps,dw-pcie"; @@ -6989,11 +6825,7 @@ index 7f0dc13b..71f15fab 100644 - <0000 0 0 3 &gic 0 0 0 111 4>, - <0000 0 0 4 &gic 0 0 0 112 4>; - }; -+ cluster3_l2: l2-cache3 { -+ compatible = "cache"; -+ }; -+}; - +- - pcie@3500000 { - compatible = "fsl,ls2080a-pcie", "fsl,ls2085a-pcie", - "snps,dw-pcie"; @@ -7018,11 +6850,7 @@ index 7f0dc13b..71f15fab 100644 - <0000 0 0 3 &gic 0 0 0 116 4>, - <0000 0 0 4 &gic 0 0 0 117 4>; - }; -+&usb0 { -+ snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>; -+ snps,dma-snooping; -+}; - +- - pcie@3600000 { - compatible = "fsl,ls2080a-pcie", "fsl,ls2085a-pcie", - "snps,dw-pcie"; @@ -7047,11 +6875,7 @@ index 7f0dc13b..71f15fab 100644 - <0000 0 0 3 &gic 0 0 0 121 4>, - <0000 0 0 4 &gic 0 0 0 122 4>; - }; -+&usb1 { -+ snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>; -+ snps,dma-snooping; -+}; - +- - pcie@3700000 { - compatible = "fsl,ls2080a-pcie", "fsl,ls2085a-pcie", - "snps,dw-pcie"; @@ -7076,10 +6900,7 @@ index 7f0dc13b..71f15fab 100644 - <0000 0 0 3 &gic 0 0 0 126 4>, - <0000 0 0 4 &gic 0 0 0 127 4>; - }; -+&pcie1 { -+ reg = <0x00 0x03400000 0x0 0x00100000 /* controller registers */ -+ 0x10 0x00000000 0x0 0x00002000>; /* configuration space */ - +- - sata0: sata@3200000 { - status = "disabled"; - compatible = "fsl,ls2080a-ahci"; @@ -7088,10 +6909,7 @@ index 7f0dc13b..71f15fab 100644 - clocks = <&clockgen 4 3>; - dma-coherent; - }; -+ ranges = <0x81000000 0x0 0x00000000 0x10 0x00010000 0x0 0x00010000 /* downstream I/O */ -+ 0x82000000 0x0 0x40000000 0x10 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */ -+}; - +- - sata1: sata@3210000 { - status = "disabled"; - compatible = "fsl,ls2080a-ahci"; @@ -7100,10 +6918,7 @@ index 7f0dc13b..71f15fab 100644 - clocks = <&clockgen 4 3>; - dma-coherent; - }; -+&pcie2 { -+ reg = <0x00 0x03500000 0x0 0x00100000 /* controller registers */ -+ 0x12 0x00000000 0x0 0x00002000>; /* configuration space */ - +- - usb0: usb3@3100000 { - status = "disabled"; - compatible = "snps,dwc3"; @@ -7113,10 +6928,7 @@ index 7f0dc13b..71f15fab 100644 - snps,quirk-frame-length-adjustment = <0x20>; - snps,dis_rxdet_inp3_quirk; - }; -+ ranges = <0x81000000 0x0 0x00000000 0x12 0x00010000 0x0 0x00010000 /* downstream I/O */ -+ 0x82000000 0x0 0x40000000 0x12 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */ -+}; - +- - usb1: usb3@3110000 { - status = "disabled"; - compatible = "snps,dwc3"; @@ -7126,42 +6938,155 @@ index 7f0dc13b..71f15fab 100644 - snps,quirk-frame-length-adjustment = <0x20>; - snps,dis_rxdet_inp3_quirk; - }; -+&pcie3 { -+ reg = <0x00 0x03600000 0x0 0x00100000 /* controller registers */ -+ 0x14 0x00000000 0x0 0x00002000>; /* configuration space */ - +- - ccn@4000000 { - compatible = "arm,ccn-504"; - reg = <0x0 0x04000000 0x0 0x01000000>; - interrupts = <0 12 4>; - }; - }; -+ ranges = <0x81000000 0x0 0x00000000 0x14 0x00010000 0x0 0x00010000 /* downstream I/O */ -+ 0x82000000 0x0 0x40000000 0x14 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */ -+}; - +- - ddr1: memory-controller@1080000 { - compatible = "fsl,qoriq-memory-controller"; - reg = <0x0 0x1080000 0x0 0x1000>; - interrupts = <0 17 0x4>; - little-endian; - }; -+&pcie4 { -+ reg = <0x00 0x03700000 0x0 0x00100000 /* controller registers */ -+ 0x16 0x00000000 0x0 0x00002000>; /* configuration space */ - +- - ddr2: memory-controller@1090000 { - compatible = "fsl,qoriq-memory-controller"; - reg = <0x0 0x1090000 0x0 0x1000>; - interrupts = <0 18 0x4>; - little-endian; -- }; ++#include "fsl-ls208xa.dtsi" ++ ++&cpu { ++ cpu0: cpu@0 { ++ device_type = "cpu"; ++ compatible = "arm,cortex-a57"; ++ reg = <0x0>; ++ clocks = <&clockgen 1 0>; ++ next-level-cache = <&cluster0_l2>; ++ #cooling-cells = <2>; ++ }; ++ ++ cpu1: cpu@1 { ++ device_type = "cpu"; ++ compatible = "arm,cortex-a57"; ++ reg = <0x1>; ++ clocks = <&clockgen 1 0>; ++ next-level-cache = <&cluster0_l2>; ++ }; ++ ++ cpu2: cpu@100 { ++ device_type = "cpu"; ++ compatible = "arm,cortex-a57"; ++ reg = <0x100>; ++ clocks = <&clockgen 1 1>; ++ next-level-cache = <&cluster1_l2>; ++ #cooling-cells = <2>; ++ }; ++ ++ cpu3: cpu@101 { ++ device_type = "cpu"; ++ compatible = "arm,cortex-a57"; ++ reg = <0x101>; ++ clocks = <&clockgen 1 1>; ++ next-level-cache = <&cluster1_l2>; ++ }; ++ ++ cpu4: cpu@200 { ++ device_type = "cpu"; ++ compatible = "arm,cortex-a57"; ++ reg = <0x200>; ++ clocks = <&clockgen 1 2>; ++ next-level-cache = <&cluster2_l2>; ++ #cooling-cells = <2>; ++ }; ++ ++ cpu5: cpu@201 { ++ device_type = "cpu"; ++ compatible = "arm,cortex-a57"; ++ reg = <0x201>; ++ clocks = <&clockgen 1 2>; ++ next-level-cache = <&cluster2_l2>; ++ }; ++ ++ cpu6: cpu@300 { ++ device_type = "cpu"; ++ compatible = "arm,cortex-a57"; ++ reg = <0x300>; ++ clocks = <&clockgen 1 3>; ++ next-level-cache = <&cluster3_l2>; ++ #cooling-cells = <2>; ++ }; ++ ++ cpu7: cpu@301 { ++ device_type = "cpu"; ++ compatible = "arm,cortex-a57"; ++ reg = <0x301>; ++ clocks = <&clockgen 1 3>; ++ next-level-cache = <&cluster3_l2>; + }; ++ ++ cluster0_l2: l2-cache0 { ++ compatible = "cache"; ++ }; ++ ++ cluster1_l2: l2-cache1 { ++ compatible = "cache"; ++ }; ++ ++ cluster2_l2: l2-cache2 { ++ compatible = "cache"; ++ }; ++ ++ cluster3_l2: l2-cache3 { ++ compatible = "cache"; ++ }; ++}; ++ ++&usb0 { ++ snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>; ++ snps,dma-snooping; ++}; ++ ++&usb1 { ++ snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>; ++ snps,dma-snooping; ++}; ++ ++&pcie1 { ++ reg = <0x00 0x03400000 0x0 0x00100000 /* controller registers */ ++ 0x10 0x00000000 0x0 0x00002000>; /* configuration space */ ++ ++ ranges = <0x81000000 0x0 0x00000000 0x10 0x00010000 0x0 0x00010000 /* downstream I/O */ ++ 0x82000000 0x0 0x40000000 0x10 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */ ++}; ++ ++&pcie2 { ++ reg = <0x00 0x03500000 0x0 0x00100000 /* controller registers */ ++ 0x12 0x00000000 0x0 0x00002000>; /* configuration space */ ++ ++ ranges = <0x81000000 0x0 0x00000000 0x12 0x00010000 0x0 0x00010000 /* downstream I/O */ ++ 0x82000000 0x0 0x40000000 0x12 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */ ++}; ++ ++&pcie3 { ++ reg = <0x00 0x03600000 0x0 0x00100000 /* controller registers */ ++ 0x14 0x00000000 0x0 0x00002000>; /* configuration space */ ++ ++ ranges = <0x81000000 0x0 0x00000000 0x14 0x00010000 0x0 0x00010000 /* downstream I/O */ ++ 0x82000000 0x0 0x40000000 0x14 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */ ++}; ++ ++&pcie4 { ++ reg = <0x00 0x03700000 0x0 0x00100000 /* controller registers */ ++ 0x16 0x00000000 0x0 0x00002000>; /* configuration space */ ++ + ranges = <0x81000000 0x0 0x00000000 0x16 0x00010000 0x0 0x00010000 /* downstream I/O */ + 0x82000000 0x0 0x40000000 0x16 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */ }; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls2081a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls2081a-rdb.dts -new file mode 100644 -index 00000000..c3375bf7 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls2081a-rdb.dts @@ -0,0 +1,161 @@ @@ -7326,9 +7251,6 @@ index 00000000..c3375bf7 +&usb1 { + status = "okay"; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls2088a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls2088a-qds.dts -new file mode 100644 -index 00000000..1dbc7aa8 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls2088a-qds.dts @@ -0,0 +1,162 @@ @@ -7494,9 +7416,6 @@ index 00000000..1dbc7aa8 +&dpmac12 { + phy-handle = <&mdio0_phy15>; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls2088a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls2088a-rdb.dts -new file mode 100644 -index 00000000..9300119b --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls2088a-rdb.dts @@ -0,0 +1,140 @@ @@ -7640,9 +7559,6 @@ index 00000000..9300119b +&dpmac8 { + phy-handle = <&mdio2_phy4>; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls2088a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls2088a.dtsi -new file mode 100644 -index 00000000..833699ea --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls2088a.dtsi @@ -0,0 +1,195 @@ @@ -7841,9 +7757,6 @@ index 00000000..833699ea + ranges = <0x81000000 0x0 0x00000000 0x38 0x00010000 0x0 0x00010000 + 0x82000000 0x0 0x40000000 0x38 0x40000000 0x0 0x40000000>; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls208xa-qds.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls208xa-qds.dtsi -new file mode 100644 -index 00000000..b2374469 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa-qds.dtsi @@ -0,0 +1,198 @@ @@ -8045,9 +7958,6 @@ index 00000000..b2374469 +&usb1 { + status = "okay"; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls208xa-rdb.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls208xa-rdb.dtsi -new file mode 100644 -index 00000000..8e919dc8 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa-rdb.dtsi @@ -0,0 +1,161 @@ @@ -8212,9 +8122,6 @@ index 00000000..8e919dc8 +&usb1 { + status = "okay"; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi -new file mode 100644 -index 00000000..f694cac0 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi @@ -0,0 +1,910 @@ @@ -9128,9 +9035,6 @@ index 00000000..f694cac0 + little-endian; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/qoriq-bman1-portals.dtsi b/arch/arm64/boot/dts/freescale/qoriq-bman1-portals.dtsi -new file mode 100644 -index 00000000..14680adb --- /dev/null +++ b/arch/arm64/boot/dts/freescale/qoriq-bman1-portals.dtsi @@ -0,0 +1,81 @@ @@ -9215,9 +9119,6 @@ index 00000000..14680adb + fsl,bpid-range = <32 32>; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/qoriq-dpaa-eth.dtsi b/arch/arm64/boot/dts/freescale/qoriq-dpaa-eth.dtsi -new file mode 100644 -index 00000000..eb5af912 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/qoriq-dpaa-eth.dtsi @@ -0,0 +1,66 @@ @@ -9287,9 +9188,6 @@ index 00000000..eb5af912 + }; +}; + -diff --git a/arch/arm64/boot/dts/freescale/qoriq-fman3-0-10g-0.dtsi b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-10g-0.dtsi -new file mode 100644 -index 00000000..474bff5e --- /dev/null +++ b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-10g-0.dtsi @@ -0,0 +1,43 @@ @@ -9336,9 +9234,6 @@ index 00000000..474bff5e + }; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/qoriq-fman3-0-10g-1.dtsi b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-10g-1.dtsi -new file mode 100644 -index 00000000..d4326f85 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-10g-1.dtsi @@ -0,0 +1,43 @@ @@ -9385,9 +9280,6 @@ index 00000000..d4326f85 + }; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-0.dtsi b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-0.dtsi -new file mode 100644 -index 00000000..7170cab9 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-0.dtsi @@ -0,0 +1,42 @@ @@ -9433,9 +9325,6 @@ index 00000000..7170cab9 + }; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-1.dtsi b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-1.dtsi -new file mode 100644 -index 00000000..c7eb8b6e --- /dev/null +++ b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-1.dtsi @@ -0,0 +1,42 @@ @@ -9481,9 +9370,6 @@ index 00000000..c7eb8b6e + }; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-2.dtsi b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-2.dtsi -new file mode 100644 -index 00000000..56f9f0dd --- /dev/null +++ b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-2.dtsi @@ -0,0 +1,42 @@ @@ -9529,9 +9415,6 @@ index 00000000..56f9f0dd + }; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-3.dtsi b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-3.dtsi -new file mode 100644 -index 00000000..bbe7dbaf --- /dev/null +++ b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-3.dtsi @@ -0,0 +1,42 @@ @@ -9577,9 +9460,6 @@ index 00000000..bbe7dbaf + }; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-4.dtsi b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-4.dtsi -new file mode 100644 -index 00000000..ead4f062 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-4.dtsi @@ -0,0 +1,42 @@ @@ -9625,9 +9505,6 @@ index 00000000..ead4f062 + }; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-5.dtsi b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-5.dtsi -new file mode 100644 -index 00000000..389eadaf --- /dev/null +++ b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-5.dtsi @@ -0,0 +1,42 @@ @@ -9673,9 +9550,6 @@ index 00000000..389eadaf + }; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/qoriq-fman3-0-6oh.dtsi b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-6oh.dtsi -new file mode 100644 -index 00000000..2d0df20d --- /dev/null +++ b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-6oh.dtsi @@ -0,0 +1,47 @@ @@ -9726,9 +9600,6 @@ index 00000000..2d0df20d + }; + +}; -diff --git a/arch/arm64/boot/dts/freescale/qoriq-fman3-0.dtsi b/arch/arm64/boot/dts/freescale/qoriq-fman3-0.dtsi -new file mode 100644 -index 00000000..8e089f0c --- /dev/null +++ b/arch/arm64/boot/dts/freescale/qoriq-fman3-0.dtsi @@ -0,0 +1,130 @@ @@ -9862,9 +9733,6 @@ index 00000000..8e089f0c + reg = <0xfe000 0x1000>; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/qoriq-qman1-portals.dtsi b/arch/arm64/boot/dts/freescale/qoriq-qman1-portals.dtsi -new file mode 100644 -index 00000000..4f7edf48 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/qoriq-qman1-portals.dtsi @@ -0,0 +1,104 @@ @@ -9972,8 +9840,6 @@ index 00000000..4f7edf48 + fsl,ceetm-channel-range = <0 32>; + }; +}; -diff --git a/arch/powerpc/boot/dts/fsl/qoriq-bman1-portals.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-bman1-portals.dtsi -index 5022432e..65701ada 100644 --- a/arch/powerpc/boot/dts/fsl/qoriq-bman1-portals.dtsi +++ b/arch/powerpc/boot/dts/fsl/qoriq-bman1-portals.dtsi @@ -38,51 +38,61 @@ @@ -10038,8 +9904,6 @@ index 5022432e..65701ada 100644 compatible = "fsl,bman-portal"; reg = <0x24000 0x4000>, <0x109000 0x1000>; interrupts = <123 2 0 0>; -diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi -index c288f3c6..dd200e28 100644 --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi @@ -35,14 +35,14 @@ @@ -10059,8 +9923,6 @@ index c288f3c6..dd200e28 100644 reg = <0xb0000 0x1000>; fsl,fman-10g-port; }; -diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi -index 94a76982..365770c9 100644 --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi @@ -35,14 +35,14 @@ @@ -10080,6 +9942,3 @@ index 94a76982..365770c9 100644 reg = <0xb1000 0x1000>; fsl,fman-10g-port; }; --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/401-mtd-spi-nor-support-layerscape.patch b/target/linux/layerscape/patches-4.9/401-mtd-spi-nor-support-layerscape.patch index f61ae06ca2..445a6fa028 100644 --- a/target/linux/layerscape/patches-4.9/401-mtd-spi-nor-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/401-mtd-spi-nor-support-layerscape.patch @@ -23,11 +23,9 @@ Signed-off-by: Yangbo Lu include/linux/mtd/spi-nor.h | 14 +- 4 files changed, 432 insertions(+), 76 deletions(-) -diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c -index 2a47a3f0..4f21401d 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c -@@ -451,7 +451,7 @@ static int mtdchar_readoob(struct file *file, struct mtd_info *mtd, +@@ -451,7 +451,7 @@ static int mtdchar_readoob(struct file * * data. For our userspace tools it is important to dump areas * with ECC errors! * For kernel internal usage it also might return -EUCLEAN @@ -36,8 +34,6 @@ index 2a47a3f0..4f21401d 100644 * been corrected by the ECC algorithm. * * Note: currently the standard NAND function, nand_read_oob_std, -diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c -index 5c82e4ef..8fb75532 100644 --- a/drivers/mtd/spi-nor/fsl-quadspi.c +++ b/drivers/mtd/spi-nor/fsl-quadspi.c @@ -41,6 +41,8 @@ @@ -90,7 +86,7 @@ index 5c82e4ef..8fb75532 100644 .devtype = FSL_QUADSPI_VYBRID, .rxfifo = 128, .txfifo = 64, -@@ -232,7 +241,7 @@ static struct fsl_qspi_devtype_data vybrid_data = { +@@ -232,7 +241,7 @@ static struct fsl_qspi_devtype_data vybr .driver_data = QUADSPI_QUIRK_SWAP_ENDIAN, }; @@ -99,7 +95,7 @@ index 5c82e4ef..8fb75532 100644 .devtype = FSL_QUADSPI_IMX6SX, .rxfifo = 128, .txfifo = 512, -@@ -241,7 +250,7 @@ static struct fsl_qspi_devtype_data imx6sx_data = { +@@ -241,7 +250,7 @@ static struct fsl_qspi_devtype_data imx6 | QUADSPI_QUIRK_TKT245618, }; @@ -108,7 +104,7 @@ index 5c82e4ef..8fb75532 100644 .devtype = FSL_QUADSPI_IMX7D, .rxfifo = 512, .txfifo = 512, -@@ -250,7 +259,7 @@ static struct fsl_qspi_devtype_data imx7d_data = { +@@ -250,7 +259,7 @@ static struct fsl_qspi_devtype_data imx7 | QUADSPI_QUIRK_4X_INT_CLK, }; @@ -117,7 +113,7 @@ index 5c82e4ef..8fb75532 100644 .devtype = FSL_QUADSPI_IMX6UL, .rxfifo = 128, .txfifo = 512, -@@ -267,6 +276,14 @@ static struct fsl_qspi_devtype_data ls1021a_data = { +@@ -267,6 +276,14 @@ static struct fsl_qspi_devtype_data ls10 .driver_data = 0, }; @@ -140,7 +136,7 @@ index 5c82e4ef..8fb75532 100644 unsigned int chip_base_addr; /* We may support two chips. */ bool has_second_chip; bool big_endian; -@@ -309,6 +327,23 @@ static inline int needs_wakeup_wait_mode(struct fsl_qspi *q) +@@ -309,6 +327,23 @@ static inline int needs_wakeup_wait_mode return q->devtype_data->driver_data & QUADSPI_QUIRK_TKT245618; } @@ -164,7 +160,7 @@ index 5c82e4ef..8fb75532 100644 /* * R/W functions for big- or little-endian registers: * The qSPI controller's endian is independent of the CPU core's endian. -@@ -331,6 +366,31 @@ static u32 qspi_readl(struct fsl_qspi *q, void __iomem *addr) +@@ -331,6 +366,31 @@ static u32 qspi_readl(struct fsl_qspi *q return ioread32(addr); } @@ -196,7 +192,7 @@ index 5c82e4ef..8fb75532 100644 /* * An IC bug makes us to re-arrange the 32-bit data. * The following chips, such as IMX6SLX, have fixed this bug. -@@ -373,8 +433,15 @@ static void fsl_qspi_init_lut(struct fsl_qspi *q) +@@ -373,8 +433,15 @@ static void fsl_qspi_init_lut(struct fsl void __iomem *base = q->iobase; int rxfifo = q->devtype_data->rxfifo; u32 lut_base; @@ -213,7 +209,7 @@ index 5c82e4ef..8fb75532 100644 fsl_qspi_unlock_lut(q); -@@ -382,25 +449,51 @@ static void fsl_qspi_init_lut(struct fsl_qspi *q) +@@ -382,25 +449,51 @@ static void fsl_qspi_init_lut(struct fsl for (i = 0; i < QUADSPI_LUT_NUM; i++) qspi_writel(q, 0, base + QUADSPI_LUT_BASE + i * 4); @@ -230,11 +226,10 @@ index 5c82e4ef..8fb75532 100644 - addrlen = ADDR32BIT; - dummy = 8; - } -- -- qspi_writel(q, LUT0(CMD, PAD1, cmd) | LUT1(ADDR, PAD1, addrlen), + /* Read */ + lut_base = SEQID_READ * 4; -+ + +- qspi_writel(q, LUT0(CMD, PAD1, cmd) | LUT1(ADDR, PAD1, addrlen), + if (nor->flash_read == SPI_NOR_FAST) { + qspi_writel(q, LUT0(CMD, PAD1, read_op) | + LUT1(ADDR, PAD1, addrlen), @@ -281,7 +276,7 @@ index 5c82e4ef..8fb75532 100644 /* Write enable */ lut_base = SEQID_WREN * 4; qspi_writel(q, LUT0(CMD, PAD1, SPINOR_OP_WREN), -@@ -409,16 +502,8 @@ static void fsl_qspi_init_lut(struct fsl_qspi *q) +@@ -409,16 +502,8 @@ static void fsl_qspi_init_lut(struct fsl /* Page Program */ lut_base = SEQID_PP * 4; @@ -300,7 +295,7 @@ index 5c82e4ef..8fb75532 100644 base + QUADSPI_LUT(lut_base)); qspi_writel(q, LUT0(FSL_WRITE, PAD1, 0), base + QUADSPI_LUT(lut_base + 1)); -@@ -432,10 +517,8 @@ static void fsl_qspi_init_lut(struct fsl_qspi *q) +@@ -432,10 +517,8 @@ static void fsl_qspi_init_lut(struct fsl /* Erase a sector */ lut_base = SEQID_SE * 4; @@ -313,7 +308,7 @@ index 5c82e4ef..8fb75532 100644 base + QUADSPI_LUT(lut_base)); /* Erase the whole chip */ -@@ -476,6 +559,44 @@ static void fsl_qspi_init_lut(struct fsl_qspi *q) +@@ -476,6 +559,44 @@ static void fsl_qspi_init_lut(struct fsl qspi_writel(q, LUT0(CMD, PAD1, SPINOR_OP_BRWR), base + QUADSPI_LUT(lut_base)); @@ -358,7 +353,7 @@ index 5c82e4ef..8fb75532 100644 fsl_qspi_lock_lut(q); } -@@ -483,8 +604,24 @@ static void fsl_qspi_init_lut(struct fsl_qspi *q) +@@ -483,8 +604,24 @@ static void fsl_qspi_init_lut(struct fsl static int fsl_qspi_get_seqid(struct fsl_qspi *q, u8 cmd) { switch (cmd) { @@ -384,7 +379,7 @@ index 5c82e4ef..8fb75532 100644 case SPINOR_OP_WREN: return SEQID_WREN; case SPINOR_OP_WRDI: -@@ -496,6 +633,7 @@ static int fsl_qspi_get_seqid(struct fsl_qspi *q, u8 cmd) +@@ -496,6 +633,7 @@ static int fsl_qspi_get_seqid(struct fsl case SPINOR_OP_CHIP_ERASE: return SEQID_CHIP_ERASE; case SPINOR_OP_PP: @@ -392,7 +387,7 @@ index 5c82e4ef..8fb75532 100644 return SEQID_PP; case SPINOR_OP_RDID: return SEQID_RDID; -@@ -507,6 +645,8 @@ static int fsl_qspi_get_seqid(struct fsl_qspi *q, u8 cmd) +@@ -507,6 +645,8 @@ static int fsl_qspi_get_seqid(struct fsl return SEQID_EN4B; case SPINOR_OP_BRWR: return SEQID_BRWR; @@ -401,7 +396,7 @@ index 5c82e4ef..8fb75532 100644 default: if (cmd == q->nor[0].erase_opcode) return SEQID_SE; -@@ -531,8 +671,11 @@ fsl_qspi_runcmd(struct fsl_qspi *q, u8 cmd, unsigned int addr, int len) +@@ -531,8 +671,11 @@ fsl_qspi_runcmd(struct fsl_qspi *q, u8 c /* save the reg */ reg = qspi_readl(q, base + QUADSPI_MCR); @@ -415,7 +410,7 @@ index 5c82e4ef..8fb75532 100644 qspi_writel(q, QUADSPI_RBCT_WMRK_MASK | QUADSPI_RBCT_RXBRD_USEIPS, base + QUADSPI_RBCT); qspi_writel(q, reg | QUADSPI_MCR_CLR_RXF_MASK, base + QUADSPI_MCR); -@@ -582,10 +725,10 @@ static void fsl_qspi_read_data(struct fsl_qspi *q, int len, u8 *rxbuf) +@@ -582,10 +725,10 @@ static void fsl_qspi_read_data(struct fs q->chip_base_addr, tmp); if (len >= 4) { @@ -428,7 +423,7 @@ index 5c82e4ef..8fb75532 100644 break; } -@@ -619,11 +762,12 @@ static inline void fsl_qspi_invalid(struct fsl_qspi *q) +@@ -619,11 +762,12 @@ static inline void fsl_qspi_invalid(stru } static ssize_t fsl_qspi_nor_write(struct fsl_qspi *q, struct spi_nor *nor, @@ -442,7 +437,7 @@ index 5c82e4ef..8fb75532 100644 dev_dbg(q->dev, "to 0x%.8x:0x%.8x, len : %d\n", q->chip_base_addr, to, count); -@@ -633,10 +777,13 @@ static ssize_t fsl_qspi_nor_write(struct fsl_qspi *q, struct spi_nor *nor, +@@ -633,10 +777,13 @@ static ssize_t fsl_qspi_nor_write(struct qspi_writel(q, tmp | QUADSPI_MCR_CLR_TXF_MASK, q->iobase + QUADSPI_MCR); /* fill the TX data to the FIFO */ @@ -458,7 +453,7 @@ index 5c82e4ef..8fb75532 100644 } /* fill the TXFIFO upto 16 bytes for i.MX7d */ -@@ -657,11 +804,43 @@ static void fsl_qspi_set_map_addr(struct fsl_qspi *q) +@@ -657,11 +804,43 @@ static void fsl_qspi_set_map_addr(struct { int nor_size = q->nor_size; void __iomem *base = q->iobase; @@ -506,7 +501,7 @@ index 5c82e4ef..8fb75532 100644 } /* -@@ -681,19 +860,36 @@ static void fsl_qspi_init_abh_read(struct fsl_qspi *q) +@@ -681,19 +860,36 @@ static void fsl_qspi_init_abh_read(struc { void __iomem *base = q->iobase; int seqid; @@ -549,7 +544,7 @@ index 5c82e4ef..8fb75532 100644 /* We only use the buffer3 */ qspi_writel(q, 0, base + QUADSPI_BUF0IND); -@@ -704,6 +900,11 @@ static void fsl_qspi_init_abh_read(struct fsl_qspi *q) +@@ -704,6 +900,11 @@ static void fsl_qspi_init_abh_read(struc seqid = fsl_qspi_get_seqid(q, q->nor[0].read_opcode); qspi_writel(q, seqid << QUADSPI_BFGENCR_SEQID_SHIFT, q->iobase + QUADSPI_BFGENCR); @@ -561,7 +556,7 @@ index 5c82e4ef..8fb75532 100644 } /* This function was used to prepare and enable QSPI clock */ -@@ -822,6 +1023,7 @@ static const struct of_device_id fsl_qspi_dt_ids[] = { +@@ -822,6 +1023,7 @@ static const struct of_device_id fsl_qsp { .compatible = "fsl,imx7d-qspi", .data = (void *)&imx7d_data, }, { .compatible = "fsl,imx6ul-qspi", .data = (void *)&imx6ul_data, }, { .compatible = "fsl,ls1021a-qspi", .data = (void *)&ls1021a_data, }, @@ -569,7 +564,7 @@ index 5c82e4ef..8fb75532 100644 { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, fsl_qspi_dt_ids); -@@ -835,8 +1037,12 @@ static int fsl_qspi_read_reg(struct spi_nor *nor, u8 opcode, u8 *buf, int len) +@@ -835,8 +1037,12 @@ static int fsl_qspi_read_reg(struct spi_ { int ret; struct fsl_qspi *q = nor->priv; @@ -583,7 +578,7 @@ index 5c82e4ef..8fb75532 100644 if (ret) return ret; -@@ -848,9 +1054,13 @@ static int fsl_qspi_write_reg(struct spi_nor *nor, u8 opcode, u8 *buf, int len) +@@ -848,9 +1054,13 @@ static int fsl_qspi_write_reg(struct spi { struct fsl_qspi *q = nor->priv; int ret; @@ -598,7 +593,7 @@ index 5c82e4ef..8fb75532 100644 if (ret) return ret; -@@ -859,7 +1069,7 @@ static int fsl_qspi_write_reg(struct spi_nor *nor, u8 opcode, u8 *buf, int len) +@@ -859,7 +1069,7 @@ static int fsl_qspi_write_reg(struct spi } else if (len > 0) { ret = fsl_qspi_nor_write(q, nor, opcode, 0, @@ -607,7 +602,7 @@ index 5c82e4ef..8fb75532 100644 if (ret > 0) return 0; } else { -@@ -875,7 +1085,7 @@ static ssize_t fsl_qspi_write(struct spi_nor *nor, loff_t to, +@@ -875,7 +1085,7 @@ static ssize_t fsl_qspi_write(struct spi { struct fsl_qspi *q = nor->priv; ssize_t ret = fsl_qspi_nor_write(q, nor, nor->program_opcode, to, @@ -616,7 +611,7 @@ index 5c82e4ef..8fb75532 100644 /* invalid the data in the AHB buffer. */ fsl_qspi_invalid(q); -@@ -922,7 +1132,7 @@ static ssize_t fsl_qspi_read(struct spi_nor *nor, loff_t from, +@@ -922,7 +1132,7 @@ static ssize_t fsl_qspi_read(struct spi_ len); /* Read out the data directly from the AHB buffer.*/ @@ -625,7 +620,7 @@ index 5c82e4ef..8fb75532 100644 len); return len; -@@ -980,6 +1190,8 @@ static int fsl_qspi_probe(struct platform_device *pdev) +@@ -980,6 +1190,8 @@ static int fsl_qspi_probe(struct platfor struct spi_nor *nor; struct mtd_info *mtd; int ret, i = 0; @@ -634,7 +629,7 @@ index 5c82e4ef..8fb75532 100644 q = devm_kzalloc(dev, sizeof(*q), GFP_KERNEL); if (!q) -@@ -1027,6 +1239,12 @@ static int fsl_qspi_probe(struct platform_device *pdev) +@@ -1027,6 +1239,12 @@ static int fsl_qspi_probe(struct platfor goto clk_failed; } @@ -647,7 +642,7 @@ index 5c82e4ef..8fb75532 100644 /* find the irq */ ret = platform_get_irq(pdev, 0); if (ret < 0) { -@@ -1050,6 +1268,7 @@ static int fsl_qspi_probe(struct platform_device *pdev) +@@ -1050,6 +1268,7 @@ static int fsl_qspi_probe(struct platfor mutex_init(&q->lock); @@ -655,7 +650,7 @@ index 5c82e4ef..8fb75532 100644 /* iterate the subnodes. */ for_each_available_child_of_node(dev->of_node, np) { /* skip the holes */ -@@ -1076,18 +1295,25 @@ static int fsl_qspi_probe(struct platform_device *pdev) +@@ -1076,18 +1295,25 @@ static int fsl_qspi_probe(struct platfor ret = of_property_read_u32(np, "spi-max-frequency", &q->clk_rate); if (ret < 0) @@ -685,7 +680,7 @@ index 5c82e4ef..8fb75532 100644 /* Set the correct NOR size now. */ if (q->nor_size == 0) { -@@ -1110,8 +1336,12 @@ static int fsl_qspi_probe(struct platform_device *pdev) +@@ -1110,8 +1336,12 @@ static int fsl_qspi_probe(struct platfor nor->page_size = q->devtype_data->txfifo; i++; @@ -698,8 +693,6 @@ index 5c82e4ef..8fb75532 100644 /* finish the rest init. */ ret = fsl_qspi_nor_setup_last(q); if (ret) -diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c -index 793d321d..190e0e45 100644 --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c @@ -40,6 +40,13 @@ @@ -747,7 +740,7 @@ index 793d321d..190e0e45 100644 */ static int read_cr(struct spi_nor *nor) { -@@ -160,6 +170,8 @@ static inline int spi_nor_read_dummy_cycles(struct spi_nor *nor) +@@ -160,6 +170,8 @@ static inline int spi_nor_read_dummy_cyc case SPI_NOR_DUAL: case SPI_NOR_QUAD: return 8; @@ -756,7 +749,7 @@ index 793d321d..190e0e45 100644 case SPI_NOR_NORMAL: return 0; } -@@ -961,6 +973,8 @@ static const struct flash_info spi_nor_ids[] = { +@@ -961,6 +973,8 @@ static const struct flash_info spi_nor_i /* ESMT */ { "f25l32pa", INFO(0x8c2016, 0, 64 * 1024, 64, SECT_4K | SPI_NOR_HAS_LOCK) }, @@ -765,7 +758,7 @@ index 793d321d..190e0e45 100644 /* Everspin */ { "mr25h256", CAT25_INFO( 32 * 1024, 1, 256, 2, SPI_NOR_NO_ERASE | SPI_NOR_NO_FR) }, -@@ -1014,12 +1028,15 @@ static const struct flash_info spi_nor_ids[] = { +@@ -1014,12 +1028,15 @@ static const struct flash_info spi_nor_i { "mx25l3205d", INFO(0xc22016, 0, 64 * 1024, 64, SECT_4K) }, { "mx25l3255e", INFO(0xc29e16, 0, 64 * 1024, 64, SECT_4K) }, { "mx25l6405d", INFO(0xc22017, 0, 64 * 1024, 128, SECT_4K) }, @@ -782,7 +775,7 @@ index 793d321d..190e0e45 100644 { "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) }, { "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_QUAD_READ) }, { "mx66l1g55g", INFO(0xc2261b, 0, 64 * 1024, 2048, SPI_NOR_QUAD_READ) }, -@@ -1033,10 +1050,11 @@ static const struct flash_info spi_nor_ids[] = { +@@ -1033,10 +1050,11 @@ static const struct flash_info spi_nor_i { "n25q128a11", INFO(0x20bb18, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_QUAD_READ) }, { "n25q128a13", INFO(0x20ba18, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_QUAD_READ) }, { "n25q256a", INFO(0x20ba19, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_QUAD_READ) }, @@ -796,7 +789,7 @@ index 793d321d..190e0e45 100644 /* PMC */ { "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K_PMC) }, -@@ -1054,8 +1072,11 @@ static const struct flash_info spi_nor_ids[] = { +@@ -1054,8 +1072,11 @@ static const struct flash_info spi_nor_i { "s70fl01gs", INFO(0x010221, 0x4d00, 256 * 1024, 256, 0) }, { "s25sl12800", INFO(0x012018, 0x0300, 256 * 1024, 64, 0) }, { "s25sl12801", INFO(0x012018, 0x0301, 64 * 1024, 256, 0) }, @@ -809,7 +802,7 @@ index 793d321d..190e0e45 100644 { "s25fl129p1", INFO(0x012018, 0x4d01, 64 * 1024, 256, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, { "s25sl004a", INFO(0x010212, 0, 64 * 1024, 8, 0) }, { "s25sl008a", INFO(0x010213, 0, 64 * 1024, 16, 0) }, -@@ -1130,6 +1151,9 @@ static const struct flash_info spi_nor_ids[] = { +@@ -1130,6 +1151,9 @@ static const struct flash_info spi_nor_i { "w25x80", INFO(0xef3014, 0, 64 * 1024, 16, SECT_4K) }, { "w25x16", INFO(0xef3015, 0, 64 * 1024, 32, SECT_4K) }, { "w25x32", INFO(0xef3016, 0, 64 * 1024, 64, SECT_4K) }, @@ -819,7 +812,7 @@ index 793d321d..190e0e45 100644 { "w25q32", INFO(0xef4016, 0, 64 * 1024, 64, SECT_4K) }, { "w25q32dw", INFO(0xef6016, 0, 64 * 1024, 64, -@@ -1192,6 +1216,53 @@ static const struct flash_info *spi_nor_read_id(struct spi_nor *nor) +@@ -1192,6 +1216,53 @@ static const struct flash_info *spi_nor_ id[0], id[1], id[2]); return ERR_PTR(-ENODEV); } @@ -873,7 +866,7 @@ index 793d321d..190e0e45 100644 static int spi_nor_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) -@@ -1411,7 +1482,7 @@ static int macronix_quad_enable(struct spi_nor *nor) +@@ -1411,7 +1482,7 @@ static int macronix_quad_enable(struct s * Write status Register and configuration register with 2 bytes * The first byte will be written to the status register, while the * second byte will be written to the configuration register. @@ -882,7 +875,7 @@ index 793d321d..190e0e45 100644 */ static int write_sr_cr(struct spi_nor *nor, u16 val) { -@@ -1459,6 +1530,24 @@ static int spansion_quad_enable(struct spi_nor *nor) +@@ -1459,6 +1530,24 @@ static int spansion_quad_enable(struct s return 0; } @@ -907,7 +900,7 @@ index 793d321d..190e0e45 100644 static int set_quad_mode(struct spi_nor *nor, const struct flash_info *info) { int status; -@@ -1604,9 +1693,25 @@ int spi_nor_scan(struct spi_nor *nor, const char *name, enum read_mode mode) +@@ -1604,9 +1693,25 @@ int spi_nor_scan(struct spi_nor *nor, co write_sr(nor, 0); spi_nor_wait_till_ready(nor); } @@ -933,7 +926,7 @@ index 793d321d..190e0e45 100644 mtd->priv = nor; mtd->type = MTD_NORFLASH; mtd->writesize = 1; -@@ -1639,6 +1744,8 @@ int spi_nor_scan(struct spi_nor *nor, const char *name, enum read_mode mode) +@@ -1639,6 +1744,8 @@ int spi_nor_scan(struct spi_nor *nor, co nor->flags |= SNOR_F_USE_FSR; if (info->flags & SPI_NOR_HAS_TB) nor->flags |= SNOR_F_HAS_SR_TB; @@ -942,7 +935,7 @@ index 793d321d..190e0e45 100644 #ifdef CONFIG_MTD_SPI_NOR_USE_4K_SECTORS /* prefer "small sector" erase if possible */ -@@ -1676,9 +1783,15 @@ int spi_nor_scan(struct spi_nor *nor, const char *name, enum read_mode mode) +@@ -1676,9 +1783,15 @@ int spi_nor_scan(struct spi_nor *nor, co /* Some devices cannot do fast-read, no matter what DT tells us */ if (info->flags & SPI_NOR_NO_FR) nor->flash_read = SPI_NOR_NORMAL; @@ -961,7 +954,7 @@ index 793d321d..190e0e45 100644 ret = set_quad_mode(nor, info); if (ret) { dev_err(dev, "quad mode not supported\n"); -@@ -1691,6 +1804,9 @@ int spi_nor_scan(struct spi_nor *nor, const char *name, enum read_mode mode) +@@ -1691,6 +1804,9 @@ int spi_nor_scan(struct spi_nor *nor, co /* Default commands */ switch (nor->flash_read) { @@ -971,8 +964,6 @@ index 793d321d..190e0e45 100644 case SPI_NOR_QUAD: nor->read_opcode = SPINOR_OP_READ_1_1_4; break; -diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h -index f2a71803..5003ff64 100644 --- a/include/linux/mtd/spi-nor.h +++ b/include/linux/mtd/spi-nor.h @@ -31,10 +31,10 @@ @@ -1037,6 +1028,3 @@ index f2a71803..5003ff64 100644 int (*prepare)(struct spi_nor *nor, enum spi_nor_ops ops); void (*unprepare)(struct spi_nor *nor, enum spi_nor_ops ops); --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/402-mtd-support-layerscape.patch b/target/linux/layerscape/patches-4.9/402-mtd-support-layerscape.patch index e45d2635fd..c4f15111cb 100644 --- a/target/linux/layerscape/patches-4.9/402-mtd-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/402-mtd-support-layerscape.patch @@ -17,8 +17,6 @@ Signed-off-by: Yangbo Lu include/linux/fsl_ifc.h | 7 ++ 6 files changed, 280 insertions(+), 3 deletions(-) -diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig -index 4b4c0c3c..820f5590 100644 --- a/drivers/memory/Kconfig +++ b/drivers/memory/Kconfig @@ -115,7 +115,7 @@ config FSL_CORENET_CF @@ -30,8 +28,6 @@ index 4b4c0c3c..820f5590 100644 config JZ4780_NEMC bool "Ingenic JZ4780 SoC NEMC driver" -diff --git a/drivers/memory/fsl_ifc.c b/drivers/memory/fsl_ifc.c -index 1b182b11..10d2a5f8 100644 --- a/drivers/memory/fsl_ifc.c +++ b/drivers/memory/fsl_ifc.c @@ -24,6 +24,7 @@ @@ -51,7 +47,7 @@ index 1b182b11..10d2a5f8 100644 /* * convert_ifc_address - convert the base address -@@ -311,6 +314,261 @@ static int fsl_ifc_ctrl_probe(struct platform_device *dev) +@@ -311,6 +314,261 @@ err: return ret; } @@ -313,7 +309,7 @@ index 1b182b11..10d2a5f8 100644 static const struct of_device_id fsl_ifc_match[] = { { .compatible = "fsl,ifc", -@@ -318,10 +576,15 @@ static const struct of_device_id fsl_ifc_match[] = { +@@ -318,10 +576,15 @@ static const struct of_device_id fsl_ifc {}, }; @@ -329,8 +325,6 @@ index 1b182b11..10d2a5f8 100644 }, .probe = fsl_ifc_ctrl_probe, .remove = fsl_ifc_ctrl_remove, -diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c -index 11d63046..38b90301 100644 --- a/drivers/mtd/maps/physmap_of.c +++ b/drivers/mtd/maps/physmap_of.c @@ -20,6 +20,7 @@ @@ -341,7 +335,7 @@ index 11d63046..38b90301 100644 #include #include #include -@@ -209,6 +210,9 @@ static int of_flash_probe(struct platform_device *dev) +@@ -209,6 +210,9 @@ static int of_flash_probe(struct platfor return err; } @@ -351,8 +345,6 @@ index 11d63046..38b90301 100644 err = -ENOMEM; info->list[i].map.virt = ioremap(info->list[i].map.phys, info->list[i].map.size); -diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig -index b254090b..961f1aa1 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig @@ -438,7 +438,7 @@ config MTD_NAND_FSL_ELBC @@ -364,11 +356,9 @@ index b254090b..961f1aa1 100644 select FSL_IFC select MEMORY help -diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c -index d1570f51..785e9ee0 100644 --- a/drivers/mtd/nand/fsl_ifc_nand.c +++ b/drivers/mtd/nand/fsl_ifc_nand.c -@@ -904,9 +904,12 @@ static int fsl_ifc_chip_init(struct fsl_ifc_mtd *priv) +@@ -904,9 +904,12 @@ static int fsl_ifc_chip_init(struct fsl_ chip->ecc.algo = NAND_ECC_HAMMING; } @@ -382,8 +372,6 @@ index d1570f51..785e9ee0 100644 return 0; } -diff --git a/include/linux/fsl_ifc.h b/include/linux/fsl_ifc.h -index c332f0a4..a41d21b6 100644 --- a/include/linux/fsl_ifc.h +++ b/include/linux/fsl_ifc.h @@ -274,6 +274,8 @@ @@ -407,6 +395,3 @@ index c332f0a4..a41d21b6 100644 }; extern struct fsl_ifc_ctrl *fsl_ifc_ctrl_dev; --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/601-net-support-layerscape.patch b/target/linux/layerscape/patches-4.9/601-net-support-layerscape.patch index 82e0a584b3..1c80ae5adc 100644 --- a/target/linux/layerscape/patches-4.9/601-net-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/601-net-support-layerscape.patch @@ -110,8 +110,6 @@ Signed-off-by: Yangbo Lu 90 files changed, 468 insertions(+), 298 deletions(-) create mode 100644 include/linux/fsl/svr.h -diff --git a/drivers/base/devres.c b/drivers/base/devres.c -index 8fc654f0..71d57702 100644 --- a/drivers/base/devres.c +++ b/drivers/base/devres.c @@ -10,6 +10,7 @@ @@ -122,7 +120,7 @@ index 8fc654f0..71d57702 100644 #include "base.h" -@@ -985,3 +986,68 @@ void devm_free_pages(struct device *dev, unsigned long addr) +@@ -985,3 +986,68 @@ void devm_free_pages(struct device *dev, &devres)); } EXPORT_SYMBOL_GPL(devm_free_pages); @@ -191,8 +189,6 @@ index 8fc654f0..71d57702 100644 + (void *)pdata)); +} +EXPORT_SYMBOL_GPL(devm_free_percpu); -diff --git a/drivers/base/soc.c b/drivers/base/soc.c -index b63f23e6..0c5cf872 100644 --- a/drivers/base/soc.c +++ b/drivers/base/soc.c @@ -13,6 +13,7 @@ @@ -272,8 +268,6 @@ index b63f23e6..0c5cf872 100644 + return NULL; +} +EXPORT_SYMBOL_GPL(soc_device_match); -diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c -index 5fa36ebc..75ff184a 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -211,8 +211,8 @@ static int lacp_fast; @@ -287,7 +281,7 @@ index 5fa36ebc..75ff184a 100644 static void bond_slave_arr_handler(struct work_struct *work); static bool bond_time_in_interval(struct bonding *bond, unsigned long last_act, int mod); -@@ -3336,8 +3336,8 @@ static void bond_fold_stats(struct rtnl_link_stats64 *_res, +@@ -3336,8 +3336,8 @@ static void bond_fold_stats(struct rtnl_ } } @@ -298,7 +292,7 @@ index 5fa36ebc..75ff184a 100644 { struct bonding *bond = netdev_priv(bond_dev); struct rtnl_link_stats64 temp; -@@ -3361,8 +3361,6 @@ static struct rtnl_link_stats64 *bond_get_stats(struct net_device *bond_dev, +@@ -3361,8 +3361,6 @@ static struct rtnl_link_stats64 *bond_ge memcpy(&bond->bond_stats, stats, sizeof(*stats)); spin_unlock(&bond->stats_lock); @@ -307,8 +301,6 @@ index 5fa36ebc..75ff184a 100644 } static int bond_do_ioctl(struct net_device *bond_dev, struct ifreq *ifr, int cmd) -diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c -index 69fc8409..da5b10e0 100644 --- a/drivers/net/dummy.c +++ b/drivers/net/dummy.c @@ -54,8 +54,8 @@ struct pcpu_dstats { @@ -322,7 +314,7 @@ index 69fc8409..da5b10e0 100644 { int i; -@@ -73,7 +73,6 @@ static struct rtnl_link_stats64 *dummy_get_stats64(struct net_device *dev, +@@ -73,7 +73,6 @@ static struct rtnl_link_stats64 *dummy_g stats->tx_bytes += tbytes; stats->tx_packets += tpackets; } @@ -330,11 +322,9 @@ index 69fc8409..da5b10e0 100644 } static netdev_tx_t dummy_xmit(struct sk_buff *skb, struct net_device *dev) -diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c -index bfeaec5b..ddc281c4 100644 --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c -@@ -2172,19 +2172,19 @@ static void ena_config_debug_area(struct ena_adapter *adapter) +@@ -2172,19 +2172,19 @@ err: ena_com_delete_debug_area(adapter->ena_dev); } @@ -358,7 +348,7 @@ index bfeaec5b..ddc281c4 100644 stats->tx_bytes = ((u64)ena_stats.tx_bytes_high << 32) | ena_stats.tx_bytes_low; -@@ -2211,8 +2211,6 @@ static struct rtnl_link_stats64 *ena_get_stats64(struct net_device *netdev, +@@ -2211,8 +2211,6 @@ static struct rtnl_link_stats64 *ena_get stats->rx_errors = 0; stats->tx_errors = 0; @@ -367,11 +357,9 @@ index bfeaec5b..ddc281c4 100644 } static const struct net_device_ops ena_netdev_ops = { -diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c -index 1e4e8b24..5b413ee7 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c -@@ -1542,8 +1542,8 @@ static void xgbe_tx_timeout(struct net_device *netdev) +@@ -1542,8 +1542,8 @@ static void xgbe_tx_timeout(struct net_d schedule_work(&pdata->restart_work); } @@ -382,7 +370,7 @@ index 1e4e8b24..5b413ee7 100644 { struct xgbe_prv_data *pdata = netdev_priv(netdev); struct xgbe_mmc_stats *pstats = &pdata->mmc_stats; -@@ -1569,8 +1569,6 @@ static struct rtnl_link_stats64 *xgbe_get_stats64(struct net_device *netdev, +@@ -1569,8 +1569,6 @@ static struct rtnl_link_stats64 *xgbe_ge s->tx_dropped = netdev->stats.tx_dropped; DBGPR("<--%s\n", __func__); @@ -391,11 +379,9 @@ index 1e4e8b24..5b413ee7 100644 } static int xgbe_vlan_rx_add_vid(struct net_device *netdev, __be16 proto, -diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c -index 8158d469..e62ca66b 100644 --- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c -@@ -1199,7 +1199,7 @@ static int xgene_enet_create_desc_rings(struct net_device *ndev) +@@ -1199,7 +1199,7 @@ err: return ret; } @@ -404,7 +390,7 @@ index 8158d469..e62ca66b 100644 struct net_device *ndev, struct rtnl_link_stats64 *storage) { -@@ -1230,8 +1230,6 @@ static struct rtnl_link_stats64 *xgene_enet_get_stats64( +@@ -1230,8 +1230,6 @@ static struct rtnl_link_stats64 *xgene_e } } memcpy(storage, stats, sizeof(struct rtnl_link_stats64)); @@ -413,11 +399,9 @@ index 8158d469..e62ca66b 100644 } static int xgene_enet_set_mac_address(struct net_device *ndev, void *addr) -diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c -index c0f84b73..3c5c8159 100644 --- a/drivers/net/ethernet/atheros/alx/main.c +++ b/drivers/net/ethernet/atheros/alx/main.c -@@ -1424,8 +1424,8 @@ static void alx_poll_controller(struct net_device *netdev) +@@ -1424,8 +1424,8 @@ static void alx_poll_controller(struct n } #endif @@ -428,7 +412,7 @@ index c0f84b73..3c5c8159 100644 { struct alx_priv *alx = netdev_priv(dev); struct alx_hw_stats *hw_stats = &alx->hw.stats; -@@ -1469,8 +1469,6 @@ static struct rtnl_link_stats64 *alx_get_stats64(struct net_device *dev, +@@ -1469,8 +1469,6 @@ static struct rtnl_link_stats64 *alx_get net_stats->rx_packets = hw_stats->rx_ok + net_stats->rx_errors; spin_unlock(&alx->stats_lock); @@ -437,11 +421,9 @@ index c0f84b73..3c5c8159 100644 } static const struct net_device_ops alx_netdev_ops = { -diff --git a/drivers/net/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c -index 17aa33c5..55f124d7 100644 --- a/drivers/net/ethernet/broadcom/b44.c +++ b/drivers/net/ethernet/broadcom/b44.c -@@ -1677,8 +1677,8 @@ static int b44_close(struct net_device *dev) +@@ -1677,8 +1677,8 @@ static int b44_close(struct net_device * return 0; } @@ -452,7 +434,7 @@ index 17aa33c5..55f124d7 100644 { struct b44 *bp = netdev_priv(dev); struct b44_hw_stats *hwstat = &bp->hw_stats; -@@ -1721,7 +1721,6 @@ static struct rtnl_link_stats64 *b44_get_stats64(struct net_device *dev, +@@ -1721,7 +1721,6 @@ static struct rtnl_link_stats64 *b44_get #endif } while (u64_stats_fetch_retry_irq(&hwstat->syncp, start)); @@ -460,8 +442,6 @@ index 17aa33c5..55f124d7 100644 } static int __b44_load_mcast(struct b44 *bp, struct net_device *dev) -diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c -index 1f7034d7..c23dfcb9 100644 --- a/drivers/net/ethernet/broadcom/bnx2.c +++ b/drivers/net/ethernet/broadcom/bnx2.c @@ -6828,13 +6828,13 @@ bnx2_save_stats(struct bnx2 *bp) @@ -480,7 +460,7 @@ index 1f7034d7..c23dfcb9 100644 net_stats->rx_packets = GET_64BIT_NET_STATS(stat_IfHCInUcastPkts) + -@@ -6898,7 +6898,6 @@ bnx2_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *net_stats) +@@ -6898,7 +6898,6 @@ bnx2_get_stats64(struct net_device *dev, GET_32BIT_NET_STATS(stat_IfInMBUFDiscards) + GET_32BIT_NET_STATS(stat_FwRxDrop); @@ -488,11 +468,9 @@ index 1f7034d7..c23dfcb9 100644 } /* All ethtool functions called with rtnl_lock */ -diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c -index 20e569bd..d6c10783 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c -@@ -5664,7 +5664,7 @@ static int bnxt_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) +@@ -5664,7 +5664,7 @@ static int bnxt_ioctl(struct net_device return -EOPNOTSUPP; } @@ -501,7 +479,7 @@ index 20e569bd..d6c10783 100644 bnxt_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) { u32 i; -@@ -5673,7 +5673,7 @@ bnxt_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) +@@ -5673,7 +5673,7 @@ bnxt_get_stats64(struct net_device *dev, memset(stats, 0, sizeof(struct rtnl_link_stats64)); if (!bp->bnapi) @@ -510,7 +488,7 @@ index 20e569bd..d6c10783 100644 /* TODO check if we need to synchronize with bnxt_close path */ for (i = 0; i < bp->cp_nr_rings; i++) { -@@ -5720,8 +5720,6 @@ bnxt_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) +@@ -5720,8 +5720,6 @@ bnxt_get_stats64(struct net_device *dev, stats->tx_fifo_errors = le64_to_cpu(tx->tx_fifo_underruns); stats->tx_errors = le64_to_cpu(tx->tx_err); } @@ -519,11 +497,9 @@ index 20e569bd..d6c10783 100644 } static bool bnxt_mc_list_updated(struct bnxt *bp, u32 *rx_mask) -diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c -index edae2dcc..4d45077e 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c -@@ -14145,8 +14145,8 @@ static const struct ethtool_ops tg3_ethtool_ops = { +@@ -14145,8 +14145,8 @@ static const struct ethtool_ops tg3_etht .set_link_ksettings = tg3_set_link_ksettings, }; @@ -534,7 +510,7 @@ index edae2dcc..4d45077e 100644 { struct tg3 *tp = netdev_priv(dev); -@@ -14154,13 +14154,11 @@ static struct rtnl_link_stats64 *tg3_get_stats64(struct net_device *dev, +@@ -14154,13 +14154,11 @@ static struct rtnl_link_stats64 *tg3_get if (!tp->hw_stats) { *stats = tp->net_stats_prev; spin_unlock_bh(&tp->lock); @@ -549,11 +525,9 @@ index edae2dcc..4d45077e 100644 } static void tg3_set_rx_mode(struct net_device *dev) -diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c -index f42f672b..aa141609 100644 --- a/drivers/net/ethernet/brocade/bna/bnad.c +++ b/drivers/net/ethernet/brocade/bna/bnad.c -@@ -3111,7 +3111,7 @@ bnad_start_xmit(struct sk_buff *skb, struct net_device *netdev) +@@ -3111,7 +3111,7 @@ bnad_start_xmit(struct sk_buff *skb, str * Used spin_lock to synchronize reading of stats structures, which * is written by BNA under the same lock. */ @@ -562,7 +536,7 @@ index f42f672b..aa141609 100644 bnad_get_stats64(struct net_device *netdev, struct rtnl_link_stats64 *stats) { struct bnad *bnad = netdev_priv(netdev); -@@ -3123,8 +3123,6 @@ bnad_get_stats64(struct net_device *netdev, struct rtnl_link_stats64 *stats) +@@ -3123,8 +3123,6 @@ bnad_get_stats64(struct net_device *netd bnad_netdev_hwstats_fill(bnad, stats); spin_unlock_irqrestore(&bnad->bna_lock, flags); @@ -571,7 +545,7 @@ index f42f672b..aa141609 100644 } static void -@@ -3430,7 +3428,7 @@ static const struct net_device_ops bnad_netdev_ops = { +@@ -3430,7 +3428,7 @@ static const struct net_device_ops bnad_ .ndo_open = bnad_open, .ndo_stop = bnad_stop, .ndo_start_xmit = bnad_start_xmit, @@ -580,11 +554,9 @@ index f42f672b..aa141609 100644 .ndo_set_rx_mode = bnad_set_rx_mode, .ndo_validate_addr = eth_validate_addr, .ndo_set_mac_address = bnad_set_mac_address, -diff --git a/drivers/net/ethernet/calxeda/xgmac.c b/drivers/net/ethernet/calxeda/xgmac.c -index 63efa0dc..ccb8fbd6 100644 --- a/drivers/net/ethernet/calxeda/xgmac.c +++ b/drivers/net/ethernet/calxeda/xgmac.c -@@ -1460,9 +1460,9 @@ static void xgmac_poll_controller(struct net_device *dev) +@@ -1460,9 +1460,9 @@ static void xgmac_poll_controller(struct } #endif @@ -596,7 +568,7 @@ index 63efa0dc..ccb8fbd6 100644 { struct xgmac_priv *priv = netdev_priv(dev); void __iomem *base = priv->base; -@@ -1490,7 +1490,6 @@ xgmac_get_stats64(struct net_device *dev, +@@ -1490,7 +1490,6 @@ xgmac_get_stats64(struct net_device *dev writel(0, base + XGMAC_MMC_CTRL); spin_unlock_bh(&priv->stats_lock); @@ -604,11 +576,9 @@ index 63efa0dc..ccb8fbd6 100644 } static int xgmac_set_mac_address(struct net_device *dev, void *p) -diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_main.c b/drivers/net/ethernet/cavium/thunder/nicvf_main.c -index 8a37012c..87709a9d 100644 --- a/drivers/net/ethernet/cavium/thunder/nicvf_main.c +++ b/drivers/net/ethernet/cavium/thunder/nicvf_main.c -@@ -1423,8 +1423,8 @@ void nicvf_update_stats(struct nicvf *nic) +@@ -1423,8 +1423,8 @@ void nicvf_update_stats(struct nicvf *ni nicvf_update_sq_stats(nic, qidx); } @@ -619,7 +589,7 @@ index 8a37012c..87709a9d 100644 { struct nicvf *nic = netdev_priv(netdev); struct nicvf_hw_stats *hw_stats = &nic->hw_stats; -@@ -1440,7 +1440,6 @@ static struct rtnl_link_stats64 *nicvf_get_stats64(struct net_device *netdev, +@@ -1440,7 +1440,6 @@ static struct rtnl_link_stats64 *nicvf_g stats->tx_packets = hw_stats->tx_frames; stats->tx_dropped = hw_stats->tx_drops; @@ -627,11 +597,9 @@ index 8a37012c..87709a9d 100644 } static void nicvf_tx_timeout(struct net_device *dev) -diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c -index 0c2a32a3..c4244913 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c -@@ -2383,8 +2383,8 @@ int cxgb4_remove_server_filter(const struct net_device *dev, unsigned int stid, +@@ -2383,8 +2383,8 @@ int cxgb4_remove_server_filter(const str } EXPORT_SYMBOL(cxgb4_remove_server_filter); @@ -642,7 +610,7 @@ index 0c2a32a3..c4244913 100644 { struct port_stats stats; struct port_info *p = netdev_priv(dev); -@@ -2397,7 +2397,7 @@ static struct rtnl_link_stats64 *cxgb_get_stats(struct net_device *dev, +@@ -2397,7 +2397,7 @@ static struct rtnl_link_stats64 *cxgb_ge spin_lock(&adapter->stats_lock); if (!netif_device_present(dev)) { spin_unlock(&adapter->stats_lock); @@ -651,7 +619,7 @@ index 0c2a32a3..c4244913 100644 } t4_get_port_stats_offset(adapter, p->tx_chan, &stats, &p->stats_base); -@@ -2431,7 +2431,6 @@ static struct rtnl_link_stats64 *cxgb_get_stats(struct net_device *dev, +@@ -2431,7 +2431,6 @@ static struct rtnl_link_stats64 *cxgb_ge ns->tx_errors = stats.tx_error_frames; ns->rx_errors = stats.rx_symbol_err + stats.rx_fcs_err + ns->rx_length_errors + stats.rx_len_err + ns->rx_fifo_errors; @@ -659,11 +627,9 @@ index 0c2a32a3..c4244913 100644 } static int cxgb_ioctl(struct net_device *dev, struct ifreq *req, int cmd) -diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c -index 48f82ab6..662cc676 100644 --- a/drivers/net/ethernet/cisco/enic/enic_main.c +++ b/drivers/net/ethernet/cisco/enic/enic_main.c -@@ -680,8 +680,8 @@ static netdev_tx_t enic_hard_start_xmit(struct sk_buff *skb, +@@ -680,8 +680,8 @@ static netdev_tx_t enic_hard_start_xmit( } /* dev_base_lock rwlock held, nominally process context */ @@ -674,7 +640,7 @@ index 48f82ab6..662cc676 100644 { struct enic *enic = netdev_priv(netdev); struct vnic_stats *stats; -@@ -693,7 +693,7 @@ static struct rtnl_link_stats64 *enic_get_stats(struct net_device *netdev, +@@ -693,7 +693,7 @@ static struct rtnl_link_stats64 *enic_ge * recorded stats. */ if (err == -ENOMEM) @@ -683,7 +649,7 @@ index 48f82ab6..662cc676 100644 net_stats->tx_packets = stats->tx.tx_frames_ok; net_stats->tx_bytes = stats->tx.tx_bytes_ok; -@@ -707,8 +707,6 @@ static struct rtnl_link_stats64 *enic_get_stats(struct net_device *netdev, +@@ -707,8 +707,6 @@ static struct rtnl_link_stats64 *enic_ge net_stats->rx_over_errors = enic->rq_truncated_pkts; net_stats->rx_crc_errors = enic->rq_bad_fcs; net_stats->rx_dropped = stats->rx.rx_no_bufs + stats->rx.rx_drop; @@ -692,11 +658,9 @@ index 48f82ab6..662cc676 100644 } static int enic_mc_sync(struct net_device *netdev, const u8 *mc_addr) -diff --git a/drivers/net/ethernet/ec_bhf.c b/drivers/net/ethernet/ec_bhf.c -index f7b42483..2e7554c7 100644 --- a/drivers/net/ethernet/ec_bhf.c +++ b/drivers/net/ethernet/ec_bhf.c -@@ -458,7 +458,7 @@ static int ec_bhf_stop(struct net_device *net_dev) +@@ -458,7 +458,7 @@ static int ec_bhf_stop(struct net_device return 0; } @@ -705,7 +669,7 @@ index f7b42483..2e7554c7 100644 ec_bhf_get_stats(struct net_device *net_dev, struct rtnl_link_stats64 *stats) { -@@ -473,8 +473,6 @@ ec_bhf_get_stats(struct net_device *net_dev, +@@ -473,8 +473,6 @@ ec_bhf_get_stats(struct net_device *net_ stats->tx_bytes = priv->stat_tx_bytes; stats->rx_bytes = priv->stat_rx_bytes; @@ -714,11 +678,9 @@ index f7b42483..2e7554c7 100644 } static const struct net_device_ops ec_bhf_netdev_ops = { -diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c -index 5626908f..59852304 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c -@@ -646,8 +646,8 @@ void be_parse_stats(struct be_adapter *adapter) +@@ -646,8 +646,8 @@ void be_parse_stats(struct be_adapter *a } } @@ -729,7 +691,7 @@ index 5626908f..59852304 100644 { struct be_adapter *adapter = netdev_priv(netdev); struct be_drv_stats *drvs = &adapter->drv_stats; -@@ -711,7 +711,6 @@ static struct rtnl_link_stats64 *be_get_stats64(struct net_device *netdev, +@@ -711,7 +711,6 @@ static struct rtnl_link_stats64 *be_get_ stats->rx_fifo_errors = drvs->rxpp_fifo_overflow_drop + drvs->rx_input_fifo_overflow_drop + drvs->rx_drops_no_pbuf; @@ -737,11 +699,9 @@ index 5626908f..59852304 100644 } void be_link_status_update(struct be_adapter *adapter, u8 link_status) -diff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c b/drivers/net/ethernet/hisilicon/hns/hns_enet.c -index c06845b7..249bc6ad 100644 --- a/drivers/net/ethernet/hisilicon/hns/hns_enet.c +++ b/drivers/net/ethernet/hisilicon/hns/hns_enet.c -@@ -1536,8 +1536,8 @@ void hns_nic_set_rx_mode(struct net_device *ndev) +@@ -1536,8 +1536,8 @@ void hns_nic_set_rx_mode(struct net_devi hns_set_multicast_list(ndev); } @@ -752,7 +712,7 @@ index c06845b7..249bc6ad 100644 { int idx = 0; u64 tx_bytes = 0; -@@ -1579,8 +1579,6 @@ struct rtnl_link_stats64 *hns_nic_get_stats64(struct net_device *ndev, +@@ -1579,8 +1579,6 @@ struct rtnl_link_stats64 *hns_nic_get_st stats->tx_window_errors = ndev->stats.tx_window_errors; stats->rx_compressed = ndev->stats.rx_compressed; stats->tx_compressed = ndev->stats.tx_compressed; @@ -761,11 +721,9 @@ index c06845b7..249bc6ad 100644 } static u16 -diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c -index bd719e25..a2ff2783 100644 --- a/drivers/net/ethernet/ibm/ehea/ehea_main.c +++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c -@@ -328,8 +328,8 @@ static void ehea_update_bcmc_registrations(void) +@@ -328,8 +328,8 @@ out: spin_unlock_irqrestore(&ehea_bcmc_regs.lock, flags); } @@ -776,7 +734,7 @@ index bd719e25..a2ff2783 100644 { struct ehea_port *port = netdev_priv(dev); u64 rx_packets = 0, tx_packets = 0, rx_bytes = 0, tx_bytes = 0; -@@ -352,7 +352,6 @@ static struct rtnl_link_stats64 *ehea_get_stats64(struct net_device *dev, +@@ -352,7 +352,6 @@ static struct rtnl_link_stats64 *ehea_ge stats->multicast = port->stats.multicast; stats->rx_errors = port->stats.rx_errors; @@ -784,11 +742,9 @@ index bd719e25..a2ff2783 100644 } static void ehea_update_stats(struct work_struct *work) -diff --git a/drivers/net/ethernet/intel/e1000e/e1000.h b/drivers/net/ethernet/intel/e1000e/e1000.h -index 879cca47..a29b12e8 100644 --- a/drivers/net/ethernet/intel/e1000e/e1000.h +++ b/drivers/net/ethernet/intel/e1000e/e1000.h -@@ -493,8 +493,8 @@ int e1000e_setup_rx_resources(struct e1000_ring *ring); +@@ -493,8 +493,8 @@ int e1000e_setup_rx_resources(struct e10 int e1000e_setup_tx_resources(struct e1000_ring *ring); void e1000e_free_rx_resources(struct e1000_ring *ring); void e1000e_free_tx_resources(struct e1000_ring *ring); @@ -799,11 +755,9 @@ index 879cca47..a29b12e8 100644 void e1000e_set_interrupt_capability(struct e1000_adapter *adapter); void e1000e_reset_interrupt_capability(struct e1000_adapter *adapter); void e1000e_get_hw_control(struct e1000_adapter *adapter); -diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c -index 7017281b..49f3d868 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c -@@ -5920,8 +5920,8 @@ static void e1000_reset_task(struct work_struct *work) +@@ -5939,8 +5939,8 @@ static void e1000_reset_task(struct work * * Returns the address of the device statistics structure. **/ @@ -814,7 +768,7 @@ index 7017281b..49f3d868 100644 { struct e1000_adapter *adapter = netdev_priv(netdev); -@@ -5958,7 +5958,6 @@ struct rtnl_link_stats64 *e1000e_get_stats64(struct net_device *netdev, +@@ -5977,7 +5977,6 @@ struct rtnl_link_stats64 *e1000e_get_sta /* Tx Dropped needs to be maintained elsewhere */ spin_unlock(&adapter->stats64_lock); @@ -822,11 +776,9 @@ index 7017281b..49f3d868 100644 } /** -diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c -index 05629381..e97b6c49 100644 --- a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c +++ b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c -@@ -1128,8 +1128,8 @@ void fm10k_reset_rx_state(struct fm10k_intfc *interface) +@@ -1128,8 +1128,8 @@ void fm10k_reset_rx_state(struct fm10k_i * Returns 64bit statistics, for use in the ndo_get_stats64 callback. This * function replaces fm10k_get_stats for kernels which support it. */ @@ -837,7 +789,7 @@ index 05629381..e97b6c49 100644 { struct fm10k_intfc *interface = netdev_priv(netdev); struct fm10k_ring *ring; -@@ -1174,8 +1174,6 @@ static struct rtnl_link_stats64 *fm10k_get_stats64(struct net_device *netdev, +@@ -1174,8 +1174,6 @@ static struct rtnl_link_stats64 *fm10k_g /* following stats updated by fm10k_service_task() */ stats->rx_missed_errors = netdev->stats.rx_missed_errors; @@ -846,11 +798,9 @@ index 05629381..e97b6c49 100644 } int fm10k_setup_tc(struct net_device *dev, u8 tc) -diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h -index 6d61e443..3cc0bf29 100644 --- a/drivers/net/ethernet/intel/i40e/i40e.h +++ b/drivers/net/ethernet/intel/i40e/i40e.h -@@ -797,9 +797,8 @@ static inline void i40e_irq_dynamic_enable(struct i40e_vsi *vsi, int vector) +@@ -797,9 +797,8 @@ static inline void i40e_irq_dynamic_enab void i40e_irq_dynamic_disable_icr0(struct i40e_pf *pf); void i40e_irq_dynamic_enable_icr0(struct i40e_pf *pf, bool clearpba); #ifdef I40E_FCOE @@ -862,11 +812,9 @@ index 6d61e443..3cc0bf29 100644 int i40e_set_mac(struct net_device *netdev, void *p); void i40e_set_rx_mode(struct net_device *netdev); #endif -diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c -index 31c97e39..2f1554b3 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c -@@ -408,15 +408,11 @@ struct rtnl_link_stats64 *i40e_get_vsi_stats_struct(struct i40e_vsi *vsi) +@@ -408,15 +408,11 @@ struct rtnl_link_stats64 *i40e_get_vsi_s * Returns the address of the device statistics structure. * The statistics are actually updated from the service task. **/ @@ -886,7 +834,7 @@ index 31c97e39..2f1554b3 100644 { struct i40e_netdev_priv *np = netdev_priv(netdev); struct i40e_ring *tx_ring, *rx_ring; -@@ -425,10 +421,10 @@ static struct rtnl_link_stats64 *i40e_get_netdev_stats_struct( +@@ -425,10 +421,10 @@ static struct rtnl_link_stats64 *i40e_ge int i; if (test_bit(__I40E_DOWN, &vsi->state)) @@ -899,7 +847,7 @@ index 31c97e39..2f1554b3 100644 rcu_read_lock(); for (i = 0; i < vsi->num_queue_pairs; i++) { -@@ -468,8 +464,6 @@ static struct rtnl_link_stats64 *i40e_get_netdev_stats_struct( +@@ -468,8 +464,6 @@ static struct rtnl_link_stats64 *i40e_ge stats->rx_dropped = vsi_stats->rx_dropped; stats->rx_crc_errors = vsi_stats->rx_crc_errors; stats->rx_length_errors = vsi_stats->rx_length_errors; @@ -908,11 +856,9 @@ index 31c97e39..2f1554b3 100644 } /** -diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c -index 9affd7c1..076ccfa4 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c -@@ -137,8 +137,8 @@ static void igb_update_phy_info(unsigned long); +@@ -137,8 +137,8 @@ static void igb_update_phy_info(unsigned static void igb_watchdog(unsigned long); static void igb_watchdog_task(struct work_struct *); static netdev_tx_t igb_xmit_frame(struct sk_buff *skb, struct net_device *); @@ -923,7 +869,7 @@ index 9affd7c1..076ccfa4 100644 static int igb_change_mtu(struct net_device *, int); static int igb_set_mac(struct net_device *, void *); static void igb_set_uta(struct igb_adapter *adapter, bool set); -@@ -5386,8 +5386,8 @@ static void igb_reset_task(struct work_struct *work) +@@ -5386,8 +5386,8 @@ static void igb_reset_task(struct work_s * @netdev: network interface device structure * @stats: rtnl_link_stats64 pointer **/ @@ -934,7 +880,7 @@ index 9affd7c1..076ccfa4 100644 { struct igb_adapter *adapter = netdev_priv(netdev); -@@ -5395,8 +5395,6 @@ static struct rtnl_link_stats64 *igb_get_stats64(struct net_device *netdev, +@@ -5395,8 +5395,6 @@ static struct rtnl_link_stats64 *igb_get igb_update_stats(adapter, &adapter->stats64); memcpy(stats, &adapter->stats64, sizeof(*stats)); spin_unlock(&adapter->stats64_lock); @@ -943,11 +889,9 @@ index 9affd7c1..076ccfa4 100644 } /** -diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c -index fee1f291..ee4f1cc2 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c -@@ -8085,8 +8085,9 @@ static void ixgbe_netpoll(struct net_device *netdev) +@@ -8085,8 +8085,9 @@ static void ixgbe_netpoll(struct net_dev } #endif @@ -959,7 +903,7 @@ index fee1f291..ee4f1cc2 100644 { struct ixgbe_adapter *adapter = netdev_priv(netdev); int i; -@@ -8124,13 +8125,13 @@ static struct rtnl_link_stats64 *ixgbe_get_stats64(struct net_device *netdev, +@@ -8124,13 +8125,13 @@ static struct rtnl_link_stats64 *ixgbe_g } } rcu_read_unlock(); @@ -974,11 +918,9 @@ index fee1f291..ee4f1cc2 100644 } #ifdef CONFIG_IXGBE_DCB -diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c -index cbf70fe4..3519769e 100644 --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c -@@ -3880,8 +3880,8 @@ static void ixgbevf_shutdown(struct pci_dev *pdev) +@@ -3880,8 +3880,8 @@ static void ixgbevf_shutdown(struct pci_ ixgbevf_suspend(pdev, PMSG_SUSPEND); } @@ -989,7 +931,7 @@ index cbf70fe4..3519769e 100644 { struct ixgbevf_adapter *adapter = netdev_priv(netdev); unsigned int start; -@@ -3914,8 +3914,6 @@ static struct rtnl_link_stats64 *ixgbevf_get_stats(struct net_device *netdev, +@@ -3914,8 +3914,6 @@ static struct rtnl_link_stats64 *ixgbevf stats->tx_bytes += bytes; stats->tx_packets += packets; } @@ -998,11 +940,9 @@ index cbf70fe4..3519769e 100644 } #define IXGBEVF_MAX_MAC_HDR_LEN 127 -diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c -index 707bc468..100f3af8 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -636,7 +636,7 @@ static void mvneta_mib_counters_clear(struct mvneta_port *pp) +@@ -636,7 +636,7 @@ static void mvneta_mib_counters_clear(st } /* Get System Network Statistics */ @@ -1011,7 +951,7 @@ index 707bc468..100f3af8 100644 mvneta_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) { -@@ -670,8 +670,6 @@ mvneta_get_stats64(struct net_device *dev, +@@ -670,8 +670,6 @@ mvneta_get_stats64(struct net_device *de stats->rx_dropped = dev->stats.rx_dropped; stats->tx_dropped = dev->stats.tx_dropped; @@ -1020,11 +960,9 @@ index 707bc468..100f3af8 100644 } /* Rx descriptors helper methods */ -diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c -index 0a4e81a2..17032925 100644 --- a/drivers/net/ethernet/marvell/mvpp2.c +++ b/drivers/net/ethernet/marvell/mvpp2.c -@@ -5762,7 +5762,7 @@ static int mvpp2_change_mtu(struct net_device *dev, int mtu) +@@ -5762,7 +5762,7 @@ error: return err; } @@ -1033,7 +971,7 @@ index 0a4e81a2..17032925 100644 mvpp2_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) { struct mvpp2_port *port = netdev_priv(dev); -@@ -5794,8 +5794,6 @@ mvpp2_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) +@@ -5794,8 +5794,6 @@ mvpp2_get_stats64(struct net_device *dev stats->rx_errors = dev->stats.rx_errors; stats->rx_dropped = dev->stats.rx_dropped; stats->tx_dropped = dev->stats.tx_dropped; @@ -1042,11 +980,9 @@ index 0a4e81a2..17032925 100644 } static int mvpp2_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) -diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c -index 941c8e2c..cff8b633 100644 --- a/drivers/net/ethernet/marvell/sky2.c +++ b/drivers/net/ethernet/marvell/sky2.c -@@ -3898,8 +3898,8 @@ static void sky2_set_multicast(struct net_device *dev) +@@ -3898,8 +3898,8 @@ static void sky2_set_multicast(struct ne gma_write16(hw, port, GM_RX_CTRL, reg); } @@ -1057,7 +993,7 @@ index 941c8e2c..cff8b633 100644 { struct sky2_port *sky2 = netdev_priv(dev); struct sky2_hw *hw = sky2->hw; -@@ -3939,8 +3939,6 @@ static struct rtnl_link_stats64 *sky2_get_stats(struct net_device *dev, +@@ -3939,8 +3939,6 @@ static struct rtnl_link_stats64 *sky2_ge stats->rx_dropped = dev->stats.rx_dropped; stats->rx_fifo_errors = dev->stats.rx_fifo_errors; stats->tx_fifo_errors = dev->stats.tx_fifo_errors; @@ -1066,11 +1002,9 @@ index 941c8e2c..cff8b633 100644 } /* Can have one global because blinking is controlled by -diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -index 4832223f..6d260da6 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -462,8 +462,8 @@ static void mtk_stats_update(struct mtk_eth *eth) +@@ -462,8 +462,8 @@ static void mtk_stats_update(struct mtk_ } } @@ -1081,7 +1015,7 @@ index 4832223f..6d260da6 100644 { struct mtk_mac *mac = netdev_priv(dev); struct mtk_hw_stats *hw_stats = mac->hw_stats; -@@ -494,8 +494,6 @@ static struct rtnl_link_stats64 *mtk_get_stats64(struct net_device *dev, +@@ -494,8 +494,6 @@ static struct rtnl_link_stats64 *mtk_get storage->tx_errors = dev->stats.tx_errors; storage->rx_dropped = dev->stats.rx_dropped; storage->tx_dropped = dev->stats.tx_dropped; @@ -1090,11 +1024,9 @@ index 4832223f..6d260da6 100644 } static inline int mtk_max_frag_size(int mtu) -diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c -index d223e7cb..ebf5c7e5 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c -@@ -1316,7 +1316,7 @@ static void mlx4_en_tx_timeout(struct net_device *dev) +@@ -1316,7 +1316,7 @@ static void mlx4_en_tx_timeout(struct ne } @@ -1103,7 +1035,7 @@ index d223e7cb..ebf5c7e5 100644 mlx4_en_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) { struct mlx4_en_priv *priv = netdev_priv(dev); -@@ -1324,8 +1324,6 @@ mlx4_en_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) +@@ -1324,8 +1324,6 @@ mlx4_en_get_stats64(struct net_device *d spin_lock_bh(&priv->stats_lock); netdev_stats_to_stats64(stats, &dev->stats); spin_unlock_bh(&priv->stats_lock); @@ -1112,11 +1044,9 @@ index d223e7cb..ebf5c7e5 100644 } static void mlx4_en_set_default_moderation(struct mlx4_en_priv *priv) -diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c -index 9d372293..582ba530 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c -@@ -2647,7 +2647,7 @@ static int mlx5e_ndo_setup_tc(struct net_device *dev, u32 handle, +@@ -2647,7 +2647,7 @@ mqprio: return mlx5e_setup_tc(dev, tc->tc); } @@ -1125,7 +1055,7 @@ index 9d372293..582ba530 100644 mlx5e_get_stats(struct net_device *dev, struct rtnl_link_stats64 *stats) { struct mlx5e_priv *priv = netdev_priv(dev); -@@ -2681,7 +2681,6 @@ mlx5e_get_stats(struct net_device *dev, struct rtnl_link_stats64 *stats) +@@ -2681,7 +2681,6 @@ mlx5e_get_stats(struct net_device *dev, stats->multicast = VPORT_COUNTER_GET(vstats, received_eth_multicast.packets); @@ -1133,11 +1063,9 @@ index 9d372293..582ba530 100644 } static void mlx5e_set_rx_mode(struct net_device *dev) -diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c -index 1806b1fc..cf21a83a 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c -@@ -948,15 +948,13 @@ static void update_stats_cache(struct work_struct *work) +@@ -948,15 +948,13 @@ out: /* Return the stats from a cache that is updated periodically, * as this function might get called in an atomic context. */ @@ -1154,11 +1082,9 @@ index 1806b1fc..cf21a83a 100644 } int mlxsw_sp_port_vlan_set(struct mlxsw_sp_port *mlxsw_sp_port, u16 vid_begin, -diff --git a/drivers/net/ethernet/mellanox/mlxsw/switchx2.c b/drivers/net/ethernet/mellanox/mlxsw/switchx2.c -index d548f0a5..6e9e7fa4 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/switchx2.c +++ b/drivers/net/ethernet/mellanox/mlxsw/switchx2.c -@@ -351,7 +351,7 @@ static int mlxsw_sx_port_change_mtu(struct net_device *dev, int mtu) +@@ -351,7 +351,7 @@ static int mlxsw_sx_port_change_mtu(stru return 0; } @@ -1167,7 +1093,7 @@ index d548f0a5..6e9e7fa4 100644 mlxsw_sx_port_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) { -@@ -380,7 +380,6 @@ mlxsw_sx_port_get_stats64(struct net_device *dev, +@@ -380,7 +380,6 @@ mlxsw_sx_port_get_stats64(struct net_dev tx_dropped += p->tx_dropped; } stats->tx_dropped = tx_dropped; @@ -1175,11 +1101,9 @@ index d548f0a5..6e9e7fa4 100644 } static const struct net_device_ops mlxsw_sx_port_netdev_ops = { -diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c -index 6d1a956e..d26745cc 100644 --- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c +++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c -@@ -378,8 +378,8 @@ static inline void put_be32(__be32 val, __be32 __iomem * p) +@@ -378,8 +378,8 @@ static inline void put_be32(__be32 val, __raw_writel((__force __u32) val, (__force void __iomem *)p); } @@ -1190,7 +1114,7 @@ index 6d1a956e..d26745cc 100644 static void set_fw_name(struct myri10ge_priv *mgp, char *name, bool allocated) { -@@ -3119,8 +3119,8 @@ static netdev_tx_t myri10ge_sw_tso(struct sk_buff *skb, +@@ -3119,8 +3119,8 @@ drop: return NETDEV_TX_OK; } @@ -1201,7 +1125,7 @@ index 6d1a956e..d26745cc 100644 { const struct myri10ge_priv *mgp = netdev_priv(dev); const struct myri10ge_slice_netstats *slice_stats; -@@ -3135,7 +3135,6 @@ static struct rtnl_link_stats64 *myri10ge_get_stats(struct net_device *dev, +@@ -3135,7 +3135,6 @@ static struct rtnl_link_stats64 *myri10g stats->rx_dropped += slice_stats->rx_dropped; stats->tx_dropped += slice_stats->tx_dropped; } @@ -1209,11 +1133,9 @@ index 6d1a956e..d26745cc 100644 } static void myri10ge_set_multicast_list(struct net_device *dev) -diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.c b/drivers/net/ethernet/neterion/vxge/vxge-main.c -index e0993eba..9c27728f 100644 --- a/drivers/net/ethernet/neterion/vxge/vxge-main.c +++ b/drivers/net/ethernet/neterion/vxge/vxge-main.c -@@ -3116,7 +3116,7 @@ static int vxge_change_mtu(struct net_device *dev, int new_mtu) +@@ -3116,7 +3116,7 @@ static int vxge_change_mtu(struct net_de * @stats: pointer to struct rtnl_link_stats64 * */ @@ -1222,7 +1144,7 @@ index e0993eba..9c27728f 100644 vxge_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *net_stats) { struct vxgedev *vdev = netdev_priv(dev); -@@ -3155,8 +3155,6 @@ vxge_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *net_stats) +@@ -3155,8 +3155,6 @@ vxge_get_stats64(struct net_device *dev, net_stats->tx_bytes += bytes; net_stats->tx_errors += txstats->tx_errors; } @@ -1231,11 +1153,9 @@ index e0993eba..9c27728f 100644 } static enum vxge_hw_status vxge_timestamp_config(struct __vxge_hw_device *devh) -diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c -index 4ca82bd8..55915cbd 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c -@@ -2400,8 +2400,8 @@ int nfp_net_set_ring_size(struct nfp_net *nn, u32 rxd_cnt, u32 txd_cnt) +@@ -2400,8 +2400,8 @@ int nfp_net_set_ring_size(struct nfp_net return err; } @@ -1246,7 +1166,7 @@ index 4ca82bd8..55915cbd 100644 { struct nfp_net *nn = netdev_priv(netdev); int r; -@@ -2431,8 +2431,6 @@ static struct rtnl_link_stats64 *nfp_net_stat64(struct net_device *netdev, +@@ -2431,8 +2431,6 @@ static struct rtnl_link_stats64 *nfp_net stats->tx_bytes += data[1]; stats->tx_errors += data[2]; } @@ -1255,11 +1175,9 @@ index 4ca82bd8..55915cbd 100644 } static bool nfp_net_ebpf_capable(struct nfp_net *nn) -diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c -index 9b0d7f46..d7a07928 100644 --- a/drivers/net/ethernet/nvidia/forcedeth.c +++ b/drivers/net/ethernet/nvidia/forcedeth.c -@@ -1733,7 +1733,7 @@ static void nv_update_stats(struct net_device *dev) +@@ -1733,7 +1733,7 @@ static void nv_update_stats(struct net_d * Called with read_lock(&dev_base_lock) held for read - * only synchronized against unregister_netdevice. */ @@ -1268,7 +1186,7 @@ index 9b0d7f46..d7a07928 100644 nv_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *storage) __acquires(&netdev_priv(dev)->hwstats_lock) __releases(&netdev_priv(dev)->hwstats_lock) -@@ -1793,8 +1793,6 @@ nv_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *storage) +@@ -1793,8 +1793,6 @@ nv_get_stats64(struct net_device *dev, s spin_unlock_bh(&np->hwstats_lock); } @@ -1277,11 +1195,9 @@ index 9b0d7f46..d7a07928 100644 } /* -diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c -index 7a0281a3..8bb16d64 100644 --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c -@@ -90,8 +90,8 @@ static irqreturn_t netxen_msix_intr(int irq, void *data); +@@ -90,8 +90,8 @@ static irqreturn_t netxen_msix_intr(int static void netxen_free_ip_list(struct netxen_adapter *, bool); static void netxen_restore_indev_addr(struct net_device *dev, unsigned long); @@ -1292,7 +1208,7 @@ index 7a0281a3..8bb16d64 100644 static int netxen_nic_set_mac(struct net_device *netdev, void *p); /* PCI Device ID Table */ -@@ -2295,8 +2295,8 @@ static void netxen_tx_timeout_task(struct work_struct *work) +@@ -2295,8 +2295,8 @@ request_reset: clear_bit(__NX_RESETTING, &adapter->state); } @@ -1303,7 +1219,7 @@ index 7a0281a3..8bb16d64 100644 { struct netxen_adapter *adapter = netdev_priv(netdev); -@@ -2306,8 +2306,6 @@ static struct rtnl_link_stats64 *netxen_nic_get_stats(struct net_device *netdev, +@@ -2306,8 +2306,6 @@ static struct rtnl_link_stats64 *netxen_ stats->tx_bytes = adapter->stats.txbytes; stats->rx_dropped = adapter->stats.rxdropped; stats->tx_dropped = adapter->stats.txdropped; @@ -1312,11 +1228,9 @@ index 7a0281a3..8bb16d64 100644 } static irqreturn_t netxen_intr(int irq, void *data) -diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c b/drivers/net/ethernet/qlogic/qede/qede_main.c -index 85f46dbe..645507a9 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_main.c +++ b/drivers/net/ethernet/qlogic/qede/qede_main.c -@@ -1803,9 +1803,8 @@ void qede_fill_by_demand_stats(struct qede_dev *edev) +@@ -1803,9 +1803,8 @@ void qede_fill_by_demand_stats(struct qe edev->stats.tx_mac_ctrl_frames = stats.tx_mac_ctrl_frames; } @@ -1328,7 +1242,7 @@ index 85f46dbe..645507a9 100644 { struct qede_dev *edev = netdev_priv(dev); -@@ -1835,8 +1834,6 @@ struct rtnl_link_stats64 *qede_get_stats64(struct net_device *dev, +@@ -1835,8 +1834,6 @@ struct rtnl_link_stats64 *qede_get_stats stats->collisions = edev->stats.tx_total_collisions; stats->rx_crc_errors = edev->stats.rx_crc_errors; stats->rx_frame_errors = edev->stats.rx_align_errors; @@ -1337,11 +1251,9 @@ index 85f46dbe..645507a9 100644 } #ifdef CONFIG_QED_SRIOV -diff --git a/drivers/net/ethernet/qualcomm/emac/emac.c b/drivers/net/ethernet/qualcomm/emac/emac.c -index 57b35aea..babc1025 100644 --- a/drivers/net/ethernet/qualcomm/emac/emac.c +++ b/drivers/net/ethernet/qualcomm/emac/emac.c -@@ -319,8 +319,8 @@ static int emac_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) +@@ -319,8 +319,8 @@ static int emac_ioctl(struct net_device } /* Provide network statistics info for the interface */ @@ -1352,7 +1264,7 @@ index 57b35aea..babc1025 100644 { struct emac_adapter *adpt = netdev_priv(netdev); unsigned int addr = REG_MAC_RX_STATUS_BIN; -@@ -384,8 +384,6 @@ static struct rtnl_link_stats64 *emac_get_stats64(struct net_device *netdev, +@@ -384,8 +384,6 @@ static struct rtnl_link_stats64 *emac_ge net_stats->tx_window_errors = stats->tx_late_col; spin_unlock(&stats->lock); @@ -1361,11 +1273,9 @@ index 57b35aea..babc1025 100644 } static const struct net_device_ops emac_netdev_ops = { -diff --git a/drivers/net/ethernet/realtek/8139too.c b/drivers/net/ethernet/realtek/8139too.c -index da4c2d8a..5722e187 100644 --- a/drivers/net/ethernet/realtek/8139too.c +++ b/drivers/net/ethernet/realtek/8139too.c -@@ -653,9 +653,8 @@ static int rtl8139_poll(struct napi_struct *napi, int budget); +@@ -653,9 +653,8 @@ static int rtl8139_poll(struct napi_stru static irqreturn_t rtl8139_interrupt (int irq, void *dev_instance); static int rtl8139_close (struct net_device *dev); static int netdev_ioctl (struct net_device *dev, struct ifreq *rq, int cmd); @@ -1377,7 +1287,7 @@ index da4c2d8a..5722e187 100644 static void rtl8139_set_rx_mode (struct net_device *dev); static void __set_rx_mode (struct net_device *dev); static void rtl8139_hw_start (struct net_device *dev); -@@ -2521,7 +2520,7 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) +@@ -2521,7 +2520,7 @@ static int netdev_ioctl(struct net_devic } @@ -1386,7 +1296,7 @@ index da4c2d8a..5722e187 100644 rtl8139_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) { struct rtl8139_private *tp = netdev_priv(dev); -@@ -2549,8 +2548,6 @@ rtl8139_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) +@@ -2549,8 +2548,6 @@ rtl8139_get_stats64(struct net_device *d stats->tx_packets = tp->tx_stats.packets; stats->tx_bytes = tp->tx_stats.bytes; } while (u64_stats_fetch_retry_irq(&tp->tx_stats.syncp, start)); @@ -1395,11 +1305,9 @@ index da4c2d8a..5722e187 100644 } /* Set or clear the multicast filter for this adaptor. -diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c -index 2c4350a1..ac7eab06 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c -@@ -7751,7 +7751,7 @@ static int rtl_open(struct net_device *dev) +@@ -7751,7 +7751,7 @@ err_pm_runtime_put: goto out; } @@ -1408,7 +1316,7 @@ index 2c4350a1..ac7eab06 100644 rtl8169_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) { struct rtl8169_private *tp = netdev_priv(dev); -@@ -7805,8 +7805,6 @@ rtl8169_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) +@@ -7805,8 +7805,6 @@ rtl8169_get_stats64(struct net_device *d le16_to_cpu(tp->tc_offset.tx_aborted); pm_runtime_put_noidle(&pdev->dev); @@ -1417,11 +1325,9 @@ index 2c4350a1..ac7eab06 100644 } static void rtl8169_net_suspend(struct net_device *dev) -diff --git a/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c b/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c -index ea44a245..49196846 100644 --- a/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c +++ b/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c -@@ -1721,11 +1721,9 @@ static inline u64 sxgbe_get_stat64(void __iomem *ioaddr, int reg_lo, int reg_hi) +@@ -1721,11 +1721,9 @@ static inline u64 sxgbe_get_stat64(void * This function is a driver entry point whenever ifconfig command gets * executed to see device statistics. Statistics are number of * bytes sent or received, errors occurred etc. @@ -1435,7 +1341,7 @@ index ea44a245..49196846 100644 { struct sxgbe_priv_data *priv = netdev_priv(dev); void __iomem *ioaddr = priv->ioaddr; -@@ -1776,8 +1774,6 @@ static struct rtnl_link_stats64 *sxgbe_get_stats64(struct net_device *dev, +@@ -1776,8 +1774,6 @@ static struct rtnl_link_stats64 *sxgbe_g SXGBE_MMC_TXUFLWHI_GBCNT_REG); writel(0, ioaddr + SXGBE_MMC_CTL_REG); spin_unlock(&priv->stats_lock); @@ -1444,11 +1350,9 @@ index ea44a245..49196846 100644 } /* sxgbe_set_features - entry point to set offload features of the device. -diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c -index 6b89e4a7..c6209dd4 100644 --- a/drivers/net/ethernet/sfc/efx.c +++ b/drivers/net/ethernet/sfc/efx.c -@@ -2232,16 +2232,14 @@ int efx_net_stop(struct net_device *net_dev) +@@ -2232,16 +2232,14 @@ int efx_net_stop(struct net_device *net_ } /* Context: process, dev_base_lock or RTNL held, non-blocking. */ @@ -1467,11 +1371,9 @@ index 6b89e4a7..c6209dd4 100644 } /* Context: netif_tx_lock held, BHs disabled. */ -diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c -index a2371aa1..680fc756 100644 --- a/drivers/net/ethernet/sun/niu.c +++ b/drivers/net/ethernet/sun/niu.c -@@ -6294,8 +6294,8 @@ static void niu_get_tx_stats(struct niu *np, +@@ -6294,8 +6294,8 @@ no_rings: stats->tx_errors = errors; } @@ -1482,7 +1384,7 @@ index a2371aa1..680fc756 100644 { struct niu *np = netdev_priv(dev); -@@ -6303,8 +6303,6 @@ static struct rtnl_link_stats64 *niu_get_stats(struct net_device *dev, +@@ -6303,8 +6303,6 @@ static struct rtnl_link_stats64 *niu_get niu_get_rx_stats(np, stats); niu_get_tx_stats(np, stats); } @@ -1491,11 +1393,9 @@ index a2371aa1..680fc756 100644 } static void niu_load_hash_xmac(struct niu *np, u16 *hash) -diff --git a/drivers/net/ethernet/synopsys/dwc_eth_qos.c b/drivers/net/ethernet/synopsys/dwc_eth_qos.c -index 97d64bfe..bcacd08c 100644 --- a/drivers/net/ethernet/synopsys/dwc_eth_qos.c +++ b/drivers/net/ethernet/synopsys/dwc_eth_qos.c -@@ -2490,7 +2490,7 @@ static void dwceqos_read_mmc_counters(struct net_local *lp, u32 rx_mask, +@@ -2490,7 +2490,7 @@ static void dwceqos_read_mmc_counters(st dwceqos_read(lp, DWC_MMC_RXPACKETCOUNT_GB); } @@ -1504,7 +1404,7 @@ index 97d64bfe..bcacd08c 100644 dwceqos_get_stats64(struct net_device *ndev, struct rtnl_link_stats64 *s) { unsigned long flags; -@@ -2522,8 +2522,6 @@ dwceqos_get_stats64(struct net_device *ndev, struct rtnl_link_stats64 *s) +@@ -2522,8 +2522,6 @@ dwceqos_get_stats64(struct net_device *n else s->tx_errors = hwstats->txunderflowerror + hwstats->txcarriererror; @@ -1513,11 +1413,9 @@ index 97d64bfe..bcacd08c 100644 } static void -diff --git a/drivers/net/ethernet/tile/tilepro.c b/drivers/net/ethernet/tile/tilepro.c -index 4ef605a9..9cd7cd3c 100644 --- a/drivers/net/ethernet/tile/tilepro.c +++ b/drivers/net/ethernet/tile/tilepro.c -@@ -2047,8 +2047,8 @@ static int tile_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) +@@ -2047,8 +2047,8 @@ static int tile_net_ioctl(struct net_dev * * Returns the address of the device statistics structure. */ @@ -1528,11 +1426,9 @@ index 4ef605a9..9cd7cd3c 100644 { struct tile_net_priv *priv = netdev_priv(dev); u64 rx_packets = 0, tx_packets = 0; -diff --git a/drivers/net/ethernet/via/via-rhine.c b/drivers/net/ethernet/via/via-rhine.c -index 9d14731c..ae891364 100644 --- a/drivers/net/ethernet/via/via-rhine.c +++ b/drivers/net/ethernet/via/via-rhine.c -@@ -513,8 +513,8 @@ static irqreturn_t rhine_interrupt(int irq, void *dev_instance); +@@ -513,8 +513,8 @@ static irqreturn_t rhine_interrupt(int i static void rhine_tx(struct net_device *dev); static int rhine_rx(struct net_device *dev, int limit); static void rhine_set_rx_mode(struct net_device *dev); @@ -1543,7 +1439,7 @@ index 9d14731c..ae891364 100644 static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); static const struct ethtool_ops netdev_ethtool_ops; static int rhine_close(struct net_device *dev); -@@ -2222,7 +2222,7 @@ static void rhine_slow_event_task(struct work_struct *work) +@@ -2222,7 +2222,7 @@ out_unlock: mutex_unlock(&rp->task_lock); } @@ -1552,7 +1448,7 @@ index 9d14731c..ae891364 100644 rhine_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) { struct rhine_private *rp = netdev_priv(dev); -@@ -2245,8 +2245,6 @@ rhine_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) +@@ -2245,8 +2245,6 @@ rhine_get_stats64(struct net_device *dev stats->tx_packets = rp->tx_stats.packets; stats->tx_bytes = rp->tx_stats.bytes; } while (u64_stats_fetch_retry_irq(&rp->tx_stats.syncp, start)); @@ -1561,11 +1457,9 @@ index 9d14731c..ae891364 100644 } static void rhine_set_rx_mode(struct net_device *dev) -diff --git a/drivers/net/fjes/fjes_main.c b/drivers/net/fjes/fjes_main.c -index e46b1ebb..6b944caf 100644 --- a/drivers/net/fjes/fjes_main.c +++ b/drivers/net/fjes/fjes_main.c -@@ -56,8 +56,7 @@ static void fjes_raise_intr_rxdata_task(struct work_struct *); +@@ -56,8 +56,7 @@ static void fjes_raise_intr_rxdata_task( static void fjes_tx_stall_task(struct work_struct *); static void fjes_force_close_task(struct work_struct *); static irqreturn_t fjes_intr(int, void*); @@ -1575,7 +1469,7 @@ index e46b1ebb..6b944caf 100644 static int fjes_change_mtu(struct net_device *, int); static int fjes_vlan_rx_add_vid(struct net_device *, __be16 proto, u16); static int fjes_vlan_rx_kill_vid(struct net_device *, __be16 proto, u16); -@@ -762,14 +761,12 @@ static void fjes_tx_retry(struct net_device *netdev) +@@ -762,14 +761,12 @@ static void fjes_tx_retry(struct net_dev netif_tx_wake_queue(queue); } @@ -1591,11 +1485,9 @@ index e46b1ebb..6b944caf 100644 } static int fjes_change_mtu(struct net_device *netdev, int new_mtu) -diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c -index 36a04e18..48f20945 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c -@@ -918,8 +918,8 @@ static int netvsc_change_mtu(struct net_device *ndev, int mtu) +@@ -918,8 +918,8 @@ out: return ret; } @@ -1606,7 +1498,7 @@ index 36a04e18..48f20945 100644 { struct net_device_context *ndev_ctx = netdev_priv(net); int cpu; -@@ -957,8 +957,6 @@ static struct rtnl_link_stats64 *netvsc_get_stats64(struct net_device *net, +@@ -957,8 +957,6 @@ static struct rtnl_link_stats64 *netvsc_ t->rx_dropped = net->stats.rx_dropped; t->rx_errors = net->stats.rx_errors; @@ -1615,11 +1507,9 @@ index 36a04e18..48f20945 100644 } static int netvsc_set_mac_addr(struct net_device *ndev, void *p) -diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c -index 66c0eeaf..082534e1 100644 --- a/drivers/net/ifb.c +++ b/drivers/net/ifb.c -@@ -129,8 +129,8 @@ static void ifb_ri_tasklet(unsigned long _txp) +@@ -129,8 +129,8 @@ resched: } @@ -1630,7 +1520,7 @@ index 66c0eeaf..082534e1 100644 { struct ifb_dev_private *dp = netdev_priv(dev); struct ifb_q_private *txp = dp->tx_private; -@@ -157,8 +157,6 @@ static struct rtnl_link_stats64 *ifb_stats64(struct net_device *dev, +@@ -157,8 +157,6 @@ static struct rtnl_link_stats64 *ifb_sta } stats->rx_dropped = dev->stats.rx_dropped; stats->tx_dropped = dev->stats.tx_dropped; @@ -1639,11 +1529,9 @@ index 66c0eeaf..082534e1 100644 } static int ifb_dev_init(struct net_device *dev) -diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c -index dfbc4ef6..6629680d 100644 --- a/drivers/net/ipvlan/ipvlan_main.c +++ b/drivers/net/ipvlan/ipvlan_main.c -@@ -296,8 +296,8 @@ static void ipvlan_set_multicast_mac_filter(struct net_device *dev) +@@ -296,8 +296,8 @@ static void ipvlan_set_multicast_mac_fil dev_mc_sync(ipvlan->phy_dev, dev); } @@ -1654,7 +1542,7 @@ index dfbc4ef6..6629680d 100644 { struct ipvl_dev *ipvlan = netdev_priv(dev); -@@ -334,7 +334,6 @@ static struct rtnl_link_stats64 *ipvlan_get_stats64(struct net_device *dev, +@@ -334,7 +334,6 @@ static struct rtnl_link_stats64 *ipvlan_ s->rx_dropped = rx_errs; s->tx_dropped = tx_drps; } @@ -1662,11 +1550,9 @@ index dfbc4ef6..6629680d 100644 } static int ipvlan_vlan_rx_add_vid(struct net_device *dev, __be16 proto, u16 vid) -diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c -index 1b65f0f9..0254b2a9 100644 --- a/drivers/net/loopback.c +++ b/drivers/net/loopback.c -@@ -97,8 +97,8 @@ static netdev_tx_t loopback_xmit(struct sk_buff *skb, +@@ -97,8 +97,8 @@ static netdev_tx_t loopback_xmit(struct return NETDEV_TX_OK; } @@ -1677,7 +1563,7 @@ index 1b65f0f9..0254b2a9 100644 { u64 bytes = 0; u64 packets = 0; -@@ -122,7 +122,6 @@ static struct rtnl_link_stats64 *loopback_get_stats64(struct net_device *dev, +@@ -122,7 +122,6 @@ static struct rtnl_link_stats64 *loopbac stats->tx_packets = packets; stats->rx_bytes = bytes; stats->tx_bytes = bytes; @@ -1685,11 +1571,9 @@ index 1b65f0f9..0254b2a9 100644 } static u32 always_on(struct net_device *dev) -diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c -index 2caac0c3..880ee985 100644 --- a/drivers/net/macsec.c +++ b/drivers/net/macsec.c -@@ -2899,13 +2899,13 @@ static int macsec_change_mtu(struct net_device *dev, int new_mtu) +@@ -2899,13 +2899,13 @@ static int macsec_change_mtu(struct net_ return 0; } @@ -1706,7 +1590,7 @@ index 2caac0c3..880ee985 100644 for_each_possible_cpu(cpu) { struct pcpu_sw_netstats *stats; -@@ -2929,8 +2929,6 @@ static struct rtnl_link_stats64 *macsec_get_stats64(struct net_device *dev, +@@ -2929,8 +2929,6 @@ static struct rtnl_link_stats64 *macsec_ s->rx_dropped = dev->stats.rx_dropped; s->tx_dropped = dev->stats.tx_dropped; @@ -1715,11 +1599,9 @@ index 2caac0c3..880ee985 100644 } static int macsec_get_iflink(const struct net_device *dev) -diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c -index dc8ccac0..94576142 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c -@@ -857,8 +857,8 @@ static void macvlan_uninit(struct net_device *dev) +@@ -857,8 +857,8 @@ static void macvlan_uninit(struct net_de macvlan_port_destroy(port->dev); } @@ -1730,7 +1612,7 @@ index dc8ccac0..94576142 100644 { struct macvlan_dev *vlan = netdev_priv(dev); -@@ -895,7 +895,6 @@ static struct rtnl_link_stats64 *macvlan_dev_get_stats64(struct net_device *dev, +@@ -895,7 +895,6 @@ static struct rtnl_link_stats64 *macvlan stats->rx_dropped = rx_errors; stats->tx_dropped = tx_dropped; } @@ -1738,11 +1620,9 @@ index dc8ccac0..94576142 100644 } static int macvlan_vlan_rx_add_vid(struct net_device *dev, -diff --git a/drivers/net/nlmon.c b/drivers/net/nlmon.c -index 7b7c70e2..a0daed8a 100644 --- a/drivers/net/nlmon.c +++ b/drivers/net/nlmon.c -@@ -76,7 +76,7 @@ static int nlmon_close(struct net_device *dev) +@@ -76,7 +76,7 @@ static int nlmon_close(struct net_device return netlink_remove_tap(&nlmon->nt); } @@ -1751,7 +1631,7 @@ index 7b7c70e2..a0daed8a 100644 nlmon_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) { int i; -@@ -104,8 +104,6 @@ nlmon_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) +@@ -104,8 +104,6 @@ nlmon_get_stats64(struct net_device *dev stats->rx_bytes = bytes; stats->tx_bytes = 0; @@ -1760,11 +1640,9 @@ index 7b7c70e2..a0daed8a 100644 } static u32 always_on(struct net_device *dev) -diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c -index 96fa0e61..d3b17318 100644 --- a/drivers/net/ppp/ppp_generic.c +++ b/drivers/net/ppp/ppp_generic.c -@@ -1312,7 +1312,7 @@ ppp_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) +@@ -1312,7 +1312,7 @@ ppp_net_ioctl(struct net_device *dev, st return err; } @@ -1773,7 +1651,7 @@ index 96fa0e61..d3b17318 100644 ppp_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats64) { struct ppp *ppp = netdev_priv(dev); -@@ -1332,8 +1332,6 @@ ppp_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats64) +@@ -1332,8 +1332,6 @@ ppp_get_stats64(struct net_device *dev, stats64->rx_dropped = dev->stats.rx_dropped; stats64->tx_dropped = dev->stats.tx_dropped; stats64->rx_length_errors = dev->stats.rx_length_errors; @@ -1782,11 +1660,9 @@ index 96fa0e61..d3b17318 100644 } static int ppp_dev_init(struct net_device *dev) -diff --git a/drivers/net/slip/slip.c b/drivers/net/slip/slip.c -index 9ed6d1c1..c8c0c231 100644 --- a/drivers/net/slip/slip.c +++ b/drivers/net/slip/slip.c -@@ -571,7 +571,7 @@ static int sl_change_mtu(struct net_device *dev, int new_mtu) +@@ -571,7 +571,7 @@ static int sl_change_mtu(struct net_devi /* Netdevice get statistics request */ @@ -1795,7 +1671,7 @@ index 9ed6d1c1..c8c0c231 100644 sl_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) { struct net_device_stats *devstats = &dev->stats; -@@ -602,7 +602,6 @@ sl_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) +@@ -602,7 +602,6 @@ sl_get_stats64(struct net_device *dev, s stats->collisions += comp->sls_o_misses; } #endif @@ -1803,11 +1679,9 @@ index 9ed6d1c1..c8c0c231 100644 } /* Netdevice register callback */ -diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c -index a380649b..95499313 100644 --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c -@@ -1798,7 +1798,7 @@ static int team_change_mtu(struct net_device *dev, int new_mtu) +@@ -1798,7 +1798,7 @@ unwind: return err; } @@ -1816,7 +1690,7 @@ index a380649b..95499313 100644 team_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) { struct team *team = netdev_priv(dev); -@@ -1835,7 +1835,6 @@ team_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) +@@ -1835,7 +1835,6 @@ team_get_stats64(struct net_device *dev, stats->rx_dropped = rx_dropped; stats->tx_dropped = tx_dropped; stats->rx_nohandler = rx_nohandler; @@ -1824,11 +1698,9 @@ index a380649b..95499313 100644 } static int team_vlan_rx_add_vid(struct net_device *dev, __be16 proto, u16 vid) -diff --git a/drivers/net/tun.c b/drivers/net/tun.c -index a931b733..19fb25b1 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c -@@ -983,7 +983,7 @@ static void tun_set_headroom(struct net_device *dev, int new_hr) +@@ -983,7 +983,7 @@ static void tun_set_headroom(struct net_ tun->align = new_hr; } @@ -1837,7 +1709,7 @@ index a931b733..19fb25b1 100644 tun_net_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) { u32 rx_dropped = 0, tx_dropped = 0, rx_frame_errors = 0; -@@ -1017,7 +1017,6 @@ tun_net_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) +@@ -1017,7 +1017,6 @@ tun_net_get_stats64(struct net_device *d stats->rx_dropped = rx_dropped; stats->rx_frame_errors = rx_frame_errors; stats->tx_dropped = tx_dropped; @@ -1845,11 +1717,9 @@ index a931b733..19fb25b1 100644 } static const struct net_device_ops tun_netdev_ops = { -diff --git a/drivers/net/veth.c b/drivers/net/veth.c -index fbc853e6..e25aa62d 100644 --- a/drivers/net/veth.c +++ b/drivers/net/veth.c -@@ -161,8 +161,8 @@ static u64 veth_stats_one(struct pcpu_vstats *result, struct net_device *dev) +@@ -161,8 +161,8 @@ static u64 veth_stats_one(struct pcpu_vs return atomic64_read(&priv->dropped); } @@ -1860,7 +1730,7 @@ index fbc853e6..e25aa62d 100644 { struct veth_priv *priv = netdev_priv(dev); struct net_device *peer; -@@ -180,8 +180,6 @@ static struct rtnl_link_stats64 *veth_get_stats64(struct net_device *dev, +@@ -180,8 +180,6 @@ static struct rtnl_link_stats64 *veth_ge tot->rx_packets = one.packets; } rcu_read_unlock(); @@ -1869,11 +1739,9 @@ index fbc853e6..e25aa62d 100644 } /* fake multicast ability */ -diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c -index 1568aedd..15e87add 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c -@@ -1017,8 +1017,8 @@ static int virtnet_set_mac_address(struct net_device *dev, void *p) +@@ -1017,8 +1017,8 @@ out: return ret; } @@ -1884,7 +1752,7 @@ index 1568aedd..15e87add 100644 { struct virtnet_info *vi = netdev_priv(dev); int cpu; -@@ -1051,8 +1051,6 @@ static struct rtnl_link_stats64 *virtnet_stats(struct net_device *dev, +@@ -1051,8 +1051,6 @@ static struct rtnl_link_stats64 *virtnet tot->rx_dropped = dev->stats.rx_dropped; tot->rx_length_errors = dev->stats.rx_length_errors; tot->rx_frame_errors = dev->stats.rx_frame_errors; @@ -1893,8 +1761,6 @@ index 1568aedd..15e87add 100644 } #ifdef CONFIG_NET_POLL_CONTROLLER -diff --git a/drivers/net/vmxnet3/vmxnet3_ethtool.c b/drivers/net/vmxnet3/vmxnet3_ethtool.c -index aabc6ef3..f88ffafe 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethtool.c +++ b/drivers/net/vmxnet3/vmxnet3_ethtool.c @@ -113,7 +113,7 @@ vmxnet3_global_stats[] = { @@ -1906,7 +1772,7 @@ index aabc6ef3..f88ffafe 100644 vmxnet3_get_stats64(struct net_device *netdev, struct rtnl_link_stats64 *stats) { -@@ -160,8 +160,6 @@ vmxnet3_get_stats64(struct net_device *netdev, +@@ -160,8 +160,6 @@ vmxnet3_get_stats64(struct net_device *n stats->rx_dropped += drvRxStats->drop_total; stats->multicast += devRxStats->mcastPktsRxOK; } @@ -1915,11 +1781,9 @@ index aabc6ef3..f88ffafe 100644 } static int -diff --git a/drivers/net/vmxnet3/vmxnet3_int.h b/drivers/net/vmxnet3/vmxnet3_int.h -index 7dc37a09..ec19df56 100644 --- a/drivers/net/vmxnet3/vmxnet3_int.h +++ b/drivers/net/vmxnet3/vmxnet3_int.h -@@ -466,8 +466,8 @@ vmxnet3_create_queues(struct vmxnet3_adapter *adapter, +@@ -466,8 +466,8 @@ vmxnet3_create_queues(struct vmxnet3_ada void vmxnet3_set_ethtool_ops(struct net_device *netdev); @@ -1930,11 +1794,9 @@ index 7dc37a09..ec19df56 100644 extern char vmxnet3_driver_name[]; #endif -diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c -index 578bd500..499af07a 100644 --- a/drivers/net/vrf.c +++ b/drivers/net/vrf.c -@@ -79,8 +79,8 @@ static void vrf_tx_error(struct net_device *vrf_dev, struct sk_buff *skb) +@@ -79,8 +79,8 @@ static void vrf_tx_error(struct net_devi kfree_skb(skb); } @@ -1945,7 +1807,7 @@ index 578bd500..499af07a 100644 { int i; -@@ -104,7 +104,6 @@ static struct rtnl_link_stats64 *vrf_get_stats64(struct net_device *dev, +@@ -104,7 +104,6 @@ static struct rtnl_link_stats64 *vrf_get stats->rx_bytes += rbytes; stats->rx_packets += rpkts; } @@ -1953,11 +1815,9 @@ index 578bd500..499af07a 100644 } /* Local traffic destined to local address. Reinsert the packet to rx -diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c -index cd442e46..f87cae7e 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c -@@ -1081,8 +1081,8 @@ static int xennet_change_mtu(struct net_device *dev, int mtu) +@@ -1081,8 +1081,8 @@ static int xennet_change_mtu(struct net_ return 0; } @@ -1968,7 +1828,7 @@ index cd442e46..f87cae7e 100644 { struct netfront_info *np = netdev_priv(dev); int cpu; -@@ -1113,8 +1113,6 @@ static struct rtnl_link_stats64 *xennet_get_stats64(struct net_device *dev, +@@ -1113,8 +1113,6 @@ static struct rtnl_link_stats64 *xennet_ tot->rx_errors = dev->stats.rx_errors; tot->tx_dropped = dev->stats.tx_dropped; @@ -1977,11 +1837,9 @@ index cd442e46..f87cae7e 100644 } static void xennet_release_tx_bufs(struct netfront_queue *queue) -diff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c -index 552a7dcb..d7dea9d4 100644 --- a/drivers/staging/netlogic/xlr_net.c +++ b/drivers/staging/netlogic/xlr_net.c -@@ -395,14 +395,6 @@ static void xlr_stats(struct net_device *ndev, struct rtnl_link_stats64 *stats) +@@ -395,14 +395,6 @@ static void xlr_stats(struct net_device TX_DROP_FRAME_COUNTER); } @@ -1996,7 +1854,7 @@ index 552a7dcb..d7dea9d4 100644 static const struct net_device_ops xlr_netdev_ops = { .ndo_open = xlr_net_open, .ndo_stop = xlr_net_stop, -@@ -410,7 +402,7 @@ static const struct net_device_ops xlr_netdev_ops = { +@@ -410,7 +402,7 @@ static const struct net_device_ops xlr_n .ndo_select_queue = xlr_net_select_queue, .ndo_set_mac_address = xlr_net_set_mac_addr, .ndo_set_rx_mode = xlr_set_rx_mode, @@ -2005,11 +1863,9 @@ index 552a7dcb..d7dea9d4 100644 }; /* -diff --git a/include/linux/device.h b/include/linux/device.h -index 8d732965..6d206930 100644 --- a/include/linux/device.h +++ b/include/linux/device.h -@@ -688,6 +688,25 @@ void __iomem *devm_ioremap_resource(struct device *dev, struct resource *res); +@@ -688,6 +688,25 @@ void __iomem *devm_ioremap_resource(stru int devm_add_action(struct device *dev, void (*action)(void *), void *data); void devm_remove_action(struct device *dev, void (*action)(void *), void *data); @@ -2035,9 +1891,6 @@ index 8d732965..6d206930 100644 static inline int devm_add_action_or_reset(struct device *dev, void (*action)(void *), void *data) { -diff --git a/include/linux/fsl/svr.h b/include/linux/fsl/svr.h -new file mode 100644 -index 00000000..e95c8f43 --- /dev/null +++ b/include/linux/fsl/svr.h @@ -0,0 +1,97 @@ @@ -2138,8 +1991,6 @@ index 00000000..e95c8f43 +#define SVR_Unknown 0xFFFFFF + +#endif -diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h -index f2912914..22308465 100644 --- a/include/linux/fsl_devices.h +++ b/include/linux/fsl_devices.h @@ -99,7 +99,10 @@ struct fsl_usb2_platform_data { @@ -2153,8 +2004,6 @@ index f2912914..22308465 100644 unsigned check_phy_clk_valid:1; /* register save area for suspend/resume */ -diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h -index 9c6c8ef2..90b4107e 100644 --- a/include/linux/netdev_features.h +++ b/include/linux/netdev_features.h @@ -74,6 +74,7 @@ enum { @@ -2173,8 +2022,6 @@ index 9c6c8ef2..90b4107e 100644 #define for_each_netdev_feature(mask_addr, bit) \ for_each_set_bit(bit, (unsigned long *)mask_addr, NETDEV_FEATURE_COUNT) -diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h -index c3a1537c..67ef59d0 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -916,8 +916,8 @@ struct netdev_xdp { @@ -2217,8 +2064,6 @@ index c3a1537c..67ef59d0 100644 unsigned short type; unsigned short hard_header_len; unsigned short min_header_len; -diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h -index 9a0c945e..06f33c98 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -903,6 +903,7 @@ void kfree_skb(struct sk_buff *skb); @@ -2229,7 +2074,7 @@ index 9a0c945e..06f33c98 100644 void __kfree_skb(struct sk_buff *skb); extern struct kmem_cache *skbuff_head_cache; -@@ -3057,6 +3058,7 @@ static inline void skb_free_datagram_locked(struct sock *sk, +@@ -3057,6 +3058,7 @@ static inline void skb_free_datagram_loc } int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, unsigned int flags); int skb_copy_bits(const struct sk_buff *skb, int offset, void *to, int len); @@ -2237,8 +2082,6 @@ index 9a0c945e..06f33c98 100644 int skb_store_bits(struct sk_buff *skb, int offset, const void *from, int len); __wsum skb_copy_and_csum_bits(const struct sk_buff *skb, int offset, u8 *to, int len, __wsum csum); -diff --git a/include/linux/sys_soc.h b/include/linux/sys_soc.h -index 2739ccb6..9f5eb06f 100644 --- a/include/linux/sys_soc.h +++ b/include/linux/sys_soc.h @@ -13,6 +13,7 @@ struct soc_device_attribute { @@ -2249,18 +2092,16 @@ index 2739ccb6..9f5eb06f 100644 }; /** -@@ -34,4 +35,6 @@ void soc_device_unregister(struct soc_device *soc_dev); +@@ -34,4 +35,6 @@ void soc_device_unregister(struct soc_de */ struct device *soc_device_to_device(struct soc_device *soc); +const struct soc_device_attribute *soc_device_match( + const struct soc_device_attribute *matches); #endif /* __SOC_BUS_H */ -diff --git a/include/net/ip_tunnels.h b/include/net/ip_tunnels.h -index 59557c07..876de4f9 100644 --- a/include/net/ip_tunnels.h +++ b/include/net/ip_tunnels.h -@@ -261,8 +261,8 @@ int ip_tunnel_ioctl(struct net_device *dev, struct ip_tunnel_parm *p, int cmd); +@@ -261,8 +261,8 @@ int ip_tunnel_ioctl(struct net_device *d int __ip_tunnel_change_mtu(struct net_device *dev, int new_mtu, bool strict); int ip_tunnel_change_mtu(struct net_device *dev, int new_mtu); @@ -2271,8 +2112,6 @@ index 59557c07..876de4f9 100644 struct ip_tunnel *ip_tunnel_lookup(struct ip_tunnel_net *itn, int link, __be16 flags, __be32 remote, __be32 local, -diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h -index 51f38442..5c01afbf 100644 --- a/include/uapi/linux/if_ether.h +++ b/include/uapi/linux/if_ether.h @@ -35,6 +35,7 @@ @@ -2283,11 +2122,9 @@ index 51f38442..5c01afbf 100644 /* * These are the defined Ethernet Protocol ID's. -diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c -index fbfacd51..ca3cf29b 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c -@@ -671,7 +671,8 @@ static int vlan_ethtool_get_ts_info(struct net_device *dev, +@@ -671,7 +671,8 @@ static int vlan_ethtool_get_ts_info(stru return 0; } @@ -2297,7 +2134,7 @@ index fbfacd51..ca3cf29b 100644 { struct vlan_pcpu_stats *p; u32 rx_errors = 0, tx_dropped = 0; -@@ -702,8 +703,6 @@ static struct rtnl_link_stats64 *vlan_dev_get_stats64(struct net_device *dev, st +@@ -702,8 +703,6 @@ static struct rtnl_link_stats64 *vlan_de } stats->rx_errors = rx_errors; stats->tx_dropped = tx_dropped; @@ -2306,11 +2143,9 @@ index fbfacd51..ca3cf29b 100644 } #ifdef CONFIG_NET_POLL_CONTROLLER -diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c -index 5f5e28f2..73d66ae3 100644 --- a/net/bridge/br_device.c +++ b/net/bridge/br_device.c -@@ -156,8 +156,8 @@ static int br_dev_stop(struct net_device *dev) +@@ -156,8 +156,8 @@ static int br_dev_stop(struct net_device return 0; } @@ -2321,7 +2156,7 @@ index 5f5e28f2..73d66ae3 100644 { struct net_bridge *br = netdev_priv(dev); struct pcpu_sw_netstats tmp, sum = { 0 }; -@@ -181,8 +181,6 @@ static struct rtnl_link_stats64 *br_get_stats64(struct net_device *dev, +@@ -181,8 +181,6 @@ static struct rtnl_link_stats64 *br_get_ stats->tx_packets = sum.tx_packets; stats->rx_bytes = sum.rx_bytes; stats->rx_packets = sum.rx_packets; @@ -2330,11 +2165,9 @@ index 5f5e28f2..73d66ae3 100644 } static int br_change_mtu(struct net_device *dev, int new_mtu) -diff --git a/net/core/dev.c b/net/core/dev.c -index 912f40ac..17e16cf7 100644 --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -6600,9 +6600,18 @@ int dev_set_mtu(struct net_device *dev, int new_mtu) +@@ -6600,9 +6600,18 @@ int dev_set_mtu(struct net_device *dev, if (new_mtu == dev->mtu) return 0; @@ -2355,11 +2188,9 @@ index 912f40ac..17e16cf7 100644 if (!netif_device_present(dev)) return -ENODEV; -diff --git a/net/core/skbuff.c b/net/core/skbuff.c -index 7e7b7ce0..0f9c014a 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c -@@ -842,6 +842,32 @@ void napi_consume_skb(struct sk_buff *skb, int budget) +@@ -842,6 +842,32 @@ void napi_consume_skb(struct sk_buff *sk } EXPORT_SYMBOL(napi_consume_skb); @@ -2392,7 +2223,7 @@ index 7e7b7ce0..0f9c014a 100644 /* Make sure a field is enclosed inside headers_start/headers_end section */ #define CHECK_SKB_FIELD(field) \ BUILD_BUG_ON(offsetof(struct sk_buff, field) < \ -@@ -1073,7 +1099,7 @@ static void skb_headers_offset_update(struct sk_buff *skb, int off) +@@ -1073,7 +1099,7 @@ static void skb_headers_offset_update(st skb->inner_mac_header += off; } @@ -2401,7 +2232,7 @@ index 7e7b7ce0..0f9c014a 100644 { __copy_skb_header(new, old); -@@ -1081,6 +1107,7 @@ static void copy_skb_header(struct sk_buff *new, const struct sk_buff *old) +@@ -1081,6 +1107,7 @@ static void copy_skb_header(struct sk_bu skb_shinfo(new)->gso_segs = skb_shinfo(old)->gso_segs; skb_shinfo(new)->gso_type = skb_shinfo(old)->gso_type; } @@ -2409,11 +2240,9 @@ index 7e7b7ce0..0f9c014a 100644 static inline int skb_alloc_rx_flag(const struct sk_buff *skb) { -diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c -index 0fd1976a..9d6c1009 100644 --- a/net/ipv4/ip_tunnel_core.c +++ b/net/ipv4/ip_tunnel_core.c -@@ -188,8 +188,8 @@ int iptunnel_handle_offloads(struct sk_buff *skb, +@@ -188,8 +188,8 @@ int iptunnel_handle_offloads(struct sk_b EXPORT_SYMBOL_GPL(iptunnel_handle_offloads); /* Often modified stats are per cpu, other are shared (netdev->stats) */ @@ -2424,7 +2253,7 @@ index 0fd1976a..9d6c1009 100644 { int i; -@@ -214,8 +214,6 @@ struct rtnl_link_stats64 *ip_tunnel_get_stats64(struct net_device *dev, +@@ -214,8 +214,6 @@ struct rtnl_link_stats64 *ip_tunnel_get_ tot->rx_bytes += rx_bytes; tot->tx_bytes += tx_bytes; } @@ -2433,11 +2262,9 @@ index 0fd1976a..9d6c1009 100644 } EXPORT_SYMBOL_GPL(ip_tunnel_get_stats64); -diff --git a/net/l2tp/l2tp_eth.c b/net/l2tp/l2tp_eth.c -index eecc64e1..ce73136a 100644 --- a/net/l2tp/l2tp_eth.c +++ b/net/l2tp/l2tp_eth.c -@@ -106,8 +106,8 @@ static int l2tp_eth_dev_xmit(struct sk_buff *skb, struct net_device *dev) +@@ -106,8 +106,8 @@ static int l2tp_eth_dev_xmit(struct sk_b return NETDEV_TX_OK; } @@ -2448,7 +2275,7 @@ index eecc64e1..ce73136a 100644 { struct l2tp_eth *priv = netdev_priv(dev); -@@ -117,10 +117,8 @@ static struct rtnl_link_stats64 *l2tp_eth_get_stats64(struct net_device *dev, +@@ -117,10 +117,8 @@ static struct rtnl_link_stats64 *l2tp_et stats->rx_bytes = atomic_long_read(&priv->rx_bytes); stats->rx_packets = atomic_long_read(&priv->rx_packets); stats->rx_errors = atomic_long_read(&priv->rx_errors); @@ -2459,11 +2286,9 @@ index eecc64e1..ce73136a 100644 static const struct net_device_ops l2tp_eth_netdev_ops = { .ndo_init = l2tp_eth_dev_init, .ndo_uninit = l2tp_eth_dev_uninit, -diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c -index 37bec0f8..aee93423 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c -@@ -1133,7 +1133,7 @@ static u16 ieee80211_netdev_select_queue(struct net_device *dev, +@@ -1146,7 +1146,7 @@ static u16 ieee80211_netdev_select_queue return ieee80211_select_queue(IEEE80211_DEV_TO_SUB_IF(dev), skb); } @@ -2472,7 +2297,7 @@ index 37bec0f8..aee93423 100644 ieee80211_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) { int i; -@@ -1158,8 +1158,6 @@ ieee80211_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) +@@ -1171,8 +1171,6 @@ ieee80211_get_stats64(struct net_device stats->rx_bytes += rx_bytes; stats->tx_bytes += tx_bytes; } @@ -2481,11 +2306,9 @@ index 37bec0f8..aee93423 100644 } static const struct net_device_ops ieee80211_dataif_ops = { -diff --git a/net/openvswitch/vport-internal_dev.c b/net/openvswitch/vport-internal_dev.c -index e7da2902..95fd5744 100644 --- a/net/openvswitch/vport-internal_dev.c +++ b/net/openvswitch/vport-internal_dev.c -@@ -106,7 +106,7 @@ static void internal_dev_destructor(struct net_device *dev) +@@ -106,7 +106,7 @@ static void internal_dev_destructor(stru free_netdev(dev); } @@ -2494,7 +2317,7 @@ index e7da2902..95fd5744 100644 internal_get_stats(struct net_device *dev, struct rtnl_link_stats64 *stats) { int i; -@@ -134,8 +134,6 @@ internal_get_stats(struct net_device *dev, struct rtnl_link_stats64 *stats) +@@ -134,8 +134,6 @@ internal_get_stats(struct net_device *de stats->tx_bytes += local_stats.tx_bytes; stats->tx_packets += local_stats.tx_packets; } @@ -2503,11 +2326,9 @@ index e7da2902..95fd5744 100644 } static void internal_set_rx_headroom(struct net_device *dev, int new_hr) -diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c -index a62de9e4..5b287e1d 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c -@@ -309,6 +309,13 @@ static void dev_watchdog(unsigned long arg) +@@ -309,6 +309,13 @@ static void dev_watchdog(unsigned long a txq->trans_timeout++; break; } @@ -2521,11 +2342,9 @@ index a62de9e4..5b287e1d 100644 } if (some_queue_timedout) { -diff --git a/net/sched/sch_teql.c b/net/sched/sch_teql.c -index 2cd9b447..5e25213e 100644 --- a/net/sched/sch_teql.c +++ b/net/sched/sch_teql.c -@@ -401,8 +401,8 @@ static int teql_master_close(struct net_device *dev) +@@ -401,8 +401,8 @@ static int teql_master_close(struct net_ return 0; } @@ -2536,7 +2355,7 @@ index 2cd9b447..5e25213e 100644 { struct teql_master *m = netdev_priv(dev); -@@ -410,7 +410,6 @@ static struct rtnl_link_stats64 *teql_master_stats64(struct net_device *dev, +@@ -410,7 +410,6 @@ static struct rtnl_link_stats64 *teql_ma stats->tx_bytes = m->tx_bytes; stats->tx_errors = m->tx_errors; stats->tx_dropped = m->tx_dropped; @@ -2544,6 +2363,3 @@ index 2cd9b447..5e25213e 100644 } static int teql_master_mtu(struct net_device *dev, int new_mtu) --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/701-sdk_dpaa-support-layerscape.patch b/target/linux/layerscape/patches-4.9/701-sdk_dpaa-support-layerscape.patch index 67e09c5270..56c07c5e6f 100644 --- a/target/linux/layerscape/patches-4.9/701-sdk_dpaa-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/701-sdk_dpaa-support-layerscape.patch @@ -527,9 +527,6 @@ Signed-off-by: Yangbo Lu create mode 100644 include/uapi/linux/fmd/ioctls.h create mode 100644 include/uapi/linux/fmd/net_ioctls.h -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/Kconfig b/drivers/net/ethernet/freescale/sdk_dpaa/Kconfig -new file mode 100644 -index 00000000..92118b76 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/Kconfig @@ -0,0 +1,173 @@ @@ -706,9 +703,6 @@ index 00000000..92118b76 + # cat /sys/kernel/debug/powerpc/fsl_dpa/eth4_loop + 4->5 +endif # FSL_SDK_DPAA_ETH -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/Makefile b/drivers/net/ethernet/freescale/sdk_dpaa/Makefile -new file mode 100644 -index 00000000..a0f4b190 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/Makefile @@ -0,0 +1,46 @@ @@ -758,9 +752,6 @@ index 00000000..a0f4b190 + +# Needed by the tracing framework +CFLAGS_dpaa_eth.o := -I$(src) -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_1588.c b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_1588.c -new file mode 100644 -index 00000000..3bf8cbca --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_1588.c @@ -0,0 +1,580 @@ @@ -1344,9 +1335,6 @@ index 00000000..3bf8cbca + kfree(tsu); +} +EXPORT_SYMBOL(dpa_ptp_cleanup); -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_1588.h b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_1588.h -new file mode 100644 -index 00000000..73390168 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_1588.h @@ -0,0 +1,138 @@ @@ -1488,9 +1476,6 @@ index 00000000..73390168 + struct sk_buff *skb, void *data); +extern int dpa_ioctl_1588(struct net_device *dev, struct ifreq *ifr, int cmd); +#endif -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_debugfs.c b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_debugfs.c -new file mode 100644 -index 00000000..25d9f5f1 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_debugfs.c @@ -0,0 +1,180 @@ @@ -1674,9 +1659,6 @@ index 00000000..25d9f5f1 +{ + debugfs_remove(dpa_debugfs_root); +} -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_debugfs.h b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_debugfs.h -new file mode 100644 -index 00000000..63d35427 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_debugfs.h @@ -0,0 +1,43 @@ @@ -1723,9 +1705,6 @@ index 00000000..63d35427 +void __exit dpa_debugfs_module_exit(void); + +#endif /* DPAA_DEBUGFS_H_ */ -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth.c -new file mode 100644 -index 00000000..7026f916 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth.c @@ -0,0 +1,1213 @@ @@ -2942,9 +2921,6 @@ index 00000000..7026f916 + KBUILD_BASENAME".c", __func__); +} +module_exit(dpa_unload); -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth.h b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth.h -new file mode 100644 -index 00000000..b1703bc1 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth.h @@ -0,0 +1,698 @@ @@ -3646,9 +3622,6 @@ index 00000000..b1703bc1 +#endif /* !CONFIG_PPC */ + +#endif /* __DPA_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_base.c b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_base.c -new file mode 100644 -index 00000000..507e77c3 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_base.c @@ -0,0 +1,205 @@ @@ -3857,9 +3830,6 @@ index 00000000..507e77c3 + +} +module_exit(dpa_advanced_unload); -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_base.h b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_base.h -new file mode 100644 -index 00000000..6ec68c3c --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_base.h @@ -0,0 +1,49 @@ @@ -3912,9 +3882,6 @@ index 00000000..6ec68c3c + size_t count); + +#endif /* __DPAA_ETH_BASE_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_ceetm.c b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_ceetm.c -new file mode 100644 -index 00000000..cac613b7 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_ceetm.c @@ -0,0 +1,1992 @@ @@ -5910,9 +5877,6 @@ index 00000000..cac613b7 + +module_init(ceetm_register); +module_exit(ceetm_unregister); -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_ceetm.h b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_ceetm.h -new file mode 100644 -index 00000000..63cc3475 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_ceetm.h @@ -0,0 +1,237 @@ @@ -6153,9 +6117,6 @@ index 00000000..63cc3475 + +int __hot ceetm_tx(struct sk_buff *skb, struct net_device *net_dev); +#endif -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_common.c b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_common.c -new file mode 100644 -index 00000000..fbe61da2 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_common.c @@ -0,0 +1,1811 @@ @@ -7970,9 +7931,6 @@ index 00000000..fbe61da2 +} +EXPORT_SYMBOL(dpa_disable_ceetm); +#endif -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_common.h b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_common.h -new file mode 100644 -index 00000000..41db4302 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_common.h @@ -0,0 +1,225 @@ @@ -8201,9 +8159,6 @@ index 00000000..41db4302 + struct net_device *net_dev); + +#endif /* __DPAA_ETH_COMMON_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_proxy.c b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_proxy.c -new file mode 100644 -index 00000000..994d38cd --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_proxy.c @@ -0,0 +1,381 @@ @@ -8588,9 +8543,6 @@ index 00000000..994d38cd + KBUILD_BASENAME".c", __func__); +} +module_exit(dpa_proxy_unload); -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_sg.c b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_sg.c -new file mode 100644 -index 00000000..11b47e8c --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_sg.c @@ -0,0 +1,1179 @@ @@ -9773,9 +9725,6 @@ index 00000000..11b47e8c + return NETDEV_TX_OK; +} +EXPORT_SYMBOL(dpa_tx_extended); -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_sysfs.c b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_sysfs.c -new file mode 100644 -index 00000000..3542d0b2 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_sysfs.c @@ -0,0 +1,278 @@ @@ -10057,9 +10006,6 @@ index 00000000..3542d0b2 + for (i = 0; i < ARRAY_SIZE(dpaa_eth_attrs); i++) + device_remove_file(dev, &dpaa_eth_attrs[i]); +} -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_trace.h b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_trace.h -new file mode 100644 -index 00000000..30069ef9 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_trace.h @@ -0,0 +1,144 @@ @@ -10207,9 +10153,6 @@ index 00000000..30069ef9 +#undef TRACE_INCLUDE_FILE +#define TRACE_INCLUDE_FILE dpaa_eth_trace +#include -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_ethtool.c b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_ethtool.c -new file mode 100644 -index 00000000..4b784662 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_ethtool.c @@ -0,0 +1,544 @@ @@ -10757,9 +10700,6 @@ index 00000000..4b784662 + .set_wol = dpa_set_wol, +#endif +}; -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_ptp.c b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_ptp.c -new file mode 100644 -index 00000000..f54a3d67 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_ptp.c @@ -0,0 +1,291 @@ @@ -11054,9 +10994,6 @@ index 00000000..f54a3d67 + ptp_clock_unregister(clock); +} +module_exit(dpa_ptp_unload); -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/mac-api.c b/drivers/net/ethernet/freescale/sdk_dpaa/mac-api.c -new file mode 100644 -index 00000000..2c5652d9 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/mac-api.c @@ -0,0 +1,907 @@ @@ -11967,9 +11904,6 @@ index 00000000..2c5652d9 + [XGMAC] = setup_xgmac, + [MEMAC] = setup_memac +}; -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/mac.c b/drivers/net/ethernet/freescale/sdk_dpaa/mac.c -new file mode 100644 -index 00000000..60133b02 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/mac.c @@ -0,0 +1,489 @@ @@ -12462,9 +12396,6 @@ index 00000000..60133b02 + KBUILD_BASENAME".c", __func__); +} +module_exit(mac_unload); -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/mac.h b/drivers/net/ethernet/freescale/sdk_dpaa/mac.h -new file mode 100644 -index 00000000..b5288f2a --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/mac.h @@ -0,0 +1,135 @@ @@ -12603,9 +12534,6 @@ index 00000000..b5288f2a +void get_pause_cfg(struct mac_device *mac_dev, bool *rx_pause, bool *tx_pause); + +#endif /* __MAC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/offline_port.c b/drivers/net/ethernet/freescale/sdk_dpaa/offline_port.c -new file mode 100644 -index 00000000..fb084af5 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/offline_port.c @@ -0,0 +1,848 @@ @@ -13457,9 +13385,6 @@ index 00000000..fb084af5 + KBUILD_BASENAME".c", __func__); +} +module_exit(oh_port_unload); -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/offline_port.h b/drivers/net/ethernet/freescale/sdk_dpaa/offline_port.h -new file mode 100644 -index 00000000..432ee88d --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/offline_port.h @@ -0,0 +1,59 @@ @@ -13522,9 +13447,6 @@ index 00000000..432ee88d +}; + +#endif /* __OFFLINE_PORT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Kconfig b/drivers/net/ethernet/freescale/sdk_fman/Kconfig -new file mode 100644 -index 00000000..d98c0989 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Kconfig @@ -0,0 +1,153 @@ @@ -13681,9 +13603,6 @@ index 00000000..d98c0989 +endif # FSL_SDK_FMAN + +endmenu -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Makefile b/drivers/net/ethernet/freescale/sdk_fman/Makefile -new file mode 100644 -index 00000000..25ce7e6a --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Makefile @@ -0,0 +1,11 @@ @@ -13698,9 +13617,6 @@ index 00000000..25ce7e6a +obj-y += etc/ +obj-y += Peripherals/FM/ +obj-y += src/ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/HC/Makefile b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/HC/Makefile -new file mode 100644 -index 00000000..d0e76727 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/HC/Makefile @@ -0,0 +1,15 @@ @@ -13719,9 +13635,6 @@ index 00000000..d0e76727 +obj-y += fsl-ncsw-Hc.o + +fsl-ncsw-Hc-objs := hc.o -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/HC/hc.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/HC/hc.c -new file mode 100644 -index 00000000..363c8f95 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/HC/hc.c @@ -0,0 +1,1232 @@ @@ -14957,9 +14870,6 @@ index 00000000..363c8f95 + t_FmHc *p_FmHc = (t_FmHc*)h_FmHc; + return p_FmHc->h_HcPortDev; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/Makefile b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/Makefile -new file mode 100644 -index 00000000..f6b090da --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/Makefile @@ -0,0 +1,28 @@ @@ -14991,9 +14901,6 @@ index 00000000..f6b090da +fsl-ncsw-MAC-objs += memac.o memac_mii_acc.o fman_memac_mii_acc.o +endif + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/dtsec.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/dtsec.c -new file mode 100644 -index 00000000..f853825f --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/dtsec.c @@ -0,0 +1,1464 @@ @@ -16461,9 +16368,6 @@ index 00000000..f853825f + + return p_Dtsec; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/dtsec.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/dtsec.h -new file mode 100644 -index 00000000..c26f40cc --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/dtsec.h @@ -0,0 +1,228 @@ @@ -16695,9 +16599,6 @@ index 00000000..c26f40cc + + +#endif /* __DTSEC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/dtsec_mii_acc.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/dtsec_mii_acc.c -new file mode 100644 -index 00000000..87da25ff --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/dtsec_mii_acc.c @@ -0,0 +1,97 @@ @@ -16798,9 +16699,6 @@ index 00000000..87da25ff + return E_OK; +} + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/dtsec_mii_acc.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/dtsec_mii_acc.h -new file mode 100644 -index 00000000..75cc658a --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/dtsec_mii_acc.h @@ -0,0 +1,42 @@ @@ -16846,9 +16744,6 @@ index 00000000..75cc658a +t_Error DTSEC_MII_ReadPhyReg(t_Handle h_Dtsec, uint8_t phyAddr, uint8_t reg, uint16_t *p_Data); + +#endif /* __DTSEC_MII_ACC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fm_mac.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fm_mac.c -new file mode 100644 -index 00000000..20bf150a --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fm_mac.c @@ -0,0 +1,658 @@ @@ -17510,9 +17405,6 @@ index 00000000..20bf150a + RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG); +} +#endif /* (defined(DEBUG_ERRORS) && ... */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fm_mac.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fm_mac.h -new file mode 100644 -index 00000000..77b9a89d --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fm_mac.h @@ -0,0 +1,225 @@ @@ -17741,9 +17633,6 @@ index 00000000..77b9a89d + + +#endif /* __FM_MAC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_crc32.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_crc32.c -new file mode 100644 -index 00000000..b6a4ca25 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_crc32.c @@ -0,0 +1,119 @@ @@ -17866,9 +17755,6 @@ index 00000000..b6a4ca25 + crc = get_mirror32(crc); + return crc; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_crc32.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_crc32.h -new file mode 100644 -index 00000000..6e32fdc6 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_crc32.h @@ -0,0 +1,43 @@ @@ -17915,9 +17801,6 @@ index 00000000..6e32fdc6 + + +#endif /* __FMAN_CRC32_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_dtsec.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_dtsec.c -new file mode 100644 -index 00000000..5b092865 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_dtsec.c @@ -0,0 +1,845 @@ @@ -18766,9 +18649,6 @@ index 00000000..5b092865 + + return ret_val; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_dtsec_mii_acc.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_dtsec_mii_acc.c -new file mode 100644 -index 00000000..8819f8fc --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_dtsec_mii_acc.c @@ -0,0 +1,163 @@ @@ -18935,9 +18815,6 @@ index 00000000..8819f8fc + return 0; +} + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_memac.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_memac.c -new file mode 100644 -index 00000000..00995a10 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_memac.c @@ -0,0 +1,511 @@ @@ -19452,9 +19329,6 @@ index 00000000..00995a10 + cfg->debug_mode = FALSE; + cfg->wake_on_lan = FALSE; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_memac_mii_acc.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_memac_mii_acc.c -new file mode 100755 -index 00000000..ccda11ec --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_memac_mii_acc.c @@ -0,0 +1,213 @@ @@ -19671,9 +19545,6 @@ index 00000000..ccda11ec + +/* ......................................................................... */ + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_tgec.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_tgec.c -new file mode 100644 -index 00000000..fff9d5de --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_tgec.c @@ -0,0 +1,367 @@ @@ -20044,9 +19915,6 @@ index 00000000..fff9d5de + + iowrite32be(tmp, ®s->tx_ipg_len); +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/memac.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/memac.c -new file mode 100644 -index 00000000..85426c5f --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/memac.c @@ -0,0 +1,1096 @@ @@ -21146,9 +21014,6 @@ index 00000000..85426c5f + + return p_Memac; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/memac.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/memac.h -new file mode 100644 -index 00000000..2fd89dae --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/memac.h @@ -0,0 +1,110 @@ @@ -21262,9 +21127,6 @@ index 00000000..2fd89dae + + +#endif /* __MEMAC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/memac_mii_acc.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/memac_mii_acc.c -new file mode 100644 -index 00000000..56eaffbc --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/memac_mii_acc.c @@ -0,0 +1,78 @@ @@ -21346,9 +21208,6 @@ index 00000000..56eaffbc + p_Data, + (enum enet_speed)ENET_SPEED_FROM_MODE(p_Memac->enetMode)); +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/memac_mii_acc.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/memac_mii_acc.h -new file mode 100644 -index 00000000..325ec082 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/memac_mii_acc.h @@ -0,0 +1,73 @@ @@ -21425,9 +21284,6 @@ index 00000000..325ec082 + + +#endif /* __MEMAC_MII_ACC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/tgec.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/tgec.c -new file mode 100644 -index 00000000..9b136a69 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/tgec.c @@ -0,0 +1,975 @@ @@ -22406,9 +22262,6 @@ index 00000000..9b136a69 + + return p_Tgec; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/tgec.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/tgec.h -new file mode 100644 -index 00000000..2aa39238 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/tgec.h @@ -0,0 +1,151 @@ @@ -22563,9 +22416,6 @@ index 00000000..2aa39238 + + +#endif /* __TGEC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/tgec_mii_acc.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/tgec_mii_acc.c -new file mode 100644 -index 00000000..e0fafd1d --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/tgec_mii_acc.c @@ -0,0 +1,139 @@ @@ -22708,9 +22558,6 @@ index 00000000..e0fafd1d + + return E_OK; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/tgec_mii_acc.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/tgec_mii_acc.h -new file mode 100644 -index 00000000..645cdde5 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/tgec_mii_acc.h @@ -0,0 +1,80 @@ @@ -22794,9 +22641,6 @@ index 00000000..645cdde5 + + +#endif /* __TGEC_MII_ACC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/Makefile b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/Makefile -new file mode 100644 -index 00000000..bfa02f5e --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/Makefile @@ -0,0 +1,15 @@ @@ -22815,9 +22659,6 @@ index 00000000..bfa02f5e +obj-y += fsl-ncsw-macsec.o + +fsl-ncsw-macsec-objs := fm_macsec.o fm_macsec_guest.o fm_macsec_master.o fm_macsec_secy.o -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec.c -new file mode 100644 -index 00000000..0a1b31f1 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec.c @@ -0,0 +1,237 @@ @@ -23058,9 +22899,6 @@ index 00000000..0a1b31f1 + RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG); +} + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec.h -new file mode 100644 -index 00000000..fbe51875 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec.h @@ -0,0 +1,203 @@ @@ -23267,9 +23105,6 @@ index 00000000..fbe51875 + + +#endif /* __FM_MACSEC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_guest.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_guest.c -new file mode 100644 -index 00000000..31d789d0 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_guest.c @@ -0,0 +1,59 @@ @@ -23332,9 +23167,6 @@ index 00000000..31d789d0 + UNUSED(p_FmMacsecParam); + return NULL; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_master.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_master.c -new file mode 100644 -index 00000000..623612ac --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_master.c @@ -0,0 +1,1031 @@ @@ -24369,9 +24201,6 @@ index 00000000..623612ac + } + return p_FmMacsec; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_master.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_master.h -new file mode 100644 -index 00000000..2296a0f1 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_master.h @@ -0,0 +1,479 @@ @@ -24854,9 +24683,6 @@ index 00000000..2296a0f1 + + +#endif /* __FM_MACSEC_MASTER_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_secy.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_secy.c -new file mode 100644 -index 00000000..7c72dc98 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_secy.c @@ -0,0 +1,883 @@ @@ -25743,9 +25569,6 @@ index 00000000..7c72dc98 + RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG); +} + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_secy.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_secy.h -new file mode 100644 -index 00000000..0cf624e6 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_secy.h @@ -0,0 +1,144 @@ @@ -25893,9 +25716,6 @@ index 00000000..0cf624e6 + + +#endif /* __FM_MACSEC_SECY_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Makefile b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Makefile -new file mode 100644 -index 00000000..619f6608 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Makefile @@ -0,0 +1,23 @@ @@ -25922,9 +25742,6 @@ index 00000000..619f6608 +obj-y += HC/ +obj-y += Rtc/ +obj-y += MACSEC/ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/Makefile b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/Makefile -new file mode 100644 -index 00000000..62fbd73c --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/Makefile @@ -0,0 +1,26 @@ @@ -25954,9 +25771,6 @@ index 00000000..62fbd73c +fsl-ncsw-Pcd-objs += fm_replic.o +endif + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/crc64.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/crc64.h -new file mode 100644 -index 00000000..335ee681 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/crc64.h @@ -0,0 +1,360 @@ @@ -26320,9 +26134,6 @@ index 00000000..335ee681 + + +#endif /* __CRC64_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_cc.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_cc.c -new file mode 100644 -index 00000000..17c933b4 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_cc.c @@ -0,0 +1,7582 @@ @@ -33908,9 +33719,6 @@ index 00000000..17c933b4 + + return FM_PCD_MatchTableGetMissStatistics(h_HashBucket, p_MissStatistics); +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_cc.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_cc.h -new file mode 100644 -index 00000000..3456bb56 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_cc.h @@ -0,0 +1,399 @@ @@ -34313,9 +34121,6 @@ index 00000000..3456bb56 + + +#endif /* __FM_CC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_kg.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_kg.c -new file mode 100644 -index 00000000..f183d2f9 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_kg.c @@ -0,0 +1,3242 @@ @@ -37561,9 +37366,6 @@ index 00000000..f183d2f9 + WRITE_UINT32(p_Regs->fmkg_gdv1r,value); + return E_OK; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_kg.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_kg.h -new file mode 100644 -index 00000000..cb7521a1 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_kg.h @@ -0,0 +1,206 @@ @@ -37773,9 +37575,6 @@ index 00000000..cb7521a1 + + +#endif /* __FM_KG_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_manip.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_manip.c -new file mode 100644 -index 00000000..113777e5 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_manip.c @@ -0,0 +1,5571 @@ @@ -43350,9 +43149,6 @@ index 00000000..113777e5 + return p_Manip; +} +#endif /* (defined(FM_CAPWAP_SUPPORT) && (DPAA_VERSION == 10)) */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_manip.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_manip.h -new file mode 100644 -index 00000000..853bb834 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_manip.h @@ -0,0 +1,555 @@ @@ -43911,9 +43707,6 @@ index 00000000..853bb834 + + +#endif /* __FM_MANIP_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_pcd.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_pcd.c -new file mode 100644 -index 00000000..91f70a1a --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_pcd.c @@ -0,0 +1,2095 @@ @@ -46012,9 +45805,6 @@ index 00000000..91f70a1a + return FmHcGetPort(p_FmPcd->h_Hc); +} + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_pcd.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_pcd.h -new file mode 100644 -index 00000000..27ec9c5b --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_pcd.h @@ -0,0 +1,543 @@ @@ -46561,9 +46351,6 @@ index 00000000..27ec9c5b + + +#endif /* __FM_PCD_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_pcd_ipc.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_pcd_ipc.h -new file mode 100644 -index 00000000..325d3e33 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_pcd_ipc.h @@ -0,0 +1,280 @@ @@ -46847,9 +46634,6 @@ index 00000000..325d3e33 + + +#endif /* __FM_PCD_IPC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_plcr.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_plcr.c -new file mode 100644 -index 00000000..e3753305 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_plcr.c @@ -0,0 +1,1847 @@ @@ -48700,9 +48484,6 @@ index 00000000..e3753305 + + return E_OK; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_plcr.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_plcr.h -new file mode 100644 -index 00000000..2bb8b969 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_plcr.h @@ -0,0 +1,165 @@ @@ -48871,9 +48652,6 @@ index 00000000..2bb8b969 + + +#endif /* __FM_PLCR_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_prs.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_prs.c -new file mode 100644 -index 00000000..ff4f0a2f --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_prs.c @@ -0,0 +1,423 @@ @@ -49300,9 +49078,6 @@ index 00000000..ff4f0a2f + + return E_OK; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_prs.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_prs.h -new file mode 100644 -index 00000000..056f225e --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_prs.h @@ -0,0 +1,316 @@ @@ -49622,9 +49397,6 @@ index 00000000..056f225e + bitMask = 0x80000000>>prsPortId + +#endif /* __FM_PRS_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_replic.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_replic.c -new file mode 100644 -index 00000000..ee82f730 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_replic.c @@ -0,0 +1,984 @@ @@ -50612,9 +50384,6 @@ index 00000000..ee82f730 +/*********************** End of API routines ************************/ + + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_replic.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_replic.h -new file mode 100644 -index 00000000..0e8e8bc0 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_replic.h @@ -0,0 +1,101 @@ @@ -50719,9 +50488,6 @@ index 00000000..0e8e8bc0 + + +#endif /* __FM_REPLIC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fman_kg.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fman_kg.c -new file mode 100644 -index 00000000..49b86e8e --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fman_kg.c @@ -0,0 +1,888 @@ @@ -51613,9 +51379,6 @@ index 00000000..49b86e8e + err = fman_kg_write_ar_wait(regs, tmp_reg); + return err; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fman_prs.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fman_prs.c -new file mode 100644 -index 00000000..108779db --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fman_prs.c @@ -0,0 +1,129 @@ @@ -51748,9 +51511,6 @@ index 00000000..108779db + else + iowrite32be(0, ®s->fmpr_ppsc); +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/Makefile b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/Makefile -new file mode 100644 -index 00000000..7d928e0a --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/Makefile @@ -0,0 +1,15 @@ @@ -51769,9 +51529,6 @@ index 00000000..7d928e0a +obj-y += fsl-ncsw-Pcd.o + +fsl-ncsw-Pcd-objs := fm_port.o fm_port_im.o fman_port.o -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fm_port.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fm_port.c -new file mode 100644 -index 00000000..ec6e0ed5 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fm_port.c @@ -0,0 +1,6436 @@ @@ -58211,9 +57968,6 @@ index 00000000..ec6e0ed5 + stats->snmpGetNextCnt = snmp_stats->snmpGetNextReqCnt; + return E_OK; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fm_port.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fm_port.h -new file mode 100644 -index 00000000..85986f55 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fm_port.h @@ -0,0 +1,999 @@ @@ -59216,9 +58970,6 @@ index 00000000..85986f55 + + +#endif /* __FM_PORT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fm_port_dsar.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fm_port_dsar.h -new file mode 100755 -index 00000000..95619eff --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fm_port_dsar.h @@ -0,0 +1,494 @@ @@ -59716,9 +59467,6 @@ index 00000000..95619eff + + +#endif /* __FM_PORT_DSAR_H_ */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fm_port_im.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fm_port_im.c -new file mode 100644 -index 00000000..8de8f5fd --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fm_port_im.c @@ -0,0 +1,753 @@ @@ -60475,9 +60223,6 @@ index 00000000..8de8f5fd + + return FmPortImRx(p_FmPort); +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fman_port.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fman_port.c -new file mode 100755 -index 00000000..60acbf34 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fman_port.c @@ -0,0 +1,1568 @@ @@ -62049,9 +61794,6 @@ index 00000000..60acbf34 + } + return 0; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Rtc/Makefile b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Rtc/Makefile -new file mode 100644 -index 00000000..d2c21d34 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Rtc/Makefile @@ -0,0 +1,15 @@ @@ -62070,9 +61812,6 @@ index 00000000..d2c21d34 +obj-y += fsl-ncsw-RTC.o + +fsl-ncsw-RTC-objs := fm_rtc.o fman_rtc.o -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Rtc/fm_rtc.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Rtc/fm_rtc.c -new file mode 100644 -index 00000000..99de427b --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Rtc/fm_rtc.c @@ -0,0 +1,692 @@ @@ -62768,9 +62507,6 @@ index 00000000..99de427b + return E_OK; +} +#endif -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Rtc/fm_rtc.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Rtc/fm_rtc.h -new file mode 100644 -index 00000000..843ca008 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Rtc/fm_rtc.h @@ -0,0 +1,96 @@ @@ -62870,9 +62606,6 @@ index 00000000..843ca008 + + +#endif /* __FM_RTC_H__ */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Rtc/fman_rtc.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Rtc/fman_rtc.c -new file mode 100755 -index 00000000..acdf507e --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Rtc/fman_rtc.c @@ -0,0 +1,334 @@ @@ -63210,9 +62943,6 @@ index 00000000..acdf507e + fman_rtc_set_timer_ctrl(regs, fman_rtc_get_timer_ctrl(regs) | tmpReg); + } +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/SP/Makefile b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/SP/Makefile -new file mode 100644 -index 00000000..fae50ce4 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/SP/Makefile @@ -0,0 +1,15 @@ @@ -63231,9 +62961,6 @@ index 00000000..fae50ce4 +obj-y += fsl-ncsw-sp.o + +fsl-ncsw-sp-objs := fm_sp.o fman_sp.o -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/SP/fm_sp.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/SP/fm_sp.c -new file mode 100644 -index 00000000..0994f34d --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/SP/fm_sp.c @@ -0,0 +1,757 @@ @@ -63994,9 +63721,6 @@ index 00000000..0994f34d +} + +#endif /* (DPAA_VERSION >= 11) */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/SP/fm_sp.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/SP/fm_sp.h -new file mode 100644 -index 00000000..9c171d85 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/SP/fm_sp.h @@ -0,0 +1,85 @@ @@ -64085,9 +63809,6 @@ index 00000000..9c171d85 + + +#endif /* __FM_SP_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/SP/fman_sp.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/SP/fman_sp.c -new file mode 100755 -index 00000000..0f772e91 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/SP/fman_sp.c @@ -0,0 +1,197 @@ @@ -64288,9 +64009,6 @@ index 00000000..0f772e91 + /* buffer margins - fill spliodn register */ + iowrite32be(liodn_offset, &sp_regs->fm_sp_spliodn); +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fm.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fm.c -new file mode 100644 -index 00000000..a870b47e --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fm.c @@ -0,0 +1,5216 @@ @@ -69510,9 +69228,6 @@ index 00000000..a870b47e + WRITE_UINT32(p_Fm->p_FmFpmRegs->fm_rcr, rcr); +} +#endif -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fm.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fm.h -new file mode 100644 -index 00000000..0bded75d --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fm.h @@ -0,0 +1,648 @@ @@ -70164,9 +69879,6 @@ index 00000000..0bded75d + + +#endif /* __FM_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fm_ipc.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fm_ipc.h -new file mode 100644 -index 00000000..7ce36a76 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fm_ipc.h @@ -0,0 +1,465 @@ @@ -70635,9 +70347,6 @@ index 00000000..7ce36a76 + + +#endif /* __FM_IPC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fm_muram.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fm_muram.c -new file mode 100644 -index 00000000..0bc67cb7 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fm_muram.c @@ -0,0 +1,174 @@ @@ -70815,9 +70524,6 @@ index 00000000..0bc67cb7 + + return MM_GetFreeMemSize(p_FmMuram->h_Mem); +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fman.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fman.c -new file mode 100755 -index 00000000..a41ecd04 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fman.c @@ -0,0 +1,1398 @@ @@ -72219,9 +71925,6 @@ index 00000000..a41ecd04 + + iowrite32be(tmp, &fpm_rg->fmfp_ee); +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/inc/fm_common.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/inc/fm_common.h -new file mode 100644 -index 00000000..204840c9 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/inc/fm_common.h @@ -0,0 +1,1214 @@ @@ -73439,9 +73142,6 @@ index 00000000..204840c9 + + +#endif /* __FM_COMMON_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/inc/fm_hc.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/inc/fm_hc.h -new file mode 100644 -index 00000000..492aa8a3 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/inc/fm_hc.h @@ -0,0 +1,93 @@ @@ -73538,9 +73238,6 @@ index 00000000..492aa8a3 + + +#endif /* __FM_HC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/inc/fm_sp_common.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/inc/fm_sp_common.h -new file mode 100644 -index 00000000..f9dd384b --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/inc/fm_sp_common.h @@ -0,0 +1,117 @@ @@ -73661,9 +73358,6 @@ index 00000000..f9dd384b + + +#endif /* __FM_SP_COMMON_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/etc/Makefile b/drivers/net/ethernet/freescale/sdk_fman/etc/Makefile -new file mode 100644 -index 00000000..d03a519c --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/etc/Makefile @@ -0,0 +1,12 @@ @@ -73679,9 +73373,6 @@ index 00000000..d03a519c +obj-y += fsl-ncsw-etc.o + +fsl-ncsw-etc-objs := mm.o memcpy.o sprint.o list.o error.o -diff --git a/drivers/net/ethernet/freescale/sdk_fman/etc/error.c b/drivers/net/ethernet/freescale/sdk_fman/etc/error.c -new file mode 100644 -index 00000000..fead7f50 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/etc/error.c @@ -0,0 +1,95 @@ @@ -73780,9 +73471,6 @@ index 00000000..fead7f50 + return NULL; +} +#endif /* (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0)) */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/etc/list.c b/drivers/net/ethernet/freescale/sdk_fman/etc/list.c -new file mode 100644 -index 00000000..2d044be2 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/etc/list.c @@ -0,0 +1,71 @@ @@ -73857,9 +73545,6 @@ index 00000000..2d044be2 + + return numOfObjs; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/etc/memcpy.c b/drivers/net/ethernet/freescale/sdk_fman/etc/memcpy.c -new file mode 100644 -index 00000000..fa203ec7 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/etc/memcpy.c @@ -0,0 +1,620 @@ @@ -74483,9 +74168,6 @@ index 00000000..fa203ec7 + XX_Print("\r\n"); + } +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/etc/mm.c b/drivers/net/ethernet/freescale/sdk_fman/etc/mm.c -new file mode 100644 -index 00000000..9fcc46e0 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/etc/mm.c @@ -0,0 +1,1155 @@ @@ -75644,9 +75326,6 @@ index 00000000..9fcc46e0 + XX_Print("\n"); + } +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/etc/mm.h b/drivers/net/ethernet/freescale/sdk_fman/etc/mm.h -new file mode 100644 -index 00000000..43b2298f --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/etc/mm.h @@ -0,0 +1,105 @@ @@ -75755,9 +75434,6 @@ index 00000000..43b2298f + + +#endif /* __MM_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/etc/sprint.c b/drivers/net/ethernet/freescale/sdk_fman/etc/sprint.c -new file mode 100644 -index 00000000..46d2956a --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/etc/sprint.c @@ -0,0 +1,81 @@ @@ -75842,9 +75518,6 @@ index 00000000..46d2956a + return i; +} +#endif /* NCSW_VXWORKS */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/fmanv3h_dflags.h b/drivers/net/ethernet/freescale/sdk_fman/fmanv3h_dflags.h -new file mode 100644 -index 00000000..435b0d2b --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/fmanv3h_dflags.h @@ -0,0 +1,57 @@ @@ -75905,9 +75578,6 @@ index 00000000..435b0d2b +#define EVENT_GLOBAL_LEVEL REPORT_LEVEL_MINOR + +#endif /* __dflags_h */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/fmanv3l_dflags.h b/drivers/net/ethernet/freescale/sdk_fman/fmanv3l_dflags.h -new file mode 100644 -index 00000000..789eb879 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/fmanv3l_dflags.h @@ -0,0 +1,56 @@ @@ -75967,9 +75637,6 @@ index 00000000..789eb879 +#define EVENT_GLOBAL_LEVEL REPORT_LEVEL_MINOR + +#endif /* __dflags_h */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/crc_mac_addr_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/crc_mac_addr_ext.h -new file mode 100644 -index 00000000..a84d5631 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/crc_mac_addr_ext.h @@ -0,0 +1,364 @@ @@ -76337,9 +76004,6 @@ index 00000000..a84d5631 + + +#endif /* __crc_mac_addr_ext_h */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/dpaa_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/dpaa_ext.h -new file mode 100644 -index 00000000..e6d9e932 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/dpaa_ext.h @@ -0,0 +1,210 @@ @@ -76553,9 +76217,6 @@ index 00000000..e6d9e932 + + +#endif /* __DPAA_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_ext.h -new file mode 100644 -index 00000000..a8a64386 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_ext.h @@ -0,0 +1,1731 @@ @@ -78290,9 +77951,6 @@ index 00000000..a8a64386 + + +#endif /* __FM_EXT */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_mac_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_mac_ext.h -new file mode 100644 -index 00000000..da7e0463 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_mac_ext.h @@ -0,0 +1,859 @@ @@ -79155,9 +78813,6 @@ index 00000000..da7e0463 + + +#endif /* __FM_MAC_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_macsec_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_macsec_ext.h -new file mode 100644 -index 00000000..57925f10 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_macsec_ext.h @@ -0,0 +1,1271 @@ @@ -80432,9 +80087,6 @@ index 00000000..57925f10 + + +#endif /* __FM_MACSEC_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_muram_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_muram_ext.h -new file mode 100644 -index 00000000..ef62c8ef --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_muram_ext.h @@ -0,0 +1,170 @@ @@ -80608,9 +80260,6 @@ index 00000000..ef62c8ef + + +#endif /* __FM_MURAM_EXT */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_pcd_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_pcd_ext.h -new file mode 100644 -index 00000000..8d1c3d88 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_pcd_ext.h @@ -0,0 +1,3974 @@ @@ -84588,9 +84237,6 @@ index 00000000..8d1c3d88 + + +#endif /* __FM_PCD_EXT */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_port_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_port_ext.h -new file mode 100644 -index 00000000..08a5aa59 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_port_ext.h @@ -0,0 +1,2608 @@ @@ -87202,9 +86848,6 @@ index 00000000..08a5aa59 + + +#endif /* __FM_PORT_EXT */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_rtc_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_rtc_ext.h -new file mode 100644 -index 00000000..72078ac4 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_rtc_ext.h @@ -0,0 +1,619 @@ @@ -87827,9 +87470,6 @@ index 00000000..72078ac4 + + +#endif /* __FM_RTC_EXT_H__ */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_vsp_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_vsp_ext.h -new file mode 100644 -index 00000000..f9aed036 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_vsp_ext.h @@ -0,0 +1,411 @@ @@ -88244,9 +87884,6 @@ index 00000000..f9aed036 + + +#endif /* __FM_VSP_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/mii_acc_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/mii_acc_ext.h -new file mode 100644 -index 00000000..f635d3c2 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/mii_acc_ext.h @@ -0,0 +1,76 @@ @@ -88326,9 +87963,6 @@ index 00000000..f635d3c2 + + +#endif /* __MII_ACC_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/core_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/core_ext.h -new file mode 100644 -index 00000000..ec89a6dd --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/core_ext.h @@ -0,0 +1,90 @@ @@ -88422,9 +88056,6 @@ index 00000000..ec89a6dd +#define fsl_mem_core_barrier() CORE_MemoryBarrier() + +#endif /* __CORE_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/cores/arm_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/cores/arm_ext.h -new file mode 100644 -index 00000000..e63444a7 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/cores/arm_ext.h @@ -0,0 +1,55 @@ @@ -88483,9 +88114,6 @@ index 00000000..e63444a7 +} + +#endif /* __PPC_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/cores/e500v2_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/cores/e500v2_ext.h -new file mode 100644 -index 00000000..e79b1ddf --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/cores/e500v2_ext.h @@ -0,0 +1,476 @@ @@ -88965,9 +88593,6 @@ index 00000000..e79b1ddf + + +#endif /* __E500V2_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/cores/ppc_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/cores/ppc_ext.h -new file mode 100644 -index 00000000..9344b3a1 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/cores/ppc_ext.h @@ -0,0 +1,141 @@ @@ -89112,9 +88737,6 @@ index 00000000..9344b3a1 + + +#endif /* __PPC_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/ddr_std_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/ddr_std_ext.h -new file mode 100644 -index 00000000..8bb343fc --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/ddr_std_ext.h @@ -0,0 +1,77 @@ @@ -89195,9 +88817,6 @@ index 00000000..8bb343fc + +#endif /* __DDR_SDT_EXT_H */ + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/debug_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/debug_ext.h -new file mode 100644 -index 00000000..57db0a14 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/debug_ext.h @@ -0,0 +1,233 @@ @@ -89434,9 +89053,6 @@ index 00000000..57db0a14 + +#endif /* __DEBUG_EXT_H */ + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/endian_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/endian_ext.h -new file mode 100644 -index 00000000..5cdec668 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/endian_ext.h @@ -0,0 +1,447 @@ @@ -89887,9 +89503,6 @@ index 00000000..5cdec668 + +#endif /* __ENDIAN_EXT_H */ + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/enet_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/enet_ext.h -new file mode 100644 -index 00000000..ef3bee55 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/enet_ext.h @@ -0,0 +1,205 @@ @@ -90098,9 +89711,6 @@ index 00000000..ef3bee55 + + +#endif /* __ENET_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/error_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/error_ext.h -new file mode 100644 -index 00000000..2a5ad67b --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/error_ext.h @@ -0,0 +1,529 @@ @@ -90633,9 +90243,6 @@ index 00000000..2a5ad67b +#endif /* __ERROR_EXT_H */ + + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/etc/list_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/etc/list_ext.h -new file mode 100644 -index 00000000..ee6b9f29 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/etc/list_ext.h @@ -0,0 +1,358 @@ @@ -90997,9 +90604,6 @@ index 00000000..ee6b9f29 + + +#endif /* __LIST_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/etc/mem_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/etc/mem_ext.h -new file mode 100644 -index 00000000..d0565d41 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/etc/mem_ext.h @@ -0,0 +1,318 @@ @@ -91321,9 +90925,6 @@ index 00000000..d0565d41 + + +#endif /* __MEM_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/etc/memcpy_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/etc/memcpy_ext.h -new file mode 100644 -index 00000000..1b3a2fac --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/etc/memcpy_ext.h @@ -0,0 +1,208 @@ @@ -91535,9 +91136,6 @@ index 00000000..1b3a2fac + + +#endif /* __MEMCPY_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/etc/mm_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/etc/mm_ext.h -new file mode 100644 -index 00000000..fa7c85e3 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/etc/mm_ext.h @@ -0,0 +1,310 @@ @@ -91851,9 +91449,6 @@ index 00000000..fa7c85e3 +/** @} */ /* end of etc_id group */ + +#endif /* __MM_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/etc/sprint_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/etc/sprint_ext.h -new file mode 100644 -index 00000000..52f7a9dc --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/etc/sprint_ext.h @@ -0,0 +1,118 @@ @@ -91975,9 +91570,6 @@ index 00000000..52f7a9dc + + +#endif /* __SPRINT_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/common/arch/ppc_access.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/common/arch/ppc_access.h -new file mode 100644 -index 00000000..c7b9b46f --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/common/arch/ppc_access.h @@ -0,0 +1,37 @@ @@ -92018,9 +91610,6 @@ index 00000000..c7b9b46f + +#endif /* FL_E500_MACROS_H */ + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/common/general.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/common/general.h -new file mode 100644 -index 00000000..b3f516fb --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/common/general.h @@ -0,0 +1,52 @@ @@ -92076,9 +91665,6 @@ index 00000000..b3f516fb + + +#endif /* __GENERAL_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fman_common.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fman_common.h -new file mode 100755 -index 00000000..8b194e99 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fman_common.h @@ -0,0 +1,78 @@ @@ -92160,9 +91746,6 @@ index 00000000..8b194e99 +#define NIA_BMI_AC_FETCH_ALL_FRAME 0x0000020c + +#endif /* __FMAN_COMMON_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_enet.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_enet.h -new file mode 100644 -index 00000000..caa87fc6 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_enet.h @@ -0,0 +1,273 @@ @@ -92439,9 +92022,6 @@ index 00000000..caa87fc6 + } while (0) + +#endif /* __FSL_ENET_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman.h -new file mode 100755 -index 00000000..96a63fa7 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman.h @@ -0,0 +1,825 @@ @@ -93270,9 +92850,6 @@ index 00000000..96a63fa7 + + +#endif /* __FSL_FMAN_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_dtsec.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_dtsec.h -new file mode 100644 -index 00000000..6004e478 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_dtsec.h @@ -0,0 +1,1096 @@ @@ -94372,9 +93949,6 @@ index 00000000..6004e478 + + +#endif /* __FSL_FMAN_DTSEC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_dtsec_mii_acc.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_dtsec_mii_acc.h -new file mode 100644 -index 00000000..0dda09c3 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_dtsec_mii_acc.h @@ -0,0 +1,107 @@ @@ -94485,9 +94059,6 @@ index 00000000..0dda09c3 + uint16_t dtsec_freq); + +#endif /* __FSL_FMAN_DTSEC_MII_ACC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_kg.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_kg.h -new file mode 100644 -index 00000000..010e4b70 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_kg.h @@ -0,0 +1,514 @@ @@ -95005,9 +94576,6 @@ index 00000000..010e4b70 +} + +#endif /* __FSL_FMAN_KG_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_memac.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_memac.h -new file mode 100644 -index 00000000..0dd8286b --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_memac.h @@ -0,0 +1,427 @@ @@ -95438,9 +95006,6 @@ index 00000000..0dd8286b + + +#endif /*__FSL_FMAN_MEMAC_H*/ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_memac_mii_acc.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_memac_mii_acc.h -new file mode 100755 -index 00000000..b4304450 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_memac_mii_acc.h @@ -0,0 +1,78 @@ @@ -95522,9 +95087,6 @@ index 00000000..b4304450 + enum enet_speed enet_speed); + +#endif /* __MAC_API_MEMAC_MII_ACC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_port.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_port.h -new file mode 100755 -index 00000000..080a23e9 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_port.h @@ -0,0 +1,593 @@ @@ -96121,9 +95683,6 @@ index 00000000..080a23e9 + + +#endif /* __FSL_FMAN_PORT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_prs.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_prs.h -new file mode 100644 -index 00000000..b18997dc --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_prs.h @@ -0,0 +1,102 @@ @@ -96229,9 +95788,6 @@ index 00000000..b18997dc +void fman_prs_set_stst_port_msk(struct fman_prs_regs *regs, uint32_t pid_msk); +void fman_prs_set_stst(struct fman_prs_regs *regs, bool enable); +#endif /* __FSL_FMAN_PRS_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_rtc.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_rtc.h -new file mode 100755 -index 00000000..f6b69a1f --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_rtc.h @@ -0,0 +1,449 @@ @@ -96684,9 +96240,6 @@ index 00000000..f6b69a1f +}; + +#endif /* __FSL_FMAN_RTC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_sp.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_sp.h -new file mode 100755 -index 00000000..f8ef7d56 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_sp.h @@ -0,0 +1,138 @@ @@ -96828,9 +96381,6 @@ index 00000000..f8ef7d56 + + +#endif /* __FSL_FMAN_SP_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_tgec.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_tgec.h -new file mode 100644 -index 00000000..a0373141 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_tgec.h @@ -0,0 +1,479 @@ @@ -97313,9 +96863,6 @@ index 00000000..a0373141 + + +#endif /* __FSL_FMAN_TGEC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3H/dpaa_integration_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3H/dpaa_integration_ext.h -new file mode 100644 -index 00000000..0346cf60 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3H/dpaa_integration_ext.h @@ -0,0 +1,291 @@ @@ -97610,9 +97157,6 @@ index 00000000..0346cf60 +#define NUM_OF_SA_PER_TX_SC 2 + +#endif /* __DPAA_INTEGRATION_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3H/part_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3H/part_ext.h -new file mode 100644 -index 00000000..0d62dd15 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3H/part_ext.h @@ -0,0 +1,71 @@ @@ -97687,9 +97231,6 @@ index 00000000..0d62dd15 + + +#endif /* __PART_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3H/part_integration_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3H/part_integration_ext.h -new file mode 100644 -index 00000000..3254c766 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3H/part_integration_ext.h @@ -0,0 +1,304 @@ @@ -97997,9 +97538,6 @@ index 00000000..3254c766 + + +#endif /* __PART_INTEGRATION_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3L/dpaa_integration_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3L/dpaa_integration_ext.h -new file mode 100644 -index 00000000..f7f8eb07 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3L/dpaa_integration_ext.h @@ -0,0 +1,293 @@ @@ -98296,9 +97834,6 @@ index 00000000..f7f8eb07 +#define NUM_OF_SA_PER_TX_SC 2 + +#endif /* __DPAA_INTEGRATION_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3L/part_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3L/part_ext.h -new file mode 100644 -index 00000000..ba9732ee --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3L/part_ext.h @@ -0,0 +1,59 @@ @@ -98361,9 +97896,6 @@ index 00000000..ba9732ee + + +#endif /* __PART_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3L/part_integration_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3L/part_integration_ext.h -new file mode 100644 -index 00000000..3254c766 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3L/part_integration_ext.h @@ -0,0 +1,304 @@ @@ -98671,9 +98203,6 @@ index 00000000..3254c766 + + +#endif /* __PART_INTEGRATION_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/LS1043/dpaa_integration_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/LS1043/dpaa_integration_ext.h -new file mode 100644 -index 00000000..5a8f3583 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/LS1043/dpaa_integration_ext.h @@ -0,0 +1,291 @@ @@ -98968,9 +98497,6 @@ index 00000000..5a8f3583 +#define NUM_OF_SA_PER_TX_SC 2 + +#endif /* __DPAA_INTEGRATION_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/LS1043/part_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/LS1043/part_ext.h -new file mode 100644 -index 00000000..4787e19c --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/LS1043/part_ext.h @@ -0,0 +1,64 @@ @@ -99038,9 +98564,6 @@ index 00000000..4787e19c + + +#endif /* __PART_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/LS1043/part_integration_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/LS1043/part_integration_ext.h -new file mode 100644 -index 00000000..85ba2a47 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/LS1043/part_integration_ext.h @@ -0,0 +1,185 @@ @@ -99229,9 +98752,6 @@ index 00000000..85ba2a47 + + +#endif /* __PART_INTEGRATION_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P1023/dpaa_integration_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P1023/dpaa_integration_ext.h -new file mode 100644 -index 00000000..7b5390de --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P1023/dpaa_integration_ext.h @@ -0,0 +1,213 @@ @@ -99448,9 +98968,6 @@ index 00000000..7b5390de + + +#endif /* __DPAA_INTEGRATION_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P1023/part_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P1023/part_ext.h -new file mode 100644 -index 00000000..6814d5fb --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P1023/part_ext.h @@ -0,0 +1,82 @@ @@ -99536,9 +99053,6 @@ index 00000000..6814d5fb + + +#endif /* __PART_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P1023/part_integration_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P1023/part_integration_ext.h -new file mode 100644 -index 00000000..e838283d --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P1023/part_integration_ext.h @@ -0,0 +1,635 @@ @@ -100177,9 +99691,6 @@ index 00000000..e838283d + + +#endif /* __PART_INTEGRATION_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P3040_P4080_P5020/dpaa_integration_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P3040_P4080_P5020/dpaa_integration_ext.h -new file mode 100644 -index 00000000..6e2b925f --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P3040_P4080_P5020/dpaa_integration_ext.h @@ -0,0 +1,276 @@ @@ -100459,9 +99970,6 @@ index 00000000..6e2b925f + + +#endif /* __DPAA_INTEGRATION_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P3040_P4080_P5020/part_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P3040_P4080_P5020/part_ext.h -new file mode 100644 -index 00000000..512f0baf --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P3040_P4080_P5020/part_ext.h @@ -0,0 +1,83 @@ @@ -100548,9 +100056,6 @@ index 00000000..512f0baf + + +#endif /* __PART_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P3040_P4080_P5020/part_integration_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P3040_P4080_P5020/part_integration_ext.h -new file mode 100644 -index 00000000..03c59b8b --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P3040_P4080_P5020/part_integration_ext.h @@ -0,0 +1,336 @@ @@ -100890,9 +100395,6 @@ index 00000000..03c59b8b + { /* Port A */ 0xFFFFFFFF } + +#endif /* __PART_INTEGRATION_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/math_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/math_ext.h -new file mode 100644 -index 00000000..4ecfc6ed --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/math_ext.h @@ -0,0 +1,100 @@ @@ -100996,9 +100498,6 @@ index 00000000..4ecfc6ed + + +#endif /* __MATH_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/ncsw_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/ncsw_ext.h -new file mode 100644 -index 00000000..dc32e249 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/ncsw_ext.h @@ -0,0 +1,435 @@ @@ -101437,9 +100936,6 @@ index 00000000..dc32e249 + + +#endif /* __NCSW_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/net_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/net_ext.h -new file mode 100644 -index 00000000..8f3bc369 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/net_ext.h @@ -0,0 +1,430 @@ @@ -101873,9 +101369,6 @@ index 00000000..8f3bc369 + + +#endif /* __NET_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/std_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/std_ext.h -new file mode 100644 -index 00000000..d91e6fdd --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/std_ext.h @@ -0,0 +1,48 @@ @@ -101927,9 +101420,6 @@ index 00000000..d91e6fdd + + +#endif /* __STD_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/stdarg_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/stdarg_ext.h -new file mode 100644 -index 00000000..3c8bb0a0 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/stdarg_ext.h @@ -0,0 +1,49 @@ @@ -101982,9 +101472,6 @@ index 00000000..3c8bb0a0 + + +#endif /* __STDARG_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/stdlib_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/stdlib_ext.h -new file mode 100644 -index 00000000..a47860cf --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/stdlib_ext.h @@ -0,0 +1,162 @@ @@ -102150,9 +101637,6 @@ index 00000000..a47860cf + + +#endif /* __STDLIB_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/string_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/string_ext.h -new file mode 100644 -index 00000000..a5c6c7e0 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/string_ext.h @@ -0,0 +1,56 @@ @@ -102212,9 +101696,6 @@ index 00000000..a5c6c7e0 + + +#endif /* __STRING_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/types_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/types_ext.h -new file mode 100644 -index 00000000..8c87edb7 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/types_ext.h @@ -0,0 +1,62 @@ @@ -102280,9 +101761,6 @@ index 00000000..8c87edb7 +#endif /* defined (__ROCOO__) */ + +#endif /* __TYPES_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/xx_common.h b/drivers/net/ethernet/freescale/sdk_fman/inc/xx_common.h -new file mode 100644 -index 00000000..8e81094b --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/xx_common.h @@ -0,0 +1,56 @@ @@ -102342,9 +101820,6 @@ index 00000000..8e81094b +#define MODULE_FM_SP 0x00080000 +#define MODULE_FM_MACSEC 0x00090000 +#endif /* __XX_COMMON_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/xx_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/xx_ext.h -new file mode 100644 -index 00000000..21b62d0a --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/xx_ext.h @@ -0,0 +1,791 @@ @@ -103139,9 +102614,6 @@ index 00000000..21b62d0a + + +#endif /* __XX_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/ls1043_dflags.h b/drivers/net/ethernet/freescale/sdk_fman/ls1043_dflags.h -new file mode 100644 -index 00000000..c3a5a623 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/ls1043_dflags.h @@ -0,0 +1,56 @@ @@ -103201,9 +102673,6 @@ index 00000000..c3a5a623 +#define EVENT_GLOBAL_LEVEL REPORT_LEVEL_MINOR + +#endif /* __dflags_h */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/ncsw_config.mk b/drivers/net/ethernet/freescale/sdk_fman/ncsw_config.mk -new file mode 100644 -index 00000000..586f9c79 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/ncsw_config.mk @@ -0,0 +1,53 @@ @@ -103260,9 +102729,6 @@ index 00000000..586f9c79 +ccflags-y += -I$(srctree)/include/uapi/linux/fmd +ccflags-y += -I$(srctree)/include/uapi/linux/fmd/Peripherals +ccflags-y += -I$(srctree)/include/uapi/linux/fmd/integrations -diff --git a/drivers/net/ethernet/freescale/sdk_fman/p1023_dflags.h b/drivers/net/ethernet/freescale/sdk_fman/p1023_dflags.h -new file mode 100644 -index 00000000..b48819d7 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/p1023_dflags.h @@ -0,0 +1,65 @@ @@ -103331,9 +102797,6 @@ index 00000000..b48819d7 + + +#endif /* __dflags_h */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/p3040_4080_5020_dflags.h b/drivers/net/ethernet/freescale/sdk_fman/p3040_4080_5020_dflags.h -new file mode 100644 -index 00000000..74389742 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/p3040_4080_5020_dflags.h @@ -0,0 +1,62 @@ @@ -103399,9 +102862,6 @@ index 00000000..74389742 + + +#endif /* __dflags_h */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/Makefile b/drivers/net/ethernet/freescale/sdk_fman/src/Makefile -new file mode 100644 -index 00000000..49405d0e --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/Makefile @@ -0,0 +1,11 @@ @@ -103416,9 +102876,6 @@ index 00000000..49405d0e +obj-y += system/ +obj-y += wrapper/ +obj-y += xx/ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/inc/system/sys_ext.h b/drivers/net/ethernet/freescale/sdk_fman/src/inc/system/sys_ext.h -new file mode 100644 -index 00000000..20f27d29 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/inc/system/sys_ext.h @@ -0,0 +1,118 @@ @@ -103540,9 +102997,6 @@ index 00000000..20f27d29 + } else + +#endif /* __SYS_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/inc/system/sys_io_ext.h b/drivers/net/ethernet/freescale/sdk_fman/src/inc/system/sys_io_ext.h -new file mode 100644 -index 00000000..d6aa9d41 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/inc/system/sys_io_ext.h @@ -0,0 +1,46 @@ @@ -103592,9 +103046,6 @@ index 00000000..d6aa9d41 + + +#endif /* __SYS_IO_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/inc/types_linux.h b/drivers/net/ethernet/freescale/sdk_fman/src/inc/types_linux.h -new file mode 100644 -index 00000000..201ad699 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/inc/types_linux.h @@ -0,0 +1,208 @@ @@ -103806,9 +103257,6 @@ index 00000000..201ad699 + + +#endif /* __TYPES_LINUX_H__ */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/inc/wrapper/fsl_fman_test.h b/drivers/net/ethernet/freescale/sdk_fman/src/inc/wrapper/fsl_fman_test.h -new file mode 100644 -index 00000000..0466a473 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/inc/wrapper/fsl_fman_test.h @@ -0,0 +1,84 @@ @@ -103896,9 +103344,6 @@ index 00000000..0466a473 +#define FMAN_TEST_MAX_TX_FQS 8 + +#endif /* __FSL_FMAN_TEST_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/inc/wrapper/lnxwrp_exp_sym.h b/drivers/net/ethernet/freescale/sdk_fman/src/inc/wrapper/lnxwrp_exp_sym.h -new file mode 100644 -index 00000000..0c0c6c11 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/inc/wrapper/lnxwrp_exp_sym.h @@ -0,0 +1,128 @@ @@ -104030,9 +103475,6 @@ index 00000000..0c0c6c11 +EXPORT_SYMBOL(FM_GetSpecialOperationCoding); + +#endif /* __LNXWRP_EXP_SYM_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/inc/wrapper/lnxwrp_fm_ext.h b/drivers/net/ethernet/freescale/sdk_fman/src/inc/wrapper/lnxwrp_fm_ext.h -new file mode 100644 -index 00000000..a72c8670 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/inc/wrapper/lnxwrp_fm_ext.h @@ -0,0 +1,163 @@ @@ -104199,9 +103641,6 @@ index 00000000..a72c8670 + + +#endif /* __LNXWRP_FM_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/inc/wrapper/lnxwrp_fsl_fman.h b/drivers/net/ethernet/freescale/sdk_fman/src/inc/wrapper/lnxwrp_fsl_fman.h -new file mode 100644 -index 00000000..c50031cf --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/inc/wrapper/lnxwrp_fsl_fman.h @@ -0,0 +1,921 @@ @@ -105126,9 +104565,6 @@ index 00000000..c50031cf +#define DPA_PTP_NOMINAL_FREQ_PERIOD_NS (1 << DPA_PTP_NOMINAL_FREQ_PERIOD_SHIFT) /* 4ns,250MHz */ + +#endif /* __LNXWRP_FSL_FMAN_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/inc/xx/xx.h b/drivers/net/ethernet/freescale/sdk_fman/src/inc/xx/xx.h -new file mode 100644 -index 00000000..b183c86d --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/inc/xx/xx.h @@ -0,0 +1,50 @@ @@ -105182,9 +104618,6 @@ index 00000000..b183c86d + + +#endif /* __XX_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/system/Makefile b/drivers/net/ethernet/freescale/sdk_fman/src/system/Makefile -new file mode 100644 -index 00000000..667cd859 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/system/Makefile @@ -0,0 +1,10 @@ @@ -105198,9 +104631,6 @@ index 00000000..667cd859 +# + +obj-y += sys_io.o -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/system/sys_io.c b/drivers/net/ethernet/freescale/sdk_fman/src/system/sys_io.c -new file mode 100644 -index 00000000..c106a8b7 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/system/sys_io.c @@ -0,0 +1,171 @@ @@ -105375,9 +104805,6 @@ index 00000000..c106a8b7 + return (uint64_t)(addr - p_IoMap->virtAddr + p_IoMap->physAddr); + return (uint64_t)virt_to_phys(UINT_TO_PTR(addr)); +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/Makefile b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/Makefile -new file mode 100644 -index 00000000..62713d62 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/Makefile @@ -0,0 +1,19 @@ @@ -105400,9 +104827,6 @@ index 00000000..62713d62 +fsl-ncsw-PFM-objs := lnxwrp_fm.o lnxwrp_fm_port.o lnxwrp_ioctls_fm.o \ + lnxwrp_sysfs.o lnxwrp_sysfs_fm.o lnxwrp_sysfs_fm_port.o +obj-$(CONFIG_COMPAT) += lnxwrp_ioctls_fm_compat.o -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/fman_test.c b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/fman_test.c -new file mode 100644 -index 00000000..270d07b8 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/fman_test.c @@ -0,0 +1,1665 @@ @@ -107071,9 +106495,6 @@ index 00000000..270d07b8 + +module_init(fmt_load); +module_exit(fmt_unload); -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_fm.c b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_fm.c -new file mode 100755 -index 00000000..31f654b4 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_fm.c @@ -0,0 +1,2908 @@ @@ -109985,9 +109406,6 @@ index 00000000..31f654b4 + +module_init (fm_load); +module_exit (fm_unload); -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_fm.h b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_fm.h -new file mode 100644 -index 00000000..09832563 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_fm.h @@ -0,0 +1,294 @@ @@ -110285,9 +109703,6 @@ index 00000000..09832563 +void LnxWrpPCDIOCTLEnumChecking(void); + +#endif /* __LNXWRP_FM_H__ */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_fm_port.c b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_fm_port.c -new file mode 100644 -index 00000000..00ab4bcb --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_fm_port.c @@ -0,0 +1,1480 @@ @@ -111771,9 +111186,6 @@ index 00000000..00ab4bcb + +module_init(fm_port_load); +module_exit(fm_port_unload); -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_ioctls_fm.c b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_ioctls_fm.c -new file mode 100644 -index 00000000..1ddde856 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_ioctls_fm.c @@ -0,0 +1,4813 @@ @@ -116590,9 +116002,6 @@ index 00000000..1ddde856 + .open = fm_open, + .release = fm_close, +}; -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_ioctls_fm_compat.c b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_ioctls_fm_compat.c -new file mode 100644 -index 00000000..322ae9ef --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_ioctls_fm_compat.c @@ -0,0 +1,1297 @@ @@ -117893,9 +117302,6 @@ index 00000000..322ae9ef + _fm_cpt_dbg (compat, " ...->}\n"); +} +#endif /* (DPAA_VERSION >= 11) */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_ioctls_fm_compat.h b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_ioctls_fm_compat.h -new file mode 100644 -index 00000000..187011f7 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_ioctls_fm_compat.h @@ -0,0 +1,755 @@ @@ -118654,9 +118060,6 @@ index 00000000..187011f7 + +/* } pcd compat functions */ +#endif -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_resources.h b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_resources.h -new file mode 100644 -index 00000000..1b72e1d5 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_resources.h @@ -0,0 +1,121 @@ @@ -118781,9 +118184,6 @@ index 00000000..1b72e1d5 +#endif + +#endif /* LNXWRP_RESOURCES_H_ */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_resources_ut.c b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_resources_ut.c -new file mode 100644 -index 00000000..6c06a5a6 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_resources_ut.c @@ -0,0 +1,191 @@ @@ -118978,9 +118378,6 @@ index 00000000..6c06a5a6 + + return 0; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_resources_ut.h b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_resources_ut.h -new file mode 100644 -index 00000000..063946eb --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_resources_ut.h @@ -0,0 +1,144 @@ @@ -119128,9 +118525,6 @@ index 00000000..063946eb +} _PackedType t_FmPrsResult; + +#endif -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_resources_ut.make b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_resources_ut.make -new file mode 100644 -index 00000000..58009cd8 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_resources_ut.make @@ -0,0 +1,28 @@ @@ -119162,9 +118556,6 @@ index 00000000..58009cd8 +clean: + rm -f *.o + rm -f $(LNXWRP_RESS_UT) -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs.c b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs.c -new file mode 100644 -index 00000000..813771bf --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs.c @@ -0,0 +1,60 @@ @@ -119228,9 +118619,6 @@ index 00000000..813771bf + WARN(1, "FMD: Should never get here!"); + return 0; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs.h b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs.h -new file mode 100644 -index 00000000..2098b244 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs.h @@ -0,0 +1,60 @@ @@ -119294,9 +118682,6 @@ index 00000000..2098b244 + uint8_t *offset); + +#endif /* LNXWRP_SYSFS_H_ */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs_fm.c b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs_fm.c -new file mode 100644 -index 00000000..1badbf98 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs_fm.c @@ -0,0 +1,1855 @@ @@ -121155,9 +120540,6 @@ index 00000000..1badbf98 + /* should never get here */ + return -EINVAL; /* counter not available */ +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs_fm.h b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs_fm.h -new file mode 100644 -index 00000000..137653e9 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs_fm.h @@ -0,0 +1,136 @@ @@ -121297,9 +120679,6 @@ index 00000000..137653e9 + } while (0) + +#endif /* LNXWRP_SYSFS_FM_H_ */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs_fm_port.c b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs_fm_port.c -new file mode 100644 -index 00000000..db8e824c --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs_fm_port.c @@ -0,0 +1,1268 @@ @@ -122571,9 +121950,6 @@ index 00000000..db8e824c + return n; +} + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs_fm_port.h b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs_fm_port.h -new file mode 100644 -index 00000000..1e7636f4 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs_fm_port.h @@ -0,0 +1,56 @@ @@ -122633,9 +122009,6 @@ index 00000000..1e7636f4 +#endif + +#endif /* LNXWRP_SYSFS_FM_PORT_H_ */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/xx/Makefile b/drivers/net/ethernet/freescale/sdk_fman/src/xx/Makefile -new file mode 100644 -index 00000000..1071c22a --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/xx/Makefile @@ -0,0 +1,18 @@ @@ -122657,9 +122030,6 @@ index 00000000..1071c22a + module_strings.o +endif + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/xx/module_strings.c b/drivers/net/ethernet/freescale/sdk_fman/src/xx/module_strings.c -new file mode 100644 -index 00000000..d7fed170 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/xx/module_strings.c @@ -0,0 +1,46 @@ @@ -122709,9 +122079,6 @@ index 00000000..d7fed170 + "FM-SP", /* MODULE_FM_SP */ + "FM-MACSEC" /* MODULE_FM_MACSEC */ +}; -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/xx/xx_arm_linux.c b/drivers/net/ethernet/freescale/sdk_fman/src/xx/xx_arm_linux.c -new file mode 100644 -index 00000000..dd3e376e --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/xx/xx_arm_linux.c @@ -0,0 +1,905 @@ @@ -123620,9 +122987,6 @@ index 00000000..dd3e376e +{ + xx_Free((void*)(*((uintptr_t *)(p) - 1))); +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/xx/xx_linux.c b/drivers/net/ethernet/freescale/sdk_fman/src/xx/xx_linux.c -new file mode 100644 -index 00000000..992757d4 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/xx/xx_linux.c @@ -0,0 +1,918 @@ @@ -124544,9 +123908,6 @@ index 00000000..992757d4 +{ + xx_Free((void*)(*((uintptr_t *)(p) - 1))); +} -diff --git a/drivers/staging/fsl_qbman/Kconfig b/drivers/staging/fsl_qbman/Kconfig -new file mode 100644 -index 00000000..93dcb7d3 --- /dev/null +++ b/drivers/staging/fsl_qbman/Kconfig @@ -0,0 +1,228 @@ @@ -124778,9 +124139,6 @@ index 00000000..93dcb7d3 + + +endmenu -diff --git a/drivers/staging/fsl_qbman/Makefile b/drivers/staging/fsl_qbman/Makefile -new file mode 100644 -index 00000000..777d7d34 --- /dev/null +++ b/drivers/staging/fsl_qbman/Makefile @@ -0,0 +1,28 @@ @@ -124812,9 +124170,6 @@ index 00000000..777d7d34 + +# USDPAA +obj-$(CONFIG_FSL_USDPAA) += fsl_usdpaa.o fsl_usdpaa_irq.o -diff --git a/drivers/staging/fsl_qbman/bman_config.c b/drivers/staging/fsl_qbman/bman_config.c -new file mode 100644 -index 00000000..bb397730 --- /dev/null +++ b/drivers/staging/fsl_qbman/bman_config.c @@ -0,0 +1,720 @@ @@ -125538,9 +124893,6 @@ index 00000000..bb397730 +module_exit(bman_ctrl_exit); + +#endif /* CONFIG_SYSFS */ -diff --git a/drivers/staging/fsl_qbman/bman_debugfs.c b/drivers/staging/fsl_qbman/bman_debugfs.c -new file mode 100644 -index 00000000..96909348 --- /dev/null +++ b/drivers/staging/fsl_qbman/bman_debugfs.c @@ -0,0 +1,119 @@ @@ -125663,9 +125015,6 @@ index 00000000..96909348 +module_init(bman_debugfs_module_init); +module_exit(bman_debugfs_module_exit); +MODULE_LICENSE("Dual BSD/GPL"); -diff --git a/drivers/staging/fsl_qbman/bman_driver.c b/drivers/staging/fsl_qbman/bman_driver.c -new file mode 100644 -index 00000000..86fabef6 --- /dev/null +++ b/drivers/staging/fsl_qbman/bman_driver.c @@ -0,0 +1,575 @@ @@ -126244,9 +125593,6 @@ index 00000000..86fabef6 + return; +} +#endif -diff --git a/drivers/staging/fsl_qbman/bman_high.c b/drivers/staging/fsl_qbman/bman_high.c -new file mode 100644 -index 00000000..c066602d --- /dev/null +++ b/drivers/staging/fsl_qbman/bman_high.c @@ -0,0 +1,1145 @@ @@ -127395,9 +126741,6 @@ index 00000000..c066602d +{ + return portal->sharing_redirect ? NULL : portal->config; +} -diff --git a/drivers/staging/fsl_qbman/bman_low.h b/drivers/staging/fsl_qbman/bman_low.h -new file mode 100644 -index 00000000..3da70571 --- /dev/null +++ b/drivers/staging/fsl_qbman/bman_low.h @@ -0,0 +1,565 @@ @@ -127966,9 +127309,6 @@ index 00000000..3da70571 + } + return 0; +} -diff --git a/drivers/staging/fsl_qbman/bman_private.h b/drivers/staging/fsl_qbman/bman_private.h -new file mode 100644 -index 00000000..64eefe7d --- /dev/null +++ b/drivers/staging/fsl_qbman/bman_private.h @@ -0,0 +1,166 @@ @@ -128138,9 +127478,6 @@ index 00000000..64eefe7d +#endif + +#endif /* CONFIG_FSL_BMAN_CONFIG */ -diff --git a/drivers/staging/fsl_qbman/bman_test.c b/drivers/staging/fsl_qbman/bman_test.c -new file mode 100644 -index 00000000..db5b7fd3 --- /dev/null +++ b/drivers/staging/fsl_qbman/bman_test.c @@ -0,0 +1,56 @@ @@ -128200,9 +127537,6 @@ index 00000000..db5b7fd3 + +module_init(test_init); +module_exit(test_exit); -diff --git a/drivers/staging/fsl_qbman/bman_test.h b/drivers/staging/fsl_qbman/bman_test.h -new file mode 100644 -index 00000000..fcd65056 --- /dev/null +++ b/drivers/staging/fsl_qbman/bman_test.h @@ -0,0 +1,44 @@ @@ -128250,9 +127584,6 @@ index 00000000..fcd65056 + +void bman_test_high(void); +void bman_test_thresh(void); -diff --git a/drivers/staging/fsl_qbman/bman_test_high.c b/drivers/staging/fsl_qbman/bman_test_high.c -new file mode 100644 -index 00000000..1617a531 --- /dev/null +++ b/drivers/staging/fsl_qbman/bman_test_high.c @@ -0,0 +1,183 @@ @@ -128439,9 +127770,6 @@ index 00000000..1617a531 + bman_free_pool(pool); + pr_info("BMAN: --- finished high-level test ---\n"); +} -diff --git a/drivers/staging/fsl_qbman/bman_test_thresh.c b/drivers/staging/fsl_qbman/bman_test_thresh.c -new file mode 100644 -index 00000000..67093693 --- /dev/null +++ b/drivers/staging/fsl_qbman/bman_test_thresh.c @@ -0,0 +1,196 @@ @@ -128641,9 +127969,6 @@ index 00000000..67093693 + + pr_info("bman_test_thresh: done\n"); +} -diff --git a/drivers/staging/fsl_qbman/dpa_alloc.c b/drivers/staging/fsl_qbman/dpa_alloc.c -new file mode 100644 -index 00000000..44db3e1e --- /dev/null +++ b/drivers/staging/fsl_qbman/dpa_alloc.c @@ -0,0 +1,706 @@ @@ -129353,9 +128678,6 @@ index 00000000..44db3e1e + spin_unlock_irq(&list_head->lock); + return res; +} -diff --git a/drivers/staging/fsl_qbman/dpa_sys.h b/drivers/staging/fsl_qbman/dpa_sys.h -new file mode 100644 -index 00000000..e144f5a4 --- /dev/null +++ b/drivers/staging/fsl_qbman/dpa_sys.h @@ -0,0 +1,259 @@ @@ -129618,9 +128940,6 @@ index 00000000..e144f5a4 + void **iir_reg); +#endif +#endif /* DPA_SYS_H */ -diff --git a/drivers/staging/fsl_qbman/dpa_sys_arm.h b/drivers/staging/fsl_qbman/dpa_sys_arm.h -new file mode 100644 -index 00000000..17c5500e --- /dev/null +++ b/drivers/staging/fsl_qbman/dpa_sys_arm.h @@ -0,0 +1,95 @@ @@ -129719,9 +129038,6 @@ index 00000000..17c5500e + +#define hard_smp_processor_id() raw_smp_processor_id() +#endif -diff --git a/drivers/staging/fsl_qbman/dpa_sys_arm64.h b/drivers/staging/fsl_qbman/dpa_sys_arm64.h -new file mode 100644 -index 00000000..247c8d97 --- /dev/null +++ b/drivers/staging/fsl_qbman/dpa_sys_arm64.h @@ -0,0 +1,102 @@ @@ -129827,9 +129143,6 @@ index 00000000..247c8d97 + + +#endif -diff --git a/drivers/staging/fsl_qbman/dpa_sys_ppc32.h b/drivers/staging/fsl_qbman/dpa_sys_ppc32.h -new file mode 100644 -index 00000000..874616df --- /dev/null +++ b/drivers/staging/fsl_qbman/dpa_sys_ppc32.h @@ -0,0 +1,70 @@ @@ -129903,9 +129216,6 @@ index 00000000..874616df +} + +#endif -diff --git a/drivers/staging/fsl_qbman/dpa_sys_ppc64.h b/drivers/staging/fsl_qbman/dpa_sys_ppc64.h -new file mode 100644 -index 00000000..d9803199 --- /dev/null +++ b/drivers/staging/fsl_qbman/dpa_sys_ppc64.h @@ -0,0 +1,79 @@ @@ -129988,9 +129298,6 @@ index 00000000..d9803199 +} + +#endif -diff --git a/drivers/staging/fsl_qbman/fsl_usdpaa.c b/drivers/staging/fsl_qbman/fsl_usdpaa.c -new file mode 100644 -index 00000000..3a6d3722 --- /dev/null +++ b/drivers/staging/fsl_qbman/fsl_usdpaa.c @@ -0,0 +1,1983 @@ @@ -131977,9 +131284,6 @@ index 00000000..3a6d3722 +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Freescale Semiconductor"); +MODULE_DESCRIPTION("Freescale USDPAA process driver"); -diff --git a/drivers/staging/fsl_qbman/fsl_usdpaa_irq.c b/drivers/staging/fsl_qbman/fsl_usdpaa_irq.c -new file mode 100644 -index 00000000..914c7471 --- /dev/null +++ b/drivers/staging/fsl_qbman/fsl_usdpaa_irq.c @@ -0,0 +1,289 @@ @@ -132272,9 +131576,6 @@ index 00000000..914c7471 +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Freescale Semiconductor"); +MODULE_DESCRIPTION("Freescale USDPAA process IRQ driver"); -diff --git a/drivers/staging/fsl_qbman/qbman_driver.c b/drivers/staging/fsl_qbman/qbman_driver.c -new file mode 100644 -index 00000000..ab487d5f --- /dev/null +++ b/drivers/staging/fsl_qbman/qbman_driver.c @@ -0,0 +1,88 @@ @@ -132366,9 +131667,6 @@ index 00000000..ab487d5f + return 0; +} +subsys_initcall(qbman_init); -diff --git a/drivers/staging/fsl_qbman/qman_config.c b/drivers/staging/fsl_qbman/qman_config.c -new file mode 100644 -index 00000000..9bb1e11a --- /dev/null +++ b/drivers/staging/fsl_qbman/qman_config.c @@ -0,0 +1,1224 @@ @@ -133596,9 +132894,6 @@ index 00000000..9bb1e11a +module_exit(qman_ctrl_exit); + +#endif /* CONFIG_SYSFS */ -diff --git a/drivers/staging/fsl_qbman/qman_debugfs.c b/drivers/staging/fsl_qbman/qman_debugfs.c -new file mode 100644 -index 00000000..fb8ecba1 --- /dev/null +++ b/drivers/staging/fsl_qbman/qman_debugfs.c @@ -0,0 +1,1594 @@ @@ -135196,9 +134491,6 @@ index 00000000..fb8ecba1 +module_init(qman_debugfs_module_init); +module_exit(qman_debugfs_module_exit); +MODULE_LICENSE("Dual BSD/GPL"); -diff --git a/drivers/staging/fsl_qbman/qman_driver.c b/drivers/staging/fsl_qbman/qman_driver.c -new file mode 100644 -index 00000000..857ecd62 --- /dev/null +++ b/drivers/staging/fsl_qbman/qman_driver.c @@ -0,0 +1,977 @@ @@ -136179,9 +135471,6 @@ index 00000000..857ecd62 + return; +} +#endif -diff --git a/drivers/staging/fsl_qbman/qman_high.c b/drivers/staging/fsl_qbman/qman_high.c -new file mode 100644 -index 00000000..1651e62c --- /dev/null +++ b/drivers/staging/fsl_qbman/qman_high.c @@ -0,0 +1,5669 @@ @@ -141854,9 +141143,6 @@ index 00000000..1651e62c +{ + return portal->sharing_redirect ? NULL : portal->config; +} -diff --git a/drivers/staging/fsl_qbman/qman_low.h b/drivers/staging/fsl_qbman/qman_low.h -new file mode 100644 -index 00000000..547b5fa2 --- /dev/null +++ b/drivers/staging/fsl_qbman/qman_low.h @@ -0,0 +1,1427 @@ @@ -143287,9 +142573,6 @@ index 00000000..547b5fa2 + } + return -1; +} -diff --git a/drivers/staging/fsl_qbman/qman_private.h b/drivers/staging/fsl_qbman/qman_private.h -new file mode 100644 -index 00000000..ee025cff --- /dev/null +++ b/drivers/staging/fsl_qbman/qman_private.h @@ -0,0 +1,398 @@ @@ -143691,9 +142974,6 @@ index 00000000..ee025cff +void suspend_unused_qportal(void); +void resume_unused_qportal(void); +#endif -diff --git a/drivers/staging/fsl_qbman/qman_test.c b/drivers/staging/fsl_qbman/qman_test.c -new file mode 100644 -index 00000000..7995dd8c --- /dev/null +++ b/drivers/staging/fsl_qbman/qman_test.c @@ -0,0 +1,57 @@ @@ -143754,9 +143034,6 @@ index 00000000..7995dd8c + +module_init(test_init); +module_exit(test_exit); -diff --git a/drivers/staging/fsl_qbman/qman_test.h b/drivers/staging/fsl_qbman/qman_test.h -new file mode 100644 -index 00000000..8c4181c7 --- /dev/null +++ b/drivers/staging/fsl_qbman/qman_test.h @@ -0,0 +1,45 @@ @@ -143805,9 +143082,6 @@ index 00000000..8c4181c7 +void qman_test_hotpotato(void); +void qman_test_high(void); + -diff --git a/drivers/staging/fsl_qbman/qman_test_high.c b/drivers/staging/fsl_qbman/qman_test_high.c -new file mode 100644 -index 00000000..65ee270e --- /dev/null +++ b/drivers/staging/fsl_qbman/qman_test_high.c @@ -0,0 +1,216 @@ @@ -144027,9 +143301,6 @@ index 00000000..65ee270e + retire_complete = 1; + wake_up(&waitqueue); +} -diff --git a/drivers/staging/fsl_qbman/qman_test_hotpotato.c b/drivers/staging/fsl_qbman/qman_test_hotpotato.c -new file mode 100644 -index 00000000..899d2aa9 --- /dev/null +++ b/drivers/staging/fsl_qbman/qman_test_hotpotato.c @@ -0,0 +1,502 @@ @@ -144535,9 +143806,6 @@ index 00000000..899d2aa9 + kmem_cache_destroy(hp_handler_slab); + pr_info("qman_test_hotpotato finished\n"); +} -diff --git a/drivers/staging/fsl_qbman/qman_utility.c b/drivers/staging/fsl_qbman/qman_utility.c -new file mode 100644 -index 00000000..f1e39023 --- /dev/null +++ b/drivers/staging/fsl_qbman/qman_utility.c @@ -0,0 +1,129 @@ @@ -144670,9 +143938,6 @@ index 00000000..f1e39023 + return pool->used; +} +EXPORT_SYMBOL(qman_fqid_pool_used); -diff --git a/include/linux/fsl_bman.h b/include/linux/fsl_bman.h -new file mode 100644 -index 00000000..43942221 --- /dev/null +++ b/include/linux/fsl_bman.h @@ -0,0 +1,532 @@ @@ -145208,9 +144473,6 @@ index 00000000..43942221 +#endif + +#endif /* FSL_BMAN_H */ -diff --git a/include/linux/fsl_qman.h b/include/linux/fsl_qman.h -new file mode 100644 -index 00000000..4e4b21d5 --- /dev/null +++ b/include/linux/fsl_qman.h @@ -0,0 +1,3888 @@ @@ -149102,9 +148364,6 @@ index 00000000..4e4b21d5 +#endif + +#endif /* FSL_QMAN_H */ -diff --git a/include/linux/fsl_usdpaa.h b/include/linux/fsl_usdpaa.h -new file mode 100644 -index 00000000..381853de --- /dev/null +++ b/include/linux/fsl_usdpaa.h @@ -0,0 +1,372 @@ @@ -149480,9 +148739,6 @@ index 00000000..381853de +#endif + +#endif /* FSL_USDPAA_H */ -diff --git a/include/uapi/linux/fmd/Kbuild b/include/uapi/linux/fmd/Kbuild -new file mode 100644 -index 00000000..56a20401 --- /dev/null +++ b/include/uapi/linux/fmd/Kbuild @@ -0,0 +1,5 @@ @@ -149491,9 +148747,6 @@ index 00000000..56a20401 + +header-y += ioctls.h +header-y += net_ioctls.h -diff --git a/include/uapi/linux/fmd/Peripherals/Kbuild b/include/uapi/linux/fmd/Peripherals/Kbuild -new file mode 100644 -index 00000000..43883efe --- /dev/null +++ b/include/uapi/linux/fmd/Peripherals/Kbuild @@ -0,0 +1,4 @@ @@ -149501,9 +148754,6 @@ index 00000000..43883efe +header-y += fm_port_ioctls.h +header-y += fm_pcd_ioctls.h +header-y += fm_test_ioctls.h -diff --git a/include/uapi/linux/fmd/Peripherals/fm_ioctls.h b/include/uapi/linux/fmd/Peripherals/fm_ioctls.h -new file mode 100644 -index 00000000..e0c2dd31 --- /dev/null +++ b/include/uapi/linux/fmd/Peripherals/fm_ioctls.h @@ -0,0 +1,628 @@ @@ -150135,9 +149385,6 @@ index 00000000..e0c2dd31 +#define FMD_API_VERSION_RESPIN 0 + +#endif /* __FM_IOCTLS_H */ -diff --git a/include/uapi/linux/fmd/Peripherals/fm_pcd_ioctls.h b/include/uapi/linux/fmd/Peripherals/fm_pcd_ioctls.h -new file mode 100644 -index 00000000..d13e878d --- /dev/null +++ b/include/uapi/linux/fmd/Peripherals/fm_pcd_ioctls.h @@ -0,0 +1,3084 @@ @@ -153225,9 +152472,6 @@ index 00000000..d13e878d +/** @} */ /* end of lnx_ioctl_FM_PCD_Runtime_grp group */ +/** @} */ /* end of lnx_ioctl_FM_PCD_grp group */ +/** @} */ /* end of lnx_ioctl_FM_grp group */ -diff --git a/include/uapi/linux/fmd/Peripherals/fm_port_ioctls.h b/include/uapi/linux/fmd/Peripherals/fm_port_ioctls.h -new file mode 100644 -index 00000000..a2f61107 --- /dev/null +++ b/include/uapi/linux/fmd/Peripherals/fm_port_ioctls.h @@ -0,0 +1,948 @@ @@ -154179,9 +153423,6 @@ index 00000000..a2f61107 +/** @} */ /* end of lnx_ioctl_FM_PORT_grp group */ +/** @} */ /* end of lnx_ioctl_FM_grp group */ +#endif /* __FM_PORT_IOCTLS_H */ -diff --git a/include/uapi/linux/fmd/Peripherals/fm_test_ioctls.h b/include/uapi/linux/fmd/Peripherals/fm_test_ioctls.h -new file mode 100644 -index 00000000..207ed1eb --- /dev/null +++ b/include/uapi/linux/fmd/Peripherals/fm_test_ioctls.h @@ -0,0 +1,208 @@ @@ -154393,16 +153634,10 @@ index 00000000..207ed1eb + + +#endif /* __FM_TEST_IOCTLS_H */ -diff --git a/include/uapi/linux/fmd/integrations/Kbuild b/include/uapi/linux/fmd/integrations/Kbuild -new file mode 100644 -index 00000000..e548d676 --- /dev/null +++ b/include/uapi/linux/fmd/integrations/Kbuild @@ -0,0 +1 @@ +header-y += integration_ioctls.h -diff --git a/include/uapi/linux/fmd/integrations/integration_ioctls.h b/include/uapi/linux/fmd/integrations/integration_ioctls.h -new file mode 100644 -index 00000000..61d696e2 --- /dev/null +++ b/include/uapi/linux/fmd/integrations/integration_ioctls.h @@ -0,0 +1,56 @@ @@ -154462,9 +153697,6 @@ index 00000000..61d696e2 +#endif + +#endif /* __INTG_IOCTLS_H */ -diff --git a/include/uapi/linux/fmd/ioctls.h b/include/uapi/linux/fmd/ioctls.h -new file mode 100644 -index 00000000..4f36cb05 --- /dev/null +++ b/include/uapi/linux/fmd/ioctls.h @@ -0,0 +1,96 @@ @@ -154564,9 +153796,6 @@ index 00000000..4f36cb05 + + +#endif /* __IOCTLS_H__ */ -diff --git a/include/uapi/linux/fmd/net_ioctls.h b/include/uapi/linux/fmd/net_ioctls.h -new file mode 100644 -index 00000000..c99d64cf --- /dev/null +++ b/include/uapi/linux/fmd/net_ioctls.h @@ -0,0 +1,430 @@ @@ -155000,6 +154229,3 @@ index 00000000..c99d64cf + + +#endif /* __NET_IOCTLS_H */ --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/702-pci-support-layerscape.patch b/target/linux/layerscape/patches-4.9/702-pci-support-layerscape.patch index c3dcd73b60..4e3b139b40 100644 --- a/target/linux/layerscape/patches-4.9/702-pci-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/702-pci-support-layerscape.patch @@ -30,8 +30,6 @@ Signed-off-by: Yangbo Lu create mode 100644 drivers/pci/host/pci-layerscape-ep.c create mode 100644 drivers/pci/host/pci-layerscape-ep.h -diff --git a/drivers/irqchip/irq-ls-scfg-msi.c b/drivers/irqchip/irq-ls-scfg-msi.c -index 02cca74c..119f4ef0 100644 --- a/drivers/irqchip/irq-ls-scfg-msi.c +++ b/drivers/irqchip/irq-ls-scfg-msi.c @@ -17,13 +17,32 @@ @@ -84,7 +82,7 @@ index 02cca74c..119f4ef0 100644 }; static struct irq_chip ls_scfg_msi_irq_chip = { -@@ -49,19 +71,56 @@ static struct msi_domain_info ls_scfg_msi_domain_info = { +@@ -49,19 +71,56 @@ static struct msi_domain_info ls_scfg_ms .chip = &ls_scfg_msi_irq_chip, }; @@ -143,7 +141,7 @@ index 02cca74c..119f4ef0 100644 } static struct irq_chip ls_scfg_msi_parent_chip = { -@@ -81,8 +140,8 @@ static int ls_scfg_msi_domain_irq_alloc(struct irq_domain *domain, +@@ -81,8 +140,8 @@ static int ls_scfg_msi_domain_irq_alloc( WARN_ON(nr_irqs != 1); spin_lock(&msi_data->lock); @@ -154,7 +152,7 @@ index 02cca74c..119f4ef0 100644 __set_bit(pos, msi_data->used); else err = -ENOSPC; -@@ -106,7 +165,7 @@ static void ls_scfg_msi_domain_irq_free(struct irq_domain *domain, +@@ -106,7 +165,7 @@ static void ls_scfg_msi_domain_irq_free( int pos; pos = d->hwirq; @@ -163,7 +161,7 @@ index 02cca74c..119f4ef0 100644 pr_err("failed to teardown msi. Invalid hwirq %d\n", pos); return; } -@@ -123,15 +182,22 @@ static const struct irq_domain_ops ls_scfg_msi_domain_ops = { +@@ -123,15 +182,22 @@ static const struct irq_domain_ops ls_sc static void ls_scfg_msi_irq_handler(struct irq_desc *desc) { @@ -191,7 +189,7 @@ index 02cca74c..119f4ef0 100644 if (virq) generic_handle_irq(virq); } -@@ -143,7 +209,7 @@ static int ls_scfg_msi_domains_init(struct ls_scfg_msi *msi_data) +@@ -143,7 +209,7 @@ static int ls_scfg_msi_domains_init(stru { /* Initialize MSI domain parent */ msi_data->parent = irq_domain_add_linear(NULL, @@ -200,7 +198,7 @@ index 02cca74c..119f4ef0 100644 &ls_scfg_msi_domain_ops, msi_data); if (!msi_data->parent) { -@@ -164,16 +230,117 @@ static int ls_scfg_msi_domains_init(struct ls_scfg_msi *msi_data) +@@ -164,16 +230,117 @@ static int ls_scfg_msi_domains_init(stru return 0; } @@ -319,7 +317,7 @@ index 02cca74c..119f4ef0 100644 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); msi_data->regs = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(msi_data->regs)) { -@@ -182,23 +349,48 @@ static int ls_scfg_msi_probe(struct platform_device *pdev) +@@ -182,23 +349,48 @@ static int ls_scfg_msi_probe(struct plat } msi_data->msiir_addr = res->start; @@ -378,7 +376,7 @@ index 02cca74c..119f4ef0 100644 platform_set_drvdata(pdev, msi_data); return 0; -@@ -207,8 +399,10 @@ static int ls_scfg_msi_probe(struct platform_device *pdev) +@@ -207,8 +399,10 @@ static int ls_scfg_msi_probe(struct plat static int ls_scfg_msi_remove(struct platform_device *pdev) { struct ls_scfg_msi *msi_data = platform_get_drvdata(pdev); @@ -390,7 +388,7 @@ index 02cca74c..119f4ef0 100644 irq_domain_remove(msi_data->msi_domain); irq_domain_remove(msi_data->parent); -@@ -218,12 +412,6 @@ static int ls_scfg_msi_remove(struct platform_device *pdev) +@@ -218,12 +412,6 @@ static int ls_scfg_msi_remove(struct pla return 0; } @@ -403,11 +401,9 @@ index 02cca74c..119f4ef0 100644 static struct platform_driver ls_scfg_msi_driver = { .driver = { .name = "ls-scfg-msi", -diff --git a/drivers/pci/host/Makefile b/drivers/pci/host/Makefile -index 084cb498..88e87704 100644 --- a/drivers/pci/host/Makefile +++ b/drivers/pci/host/Makefile -@@ -17,7 +17,7 @@ obj-$(CONFIG_PCIE_XILINX) += pcie-xilinx.o +@@ -17,7 +17,7 @@ obj-$(CONFIG_PCIE_XILINX) += pcie-xilinx obj-$(CONFIG_PCIE_XILINX_NWL) += pcie-xilinx-nwl.o obj-$(CONFIG_PCI_XGENE) += pci-xgene.o obj-$(CONFIG_PCI_XGENE_MSI) += pci-xgene-msi.o @@ -416,9 +412,6 @@ index 084cb498..88e87704 100644 obj-$(CONFIG_PCI_VERSATILE) += pci-versatile.o obj-$(CONFIG_PCIE_IPROC) += pcie-iproc.o obj-$(CONFIG_PCIE_IPROC_MSI) += pcie-iproc-msi.o -diff --git a/drivers/pci/host/pci-layerscape-ep-debugfs.c b/drivers/pci/host/pci-layerscape-ep-debugfs.c -new file mode 100644 -index 00000000..5f4870ba --- /dev/null +++ b/drivers/pci/host/pci-layerscape-ep-debugfs.c @@ -0,0 +1,758 @@ @@ -1180,9 +1173,6 @@ index 00000000..5f4870ba +MODULE_AUTHOR("Minghuan Lian "); +MODULE_DESCRIPTION("Freescale Layerscape PCIe EP controller driver"); +MODULE_LICENSE("GPL v2"); -diff --git a/drivers/pci/host/pci-layerscape-ep.c b/drivers/pci/host/pci-layerscape-ep.c -new file mode 100644 -index 00000000..8f1cca6e --- /dev/null +++ b/drivers/pci/host/pci-layerscape-ep.c @@ -0,0 +1,309 @@ @@ -1495,9 +1485,6 @@ index 00000000..8f1cca6e +MODULE_AUTHOR("Minghuan Lian "); +MODULE_DESCRIPTION("Freescale Layerscape PCIe EP driver"); +MODULE_LICENSE("GPL v2"); -diff --git a/drivers/pci/host/pci-layerscape-ep.h b/drivers/pci/host/pci-layerscape-ep.h -new file mode 100644 -index 00000000..990c0ff5 --- /dev/null +++ b/drivers/pci/host/pci-layerscape-ep.h @@ -0,0 +1,115 @@ @@ -1616,8 +1603,6 @@ index 00000000..990c0ff5 +int ls_pcie_ep_dbgfs_remove(struct ls_pcie *pcie); + +#endif /* _PCIE_LAYERSCAPE_EP_H */ -diff --git a/drivers/pci/host/pci-layerscape.c b/drivers/pci/host/pci-layerscape.c -index 65370799..4713b872 100644 --- a/drivers/pci/host/pci-layerscape.c +++ b/drivers/pci/host/pci-layerscape.c @@ -35,12 +35,14 @@ @@ -1637,7 +1622,7 @@ index 65370799..4713b872 100644 struct pcie_host_ops *ops; }; -@@ -86,6 +88,14 @@ static void ls_pcie_drop_msg_tlp(struct ls_pcie *pcie) +@@ -86,6 +88,14 @@ static void ls_pcie_drop_msg_tlp(struct iowrite32(val, pcie->pp.dbi_base + PCIE_STRFMR1); } @@ -1652,7 +1637,7 @@ index 65370799..4713b872 100644 static int ls1021_pcie_link_up(struct pcie_port *pp) { u32 state; -@@ -134,7 +144,7 @@ static int ls_pcie_link_up(struct pcie_port *pp) +@@ -134,7 +144,7 @@ static int ls_pcie_link_up(struct pcie_p struct ls_pcie *pcie = to_ls_pcie(pp); u32 state; @@ -1661,7 +1646,7 @@ index 65370799..4713b872 100644 pcie->drvdata->ltssm_shift) & LTSSM_STATE_MASK; -@@ -153,6 +163,9 @@ static void ls_pcie_host_init(struct pcie_port *pp) +@@ -153,6 +163,9 @@ static void ls_pcie_host_init(struct pci ls_pcie_clear_multifunction(pcie); ls_pcie_drop_msg_tlp(pcie); iowrite32(0, pcie->pp.dbi_base + PCIE_DBI_RO_WR_EN); @@ -1671,7 +1656,7 @@ index 65370799..4713b872 100644 } static int ls_pcie_msi_host_init(struct pcie_port *pp, -@@ -196,20 +209,38 @@ static struct ls_pcie_drvdata ls1021_drvdata = { +@@ -196,20 +209,38 @@ static struct ls_pcie_drvdata ls1021_drv static struct ls_pcie_drvdata ls1043_drvdata = { .lut_offset = 0x10000, .ltssm_shift = 24, @@ -1710,11 +1695,9 @@ index 65370799..4713b872 100644 { }, }; -diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c -index af8f6e92..2358e049 100644 --- a/drivers/pci/host/pcie-designware.c +++ b/drivers/pci/host/pcie-designware.c -@@ -478,6 +478,12 @@ int dw_pcie_wait_for_link(struct pcie_port *pp) +@@ -478,6 +478,12 @@ int dw_pcie_wait_for_link(struct pcie_po return -ETIMEDOUT; } @@ -1727,22 +1710,18 @@ index af8f6e92..2358e049 100644 int dw_pcie_link_up(struct pcie_port *pp) { u32 val; -diff --git a/drivers/pci/host/pcie-designware.h b/drivers/pci/host/pcie-designware.h -index a567ea28..4e6672b2 100644 --- a/drivers/pci/host/pcie-designware.h +++ b/drivers/pci/host/pcie-designware.h -@@ -82,5 +82,6 @@ int dw_pcie_wait_for_link(struct pcie_port *pp); +@@ -82,5 +82,6 @@ int dw_pcie_wait_for_link(struct pcie_po int dw_pcie_link_up(struct pcie_port *pp); void dw_pcie_setup_rc(struct pcie_port *pp); int dw_pcie_host_init(struct pcie_port *pp); +void dw_pcie_disable_outbound_atu(struct pcie_port *pp, int index); #endif /* _PCIE_DESIGNWARE_H */ -diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c -index e9270b40..1bad877a 100644 --- a/drivers/pci/pcie/portdrv_core.c +++ b/drivers/pci/pcie/portdrv_core.c -@@ -44,52 +44,30 @@ static void release_pcie_device(struct device *dev) +@@ -44,52 +44,30 @@ static void release_pcie_device(struct d } /** @@ -1806,7 +1785,7 @@ index e9270b40..1bad877a 100644 /* * Allocate as many entries as the port wants, so that we can check -@@ -97,20 +75,13 @@ static int pcie_port_enable_msix(struct pci_dev *dev, int *vectors, int mask) +@@ -97,20 +75,13 @@ static int pcie_port_enable_msix(struct * equal to the number of entries this port actually uses, we'll happily * go through without any tricks. */ @@ -1832,7 +1811,7 @@ index e9270b40..1bad877a 100644 /* * The code below follows the PCI Express Base Specification 2.0 -@@ -125,18 +96,16 @@ static int pcie_port_enable_msix(struct pci_dev *dev, int *vectors, int mask) +@@ -125,18 +96,16 @@ static int pcie_port_enable_msix(struct pcie_capability_read_word(dev, PCI_EXP_FLAGS, ®16); entry = (reg16 & PCI_EXP_FLAGS_IRQ) >> 9; if (entry >= nr_entries) @@ -1856,7 +1835,7 @@ index e9270b40..1bad877a 100644 /* * The code below follows Section 7.10.10 of the PCI Express -@@ -151,13 +120,11 @@ static int pcie_port_enable_msix(struct pci_dev *dev, int *vectors, int mask) +@@ -151,13 +120,11 @@ static int pcie_port_enable_msix(struct pci_read_config_dword(dev, pos + PCI_ERR_ROOT_STATUS, ®32); entry = reg32 >> 27; if (entry >= nr_entries) @@ -1873,7 +1852,7 @@ index e9270b40..1bad877a 100644 } /* -@@ -165,41 +132,54 @@ static int pcie_port_enable_msix(struct pci_dev *dev, int *vectors, int mask) +@@ -165,41 +132,54 @@ static int pcie_port_enable_msix(struct * what we have. Otherwise, the port has some extra entries not for the * services we know and we need to work around that. */ @@ -1947,7 +1926,7 @@ index e9270b40..1bad877a 100644 /* * If MSI cannot be used for PCIe PME or hotplug, we have to use -@@ -207,41 +187,25 @@ static int init_service_irqs(struct pci_dev *dev, int *irqs, int mask) +@@ -207,41 +187,25 @@ static int init_service_irqs(struct pci_ */ if (((mask & PCIE_PORT_SERVICE_PME) && pcie_pme_no_msi()) || ((mask & PCIE_PORT_SERVICE_HP) && pciehp_no_msi())) { @@ -2001,7 +1980,7 @@ index e9270b40..1bad877a 100644 /** * get_port_device_capability - discover capabilities of a PCI Express port * @dev: PCI Express port to examine -@@ -378,7 +342,7 @@ int pcie_port_device_register(struct pci_dev *dev) +@@ -378,7 +342,7 @@ int pcie_port_device_register(struct pci * that can be used in the absence of irqs. Allow them to determine * if that is to be used. */ @@ -2010,7 +1989,7 @@ index e9270b40..1bad877a 100644 if (status) { capabilities &= PCIE_PORT_SERVICE_VC | PCIE_PORT_SERVICE_HP; if (!capabilities) -@@ -401,7 +365,7 @@ int pcie_port_device_register(struct pci_dev *dev) +@@ -401,7 +365,7 @@ int pcie_port_device_register(struct pci return 0; error_cleanup_irqs: @@ -2019,7 +1998,7 @@ index e9270b40..1bad877a 100644 error_disable: pci_disable_device(dev); return status; -@@ -469,7 +433,7 @@ static int remove_iter(struct device *dev, void *data) +@@ -469,7 +433,7 @@ static int remove_iter(struct device *de void pcie_port_device_remove(struct pci_dev *dev) { device_for_each_child(&dev->dev, NULL, remove_iter); @@ -2028,7 +2007,7 @@ index e9270b40..1bad877a 100644 pci_disable_device(dev); } -@@ -499,7 +463,6 @@ static int pcie_port_probe_service(struct device *dev) +@@ -499,7 +463,6 @@ static int pcie_port_probe_service(struc if (status) return status; @@ -2036,7 +2015,7 @@ index e9270b40..1bad877a 100644 get_device(dev); return 0; } -@@ -524,8 +487,6 @@ static int pcie_port_remove_service(struct device *dev) +@@ -524,8 +487,6 @@ static int pcie_port_remove_service(stru pciedev = to_pcie_device(dev); driver = to_service_driver(dev->driver); if (driver && driver->remove) { @@ -2045,11 +2024,9 @@ index e9270b40..1bad877a 100644 driver->remove(pciedev); put_device(dev); } -diff --git a/include/linux/pci.h b/include/linux/pci.h -index 1b711796..6738d816 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h -@@ -1823,6 +1823,7 @@ void pcibios_release_device(struct pci_dev *dev); +@@ -1823,6 +1823,7 @@ void pcibios_release_device(struct pci_d void pcibios_penalize_isa_irq(int irq, int active); int pcibios_alloc_irq(struct pci_dev *dev); void pcibios_free_irq(struct pci_dev *dev); @@ -2057,6 +2034,3 @@ index 1b711796..6738d816 100644 #ifdef CONFIG_HIBERNATE_CALLBACKS extern struct dev_pm_ops pcibios_pm_ops; --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/703-phy-support-layerscape.patch b/target/linux/layerscape/patches-4.9/703-phy-support-layerscape.patch index 0e8e3695f3..312faf2c5b 100644 --- a/target/linux/layerscape/patches-4.9/703-phy-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/703-phy-support-layerscape.patch @@ -26,8 +26,6 @@ Signed-off-by: Yangbo Lu create mode 100644 drivers/net/phy/cortina.c create mode 100644 drivers/net/phy/fsl_backplane.c -diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig -index 30a3a2f5..3521c1ac 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig @@ -89,6 +89,12 @@ config MDIO_BUS_MUX_MMIOREG @@ -55,11 +53,9 @@ index 30a3a2f5..3521c1ac 100644 config DAVICOM_PHY tristate "Davicom PHYs" ---help--- -diff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile -index 93a68fcd..ef3ec265 100644 --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile -@@ -30,6 +30,7 @@ obj-$(CONFIG_MDIO_BUS_MUX_BCM_IPROC) += mdio-mux-bcm-iproc.o +@@ -30,6 +30,7 @@ obj-$(CONFIG_MDIO_BUS_MUX_BCM_IPROC) += obj-$(CONFIG_MDIO_BUS_MUX_GPIO) += mdio-mux-gpio.o obj-$(CONFIG_MDIO_BUS_MUX_MMIOREG) += mdio-mux-mmioreg.o obj-$(CONFIG_MDIO_CAVIUM) += mdio-cavium.o @@ -67,7 +63,7 @@ index 93a68fcd..ef3ec265 100644 obj-$(CONFIG_MDIO_GPIO) += mdio-gpio.o obj-$(CONFIG_MDIO_HISI_FEMAC) += mdio-hisi-femac.o obj-$(CONFIG_MDIO_MOXART) += mdio-moxart.o -@@ -48,6 +49,7 @@ obj-$(CONFIG_BCM_CYGNUS_PHY) += bcm-cygnus.o +@@ -48,6 +49,7 @@ obj-$(CONFIG_BCM_CYGNUS_PHY) += bcm-cygn obj-$(CONFIG_BCM_NET_PHYLIB) += bcm-phy-lib.o obj-$(CONFIG_BROADCOM_PHY) += broadcom.o obj-$(CONFIG_CICADA_PHY) += cicada.o @@ -75,8 +71,6 @@ index 93a68fcd..ef3ec265 100644 obj-$(CONFIG_DAVICOM_PHY) += davicom.o obj-$(CONFIG_DP83640_PHY) += dp83640.o obj-$(CONFIG_DP83848_PHY) += dp83848.o -diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c -index 09b0b0aa..e8ae50e1 100644 --- a/drivers/net/phy/aquantia.c +++ b/drivers/net/phy/aquantia.c @@ -21,6 +21,8 @@ @@ -88,11 +82,10 @@ index 09b0b0aa..e8ae50e1 100644 #define PHY_ID_AQR405 0x03a1b4b0 #define PHY_AQUANTIA_FEATURES (SUPPORTED_10000baseT_Full | \ -@@ -153,6 +155,30 @@ static struct phy_driver aquantia_driver[] = { - .ack_interrupt = aquantia_ack_interrupt, +@@ -154,6 +156,30 @@ static struct phy_driver aquantia_driver .read_status = aquantia_read_status, }, -+{ + { + .phy_id = PHY_ID_AQR106, + .phy_id_mask = 0xfffffff0, + .name = "Aquantia AQR106", @@ -116,10 +109,11 @@ index 09b0b0aa..e8ae50e1 100644 + .ack_interrupt = aquantia_ack_interrupt, + .read_status = aquantia_read_status, +}, - { ++{ .phy_id = PHY_ID_AQR405, .phy_id_mask = 0xfffffff0, -@@ -173,6 +199,8 @@ static struct mdio_device_id __maybe_unused aquantia_tbl[] = { + .name = "Aquantia AQR405", +@@ -173,6 +199,8 @@ static struct mdio_device_id __maybe_unu { PHY_ID_AQ1202, 0xfffffff0 }, { PHY_ID_AQ2104, 0xfffffff0 }, { PHY_ID_AQR105, 0xfffffff0 }, @@ -128,9 +122,6 @@ index 09b0b0aa..e8ae50e1 100644 { PHY_ID_AQR405, 0xfffffff0 }, { } }; -diff --git a/drivers/net/phy/cortina.c b/drivers/net/phy/cortina.c -new file mode 100644 -index 00000000..72f4228a --- /dev/null +++ b/drivers/net/phy/cortina.c @@ -0,0 +1,118 @@ @@ -252,9 +243,6 @@ index 00000000..72f4228a +}; + +MODULE_DEVICE_TABLE(mdio, cortina_tbl); -diff --git a/drivers/net/phy/fsl_backplane.c b/drivers/net/phy/fsl_backplane.c -new file mode 100644 -index 00000000..76865261 --- /dev/null +++ b/drivers/net/phy/fsl_backplane.c @@ -0,0 +1,1358 @@ @@ -1616,11 +1604,9 @@ index 00000000..76865261 +MODULE_DESCRIPTION("Freescale Backplane driver"); +MODULE_AUTHOR("Shaohui Xie "); +MODULE_LICENSE("GPL v2"); -diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c -index f3e64a89..42cdd5b7 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c -@@ -585,7 +585,7 @@ int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd) +@@ -585,7 +585,7 @@ int phy_mii_ioctl(struct phy_device *phy return 0; case SIOCSHWTSTAMP: @@ -1629,7 +1615,7 @@ index f3e64a89..42cdd5b7 100644 return phydev->drv->hwtstamp(phydev, ifr); /* fall through */ -@@ -610,6 +610,9 @@ static int phy_start_aneg_priv(struct phy_device *phydev, bool sync) +@@ -610,6 +610,9 @@ static int phy_start_aneg_priv(struct ph bool trigger = 0; int err; @@ -1639,7 +1625,7 @@ index f3e64a89..42cdd5b7 100644 mutex_lock(&phydev->lock); if (AUTONEG_DISABLE == phydev->autoneg) -@@ -1009,7 +1012,7 @@ void phy_state_machine(struct work_struct *work) +@@ -1009,7 +1012,7 @@ void phy_state_machine(struct work_struc old_state = phydev->state; @@ -1668,7 +1654,7 @@ index f3e64a89..42cdd5b7 100644 return phy_read_mmd_indirect(phydev, MDIO_PCS_EEE_WK_ERR, MDIO_MMD_PCS); } EXPORT_SYMBOL(phy_get_eee_err); -@@ -1404,6 +1413,9 @@ int phy_ethtool_get_eee(struct phy_device *phydev, struct ethtool_eee *data) +@@ -1404,6 +1413,9 @@ int phy_ethtool_get_eee(struct phy_devic { int val; @@ -1678,7 +1664,7 @@ index f3e64a89..42cdd5b7 100644 /* Get Supported EEE */ val = phy_read_mmd_indirect(phydev, MDIO_PCS_EEE_ABLE, MDIO_MMD_PCS); if (val < 0) -@@ -1437,6 +1449,9 @@ int phy_ethtool_set_eee(struct phy_device *phydev, struct ethtool_eee *data) +@@ -1437,6 +1449,9 @@ int phy_ethtool_set_eee(struct phy_devic { int val = ethtool_adv_to_mmd_eee_adv_t(data->advertised); @@ -1706,11 +1692,9 @@ index f3e64a89..42cdd5b7 100644 phydev->drv->get_wol(phydev, wol); } EXPORT_SYMBOL(phy_ethtool_get_wol); -diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c -index 5fdc491e..039f9664 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1046,7 +1046,7 @@ int phy_suspend(struct phy_device *phydev) +@@ -1046,7 +1046,7 @@ int phy_suspend(struct phy_device *phyde if (wol.wolopts) return -EBUSY; @@ -1719,7 +1703,7 @@ index 5fdc491e..039f9664 100644 ret = phydrv->suspend(phydev); if (ret) -@@ -1063,7 +1063,7 @@ int phy_resume(struct phy_device *phydev) +@@ -1063,7 +1063,7 @@ int phy_resume(struct phy_device *phydev struct phy_driver *phydrv = to_phy_driver(phydev->mdio.dev.driver); int ret = 0; @@ -1728,7 +1712,7 @@ index 5fdc491e..039f9664 100644 ret = phydrv->resume(phydev); if (ret) -@@ -1726,7 +1726,7 @@ static int phy_remove(struct device *dev) +@@ -1726,7 +1726,7 @@ static int phy_remove(struct device *dev phydev->state = PHY_DOWN; mutex_unlock(&phydev->lock); @@ -1737,11 +1721,9 @@ index 5fdc491e..039f9664 100644 phydev->drv->remove(phydev); phydev->drv = NULL; -diff --git a/drivers/net/phy/swphy.c b/drivers/net/phy/swphy.c -index 34f58f23..52ddddbe 100644 --- a/drivers/net/phy/swphy.c +++ b/drivers/net/phy/swphy.c -@@ -77,6 +77,7 @@ static const struct swmii_regs duplex[] = { +@@ -77,6 +77,7 @@ static const struct swmii_regs duplex[] static int swphy_decode_speed(int speed) { switch (speed) { @@ -1749,8 +1731,6 @@ index 34f58f23..52ddddbe 100644 case 1000: return SWMII_SPEED_1000; case 100: -diff --git a/include/linux/phy.h b/include/linux/phy.h -index 850c8b51..5f253f1a 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -81,6 +81,7 @@ typedef enum { @@ -1761,7 +1741,7 @@ index 850c8b51..5f253f1a 100644 PHY_INTERFACE_MODE_MAX, } phy_interface_t; -@@ -784,6 +785,9 @@ int phy_stop_interrupts(struct phy_device *phydev); +@@ -784,6 +785,9 @@ int phy_stop_interrupts(struct phy_devic static inline int phy_read_status(struct phy_device *phydev) { @@ -1771,6 +1751,3 @@ index 850c8b51..5f253f1a 100644 return phydev->drv->read_status(phydev); } --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/704-fsl-mc-layerscape-support.patch b/target/linux/layerscape/patches-4.9/704-fsl-mc-layerscape-support.patch index eab1e656d2..2927c7e669 100644 --- a/target/linux/layerscape/patches-4.9/704-fsl-mc-layerscape-support.patch +++ b/target/linux/layerscape/patches-4.9/704-fsl-mc-layerscape-support.patch @@ -94,8 +94,6 @@ Signed-off-by: Yangbo Lu create mode 100644 drivers/staging/fsl-mc/include/dpcon.h create mode 100644 drivers/staging/fsl-mc/include/dpopr.h -diff --git a/drivers/staging/fsl-mc/bus/Kconfig b/drivers/staging/fsl-mc/bus/Kconfig -index 1f959339..67847c0e 100644 --- a/drivers/staging/fsl-mc/bus/Kconfig +++ b/drivers/staging/fsl-mc/bus/Kconfig @@ -1,25 +1,40 @@ @@ -152,8 +150,6 @@ index 1f959339..67847c0e 100644 + help + Driver that provides kernel support for the Freescale Management + Complex resource manager user-space tool. -diff --git a/drivers/staging/fsl-mc/bus/Makefile b/drivers/staging/fsl-mc/bus/Makefile -index 38716fd5..e7e2239c 100644 --- a/drivers/staging/fsl-mc/bus/Makefile +++ b/drivers/staging/fsl-mc/bus/Makefile @@ -17,4 +17,12 @@ mc-bus-driver-objs := fsl-mc-bus.o \ @@ -170,9 +166,6 @@ index 38716fd5..e7e2239c 100644 + +# MC restool kernel support +obj-$(CONFIG_FSL_MC_RESTOOL) += mc-restool.o -diff --git a/drivers/staging/fsl-mc/bus/dpbp-cmd.h b/drivers/staging/fsl-mc/bus/dpbp-cmd.h -new file mode 100644 -index 00000000..8aa65452 --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpbp-cmd.h @@ -0,0 +1,80 @@ @@ -256,8 +249,6 @@ index 00000000..8aa65452 +}; + +#endif /* _FSL_DPBP_CMD_H */ -diff --git a/drivers/staging/fsl-mc/bus/dpbp.c b/drivers/staging/fsl-mc/bus/dpbp.c -index 5d4cd812..d9e450a6 100644 --- a/drivers/staging/fsl-mc/bus/dpbp.c +++ b/drivers/staging/fsl-mc/bus/dpbp.c @@ -1,4 +1,5 @@ @@ -285,11 +276,10 @@ index 5d4cd812..d9e450a6 100644 /** * dpbp_open() - Open a control session for the specified object. -@@ -104,74 +105,6 @@ int dpbp_close(struct fsl_mc_io *mc_io, - } +@@ -105,74 +106,6 @@ int dpbp_close(struct fsl_mc_io *mc_io, EXPORT_SYMBOL(dpbp_close); --/** + /** - * dpbp_create() - Create the DPBP object. - * @mc_io: Pointer to MC portal's I/O object - * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' @@ -357,10 +347,11 @@ index 5d4cd812..d9e450a6 100644 - return mc_send_command(mc_io, &cmd); -} - - /** +-/** * dpbp_enable() - Enable the DPBP. * @mc_io: Pointer to MC portal's I/O object -@@ -250,6 +183,7 @@ int dpbp_is_enabled(struct fsl_mc_io *mc_io, + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' +@@ -250,6 +183,7 @@ int dpbp_is_enabled(struct fsl_mc_io *mc return 0; } @@ -680,7 +671,7 @@ index 5d4cd812..d9e450a6 100644 /** * dpbp_get_attributes - Retrieve DPBP attributes. -@@ -609,83 +240,40 @@ int dpbp_get_attributes(struct fsl_mc_io *mc_io, +@@ -609,83 +240,40 @@ int dpbp_get_attributes(struct fsl_mc_io rsp_params = (struct dpbp_rsp_get_attributes *)cmd.params; attr->bpid = le16_to_cpu(rsp_params->bpid); attr->id = le32_to_cpu(rsp_params->id); @@ -777,9 +768,6 @@ index 5d4cd812..d9e450a6 100644 return 0; } +EXPORT_SYMBOL(dpbp_get_api_version); -diff --git a/drivers/staging/fsl-mc/bus/dpcon-cmd.h b/drivers/staging/fsl-mc/bus/dpcon-cmd.h -new file mode 100644 -index 00000000..2bb66988 --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpcon-cmd.h @@ -0,0 +1,85 @@ @@ -868,9 +856,6 @@ index 00000000..2bb66988 +}; + +#endif /* _FSL_DPCON_CMD_H */ -diff --git a/drivers/staging/fsl-mc/bus/dpcon.c b/drivers/staging/fsl-mc/bus/dpcon.c -new file mode 100644 -index 00000000..eb713578 --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpcon.c @@ -0,0 +1,317 @@ @@ -1191,9 +1176,6 @@ index 00000000..eb713578 + return 0; +} +EXPORT_SYMBOL(dpcon_get_api_version); -diff --git a/drivers/staging/fsl-mc/bus/dpio/Makefile b/drivers/staging/fsl-mc/bus/dpio/Makefile -new file mode 100644 -index 00000000..1c28794e --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpio/Makefile @@ -0,0 +1,11 @@ @@ -1208,53 +1190,48 @@ index 00000000..1c28794e +fsl-mc-dpio-objs := dpio.o qbman-portal.o dpio-service.o dpio-driver.o + +obj-$(CONFIG_FSL_QBMAN_DEBUG) += qbman_debug.o -diff --git a/drivers/staging/fsl-mc/include/dpcon-cmd.h b/drivers/staging/fsl-mc/bus/dpio/dpio-cmd.h -similarity index 64% -rename from drivers/staging/fsl-mc/include/dpcon-cmd.h -rename to drivers/staging/fsl-mc/bus/dpio/dpio-cmd.h -index 536b2ef1..b2dc6e76 100644 --- a/drivers/staging/fsl-mc/include/dpcon-cmd.h -+++ b/drivers/staging/fsl-mc/bus/dpio/dpio-cmd.h -@@ -1,4 +1,6 @@ ++++ /dev/null +@@ -1,62 +0,0 @@ -/* Copyright 2013-2015 Freescale Semiconductor Inc. -+/* -+ * Copyright 2013-2016 Freescale Semiconductor Inc. -+ * Copyright 2016 NXP - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: -@@ -11,7 +13,6 @@ - * names of any contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * - * ALTERNATIVELY, this software may be distributed under the terms of the - * GNU General Public License ("GPL") as published by the Free Software - * Foundation, either version 2 of that License or (at your option) any -@@ -29,34 +30,46 @@ - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ +- * Redistribution and use in source and binary forms, with or without +- * modification, are permitted provided that the following conditions are met: +- * * Redistributions of source code must retain the above copyright +- * notice, this list of conditions and the following disclaimer. +- * * Redistributions in binary form must reproduce the above copyright +- * notice, this list of conditions and the following disclaimer in the +- * documentation and/or other materials provided with the distribution. +- * * Neither the name of the above-listed copyright holders nor the +- * names of any contributors may be used to endorse or promote products +- * derived from this software without specific prior written permission. +- * +- * +- * ALTERNATIVELY, this software may be distributed under the terms of the +- * GNU General Public License ("GPL") as published by the Free Software +- * Foundation, either version 2 of that License or (at your option) any +- * later version. +- * +- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE +- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +- * POSSIBILITY OF SUCH DAMAGE. +- */ -#ifndef _FSL_DPCON_CMD_H -#define _FSL_DPCON_CMD_H -+#ifndef _FSL_DPIO_CMD_H -+#define _FSL_DPIO_CMD_H -+ -+/* DPIO Version */ -+#define DPIO_VER_MAJOR 4 -+#define DPIO_VER_MINOR 2 -+ -+/* Command Versioning */ -+ -+#define DPIO_CMD_ID_OFFSET 4 -+#define DPIO_CMD_BASE_VERSION 1 - +- -/* DPCON Version */ -#define DPCON_VER_MAJOR 2 -#define DPCON_VER_MINOR 1 -+#define DPIO_CMD(id) (((id) << DPIO_CMD_ID_OFFSET) | DPIO_CMD_BASE_VERSION) - - /* Command IDs */ +- +-/* Command IDs */ -#define DPCON_CMDID_CLOSE 0x800 -#define DPCON_CMDID_OPEN 0x808 -#define DPCON_CMDID_CREATE 0x908 @@ -1278,6 +1255,56 @@ index 536b2ef1..b2dc6e76 100644 -#define DPCON_CMDID_SET_NOTIFICATION 0x100 - -#endif /* _FSL_DPCON_CMD_H */ +--- /dev/null ++++ b/drivers/staging/fsl-mc/bus/dpio/dpio-cmd.h +@@ -0,0 +1,75 @@ ++/* ++ * Copyright 2013-2016 Freescale Semiconductor Inc. ++ * Copyright 2016 NXP ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * * Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * * Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * * Neither the name of the above-listed copyright holders nor the ++ * names of any contributors may be used to endorse or promote products ++ * derived from this software without specific prior written permission. ++ * ++ * ALTERNATIVELY, this software may be distributed under the terms of the ++ * GNU General Public License ("GPL") as published by the Free Software ++ * Foundation, either version 2 of that License or (at your option) any ++ * later version. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++#ifndef _FSL_DPIO_CMD_H ++#define _FSL_DPIO_CMD_H ++ ++/* DPIO Version */ ++#define DPIO_VER_MAJOR 4 ++#define DPIO_VER_MINOR 2 ++ ++/* Command Versioning */ ++ ++#define DPIO_CMD_ID_OFFSET 4 ++#define DPIO_CMD_BASE_VERSION 1 ++ ++#define DPIO_CMD(id) (((id) << DPIO_CMD_ID_OFFSET) | DPIO_CMD_BASE_VERSION) ++ ++/* Command IDs */ +#define DPIO_CMDID_CLOSE DPIO_CMD(0x800) +#define DPIO_CMDID_OPEN DPIO_CMD(0x803) +#define DPIO_CMDID_GET_API_VERSION DPIO_CMD(0xa03) @@ -1306,9 +1333,6 @@ index 536b2ef1..b2dc6e76 100644 +}; + +#endif /* _FSL_DPIO_CMD_H */ -diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio-driver.c b/drivers/staging/fsl-mc/bus/dpio/dpio-driver.c -new file mode 100644 -index 00000000..8c8244a1 --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpio/dpio-driver.c @@ -0,0 +1,296 @@ @@ -1608,9 +1632,6 @@ index 00000000..8c8244a1 +} +module_init(dpio_driver_init); +module_exit(dpio_driver_exit); -diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio-driver.txt b/drivers/staging/fsl-mc/bus/dpio/dpio-driver.txt -new file mode 100644 -index 00000000..0ba67716 --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpio/dpio-driver.txt @@ -0,0 +1,135 @@ @@ -1749,9 +1770,6 @@ index 00000000..0ba67716 + manipulate them are defined in dpaa2-fd.h. + + Dequeue result struct and parsing APIs are defined in dpaa2-global.h. -diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio-service.c b/drivers/staging/fsl-mc/bus/dpio/dpio-service.c -new file mode 100644 -index 00000000..46c32a67 --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpio/dpio-service.c @@ -0,0 +1,689 @@ @@ -2444,9 +2462,6 @@ index 00000000..46c32a67 +} +EXPORT_SYMBOL(dpaa2_io_query_bp_count); +#endif -diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio.c b/drivers/staging/fsl-mc/bus/dpio/dpio.c -new file mode 100644 -index 00000000..d81e0232 --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpio/dpio.c @@ -0,0 +1,224 @@ @@ -2674,9 +2689,6 @@ index 00000000..d81e0232 + + return 0; +} -diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio.h b/drivers/staging/fsl-mc/bus/dpio/dpio.h -new file mode 100644 -index 00000000..ced1103d --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpio/dpio.h @@ -0,0 +1,109 @@ @@ -2789,9 +2801,6 @@ index 00000000..ced1103d + u16 *minor_ver); + +#endif /* __FSL_DPIO_H */ -diff --git a/drivers/staging/fsl-mc/bus/dpio/qbman-portal.c b/drivers/staging/fsl-mc/bus/dpio/qbman-portal.c -new file mode 100644 -index 00000000..e14fb65b --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpio/qbman-portal.c @@ -0,0 +1,1049 @@ @@ -3844,9 +3853,6 @@ index 00000000..e14fb65b + + return 0; +} -diff --git a/drivers/staging/fsl-mc/bus/dpio/qbman-portal.h b/drivers/staging/fsl-mc/bus/dpio/qbman-portal.h -new file mode 100644 -index 00000000..4254034c --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpio/qbman-portal.h @@ -0,0 +1,662 @@ @@ -4512,9 +4518,6 @@ index 00000000..4254034c +#define qb_cl(d) (&(d)->dont_manipulate_directly[0]) + +#endif /* __FSL_QBMAN_PORTAL_H */ -diff --git a/drivers/staging/fsl-mc/bus/dpio/qbman_debug.c b/drivers/staging/fsl-mc/bus/dpio/qbman_debug.c -new file mode 100644 -index 00000000..1c77fa6a --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpio/qbman_debug.c @@ -0,0 +1,853 @@ @@ -5371,9 +5374,6 @@ index 00000000..1c77fa6a + return qbman_cgr_statistics_query(s, cgid, clear, 0, + frame_cnt, byte_cnt); +} -diff --git a/drivers/staging/fsl-mc/bus/dpio/qbman_debug.h b/drivers/staging/fsl-mc/bus/dpio/qbman_debug.h -new file mode 100644 -index 00000000..0a247a49 --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpio/qbman_debug.h @@ -0,0 +1,136 @@ @@ -5513,9 +5513,6 @@ index 00000000..0a247a49 + u64 *frame_cnt, u64 *byte_cnt); +int qbman_cq_dequeue_statistics(struct qbman_swp *s, u32 cgid, int clear, + u64 *frame_cnt, u64 *byte_cnt); -diff --git a/drivers/staging/fsl-mc/bus/dpio/qbman_private.h b/drivers/staging/fsl-mc/bus/dpio/qbman_private.h -new file mode 100644 -index 00000000..98a64be2 --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpio/qbman_private.h @@ -0,0 +1,171 @@ @@ -5690,8 +5687,6 @@ index 00000000..98a64be2 + + __hexdump(start, end, p, sz, c); +} -diff --git a/drivers/staging/fsl-mc/bus/dpmcp-cmd.h b/drivers/staging/fsl-mc/bus/dpmcp-cmd.h -index d098a6d8..384a13d0 100644 --- a/drivers/staging/fsl-mc/bus/dpmcp-cmd.h +++ b/drivers/staging/fsl-mc/bus/dpmcp-cmd.h @@ -1,4 +1,5 @@ @@ -5715,27 +5710,16 @@ index d098a6d8..384a13d0 100644 /* Minimal supported DPMCP Version */ -#define DPMCP_MIN_VER_MAJOR 3 -#define DPMCP_MIN_VER_MINOR 0 -+#define DPMCP_MIN_VER_MAJOR 3 -+#define DPMCP_MIN_VER_MINOR 0 - +- -/* Command IDs */ -#define DPMCP_CMDID_CLOSE 0x800 -#define DPMCP_CMDID_OPEN 0x80b -#define DPMCP_CMDID_CREATE 0x90b -#define DPMCP_CMDID_DESTROY 0x900 -+/* Command versioning */ -+#define DPMCP_CMD_BASE_VERSION 1 -+#define DPMCP_CMD_ID_OFFSET 4 - +- -#define DPMCP_CMDID_GET_ATTR 0x004 -#define DPMCP_CMDID_RESET 0x005 -+#define DPMCP_CMD(id) ((id << DPMCP_CMD_ID_OFFSET) | DPMCP_CMD_BASE_VERSION) -+ -+/* Command IDs */ -+#define DPMCP_CMDID_CLOSE DPMCP_CMD(0x800) -+#define DPMCP_CMDID_OPEN DPMCP_CMD(0x80b) -+#define DPMCP_CMDID_GET_API_VERSION DPMCP_CMD(0xa0b) - +- -#define DPMCP_CMDID_SET_IRQ 0x010 -#define DPMCP_CMDID_GET_IRQ 0x011 -#define DPMCP_CMDID_SET_IRQ_ENABLE 0x012 @@ -5743,12 +5727,11 @@ index d098a6d8..384a13d0 100644 -#define DPMCP_CMDID_SET_IRQ_MASK 0x014 -#define DPMCP_CMDID_GET_IRQ_MASK 0x015 -#define DPMCP_CMDID_GET_IRQ_STATUS 0x016 -+#define DPMCP_CMDID_RESET DPMCP_CMD(0x005) - - struct dpmcp_cmd_open { - __le32 dpmcp_id; - }; - +- +-struct dpmcp_cmd_open { +- __le32 dpmcp_id; +-}; +- -struct dpmcp_cmd_create { - __le32 portal_id; -}; @@ -5779,15 +5762,21 @@ index d098a6d8..384a13d0 100644 - __le32 irq_num; - __le32 type; -}; -- ++#define DPMCP_MIN_VER_MAJOR 3 ++#define DPMCP_MIN_VER_MINOR 0 + -#define DPMCP_ENABLE 0x1 -- ++/* Command versioning */ ++#define DPMCP_CMD_BASE_VERSION 1 ++#define DPMCP_CMD_ID_OFFSET 4 + -struct dpmcp_cmd_set_irq_enable { - u8 enable; - u8 pad[3]; - u8 irq_index; -}; -- ++#define DPMCP_CMD(id) ((id << DPMCP_CMD_ID_OFFSET) | DPMCP_CMD_BASE_VERSION) + -struct dpmcp_cmd_get_irq_enable { - __le32 pad; - u8 irq_index; @@ -5810,12 +5799,17 @@ index d098a6d8..384a13d0 100644 -struct dpmcp_rsp_get_irq_mask { - __le32 mask; -}; -- ++/* Command IDs */ ++#define DPMCP_CMDID_CLOSE DPMCP_CMD(0x800) ++#define DPMCP_CMDID_OPEN DPMCP_CMD(0x80b) ++#define DPMCP_CMDID_GET_API_VERSION DPMCP_CMD(0xa0b) + -struct dpmcp_cmd_get_irq_status { - __le32 status; - u8 irq_index; -}; -- ++#define DPMCP_CMDID_RESET DPMCP_CMD(0x005) + -struct dpmcp_rsp_get_irq_status { - __le32 status; -}; @@ -5827,11 +5821,11 @@ index d098a6d8..384a13d0 100644 - /* response word 1 */ - __le16 version_major; - __le16 version_minor; --}; -- ++struct dpmcp_cmd_open { ++ __le32 dpmcp_id; + }; + #endif /* _FSL_DPMCP_CMD_H */ -diff --git a/drivers/staging/fsl-mc/bus/dpmcp.c b/drivers/staging/fsl-mc/bus/dpmcp.c -index 55766f78..ad4c8b43 100644 --- a/drivers/staging/fsl-mc/bus/dpmcp.c +++ b/drivers/staging/fsl-mc/bus/dpmcp.c @@ -1,4 +1,5 @@ @@ -5849,11 +5843,10 @@ index 55766f78..ad4c8b43 100644 * ALTERNATIVELY, this software may be distributed under the terms of the * GNU General Public License ("GPL") as published by the Free Software * Foundation, either version 2 of that License or (at your option) any -@@ -103,76 +103,6 @@ int dpmcp_close(struct fsl_mc_io *mc_io, - return mc_send_command(mc_io, &cmd); +@@ -104,76 +104,6 @@ int dpmcp_close(struct fsl_mc_io *mc_io, } --/** + /** - * dpmcp_create() - Create the DPMCP object. - * @mc_io: Pointer to MC portal's I/O object - * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' @@ -5923,9 +5916,10 @@ index 55766f78..ad4c8b43 100644 - return mc_send_command(mc_io, &cmd); -} - - /** +-/** * dpmcp_reset() - Reset the DPMCP, returns the object to initial state. * @mc_io: Pointer to MC portal's I/O object + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' @@ -196,309 +126,33 @@ int dpmcp_reset(struct fsl_mc_io *mc_io, } @@ -6248,8 +6242,6 @@ index 55766f78..ad4c8b43 100644 return 0; } -diff --git a/drivers/staging/fsl-mc/bus/dpmcp.h b/drivers/staging/fsl-mc/bus/dpmcp.h -index fe79d4d9..f616031e 100644 --- a/drivers/staging/fsl-mc/bus/dpmcp.h +++ b/drivers/staging/fsl-mc/bus/dpmcp.h @@ -1,4 +1,5 @@ @@ -6292,7 +6284,9 @@ index fe79d4d9..f616031e 100644 int dpmcp_close(struct fsl_mc_io *mc_io, - uint32_t cmd_flags, - uint16_t token); -- ++ u32 cmd_flags, ++ u16 token); + -/** - * struct dpmcp_cfg - Structure representing DPMCP configuration - * @portal_id: Portal ID; 'DPMCP_GET_PORTAL_ID_FROM_POOL' to get the portal ID @@ -6306,9 +6300,7 @@ index fe79d4d9..f616031e 100644 - uint32_t cmd_flags, - const struct dpmcp_cfg *cfg, - uint16_t *token); -+ u32 cmd_flags, -+ u16 token); - +- -int dpmcp_destroy(struct fsl_mc_io *mc_io, - uint32_t cmd_flags, - uint16_t token); @@ -6408,8 +6400,6 @@ index fe79d4d9..f616031e 100644 + u16 token); #endif /* __FSL_DPMCP_H */ -diff --git a/drivers/staging/fsl-mc/bus/dpmng-cmd.h b/drivers/staging/fsl-mc/bus/dpmng-cmd.h -index a7b77d58..cdddfb80 100644 --- a/drivers/staging/fsl-mc/bus/dpmng-cmd.h +++ b/drivers/staging/fsl-mc/bus/dpmng-cmd.h @@ -12,7 +12,6 @@ @@ -6441,8 +6431,6 @@ index a7b77d58..cdddfb80 100644 struct dpmng_rsp_get_version { __le32 revision; -diff --git a/drivers/staging/fsl-mc/bus/dpmng.c b/drivers/staging/fsl-mc/bus/dpmng.c -index 96b1d677..ad5d5bbe 100644 --- a/drivers/staging/fsl-mc/bus/dpmng.c +++ b/drivers/staging/fsl-mc/bus/dpmng.c @@ -1,4 +1,5 @@ @@ -6460,7 +6448,7 @@ index 96b1d677..ad5d5bbe 100644 * ALTERNATIVELY, this software may be distributed under the terms of the * GNU General Public License ("GPL") as published by the Free Software * Foundation, either version 2 of that License or (at your option) any -@@ -72,36 +72,3 @@ int mc_get_version(struct fsl_mc_io *mc_io, +@@ -72,36 +72,3 @@ int mc_get_version(struct fsl_mc_io *mc_ } EXPORT_SYMBOL(mc_get_version); @@ -6497,8 +6485,6 @@ index 96b1d677..ad5d5bbe 100644 - return 0; -} - -diff --git a/drivers/staging/fsl-mc/bus/dprc-cmd.h b/drivers/staging/fsl-mc/bus/dprc-cmd.h -index 009d6567..b7d8c345 100644 --- a/drivers/staging/fsl-mc/bus/dprc-cmd.h +++ b/drivers/staging/fsl-mc/bus/dprc-cmd.h @@ -12,7 +12,6 @@ @@ -6517,13 +6503,7 @@ index 009d6567..b7d8c345 100644 +#define DPRC_MIN_VER_MAJOR 6 #define DPRC_MIN_VER_MINOR 0 -+/* Command versioning */ -+#define DPRC_CMD_BASE_VERSION 1 -+#define DPRC_CMD_ID_OFFSET 4 -+ -+#define DPRC_CMD(id) ((id << DPRC_CMD_ID_OFFSET) | DPRC_CMD_BASE_VERSION) -+ - /* Command IDs */ +-/* Command IDs */ -#define DPRC_CMDID_CLOSE 0x800 -#define DPRC_CMDID_OPEN 0x805 -#define DPRC_CMDID_CREATE 0x905 @@ -6560,8 +6540,14 @@ index 009d6567..b7d8c345 100644 -#define DPRC_CMDID_DISCONNECT 0x168 -#define DPRC_CMDID_GET_POOL 0x169 -#define DPRC_CMDID_GET_POOL_COUNT 0x16A -- ++/* Command versioning */ ++#define DPRC_CMD_BASE_VERSION 1 ++#define DPRC_CMD_ID_OFFSET 4 + -#define DPRC_CMDID_GET_CONNECTION 0x16C ++#define DPRC_CMD(id) ((id << DPRC_CMD_ID_OFFSET) | DPRC_CMD_BASE_VERSION) ++ ++/* Command IDs */ +#define DPRC_CMDID_CLOSE DPRC_CMD(0x800) +#define DPRC_CMDID_OPEN DPRC_CMD(0x805) +#define DPRC_CMDID_GET_API_VERSION DPRC_CMD(0xa05) @@ -6617,8 +6603,6 @@ index 009d6567..b7d8c345 100644 }; struct dprc_cmd_set_obj_label { -diff --git a/drivers/staging/fsl-mc/bus/dprc-driver.c b/drivers/staging/fsl-mc/bus/dprc-driver.c -index c5ee4639..f6e6211b 100644 --- a/drivers/staging/fsl-mc/bus/dprc-driver.c +++ b/drivers/staging/fsl-mc/bus/dprc-driver.c @@ -1,7 +1,7 @@ @@ -6630,7 +6614,7 @@ index c5ee4639..f6e6211b 100644 * Author: German Rivera * * This file is licensed under the terms of the GNU General Public -@@ -160,6 +160,8 @@ static void check_plugged_state_change(struct fsl_mc_device *mc_dev, +@@ -160,6 +160,8 @@ static void check_plugged_state_change(s * dprc_add_new_devices - Adds devices to the logical bus for a DPRC * * @mc_bus_dev: pointer to the fsl-mc device that represents a DPRC object @@ -6639,7 +6623,7 @@ index c5ee4639..f6e6211b 100644 * @obj_desc_array: array of device descriptors for child devices currently * present in the physical DPRC. * @num_child_objects_in_mc: number of entries in obj_desc_array -@@ -169,6 +171,7 @@ static void check_plugged_state_change(struct fsl_mc_device *mc_dev, +@@ -169,6 +171,7 @@ static void check_plugged_state_change(s * in the physical DPRC. */ static void dprc_add_new_devices(struct fsl_mc_device *mc_bus_dev, @@ -6647,7 +6631,7 @@ index c5ee4639..f6e6211b 100644 struct dprc_obj_desc *obj_desc_array, int num_child_objects_in_mc) { -@@ -188,11 +191,12 @@ static void dprc_add_new_devices(struct fsl_mc_device *mc_bus_dev, +@@ -188,11 +191,12 @@ static void dprc_add_new_devices(struct child_dev = fsl_mc_device_lookup(obj_desc, mc_bus_dev); if (child_dev) { check_plugged_state_change(child_dev, obj_desc); @@ -6661,7 +6645,7 @@ index c5ee4639..f6e6211b 100644 if (error < 0) continue; } -@@ -202,6 +206,8 @@ static void dprc_add_new_devices(struct fsl_mc_device *mc_bus_dev, +@@ -202,6 +206,8 @@ static void dprc_add_new_devices(struct * dprc_scan_objects - Discover objects in a DPRC * * @mc_bus_dev: pointer to the fsl-mc device that represents a DPRC object @@ -6670,7 +6654,7 @@ index c5ee4639..f6e6211b 100644 * @total_irq_count: total number of IRQs needed by objects in the DPRC. * * Detects objects added and removed from a DPRC and synchronizes the -@@ -217,6 +223,7 @@ static void dprc_add_new_devices(struct fsl_mc_device *mc_bus_dev, +@@ -217,6 +223,7 @@ static void dprc_add_new_devices(struct * of the device drivers for the non-allocatable devices. */ int dprc_scan_objects(struct fsl_mc_device *mc_bus_dev, @@ -6678,7 +6662,7 @@ index c5ee4639..f6e6211b 100644 unsigned int *total_irq_count) { int num_child_objects; -@@ -297,7 +304,7 @@ int dprc_scan_objects(struct fsl_mc_device *mc_bus_dev, +@@ -297,7 +304,7 @@ int dprc_scan_objects(struct fsl_mc_devi dprc_remove_devices(mc_bus_dev, child_obj_desc_array, num_child_objects); @@ -6687,7 +6671,7 @@ index c5ee4639..f6e6211b 100644 num_child_objects); if (child_obj_desc_array) -@@ -328,7 +335,7 @@ int dprc_scan_container(struct fsl_mc_device *mc_bus_dev) +@@ -328,7 +335,7 @@ int dprc_scan_container(struct fsl_mc_de * Discover objects in the DPRC: */ mutex_lock(&mc_bus->scan_mutex); @@ -6696,7 +6680,7 @@ index c5ee4639..f6e6211b 100644 mutex_unlock(&mc_bus->scan_mutex); if (error < 0) goto error; -@@ -415,7 +422,7 @@ static irqreturn_t dprc_irq0_handler_thread(int irq_num, void *arg) +@@ -415,7 +422,7 @@ static irqreturn_t dprc_irq0_handler_thr DPRC_IRQ_EVENT_OBJ_CREATED)) { unsigned int irq_count; @@ -6705,7 +6689,7 @@ index c5ee4639..f6e6211b 100644 if (error < 0) { /* * If the error is -ENXIO, we ignore it, as it indicates -@@ -505,7 +512,7 @@ static int register_dprc_irq_handler(struct fsl_mc_device *mc_dev) +@@ -505,7 +512,7 @@ static int register_dprc_irq_handler(str dprc_irq0_handler, dprc_irq0_handler_thread, IRQF_NO_SUSPEND | IRQF_ONESHOT, @@ -6714,7 +6698,7 @@ index c5ee4639..f6e6211b 100644 &mc_dev->dev); if (error < 0) { dev_err(&mc_dev->dev, -@@ -597,6 +604,7 @@ static int dprc_probe(struct fsl_mc_device *mc_dev) +@@ -597,6 +604,7 @@ static int dprc_probe(struct fsl_mc_devi struct fsl_mc_bus *mc_bus = to_fsl_mc_bus(mc_dev); bool mc_io_created = false; bool msi_domain_set = false; @@ -6722,7 +6706,7 @@ index c5ee4639..f6e6211b 100644 if (WARN_ON(strcmp(mc_dev->obj_desc.type, "dprc") != 0)) return -EINVAL; -@@ -669,13 +677,21 @@ static int dprc_probe(struct fsl_mc_device *mc_dev) +@@ -669,13 +677,21 @@ static int dprc_probe(struct fsl_mc_devi goto error_cleanup_open; } @@ -6749,8 +6733,6 @@ index c5ee4639..f6e6211b 100644 error = -ENOTSUPP; goto error_cleanup_open; } -diff --git a/drivers/staging/fsl-mc/bus/dprc.c b/drivers/staging/fsl-mc/bus/dprc.c -index 9fea3def..764cd3fb 100644 --- a/drivers/staging/fsl-mc/bus/dprc.c +++ b/drivers/staging/fsl-mc/bus/dprc.c @@ -1,4 +1,5 @@ @@ -6768,11 +6750,10 @@ index 9fea3def..764cd3fb 100644 * ALTERNATIVELY, this software may be distributed under the terms of the * GNU General Public License ("GPL") as published by the Free Software * Foundation, either version 2 of that License or (at your option) any -@@ -99,93 +99,6 @@ int dprc_close(struct fsl_mc_io *mc_io, - } +@@ -100,93 +100,6 @@ int dprc_close(struct fsl_mc_io *mc_io, EXPORT_SYMBOL(dprc_close); --/** + /** - * dprc_create_container() - Create child container - * @mc_io: Pointer to MC portal's I/O object - * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' @@ -6859,10 +6840,11 @@ index 9fea3def..764cd3fb 100644 - return mc_send_command(mc_io, &cmd); -} - - /** +-/** * dprc_reset_container - Reset child container. * @mc_io: Pointer to MC portal's I/O object -@@ -565,279 +478,6 @@ int dprc_get_attributes(struct fsl_mc_io *mc_io, + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' +@@ -565,279 +478,6 @@ int dprc_get_attributes(struct fsl_mc_io attr->icid = le16_to_cpu(rsp_params->icid); attr->options = le32_to_cpu(rsp_params->options); attr->portal_id = le32_to_cpu(rsp_params->portal_id); @@ -7142,11 +7124,10 @@ index 9fea3def..764cd3fb 100644 return 0; } -@@ -933,64 +573,6 @@ int dprc_get_obj(struct fsl_mc_io *mc_io, - } +@@ -934,64 +574,6 @@ int dprc_get_obj(struct fsl_mc_io *mc_io EXPORT_SYMBOL(dprc_get_obj); --/** + /** - * dprc_get_obj_desc() - Get object descriptor. - * - * @mc_io: Pointer to MC portal's I/O object @@ -7204,14 +7185,14 @@ index 9fea3def..764cd3fb 100644 -} -EXPORT_SYMBOL(dprc_get_obj_desc); - - /** +-/** * dprc_set_obj_irq() - Set IRQ information for object to trigger an interrupt. * @mc_io: Pointer to MC portal's I/O object -@@ -1129,52 +711,6 @@ int dprc_get_res_count(struct fsl_mc_io *mc_io, - } + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' +@@ -1130,52 +712,6 @@ int dprc_get_res_count(struct fsl_mc_io EXPORT_SYMBOL(dprc_get_res_count); --/** + /** - * dprc_get_res_ids() - Obtains IDs of free resources in the container - * @mc_io: Pointer to MC portal's I/O object - * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' @@ -7257,10 +7238,11 @@ index 9fea3def..764cd3fb 100644 -} -EXPORT_SYMBOL(dprc_get_res_ids); - - /** +-/** * dprc_get_obj_region() - Get region information for a specified object. * @mc_io: Pointer to MC portal's I/O object -@@ -1216,160 +752,66 @@ int dprc_get_obj_region(struct fsl_mc_io *mc_io, + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' +@@ -1216,160 +752,66 @@ int dprc_get_obj_region(struct fsl_mc_io /* retrieve response parameters */ rsp_params = (struct dprc_rsp_get_obj_region *)cmd.params; @@ -7451,7 +7433,7 @@ index 9fea3def..764cd3fb 100644 /* send command to mc*/ err = mc_send_command(mc_io, &cmd); -@@ -1377,12 +819,7 @@ int dprc_get_connection(struct fsl_mc_io *mc_io, +@@ -1377,12 +819,7 @@ int dprc_get_connection(struct fsl_mc_io return err; /* retrieve response parameters */ @@ -7465,8 +7447,6 @@ index 9fea3def..764cd3fb 100644 return 0; } -diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c b/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c -index e93ab53b..ce07096c 100644 --- a/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c +++ b/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c @@ -1,7 +1,7 @@ @@ -7512,7 +7492,7 @@ index e93ab53b..ce07096c 100644 */ static int __must_check fsl_mc_resource_pool_add_device(struct fsl_mc_bus *mc_bus, -@@ -95,10 +92,10 @@ static int __must_check fsl_mc_resource_pool_add_device(struct fsl_mc_bus +@@ -95,10 +92,10 @@ out: * fsl_mc_resource_pool_remove_device - remove an allocatable device from a * resource pool * @@ -7526,7 +7506,7 @@ index e93ab53b..ce07096c 100644 */ static int __must_check fsl_mc_resource_pool_remove_device(struct fsl_mc_device *mc_dev) -@@ -255,17 +252,18 @@ void fsl_mc_resource_free(struct fsl_mc_resource *resource) +@@ -255,17 +252,18 @@ out_unlock: EXPORT_SYMBOL_GPL(fsl_mc_resource_free); /** @@ -7554,7 +7534,7 @@ index e93ab53b..ce07096c 100644 * * NOTE: pool_type must be different from FSL_MC_POOL_MCP, since MC * portals are allocated using fsl_mc_portal_allocate(), instead of -@@ -312,10 +310,9 @@ int __must_check fsl_mc_object_allocate(struct fsl_mc_device *mc_dev, +@@ -312,10 +310,9 @@ error: EXPORT_SYMBOL_GPL(fsl_mc_object_allocate); /** @@ -7568,7 +7548,7 @@ index e93ab53b..ce07096c 100644 */ void fsl_mc_object_free(struct fsl_mc_device *mc_adev) { -@@ -332,8 +329,14 @@ void fsl_mc_object_free(struct fsl_mc_device *mc_adev) +@@ -332,8 +329,14 @@ void fsl_mc_object_free(struct fsl_mc_de EXPORT_SYMBOL_GPL(fsl_mc_object_free); /* @@ -7585,7 +7565,7 @@ index e93ab53b..ce07096c 100644 */ int fsl_mc_populate_irq_pool(struct fsl_mc_bus *mc_bus, unsigned int irq_count) -@@ -395,7 +398,7 @@ int fsl_mc_populate_irq_pool(struct fsl_mc_bus *mc_bus, +@@ -395,7 +398,7 @@ cleanup_msi_irqs: EXPORT_SYMBOL_GPL(fsl_mc_populate_irq_pool); /** @@ -7594,7 +7574,7 @@ index e93ab53b..ce07096c 100644 * It frees the IRQs that were allocated to the pool, back to the GIC-ITS. */ void fsl_mc_cleanup_irq_pool(struct fsl_mc_bus *mc_bus) -@@ -422,11 +425,7 @@ void fsl_mc_cleanup_irq_pool(struct fsl_mc_bus *mc_bus) +@@ -422,11 +425,7 @@ void fsl_mc_cleanup_irq_pool(struct fsl_ EXPORT_SYMBOL_GPL(fsl_mc_cleanup_irq_pool); /** @@ -7607,7 +7587,7 @@ index e93ab53b..ce07096c 100644 */ int __must_check fsl_mc_allocate_irqs(struct fsl_mc_device *mc_dev) { -@@ -495,8 +494,7 @@ int __must_check fsl_mc_allocate_irqs(struct fsl_mc_device *mc_dev) +@@ -495,8 +494,7 @@ error_resource_alloc: EXPORT_SYMBOL_GPL(fsl_mc_allocate_irqs); /* @@ -7617,7 +7597,7 @@ index e93ab53b..ce07096c 100644 */ void fsl_mc_free_irqs(struct fsl_mc_device *mc_dev) { -@@ -605,7 +603,7 @@ static int fsl_mc_allocator_probe(struct fsl_mc_device *mc_dev) +@@ -605,7 +603,7 @@ static int fsl_mc_allocator_probe(struct return error; dev_dbg(&mc_dev->dev, @@ -7626,7 +7606,7 @@ index e93ab53b..ce07096c 100644 return 0; } -@@ -627,7 +625,7 @@ static int fsl_mc_allocator_remove(struct fsl_mc_device *mc_dev) +@@ -627,7 +625,7 @@ static int fsl_mc_allocator_remove(struc } dev_dbg(&mc_dev->dev, @@ -7635,8 +7615,6 @@ index e93ab53b..ce07096c 100644 return 0; } -diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c -index 44f64b6f..30a48df3 100644 --- a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c +++ b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c @@ -1,7 +1,7 @@ @@ -7686,7 +7664,7 @@ index 44f64b6f..30a48df3 100644 * structures * * Returns 1 on success, 0 otherwise. -@@ -75,8 +75,11 @@ static int fsl_mc_bus_match(struct device *dev, struct device_driver *drv) +@@ -75,8 +75,11 @@ static int fsl_mc_bus_match(struct devic struct fsl_mc_driver *mc_drv = to_fsl_mc_driver(drv); bool found = false; @@ -7699,7 +7677,7 @@ index 44f64b6f..30a48df3 100644 if (!mc_drv->match_id_table) goto out; -@@ -91,7 +94,7 @@ static int fsl_mc_bus_match(struct device *dev, struct device_driver *drv) +@@ -91,7 +94,7 @@ static int fsl_mc_bus_match(struct devic /* * Traverse the match_id table of the given driver, trying to find @@ -7708,7 +7686,7 @@ index 44f64b6f..30a48df3 100644 */ for (id = mc_drv->match_id_table; id->vendor != 0x0; id++) { if (id->vendor == mc_dev->obj_desc.vendor && -@@ -132,23 +135,141 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, +@@ -132,23 +135,141 @@ static ssize_t modalias_show(struct devi } static DEVICE_ATTR_RO(modalias); @@ -7852,7 +7830,7 @@ index 44f64b6f..30a48df3 100644 static int fsl_mc_driver_probe(struct device *dev) { struct fsl_mc_driver *mc_drv; -@@ -164,8 +285,7 @@ static int fsl_mc_driver_probe(struct device *dev) +@@ -164,8 +285,7 @@ static int fsl_mc_driver_probe(struct de error = mc_drv->probe(mc_dev); if (error < 0) { @@ -7862,7 +7840,7 @@ index 44f64b6f..30a48df3 100644 return error; } -@@ -183,9 +303,7 @@ static int fsl_mc_driver_remove(struct device *dev) +@@ -183,9 +303,7 @@ static int fsl_mc_driver_remove(struct d error = mc_drv->remove(mc_dev); if (error < 0) { @@ -7873,7 +7851,7 @@ index 44f64b6f..30a48df3 100644 return error; } -@@ -232,8 +350,6 @@ int __fsl_mc_driver_register(struct fsl_mc_driver *mc_driver, +@@ -232,8 +350,6 @@ int __fsl_mc_driver_register(struct fsl_ return error; } @@ -7882,11 +7860,10 @@ index 44f64b6f..30a48df3 100644 return 0; } EXPORT_SYMBOL_GPL(__fsl_mc_driver_register); -@@ -248,15 +364,6 @@ void fsl_mc_driver_unregister(struct fsl_mc_driver *mc_driver) - } +@@ -249,15 +365,6 @@ void fsl_mc_driver_unregister(struct fsl EXPORT_SYMBOL_GPL(fsl_mc_driver_unregister); --/** + /** - * fsl_mc_bus_exists - check if a root dprc exists - */ -bool fsl_mc_bus_exists(void) @@ -7895,10 +7872,11 @@ index 44f64b6f..30a48df3 100644 -} -EXPORT_SYMBOL_GPL(fsl_mc_bus_exists); - - /** +-/** * fsl_mc_get_root_dprc - function to traverse to the root dprc */ -@@ -315,21 +422,6 @@ static int get_dprc_icid(struct fsl_mc_io *mc_io, + void fsl_mc_get_root_dprc(struct device *dev, +@@ -315,21 +422,6 @@ static int get_dprc_icid(struct fsl_mc_i return error; } @@ -7920,7 +7898,7 @@ index 44f64b6f..30a48df3 100644 static int translate_mc_addr(struct fsl_mc_device *mc_dev, enum dprc_region_type mc_region_type, u64 mc_offset, phys_addr_t *phys_addr) -@@ -451,18 +543,37 @@ bool fsl_mc_is_root_dprc(struct device *dev) +@@ -451,18 +543,37 @@ bool fsl_mc_is_root_dprc(struct device * return dev == root_dprc_dev; } @@ -7959,7 +7937,7 @@ index 44f64b6f..30a48df3 100644 if (dev_is_fsl_mc(parent_dev)) parent_mc_dev = to_fsl_mc_device(parent_dev); -@@ -473,7 +584,7 @@ int fsl_mc_device_add(struct dprc_obj_desc *obj_desc, +@@ -473,7 +584,7 @@ int fsl_mc_device_add(struct dprc_obj_de /* * Allocate an MC bus device object: */ @@ -7968,7 +7946,7 @@ index 44f64b6f..30a48df3 100644 if (!mc_bus) return -ENOMEM; -@@ -482,16 +593,30 @@ int fsl_mc_device_add(struct dprc_obj_desc *obj_desc, +@@ -482,16 +593,30 @@ int fsl_mc_device_add(struct dprc_obj_de /* * Allocate a regular fsl_mc_device object: */ @@ -8000,7 +7978,7 @@ index 44f64b6f..30a48df3 100644 dev_set_name(&mc_dev->dev, "%s.%d", obj_desc->type, obj_desc->id); if (strcmp(obj_desc->type, "dprc") == 0) { -@@ -524,8 +649,6 @@ int fsl_mc_device_add(struct dprc_obj_desc *obj_desc, +@@ -524,8 +649,6 @@ int fsl_mc_device_add(struct dprc_obj_de } mc_io2 = mc_io; @@ -8009,7 +7987,7 @@ index 44f64b6f..30a48df3 100644 } error = get_dprc_icid(mc_io2, obj_desc->id, &mc_dev->icid); -@@ -533,8 +656,8 @@ int fsl_mc_device_add(struct dprc_obj_desc *obj_desc, +@@ -533,8 +656,8 @@ int fsl_mc_device_add(struct dprc_obj_de goto error_cleanup_dev; } else { /* @@ -8020,7 +7998,7 @@ index 44f64b6f..30a48df3 100644 */ mc_dev->icid = parent_mc_dev->icid; mc_dev->dma_mask = FSL_MC_DEFAULT_DMA_MASK; -@@ -556,9 +679,14 @@ int fsl_mc_device_add(struct dprc_obj_desc *obj_desc, +@@ -556,9 +679,14 @@ int fsl_mc_device_add(struct dprc_obj_de goto error_cleanup_dev; } @@ -8038,7 +8016,7 @@ index 44f64b6f..30a48df3 100644 /* * The device-specific probe callback will get invoked by device_add() -@@ -571,9 +699,7 @@ int fsl_mc_device_add(struct dprc_obj_desc *obj_desc, +@@ -571,9 +699,7 @@ int fsl_mc_device_add(struct dprc_obj_de goto error_cleanup_dev; } @@ -8049,7 +8027,7 @@ index 44f64b6f..30a48df3 100644 *new_mc_dev = mc_dev; return 0; -@@ -581,47 +707,34 @@ int fsl_mc_device_add(struct dprc_obj_desc *obj_desc, +@@ -581,47 +707,34 @@ int fsl_mc_device_add(struct dprc_obj_de error_cleanup_dev: kfree(mc_dev->regions); if (mc_bus) @@ -8087,9 +8065,7 @@ index 44f64b6f..30a48df3 100644 - if (strcmp(mc_dev->obj_desc.type, "dprc") == 0) { - mc_bus = to_fsl_mc_bus(mc_dev); -+ if (strcmp(mc_dev->obj_desc.type, "dprc") != 0) -+ mc_dev->dev.iommu_fwspec = NULL; - +- - if (fsl_mc_is_root_dprc(&mc_dev->dev)) { - if (atomic_read(&root_dprc_count) > 0) - atomic_dec(&root_dprc_count); @@ -8097,7 +8073,9 @@ index 44f64b6f..30a48df3 100644 - WARN_ON(1); - } - } -- ++ if (strcmp(mc_dev->obj_desc.type, "dprc") != 0) ++ mc_dev->dev.iommu_fwspec = NULL; + - if (mc_bus) - devm_kfree(mc_dev->dev.parent, mc_bus); - else @@ -8106,7 +8084,7 @@ index 44f64b6f..30a48df3 100644 } EXPORT_SYMBOL_GPL(fsl_mc_device_remove); -@@ -629,8 +742,7 @@ static int parse_mc_ranges(struct device *dev, +@@ -629,8 +742,7 @@ static int parse_mc_ranges(struct device int *paddr_cells, int *mc_addr_cells, int *mc_size_cells, @@ -8116,7 +8094,7 @@ index 44f64b6f..30a48df3 100644 { const __be32 *prop; int range_tuple_cell_count; -@@ -643,8 +755,6 @@ static int parse_mc_ranges(struct device *dev, +@@ -643,8 +755,6 @@ static int parse_mc_ranges(struct device dev_warn(dev, "missing or empty ranges property for device tree node '%s'\n", mc_node->name); @@ -8125,7 +8103,7 @@ index 44f64b6f..30a48df3 100644 return 0; } -@@ -671,8 +781,7 @@ static int parse_mc_ranges(struct device *dev, +@@ -671,8 +781,7 @@ static int parse_mc_ranges(struct device return -EINVAL; } @@ -8135,7 +8113,7 @@ index 44f64b6f..30a48df3 100644 } static int get_mc_addr_translation_ranges(struct device *dev, -@@ -680,7 +789,7 @@ static int get_mc_addr_translation_ranges(struct device *dev, +@@ -680,7 +789,7 @@ static int get_mc_addr_translation_range **ranges, u8 *num_ranges) { @@ -8144,7 +8122,7 @@ index 44f64b6f..30a48df3 100644 int paddr_cells; int mc_addr_cells; int mc_size_cells; -@@ -688,16 +797,16 @@ static int get_mc_addr_translation_ranges(struct device *dev, +@@ -688,16 +797,16 @@ static int get_mc_addr_translation_range const __be32 *ranges_start; const __be32 *cell; @@ -8167,7 +8145,7 @@ index 44f64b6f..30a48df3 100644 /* * Missing or empty ranges property ("ranges;") for the * 'fsl,qoriq-mc' node. In this case, identity mapping -@@ -749,8 +858,6 @@ static int fsl_mc_bus_probe(struct platform_device *pdev) +@@ -749,8 +858,6 @@ static int fsl_mc_bus_probe(struct platf struct mc_version mc_version; struct resource res; @@ -8176,7 +8154,7 @@ index 44f64b6f..30a48df3 100644 mc = devm_kzalloc(&pdev->dev, sizeof(*mc), GFP_KERNEL); if (!mc) return -ENOMEM; -@@ -783,8 +890,7 @@ static int fsl_mc_bus_probe(struct platform_device *pdev) +@@ -783,8 +890,7 @@ static int fsl_mc_bus_probe(struct platf goto error_cleanup_mc_io; } @@ -8186,7 +8164,7 @@ index 44f64b6f..30a48df3 100644 mc_version.major, mc_version.minor, mc_version.revision); error = get_mc_addr_translation_ranges(&pdev->dev, -@@ -793,16 +899,17 @@ static int fsl_mc_bus_probe(struct platform_device *pdev) +@@ -793,16 +899,17 @@ static int fsl_mc_bus_probe(struct platf if (error < 0) goto error_cleanup_mc_io; @@ -8208,7 +8186,7 @@ index 44f64b6f..30a48df3 100644 if (error < 0) goto error_cleanup_mc_io; -@@ -812,7 +919,8 @@ static int fsl_mc_bus_probe(struct platform_device *pdev) +@@ -812,7 +919,8 @@ static int fsl_mc_bus_probe(struct platf obj_desc.irq_count = 1; obj_desc.region_count = 0; @@ -8218,7 +8196,7 @@ index 44f64b6f..30a48df3 100644 if (error < 0) goto error_cleanup_mc_io; -@@ -840,7 +948,6 @@ static int fsl_mc_bus_remove(struct platform_device *pdev) +@@ -840,7 +948,6 @@ static int fsl_mc_bus_remove(struct plat fsl_destroy_mc_io(mc->root_mc_bus_dev->mc_io); mc->root_mc_bus_dev->mc_io = NULL; @@ -8226,7 +8204,7 @@ index 44f64b6f..30a48df3 100644 return 0; } -@@ -865,22 +972,12 @@ static int __init fsl_mc_bus_driver_init(void) +@@ -865,22 +972,12 @@ static int __init fsl_mc_bus_driver_init { int error; @@ -8250,7 +8228,7 @@ index 44f64b6f..30a48df3 100644 error = platform_driver_register(&fsl_mc_bus_driver); if (error < 0) { pr_err("platform_driver_register() failed: %d\n", error); -@@ -914,7 +1011,6 @@ static int __init fsl_mc_bus_driver_init(void) +@@ -914,7 +1011,6 @@ error_cleanup_bus: bus_unregister(&fsl_mc_bus_type); error_cleanup_cache: @@ -8258,9 +8236,6 @@ index 44f64b6f..30a48df3 100644 return error; } postcore_initcall(fsl_mc_bus_driver_init); -diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-iommu.c b/drivers/staging/fsl-mc/bus/fsl-mc-iommu.c -new file mode 100644 -index 00000000..86b2cd84 --- /dev/null +++ b/drivers/staging/fsl-mc/bus/fsl-mc-iommu.c @@ -0,0 +1,104 @@ @@ -8368,8 +8343,6 @@ index 00000000..86b2cd84 + + return group; +} -diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-msi.c b/drivers/staging/fsl-mc/bus/fsl-mc-msi.c -index 3d46b1b1..b8b2c86e 100644 --- a/drivers/staging/fsl-mc/bus/fsl-mc-msi.c +++ b/drivers/staging/fsl-mc/bus/fsl-mc-msi.c @@ -1,7 +1,7 @@ @@ -8389,8 +8362,6 @@ index 3d46b1b1..b8b2c86e 100644 /* * Generate a unique ID identifying the interrupt (only used within the MSI -diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-private.h b/drivers/staging/fsl-mc/bus/fsl-mc-private.h -index d459c267..e08b8843 100644 --- a/drivers/staging/fsl-mc/bus/fsl-mc-private.h +++ b/drivers/staging/fsl-mc/bus/fsl-mc-private.h @@ -10,13 +10,15 @@ @@ -8411,8 +8382,6 @@ index d459c267..e08b8843 100644 int __init dprc_driver_init(void); void dprc_driver_exit(void); -diff --git a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c b/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c -index 7a6ac640..49127acb 100644 --- a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c +++ b/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c @@ -1,7 +1,7 @@ @@ -8436,7 +8405,7 @@ index 7a6ac640..49127acb 100644 .irq_mask = irq_chip_mask_parent, .irq_unmask = irq_chip_unmask_parent, .irq_eoi = irq_chip_eoi_parent, -@@ -51,7 +52,7 @@ static int its_fsl_mc_msi_prepare(struct irq_domain *msi_domain, +@@ -51,7 +52,7 @@ static int its_fsl_mc_msi_prepare(struct return msi_info->ops->msi_prepare(msi_domain->parent, dev, nvec, info); } @@ -8456,8 +8425,6 @@ index 7a6ac640..49127acb 100644 pr_info("fsl-mc MSI: %s domain created\n", np->full_name); } -diff --git a/drivers/staging/fsl-mc/bus/mc-io.c b/drivers/staging/fsl-mc/bus/mc-io.c -index 798c965f..d66b87f0 100644 --- a/drivers/staging/fsl-mc/bus/mc-io.c +++ b/drivers/staging/fsl-mc/bus/mc-io.c @@ -1,4 +1,5 @@ @@ -8475,9 +8442,6 @@ index 798c965f..d66b87f0 100644 * ALTERNATIVELY, this software may be distributed under the terms of the * GNU General Public License ("GPL") as published by the Free Software * Foundation, either version 2 of that License or (at your option) any -diff --git a/drivers/staging/fsl-mc/bus/mc-ioctl.h b/drivers/staging/fsl-mc/bus/mc-ioctl.h -new file mode 100644 -index 00000000..8ac502a1 --- /dev/null +++ b/drivers/staging/fsl-mc/bus/mc-ioctl.h @@ -0,0 +1,22 @@ @@ -8503,9 +8467,6 @@ index 00000000..8ac502a1 + _IOWR(RESTOOL_IOCTL_TYPE, 0xE0, struct mc_command) + +#endif /* _FSL_MC_IOCTL_H_ */ -diff --git a/drivers/staging/fsl-mc/bus/mc-restool.c b/drivers/staging/fsl-mc/bus/mc-restool.c -new file mode 100644 -index 00000000..d5330b68 --- /dev/null +++ b/drivers/staging/fsl-mc/bus/mc-restool.c @@ -0,0 +1,405 @@ @@ -8914,8 +8875,6 @@ index 00000000..d5330b68 +MODULE_AUTHOR("Freescale Semiconductor Inc."); +MODULE_DESCRIPTION("Freescale's MC restool driver"); +MODULE_LICENSE("GPL"); -diff --git a/drivers/staging/fsl-mc/bus/mc-sys.c b/drivers/staging/fsl-mc/bus/mc-sys.c -index 285917c7..cf63c7b6 100644 --- a/drivers/staging/fsl-mc/bus/mc-sys.c +++ b/drivers/staging/fsl-mc/bus/mc-sys.c @@ -1,4 +1,5 @@ @@ -8942,7 +8901,7 @@ index 285917c7..cf63c7b6 100644 /* * usleep_range() min and max values used to throttle down polling -@@ -67,7 +67,7 @@ static u16 mc_cmd_hdr_read_cmdid(struct mc_command *cmd) +@@ -67,7 +67,7 @@ static u16 mc_cmd_hdr_read_cmdid(struct struct mc_cmd_header *hdr = (struct mc_cmd_header *)&cmd->header; u16 cmd_id = le16_to_cpu(hdr->cmd_id); @@ -8951,7 +8910,7 @@ index 285917c7..cf63c7b6 100644 } static int mc_status_to_error(enum mc_cmd_status status) -@@ -200,7 +200,7 @@ static int mc_polling_wait_preemptible(struct fsl_mc_io *mc_io, +@@ -200,7 +200,7 @@ static int mc_polling_wait_preemptible(s if (time_after_eq(jiffies, jiffies_until_timeout)) { dev_dbg(mc_io->dev, @@ -8960,7 +8919,7 @@ index 285917c7..cf63c7b6 100644 mc_io->portal_phys_addr, (unsigned int)mc_cmd_hdr_read_token(cmd), (unsigned int)mc_cmd_hdr_read_cmdid(cmd)); -@@ -240,7 +240,7 @@ static int mc_polling_wait_atomic(struct fsl_mc_io *mc_io, +@@ -240,7 +240,7 @@ static int mc_polling_wait_atomic(struct timeout_usecs -= MC_CMD_COMPLETION_POLLING_MAX_SLEEP_USECS; if (timeout_usecs == 0) { dev_dbg(mc_io->dev, @@ -8969,7 +8928,7 @@ index 285917c7..cf63c7b6 100644 mc_io->portal_phys_addr, (unsigned int)mc_cmd_hdr_read_token(cmd), (unsigned int)mc_cmd_hdr_read_cmdid(cmd)); -@@ -294,7 +294,7 @@ int mc_send_command(struct fsl_mc_io *mc_io, struct mc_command *cmd) +@@ -294,7 +294,7 @@ int mc_send_command(struct fsl_mc_io *mc if (status != MC_CMD_STATUS_OK) { dev_dbg(mc_io->dev, @@ -8978,9 +8937,6 @@ index 285917c7..cf63c7b6 100644 mc_io->portal_phys_addr, (unsigned int)mc_cmd_hdr_read_token(cmd), (unsigned int)mc_cmd_hdr_read_cmdid(cmd), -diff --git a/drivers/staging/fsl-mc/include/dpaa2-fd.h b/drivers/staging/fsl-mc/include/dpaa2-fd.h -new file mode 100644 -index 00000000..72328415 --- /dev/null +++ b/drivers/staging/fsl-mc/include/dpaa2-fd.h @@ -0,0 +1,706 @@ @@ -9690,9 +9646,6 @@ index 00000000..72328415 +} + +#endif /* __FSL_DPAA2_FD_H */ -diff --git a/drivers/staging/fsl-mc/include/dpaa2-global.h b/drivers/staging/fsl-mc/include/dpaa2-global.h -new file mode 100644 -index 00000000..0326447f --- /dev/null +++ b/drivers/staging/fsl-mc/include/dpaa2-global.h @@ -0,0 +1,202 @@ @@ -9898,9 +9851,6 @@ index 00000000..0326447f +} + +#endif /* __FSL_DPAA2_GLOBAL_H */ -diff --git a/drivers/staging/fsl-mc/include/dpaa2-io.h b/drivers/staging/fsl-mc/include/dpaa2-io.h -new file mode 100644 -index 00000000..c7d1d997 --- /dev/null +++ b/drivers/staging/fsl-mc/include/dpaa2-io.h @@ -0,0 +1,190 @@ @@ -10094,9 +10044,6 @@ index 00000000..c7d1d997 +} + +#endif /* __FSL_DPAA2_IO_H */ -diff --git a/drivers/staging/fsl-mc/include/dpbp-cmd.h b/drivers/staging/fsl-mc/include/dpbp-cmd.h -deleted file mode 100644 -index 2860411d..00000000 --- a/drivers/staging/fsl-mc/include/dpbp-cmd.h +++ /dev/null @@ -1,185 +0,0 @@ @@ -10285,8 +10232,6 @@ index 2860411d..00000000 -}; - -#endif /* _FSL_DPBP_CMD_H */ -diff --git a/drivers/staging/fsl-mc/include/dpbp.h b/drivers/staging/fsl-mc/include/dpbp.h -index e14e85a5..e9e04cce 100644 --- a/drivers/staging/fsl-mc/include/dpbp.h +++ b/drivers/staging/fsl-mc/include/dpbp.h @@ -1,4 +1,5 @@ @@ -10334,11 +10279,10 @@ index e14e85a5..e9e04cce 100644 int dpbp_enable(struct fsl_mc_io *mc_io, u32 cmd_flags, -@@ -81,140 +66,25 @@ int dpbp_reset(struct fsl_mc_io *mc_io, - u32 cmd_flags, +@@ -82,139 +67,24 @@ int dpbp_reset(struct fsl_mc_io *mc_io, u16 token); --/** + /** - * struct dpbp_irq_cfg - IRQ configuration - * @addr: Address that must be written to signal a message-based interrupt - * @val: Value to write into irq_addr address @@ -10399,7 +10343,7 @@ index e14e85a5..e9e04cce 100644 - u8 irq_index, - u32 status); - - /** +-/** * struct dpbp_attr - Structure representing DPBP attributes * @id: DPBP object ID - * @version: DPBP version @@ -10471,21 +10415,19 @@ index e14e85a5..e9e04cce 100644 - u32 cmd_flags, - u16 token, - struct dpbp_notification_cfg *cfg); +- +-/** @} */ +int dpbp_get_attributes(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token, + struct dpbp_attr *attr); - --/** @} */ ++ +int dpbp_get_api_version(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 *major_ver, + u16 *minor_ver); #endif /* __FSL_DPBP_H */ -diff --git a/drivers/staging/fsl-mc/include/dpcon.h b/drivers/staging/fsl-mc/include/dpcon.h -new file mode 100644 -index 00000000..efa23906 --- /dev/null +++ b/drivers/staging/fsl-mc/include/dpcon.h @@ -0,0 +1,115 @@ @@ -10604,8 +10546,6 @@ index 00000000..efa23906 + u16 *minor_ver); + +#endif /* __FSL_DPCON_H */ -diff --git a/drivers/staging/fsl-mc/include/dpmng.h b/drivers/staging/fsl-mc/include/dpmng.h -index e5cfd017..170c07dd 100644 --- a/drivers/staging/fsl-mc/include/dpmng.h +++ b/drivers/staging/fsl-mc/include/dpmng.h @@ -1,4 +1,5 @@ @@ -10641,9 +10581,6 @@ index e5cfd017..170c07dd 100644 + struct mc_version *mc_ver_info); #endif /* __FSL_DPMNG_H */ -diff --git a/drivers/staging/fsl-mc/include/dpopr.h b/drivers/staging/fsl-mc/include/dpopr.h -new file mode 100644 -index 00000000..e1110af2 --- /dev/null +++ b/drivers/staging/fsl-mc/include/dpopr.h @@ -0,0 +1,110 @@ @@ -10757,8 +10694,6 @@ index 00000000..e1110af2 +}; + +#endif /* __FSL_DPOPR_H_ */ -diff --git a/drivers/staging/fsl-mc/include/dprc.h b/drivers/staging/fsl-mc/include/dprc.h -index 593b2bbe..8dc411ec 100644 --- a/drivers/staging/fsl-mc/include/dprc.h +++ b/drivers/staging/fsl-mc/include/dprc.h @@ -1,4 +1,5 @@ @@ -10873,7 +10808,7 @@ index 593b2bbe..8dc411ec 100644 /* IRQ */ -@@ -139,7 +58,7 @@ int dprc_reset_container(struct fsl_mc_io *mc_io, +@@ -139,7 +58,7 @@ int dprc_reset_container(struct fsl_mc_i #define DPRC_IRQ_INDEX 0 /* Number of dprc's IRQs */ @@ -10882,7 +10817,7 @@ index 593b2bbe..8dc411ec 100644 /* DPRC IRQ events */ -@@ -151,12 +70,14 @@ int dprc_reset_container(struct fsl_mc_io *mc_io, +@@ -151,12 +70,14 @@ int dprc_reset_container(struct fsl_mc_i #define DPRC_IRQ_EVENT_RES_ADDED 0x00000004 /* IRQ event - Indicates that resources removed from the container */ #define DPRC_IRQ_EVENT_RES_REMOVED 0x00000008 @@ -10899,18 +10834,15 @@ index 593b2bbe..8dc411ec 100644 * destroyed */ #define DPRC_IRQ_EVENT_OBJ_DESTROYED 0x00000020 -@@ -171,59 +92,59 @@ int dprc_reset_container(struct fsl_mc_io *mc_io, +@@ -171,59 +92,59 @@ int dprc_reset_container(struct fsl_mc_i * @irq_num: A user defined number associated with this IRQ */ struct dprc_irq_cfg { - phys_addr_t paddr; - u32 val; - int irq_num; -+ phys_addr_t paddr; -+ u32 val; -+ int irq_num; - }; - +-}; +- -int dprc_set_irq(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, @@ -10959,6 +10891,11 @@ index 593b2bbe..8dc411ec 100644 - u16 token, - u8 irq_index, - u32 status); ++ phys_addr_t paddr; ++ u32 val; ++ int irq_num; ++}; ++ +int dprc_set_irq(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token, @@ -11010,7 +10947,7 @@ index 593b2bbe..8dc411ec 100644 /** * struct dprc_attributes - Container attributes -@@ -231,114 +152,23 @@ int dprc_clear_irq_status(struct fsl_mc_io *mc_io, +@@ -231,114 +152,23 @@ int dprc_clear_irq_status(struct fsl_mc_ * @icid: Container's ICID * @portal_id: Container's portal ID * @options: Container's options as set at container's creation @@ -11030,8 +10967,8 @@ index 593b2bbe..8dc411ec 100644 - u16 major; - u16 minor; - } version; --}; -- + }; + -int dprc_get_attributes(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, @@ -11093,8 +11030,8 @@ index 593b2bbe..8dc411ec 100644 - u32 num; - u32 options; - int id_base_align; - }; - +-}; +- -int dprc_assign(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, @@ -11132,7 +11069,7 @@ index 593b2bbe..8dc411ec 100644 /* Objects Attributes Flags */ -@@ -353,7 +183,7 @@ int dprc_get_obj_count(struct fsl_mc_io *mc_io, +@@ -353,7 +183,7 @@ int dprc_get_obj_count(struct fsl_mc_io * masters; * user is responsible for proper memory handling through IOMMU configuration. */ @@ -11329,8 +11266,6 @@ index 593b2bbe..8dc411ec 100644 #endif /* _FSL_DPRC_H */ -diff --git a/drivers/staging/fsl-mc/include/mc-bus.h b/drivers/staging/fsl-mc/include/mc-bus.h -index 170684a5..4d1f2d3e 100644 --- a/drivers/staging/fsl-mc/include/mc-bus.h +++ b/drivers/staging/fsl-mc/include/mc-bus.h @@ -1,7 +1,7 @@ @@ -11361,8 +11296,6 @@ index 170684a5..4d1f2d3e 100644 unsigned int *total_irq_count); int __init dprc_driver_init(void); -diff --git a/drivers/staging/fsl-mc/include/mc-cmd.h b/drivers/staging/fsl-mc/include/mc-cmd.h -index 5decb989..2e08aa31 100644 --- a/drivers/staging/fsl-mc/include/mc-cmd.h +++ b/drivers/staging/fsl-mc/include/mc-cmd.h @@ -1,4 +1,5 @@ @@ -11400,7 +11333,7 @@ index 5decb989..2e08aa31 100644 static inline u64 mc_encode_cmd_header(u16 cmd_id, u32 cmd_flags, u16 token) -@@ -84,10 +89,8 @@ static inline u64 mc_encode_cmd_header(u16 cmd_id, +@@ -84,10 +89,8 @@ static inline u64 mc_encode_cmd_header(u u64 header = 0; struct mc_cmd_header *hdr = (struct mc_cmd_header *)&header; @@ -11413,7 +11346,7 @@ index 5decb989..2e08aa31 100644 hdr->status = MC_CMD_STATUS_READY; if (cmd_flags & MC_CMD_FLAG_PRI) hdr->flags_hw = MC_CMD_FLAG_PRI; -@@ -102,7 +105,26 @@ static inline u16 mc_cmd_hdr_read_token(struct mc_command *cmd) +@@ -102,7 +105,26 @@ static inline u16 mc_cmd_hdr_read_token( struct mc_cmd_header *hdr = (struct mc_cmd_header *)&cmd->header; u16 token = le16_to_cpu(hdr->token); @@ -11441,8 +11374,6 @@ index 5decb989..2e08aa31 100644 } #endif /* __FSL_MC_CMD_H */ -diff --git a/drivers/staging/fsl-mc/include/mc-sys.h b/drivers/staging/fsl-mc/include/mc-sys.h -index 89ad0cf5..dca7f908 100644 --- a/drivers/staging/fsl-mc/include/mc-sys.h +++ b/drivers/staging/fsl-mc/include/mc-sys.h @@ -1,4 +1,5 @@ @@ -11452,8 +11383,6 @@ index 89ad0cf5..dca7f908 100644 * * Interface of the I/O services to send MC commands to the MC hardware * -diff --git a/drivers/staging/fsl-mc/include/mc.h b/drivers/staging/fsl-mc/include/mc.h -index f6e720e8..c23b78a4 100644 --- a/drivers/staging/fsl-mc/include/mc.h +++ b/drivers/staging/fsl-mc/include/mc.h @@ -1,7 +1,7 @@ @@ -11499,7 +11428,7 @@ index f6e720e8..c23b78a4 100644 int __must_check __fsl_mc_driver_register(struct fsl_mc_driver *fsl_mc_driver, struct module *owner); -@@ -198,4 +202,13 @@ int __must_check fsl_mc_allocate_irqs(struct fsl_mc_device *mc_dev); +@@ -198,4 +202,13 @@ int __must_check fsl_mc_allocate_irqs(st void fsl_mc_free_irqs(struct fsl_mc_device *mc_dev); @@ -11513,6 +11442,3 @@ index f6e720e8..c23b78a4 100644 +#endif + #endif /* _FSL_MC_H_ */ --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/705-dpaa2-support-layerscape.patch b/target/linux/layerscape/patches-4.9/705-dpaa2-support-layerscape.patch index d513efb2fb..51abc03254 100644 --- a/target/linux/layerscape/patches-4.9/705-dpaa2-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/705-dpaa2-support-layerscape.patch @@ -92,9 +92,6 @@ Signed-off-by: Yangbo Lu create mode 100644 drivers/staging/fsl-dpaa2/rtc/dprtc.h create mode 100644 drivers/staging/fsl-dpaa2/rtc/rtc.c -diff --git a/drivers/soc/fsl/ls2-console/Kconfig b/drivers/soc/fsl/ls2-console/Kconfig -new file mode 100644 -index 00000000..47d0dc11 --- /dev/null +++ b/drivers/soc/fsl/ls2-console/Kconfig @@ -0,0 +1,4 @@ @@ -102,16 +99,10 @@ index 00000000..47d0dc11 + tristate "Layerscape MC and AIOP console support" + depends on ARCH_LAYERSCAPE + default y -diff --git a/drivers/soc/fsl/ls2-console/Makefile b/drivers/soc/fsl/ls2-console/Makefile -new file mode 100644 -index 00000000..62b96346 --- /dev/null +++ b/drivers/soc/fsl/ls2-console/Makefile @@ -0,0 +1 @@ +obj-$(CONFIG_FSL_LS2_CONSOLE) += ls2-console.o -diff --git a/drivers/soc/fsl/ls2-console/ls2-console.c b/drivers/soc/fsl/ls2-console/ls2-console.c -new file mode 100644 -index 00000000..68415ad0 --- /dev/null +++ b/drivers/soc/fsl/ls2-console/ls2-console.c @@ -0,0 +1,284 @@ @@ -399,9 +390,6 @@ index 00000000..68415ad0 +MODULE_AUTHOR("Roy Pledge "); +MODULE_LICENSE("Dual BSD/GPL"); +MODULE_DESCRIPTION("Freescale LS2 console driver"); -diff --git a/drivers/staging/fsl-dpaa2/ethernet/Makefile b/drivers/staging/fsl-dpaa2/ethernet/Makefile -new file mode 100644 -index 00000000..e26911d5 --- /dev/null +++ b/drivers/staging/fsl-dpaa2/ethernet/Makefile @@ -0,0 +1,11 @@ @@ -416,9 +404,6 @@ index 00000000..e26911d5 + +# Needed by the tracing framework +CFLAGS_dpaa2-eth.o := -I$(src) -diff --git a/drivers/staging/fsl-dpaa2/ethernet/README b/drivers/staging/fsl-dpaa2/ethernet/README -new file mode 100644 -index 00000000..410952ec --- /dev/null +++ b/drivers/staging/fsl-dpaa2/ethernet/README @@ -0,0 +1,186 @@ @@ -608,9 +593,6 @@ index 00000000..410952ec + +Hardware specific statistics for the network interface as well as some +non-standard driver stats can be consulted through ethtool -S option. -diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth-debugfs.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth-debugfs.c -new file mode 100644 -index 00000000..445c5d17 --- /dev/null +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth-debugfs.c @@ -0,0 +1,350 @@ @@ -964,9 +946,6 @@ index 00000000..445c5d17 +{ + debugfs_remove(dpaa2_dbg_root); +} -diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth-debugfs.h b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth-debugfs.h -new file mode 100644 -index 00000000..551e6c4c --- /dev/null +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth-debugfs.h @@ -0,0 +1,60 @@ @@ -1030,9 +1009,6 @@ index 00000000..551e6c4c +#endif /* CONFIG_FSL_DPAA2_ETH_DEBUGFS */ + +#endif /* DPAA2_ETH_DEBUGFS_H */ -diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth-trace.h b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth-trace.h -new file mode 100644 -index 00000000..e8e6522a --- /dev/null +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth-trace.h @@ -0,0 +1,184 @@ @@ -1220,9 +1196,6 @@ index 00000000..e8e6522a +#undef TRACE_INCLUDE_FILE +#define TRACE_INCLUDE_FILE dpaa2-eth-trace +#include -diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c -new file mode 100644 -index 00000000..452eca52 --- /dev/null +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c @@ -0,0 +1,3155 @@ @@ -4381,9 +4354,6 @@ index 00000000..452eca52 + +module_init(dpaa2_eth_driver_init); +module_exit(dpaa2_eth_driver_exit); -diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h -new file mode 100644 -index 00000000..86cb12e9 --- /dev/null +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h @@ -0,0 +1,460 @@ @@ -4847,9 +4817,6 @@ index 00000000..86cb12e9 + +int setup_fqs_taildrop(struct dpaa2_eth_priv *priv, bool enable); +#endif /* __DPAA2_H */ -diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c -new file mode 100644 -index 00000000..9859814e --- /dev/null +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c @@ -0,0 +1,856 @@ @@ -5709,9 +5676,6 @@ index 00000000..9859814e + .get_rxnfc = dpaa2_eth_get_rxnfc, + .set_rxnfc = dpaa2_eth_set_rxnfc, +}; -diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpkg.h b/drivers/staging/fsl-dpaa2/ethernet/dpkg.h -new file mode 100644 -index 00000000..02290a08 --- /dev/null +++ b/drivers/staging/fsl-dpaa2/ethernet/dpkg.h @@ -0,0 +1,176 @@ @@ -5891,9 +5855,6 @@ index 00000000..02290a08 +}; + +#endif /* __FSL_DPKG_H_ */ -diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpni-cmd.h b/drivers/staging/fsl-dpaa2/ethernet/dpni-cmd.h -new file mode 100644 -index 00000000..fa353d75 --- /dev/null +++ b/drivers/staging/fsl-dpaa2/ethernet/dpni-cmd.h @@ -0,0 +1,600 @@ @@ -6497,9 +6458,6 @@ index 00000000..fa353d75 +}; + +#endif /* _FSL_DPNI_CMD_H */ -diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpni.c b/drivers/staging/fsl-dpaa2/ethernet/dpni.c -new file mode 100644 -index 00000000..3c23e4dc --- /dev/null +++ b/drivers/staging/fsl-dpaa2/ethernet/dpni.c @@ -0,0 +1,1770 @@ @@ -8273,9 +8231,6 @@ index 00000000..3c23e4dc + + return 0; +} -diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpni.h b/drivers/staging/fsl-dpaa2/ethernet/dpni.h -new file mode 100644 -index 00000000..600c3574 --- /dev/null +++ b/drivers/staging/fsl-dpaa2/ethernet/dpni.h @@ -0,0 +1,989 @@ @@ -9268,9 +9223,6 @@ index 00000000..600c3574 + const struct dpni_rule_cfg *cfg); + +#endif /* __FSL_DPNI_H */ -diff --git a/drivers/staging/fsl-dpaa2/ethernet/net.h b/drivers/staging/fsl-dpaa2/ethernet/net.h -new file mode 100644 -index 00000000..5020dee1 --- /dev/null +++ b/drivers/staging/fsl-dpaa2/ethernet/net.h @@ -0,0 +1,480 @@ @@ -9754,9 +9706,6 @@ index 00000000..5020dee1 + (((u32)((vlan_id) & 0xFFF)))) + +#endif /* __FSL_NET_H */ -diff --git a/drivers/staging/fsl-dpaa2/ethsw/Kconfig b/drivers/staging/fsl-dpaa2/ethsw/Kconfig -new file mode 100644 -index 00000000..06c70408 --- /dev/null +++ b/drivers/staging/fsl-dpaa2/ethsw/Kconfig @@ -0,0 +1,6 @@ @@ -9766,9 +9715,6 @@ index 00000000..06c70408 + default y + ---help--- + Prototype driver for DPAA2 Ethernet Switch. -diff --git a/drivers/staging/fsl-dpaa2/ethsw/Makefile b/drivers/staging/fsl-dpaa2/ethsw/Makefile -new file mode 100644 -index 00000000..20eb3ac4 --- /dev/null +++ b/drivers/staging/fsl-dpaa2/ethsw/Makefile @@ -0,0 +1,10 @@ @@ -9782,9 +9728,6 @@ index 00000000..20eb3ac4 + +clean: + make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean -diff --git a/drivers/staging/fsl-dpaa2/ethsw/dpsw-cmd.h b/drivers/staging/fsl-dpaa2/ethsw/dpsw-cmd.h -new file mode 100644 -index 00000000..f7374d1c --- /dev/null +++ b/drivers/staging/fsl-dpaa2/ethsw/dpsw-cmd.h @@ -0,0 +1,851 @@ @@ -10639,9 +10582,6 @@ index 00000000..f7374d1c +}; + +#endif /* __FSL_DPSW_CMD_H */ -diff --git a/drivers/staging/fsl-dpaa2/ethsw/dpsw.c b/drivers/staging/fsl-dpaa2/ethsw/dpsw.c -new file mode 100644 -index 00000000..179e98c8 --- /dev/null +++ b/drivers/staging/fsl-dpaa2/ethsw/dpsw.c @@ -0,0 +1,2762 @@ @@ -13407,9 +13347,6 @@ index 00000000..179e98c8 + + return 0; +} -diff --git a/drivers/staging/fsl-dpaa2/ethsw/dpsw.h b/drivers/staging/fsl-dpaa2/ethsw/dpsw.h -new file mode 100644 -index 00000000..c91abeb4 --- /dev/null +++ b/drivers/staging/fsl-dpaa2/ethsw/dpsw.h @@ -0,0 +1,1269 @@ @@ -14682,9 +14619,6 @@ index 00000000..c91abeb4 + u16 *minor_ver); + +#endif /* __FSL_DPSW_H */ -diff --git a/drivers/staging/fsl-dpaa2/ethsw/switch.c b/drivers/staging/fsl-dpaa2/ethsw/switch.c -new file mode 100644 -index 00000000..3f2c9648 --- /dev/null +++ b/drivers/staging/fsl-dpaa2/ethsw/switch.c @@ -0,0 +1,1857 @@ @@ -16545,9 +16479,6 @@ index 00000000..3f2c9648 + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("DPAA2 Ethernet Switch Driver (prototype)"); -diff --git a/drivers/staging/fsl-dpaa2/evb/Kconfig b/drivers/staging/fsl-dpaa2/evb/Kconfig -new file mode 100644 -index 00000000..3534f697 --- /dev/null +++ b/drivers/staging/fsl-dpaa2/evb/Kconfig @@ -0,0 +1,7 @@ @@ -16558,9 +16489,6 @@ index 00000000..3534f697 + default y + ---help--- + Prototype driver for DPAA2 Edge Virtual Bridge. -diff --git a/drivers/staging/fsl-dpaa2/evb/Makefile b/drivers/staging/fsl-dpaa2/evb/Makefile -new file mode 100644 -index 00000000..ecc529d7 --- /dev/null +++ b/drivers/staging/fsl-dpaa2/evb/Makefile @@ -0,0 +1,10 @@ @@ -16574,9 +16502,6 @@ index 00000000..ecc529d7 + +clean: + make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean -diff --git a/drivers/staging/fsl-dpaa2/evb/dpdmux-cmd.h b/drivers/staging/fsl-dpaa2/evb/dpdmux-cmd.h -new file mode 100644 -index 00000000..66306804 --- /dev/null +++ b/drivers/staging/fsl-dpaa2/evb/dpdmux-cmd.h @@ -0,0 +1,279 @@ @@ -16859,9 +16784,6 @@ index 00000000..66306804 +}; + +#endif /* _FSL_DPDMUX_CMD_H */ -diff --git a/drivers/staging/fsl-dpaa2/evb/dpdmux.c b/drivers/staging/fsl-dpaa2/evb/dpdmux.c -new file mode 100644 -index 00000000..f7a87633 --- /dev/null +++ b/drivers/staging/fsl-dpaa2/evb/dpdmux.c @@ -0,0 +1,1112 @@ @@ -17977,9 +17899,6 @@ index 00000000..f7a87633 + + return 0; +} -diff --git a/drivers/staging/fsl-dpaa2/evb/dpdmux.h b/drivers/staging/fsl-dpaa2/evb/dpdmux.h -new file mode 100644 -index 00000000..a6ccc7ef --- /dev/null +++ b/drivers/staging/fsl-dpaa2/evb/dpdmux.h @@ -0,0 +1,453 @@ @@ -18436,9 +18355,6 @@ index 00000000..a6ccc7ef + u16 *minor_ver); + +#endif /* __FSL_DPDMUX_H */ -diff --git a/drivers/staging/fsl-dpaa2/evb/evb.c b/drivers/staging/fsl-dpaa2/evb/evb.c -new file mode 100644 -index 00000000..9ee09b42 --- /dev/null +++ b/drivers/staging/fsl-dpaa2/evb/evb.c @@ -0,0 +1,1350 @@ @@ -19792,9 +19708,6 @@ index 00000000..9ee09b42 + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("Layerscape DPAA Edge Virtual Bridge driver (prototype)"); -diff --git a/drivers/staging/fsl-dpaa2/mac/Kconfig b/drivers/staging/fsl-dpaa2/mac/Kconfig -new file mode 100644 -index 00000000..c94f7c1b --- /dev/null +++ b/drivers/staging/fsl-dpaa2/mac/Kconfig @@ -0,0 +1,23 @@ @@ -19821,9 +19734,6 @@ index 00000000..c94f7c1b + PHYs. + . + Leave disabled if unsure. -diff --git a/drivers/staging/fsl-dpaa2/mac/Makefile b/drivers/staging/fsl-dpaa2/mac/Makefile -new file mode 100644 -index 00000000..bda94101 --- /dev/null +++ b/drivers/staging/fsl-dpaa2/mac/Makefile @@ -0,0 +1,10 @@ @@ -19837,9 +19747,6 @@ index 00000000..bda94101 + +clean: + make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean -diff --git a/drivers/staging/fsl-dpaa2/mac/dpmac-cmd.h b/drivers/staging/fsl-dpaa2/mac/dpmac-cmd.h -new file mode 100644 -index 00000000..abdc3c0d --- /dev/null +++ b/drivers/staging/fsl-dpaa2/mac/dpmac-cmd.h @@ -0,0 +1,172 @@ @@ -20015,9 +19922,6 @@ index 00000000..abdc3c0d +}; + +#endif /* _FSL_DPMAC_CMD_H */ -diff --git a/drivers/staging/fsl-dpaa2/mac/dpmac.c b/drivers/staging/fsl-dpaa2/mac/dpmac.c -new file mode 100644 -index 00000000..f7827423 --- /dev/null +++ b/drivers/staging/fsl-dpaa2/mac/dpmac.c @@ -0,0 +1,620 @@ @@ -20641,9 +20545,6 @@ index 00000000..f7827423 + + return 0; +} -diff --git a/drivers/staging/fsl-dpaa2/mac/dpmac.h b/drivers/staging/fsl-dpaa2/mac/dpmac.h -new file mode 100644 -index 00000000..32d4ada2 --- /dev/null +++ b/drivers/staging/fsl-dpaa2/mac/dpmac.h @@ -0,0 +1,342 @@ @@ -20989,9 +20890,6 @@ index 00000000..32d4ada2 + u16 *minor_ver); + +#endif /* __FSL_DPMAC_H */ -diff --git a/drivers/staging/fsl-dpaa2/mac/mac.c b/drivers/staging/fsl-dpaa2/mac/mac.c -new file mode 100644 -index 00000000..30169639 --- /dev/null +++ b/drivers/staging/fsl-dpaa2/mac/mac.c @@ -0,0 +1,666 @@ @@ -21661,9 +21559,6 @@ index 00000000..30169639 + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("DPAA2 PHY proxy interface driver"); -diff --git a/drivers/staging/fsl-dpaa2/rtc/Makefile b/drivers/staging/fsl-dpaa2/rtc/Makefile -new file mode 100644 -index 00000000..541a7acd --- /dev/null +++ b/drivers/staging/fsl-dpaa2/rtc/Makefile @@ -0,0 +1,10 @@ @@ -21677,9 +21572,6 @@ index 00000000..541a7acd + +clean: + make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean -diff --git a/drivers/staging/fsl-dpaa2/rtc/dprtc-cmd.h b/drivers/staging/fsl-dpaa2/rtc/dprtc-cmd.h -new file mode 100644 -index 00000000..618c7e54 --- /dev/null +++ b/drivers/staging/fsl-dpaa2/rtc/dprtc-cmd.h @@ -0,0 +1,160 @@ @@ -21843,9 +21735,6 @@ index 00000000..618c7e54 +}; +#pragma pack(pop) +#endif /* _FSL_DPRTC_CMD_H */ -diff --git a/drivers/staging/fsl-dpaa2/rtc/dprtc.c b/drivers/staging/fsl-dpaa2/rtc/dprtc.c -new file mode 100644 -index 00000000..399177e4 --- /dev/null +++ b/drivers/staging/fsl-dpaa2/rtc/dprtc.c @@ -0,0 +1,746 @@ @@ -22595,9 +22484,6 @@ index 00000000..399177e4 + + return 0; +} -diff --git a/drivers/staging/fsl-dpaa2/rtc/dprtc.h b/drivers/staging/fsl-dpaa2/rtc/dprtc.h -new file mode 100644 -index 00000000..fc96cac6 --- /dev/null +++ b/drivers/staging/fsl-dpaa2/rtc/dprtc.h @@ -0,0 +1,172 @@ @@ -22773,9 +22659,6 @@ index 00000000..fc96cac6 + uint16_t *minor_ver); + +#endif /* __FSL_DPRTC_H */ -diff --git a/drivers/staging/fsl-dpaa2/rtc/rtc.c b/drivers/staging/fsl-dpaa2/rtc/rtc.c -new file mode 100644 -index 00000000..0afc6538 --- /dev/null +++ b/drivers/staging/fsl-dpaa2/rtc/rtc.c @@ -0,0 +1,243 @@ @@ -23022,6 +22905,3 @@ index 00000000..0afc6538 + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("DPAA2 RTC (PTP 1588 clock) driver (prototype)"); --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/801-ata-support-layerscape.patch b/target/linux/layerscape/patches-4.9/801-ata-support-layerscape.patch index bc7641015c..0c1cd1bf84 100644 --- a/target/linux/layerscape/patches-4.9/801-ata-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/801-ata-support-layerscape.patch @@ -11,8 +11,6 @@ Signed-off-by: Yangbo Lu drivers/ata/ahci_qoriq.c | 63 ++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 56 insertions(+), 7 deletions(-) -diff --git a/drivers/ata/ahci_qoriq.c b/drivers/ata/ahci_qoriq.c -index 1eba8dff..2f30a39f 100644 --- a/drivers/ata/ahci_qoriq.c +++ b/drivers/ata/ahci_qoriq.c @@ -1,7 +1,7 @@ @@ -57,7 +55,7 @@ index 1eba8dff..2f30a39f 100644 {}, }; MODULE_DEVICE_TABLE(of, ahci_qoriq_of_match); -@@ -154,6 +163,8 @@ static int ahci_qoriq_phy_init(struct ahci_host_priv *hpriv) +@@ -154,6 +163,8 @@ static int ahci_qoriq_phy_init(struct ah switch (qpriv->type) { case AHCI_LS1021A: @@ -66,7 +64,7 @@ index 1eba8dff..2f30a39f 100644 writel(SATA_ECC_DISABLE, qpriv->ecc_addr); writel(AHCI_PORT_PHY_1_CFG, reg_base + PORT_PHY1); writel(LS1021A_PORT_PHY2, reg_base + PORT_PHY2); -@@ -161,19 +172,56 @@ static int ahci_qoriq_phy_init(struct ahci_host_priv *hpriv) +@@ -161,19 +172,56 @@ static int ahci_qoriq_phy_init(struct ah writel(LS1021A_PORT_PHY4, reg_base + PORT_PHY4); writel(LS1021A_PORT_PHY5, reg_base + PORT_PHY5); writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS); @@ -126,7 +124,7 @@ index 1eba8dff..2f30a39f 100644 break; } -@@ -204,13 +252,14 @@ static int ahci_qoriq_probe(struct platform_device *pdev) +@@ -204,13 +252,14 @@ static int ahci_qoriq_probe(struct platf qoriq_priv->type = (enum ahci_qoriq_type)of_id->data; @@ -144,6 +142,3 @@ index 1eba8dff..2f30a39f 100644 rc = ahci_platform_enable_resources(hpriv); if (rc) --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/802-clk-support-layerscape.patch b/target/linux/layerscape/patches-4.9/802-clk-support-layerscape.patch index 881e3848b4..2f7d6f8478 100644 --- a/target/linux/layerscape/patches-4.9/802-clk-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/802-clk-support-layerscape.patch @@ -13,8 +13,6 @@ Signed-off-by: Yangbo Lu drivers/clk/clk-qoriq.c | 170 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 156 insertions(+), 14 deletions(-) -diff --git a/drivers/clk/clk-qoriq.c b/drivers/clk/clk-qoriq.c -index 80ae2a51..0e7de00a 100644 --- a/drivers/clk/clk-qoriq.c +++ b/drivers/clk/clk-qoriq.c @@ -12,6 +12,7 @@ @@ -34,7 +32,7 @@ index 80ae2a51..0e7de00a 100644 struct clockgen_pll pll[6]; struct clk *cmux[NUM_CMUX]; struct clk *hwaccel[NUM_HWACCEL]; -@@ -266,6 +267,39 @@ static const struct clockgen_muxinfo ls1043a_hwa2 = { +@@ -266,6 +267,39 @@ static const struct clockgen_muxinfo ls1 }, }; @@ -74,11 +72,10 @@ index 80ae2a51..0e7de00a 100644 static const struct clockgen_muxinfo t1023_hwa1 = { { {}, -@@ -488,6 +522,42 @@ static const struct clockgen_chipinfo chipinfo[] = { - .pll_mask = 0x07, +@@ -489,6 +523,42 @@ static const struct clockgen_chipinfo ch .flags = CG_PLL_8BIT, }, -+ { + { + .compat = "fsl,ls1046a-clockgen", + .init_periph = t2080_init_periph, + .cmux_groups = { @@ -114,10 +111,11 @@ index 80ae2a51..0e7de00a 100644 + }, + .pll_mask = 0x03, + }, - { ++ { .compat = "fsl,ls2080a-clockgen", .cmux_groups = { -@@ -846,7 +916,12 @@ static void __init create_muxes(struct clockgen *cg) + &clockgen2_cmux_cga12, &clockgen2_cmux_cgb +@@ -846,7 +916,12 @@ static void __init create_muxes(struct c static void __init clockgen_init(struct device_node *np); @@ -154,7 +152,7 @@ index 80ae2a51..0e7de00a 100644 0, 1, 1); if (IS_ERR(clk)) pr_err("%s: Couldn't register %s: %ld\n", __func__, name, -@@ -907,6 +977,29 @@ static struct clk *sysclk_from_parent(const char *name) +@@ -907,6 +977,29 @@ static struct clk *sysclk_from_parent(co return clk; } @@ -184,7 +182,7 @@ index 80ae2a51..0e7de00a 100644 static struct clk * __init create_sysclk(const char *name) { struct device_node *sysclk; -@@ -916,7 +1009,11 @@ static struct clk * __init create_sysclk(const char *name) +@@ -916,7 +1009,11 @@ static struct clk * __init create_sysclk if (!IS_ERR(clk)) return clk; @@ -197,7 +195,7 @@ index 80ae2a51..0e7de00a 100644 if (!IS_ERR(clk)) return clk; -@@ -927,7 +1024,27 @@ static struct clk * __init create_sysclk(const char *name) +@@ -927,7 +1024,27 @@ static struct clk * __init create_sysclk return clk; } @@ -226,7 +224,7 @@ index 80ae2a51..0e7de00a 100644 return NULL; } -@@ -950,11 +1067,19 @@ static void __init create_one_pll(struct clockgen *cg, int idx) +@@ -950,11 +1067,19 @@ static void __init create_one_pll(struct u32 __iomem *reg; u32 mult; struct clockgen_pll *pll = &cg->pll[idx]; @@ -246,7 +244,7 @@ index 80ae2a51..0e7de00a 100644 if (cg->info.flags & CG_VER3) { switch (idx) { case PLATFORM_PLL: -@@ -1000,12 +1125,13 @@ static void __init create_one_pll(struct clockgen *cg, int idx) +@@ -1000,12 +1125,13 @@ static void __init create_one_pll(struct for (i = 0; i < ARRAY_SIZE(pll->div); i++) { struct clk *clk; @@ -261,7 +259,7 @@ index 80ae2a51..0e7de00a 100644 if (IS_ERR(clk)) { pr_err("%s: %s: register failed %ld\n", __func__, pll->div[i].name, PTR_ERR(clk)); -@@ -1013,6 +1139,11 @@ static void __init create_one_pll(struct clockgen *cg, int idx) +@@ -1013,6 +1139,11 @@ static void __init create_one_pll(struct } pll->div[i].clk = clk; @@ -273,7 +271,7 @@ index 80ae2a51..0e7de00a 100644 } } -@@ -1142,6 +1273,13 @@ static struct clk *clockgen_clk_get(struct of_phandle_args *clkspec, void *data) +@@ -1142,6 +1273,13 @@ static struct clk *clockgen_clk_get(stru goto bad_args; clk = pll->div[idx].clk; break; @@ -287,7 +285,7 @@ index 80ae2a51..0e7de00a 100644 default: goto bad_args; } -@@ -1253,6 +1391,7 @@ static void __init clockgen_init(struct device_node *np) +@@ -1253,6 +1391,7 @@ static void __init clockgen_init(struct clockgen.info.flags |= CG_CMUX_GE_PLAT; clockgen.sysclk = create_sysclk("cg-sysclk"); @@ -295,7 +293,7 @@ index 80ae2a51..0e7de00a 100644 create_plls(&clockgen); create_muxes(&clockgen); -@@ -1273,8 +1412,11 @@ static void __init clockgen_init(struct device_node *np) +@@ -1273,8 +1412,11 @@ err: CLK_OF_DECLARE(qoriq_clockgen_1, "fsl,qoriq-clockgen-1.0", clockgen_init); CLK_OF_DECLARE(qoriq_clockgen_2, "fsl,qoriq-clockgen-2.0", clockgen_init); @@ -307,6 +305,3 @@ index 80ae2a51..0e7de00a 100644 CLK_OF_DECLARE(qoriq_clockgen_ls2080a, "fsl,ls2080a-clockgen", clockgen_init); /* Legacy nodes */ --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/803-cpufreq-support-layerscape.patch b/target/linux/layerscape/patches-4.9/803-cpufreq-support-layerscape.patch index 9ea5c407dd..2bc0f24f72 100644 --- a/target/linux/layerscape/patches-4.9/803-cpufreq-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/803-cpufreq-support-layerscape.patch @@ -13,8 +13,6 @@ Signed-off-by: Yangbo Lu drivers/firmware/psci.c | 12 ++- 3 files changed, 77 insertions(+), 113 deletions(-) -diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig -index d8b164a7..bc9264c7 100644 --- a/drivers/cpufreq/Kconfig +++ b/drivers/cpufreq/Kconfig @@ -332,7 +332,7 @@ endif @@ -26,8 +24,6 @@ index d8b164a7..bc9264c7 100644 depends on !CPU_THERMAL || THERMAL select CLK_QORIQ help -diff --git a/drivers/cpufreq/qoriq-cpufreq.c b/drivers/cpufreq/qoriq-cpufreq.c -index 53d8c3fb..e2ea433a 100644 --- a/drivers/cpufreq/qoriq-cpufreq.c +++ b/drivers/cpufreq/qoriq-cpufreq.c @@ -11,6 +11,7 @@ @@ -151,7 +147,7 @@ index 53d8c3fb..e2ea433a 100644 if (!cpu_present(cpu)) return NULL; -@@ -112,37 +87,28 @@ static struct device_node *cpu_to_clk_node(int cpu) +@@ -112,37 +87,28 @@ static struct device_node *cpu_to_clk_no if (!np) return NULL; @@ -197,7 +193,7 @@ index 53d8c3fb..e2ea433a 100644 } /* reduce the duplicated frequencies in frequency table */ -@@ -198,10 +164,11 @@ static void freq_table_sort(struct cpufreq_frequency_table *freq_table, +@@ -198,10 +164,11 @@ static void freq_table_sort(struct cpufr static int qoriq_cpufreq_cpu_init(struct cpufreq_policy *policy) { @@ -211,7 +207,7 @@ index 53d8c3fb..e2ea433a 100644 struct cpufreq_frequency_table *table; struct cpu_data *data; unsigned int cpu = policy->cpu; -@@ -221,17 +188,13 @@ static int qoriq_cpufreq_cpu_init(struct cpufreq_policy *policy) +@@ -221,17 +188,13 @@ static int qoriq_cpufreq_cpu_init(struct goto err_nomem2; } @@ -232,7 +228,7 @@ index 53d8c3fb..e2ea433a 100644 } table = kcalloc(count + 1, sizeof(*table), GFP_KERNEL); -@@ -240,23 +203,11 @@ static int qoriq_cpufreq_cpu_init(struct cpufreq_policy *policy) +@@ -240,23 +203,11 @@ static int qoriq_cpufreq_cpu_init(struct goto err_pclk; } @@ -258,7 +254,7 @@ index 53d8c3fb..e2ea433a 100644 table[i].driver_data = i; } freq_table_redup(table, count); -@@ -282,7 +233,6 @@ static int qoriq_cpufreq_cpu_init(struct cpufreq_policy *policy) +@@ -282,7 +233,6 @@ static int qoriq_cpufreq_cpu_init(struct policy->cpuinfo.transition_latency = u64temp + 1; of_node_put(np); @@ -266,7 +262,7 @@ index 53d8c3fb..e2ea433a 100644 return 0; -@@ -290,10 +240,7 @@ static int qoriq_cpufreq_cpu_init(struct cpufreq_policy *policy) +@@ -290,10 +240,7 @@ err_nomem1: kfree(table); err_pclk: kfree(data->pclk); @@ -277,7 +273,7 @@ index 53d8c3fb..e2ea433a 100644 kfree(data); err_np: of_node_put(np); -@@ -357,12 +304,25 @@ static struct cpufreq_driver qoriq_cpufreq_driver = { +@@ -357,12 +304,25 @@ static struct cpufreq_driver qoriq_cpufr .attr = cpufreq_generic_attr, }; @@ -308,7 +304,7 @@ index 53d8c3fb..e2ea433a 100644 { .compatible = "fsl,qoriq-clockgen-2.0", }, {} }; -@@ -380,16 +340,12 @@ static int __init qoriq_cpufreq_init(void) +@@ -380,16 +340,12 @@ static int __init qoriq_cpufreq_init(voi match = of_match_node(node_matches, np); data = match->data; @@ -328,11 +324,9 @@ index 53d8c3fb..e2ea433a 100644 ret = cpufreq_register_driver(&qoriq_cpufreq_driver); if (!ret) pr_info("Freescale QorIQ CPU frequency scaling driver\n"); -diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c -index 8263429e..323c9fc0 100644 --- a/drivers/firmware/psci.c +++ b/drivers/firmware/psci.c -@@ -418,8 +418,12 @@ CPUIDLE_METHOD_OF_DECLARE(psci, "psci", &psci_cpuidle_ops); +@@ -418,8 +418,12 @@ CPUIDLE_METHOD_OF_DECLARE(psci, "psci", static int psci_system_suspend(unsigned long unused) { @@ -347,7 +341,7 @@ index 8263429e..323c9fc0 100644 } static int psci_system_suspend_enter(suspend_state_t state) -@@ -439,6 +443,8 @@ static void __init psci_init_system_suspend(void) +@@ -439,6 +443,8 @@ static void __init psci_init_system_susp if (!IS_ENABLED(CONFIG_SUSPEND)) return; @@ -356,7 +350,7 @@ index 8263429e..323c9fc0 100644 ret = psci_features(PSCI_FN_NATIVE(1_0, SYSTEM_SUSPEND)); if (ret != PSCI_RET_NOT_SUPPORTED) -@@ -516,6 +522,8 @@ static void __init psci_0_2_set_functions(void) +@@ -516,6 +522,8 @@ static void __init psci_0_2_set_function arm_pm_restart = psci_sys_reset; pm_power_off = psci_sys_poweroff; @@ -365,6 +359,3 @@ index 8263429e..323c9fc0 100644 } /* --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/804-crypto-support-layerscape.patch b/target/linux/layerscape/patches-4.9/804-crypto-support-layerscape.patch index 4340247d6e..79103a273b 100644 --- a/target/linux/layerscape/patches-4.9/804-crypto-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/804-crypto-support-layerscape.patch @@ -103,8 +103,6 @@ Signed-off-by: Yangbo Lu create mode 100644 include/crypto/internal/acompress.h create mode 100644 include/crypto/internal/scompress.h -diff --git a/crypto/Kconfig b/crypto/Kconfig -index 17be110a..00e145e2 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig @@ -102,6 +102,15 @@ config CRYPTO_KPP @@ -158,8 +156,6 @@ index 17be110a..00e145e2 100644 comment "Block modes" config CRYPTO_CBC -diff --git a/crypto/Makefile b/crypto/Makefile -index 9e52b3c5..936d2b73 100644 --- a/crypto/Makefile +++ b/crypto/Makefile @@ -51,6 +51,9 @@ rsa_generic-y += rsa_helper.o @@ -172,7 +168,7 @@ index 9e52b3c5..936d2b73 100644 cryptomgr-y := algboss.o testmgr.o obj-$(CONFIG_CRYPTO_MANAGER2) += cryptomgr.o -@@ -115,6 +118,7 @@ obj-$(CONFIG_CRYPTO_CRC32C) += crc32c_generic.o +@@ -115,6 +118,7 @@ obj-$(CONFIG_CRYPTO_CRC32C) += crc32c_ge obj-$(CONFIG_CRYPTO_CRC32) += crc32_generic.o obj-$(CONFIG_CRYPTO_CRCT10DIF) += crct10dif_common.o crct10dif_generic.o obj-$(CONFIG_CRYPTO_AUTHENC) += authenc.o authencesn.o @@ -180,9 +176,6 @@ index 9e52b3c5..936d2b73 100644 obj-$(CONFIG_CRYPTO_LZO) += lzo.o obj-$(CONFIG_CRYPTO_LZ4) += lz4.o obj-$(CONFIG_CRYPTO_LZ4HC) += lz4hc.o -diff --git a/crypto/acompress.c b/crypto/acompress.c -new file mode 100644 -index 00000000..887783d8 --- /dev/null +++ b/crypto/acompress.c @@ -0,0 +1,169 @@ @@ -355,11 +348,9 @@ index 00000000..887783d8 + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("Asynchronous compression type"); -diff --git a/crypto/algboss.c b/crypto/algboss.c -index 4bde25d6..ccb85e17 100644 --- a/crypto/algboss.c +++ b/crypto/algboss.c -@@ -247,17 +247,9 @@ static int cryptomgr_schedule_test(struct crypto_alg *alg) +@@ -247,17 +247,9 @@ static int cryptomgr_schedule_test(struc memcpy(param->alg, alg->cra_name, sizeof(param->alg)); type = alg->cra_flags; @@ -379,11 +370,9 @@ index 4bde25d6..ccb85e17 100644 param->type = type; -diff --git a/crypto/crypto_user.c b/crypto/crypto_user.c -index 1c570548..a90404a0 100644 --- a/crypto/crypto_user.c +++ b/crypto/crypto_user.c -@@ -112,6 +112,21 @@ static int crypto_report_comp(struct sk_buff *skb, struct crypto_alg *alg) +@@ -112,6 +112,21 @@ nla_put_failure: return -EMSGSIZE; } @@ -405,7 +394,7 @@ index 1c570548..a90404a0 100644 static int crypto_report_akcipher(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_akcipher rakcipher; -@@ -186,7 +201,11 @@ static int crypto_report_one(struct crypto_alg *alg, +@@ -186,7 +201,11 @@ static int crypto_report_one(struct cryp goto nla_put_failure; break; @@ -417,9 +406,6 @@ index 1c570548..a90404a0 100644 case CRYPTO_ALG_TYPE_AKCIPHER: if (crypto_report_akcipher(skb, alg)) goto nla_put_failure; -diff --git a/crypto/scompress.c b/crypto/scompress.c -new file mode 100644 -index 00000000..35e396d1 --- /dev/null +++ b/crypto/scompress.c @@ -0,0 +1,356 @@ @@ -779,8 +765,6 @@ index 00000000..35e396d1 + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("Synchronous compression type"); -diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c -index ae22f05d..bbb35eed 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -74,7 +74,7 @@ static char *check[] = { @@ -792,7 +776,7 @@ index ae22f05d..bbb35eed 100644 }; struct tcrypt_result { -@@ -1329,6 +1329,10 @@ static int do_test(const char *alg, u32 type, u32 mask, int m) +@@ -1329,6 +1329,10 @@ static int do_test(const char *alg, u32 ret += tcrypt_test("hmac(sha3-512)"); break; @@ -803,7 +787,7 @@ index ae22f05d..bbb35eed 100644 case 150: ret += tcrypt_test("ansi_cprng"); break; -@@ -1390,6 +1394,9 @@ static int do_test(const char *alg, u32 type, u32 mask, int m) +@@ -1390,6 +1394,9 @@ static int do_test(const char *alg, u32 case 190: ret += tcrypt_test("authenc(hmac(sha512),cbc(des3_ede))"); break; @@ -813,7 +797,7 @@ index ae22f05d..bbb35eed 100644 case 200: test_cipher_speed("ecb(aes)", ENCRYPT, sec, NULL, 0, speed_template_16_24_32); -@@ -1404,9 +1411,9 @@ static int do_test(const char *alg, u32 type, u32 mask, int m) +@@ -1404,9 +1411,9 @@ static int do_test(const char *alg, u32 test_cipher_speed("lrw(aes)", DECRYPT, sec, NULL, 0, speed_template_32_40_48); test_cipher_speed("xts(aes)", ENCRYPT, sec, NULL, 0, @@ -825,7 +809,7 @@ index ae22f05d..bbb35eed 100644 test_cipher_speed("cts(cbc(aes))", ENCRYPT, sec, NULL, 0, speed_template_16_24_32); test_cipher_speed("cts(cbc(aes))", DECRYPT, sec, NULL, 0, -@@ -1837,9 +1844,9 @@ static int do_test(const char *alg, u32 type, u32 mask, int m) +@@ -1837,9 +1844,9 @@ static int do_test(const char *alg, u32 test_acipher_speed("lrw(aes)", DECRYPT, sec, NULL, 0, speed_template_32_40_48); test_acipher_speed("xts(aes)", ENCRYPT, sec, NULL, 0, @@ -837,8 +821,6 @@ index ae22f05d..bbb35eed 100644 test_acipher_speed("cts(cbc(aes))", ENCRYPT, sec, NULL, 0, speed_template_16_24_32); test_acipher_speed("cts(cbc(aes))", DECRYPT, sec, NULL, 0, -diff --git a/crypto/testmgr.c b/crypto/testmgr.c -index 62dffa00..73d91fba 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c @@ -33,6 +33,7 @@ @@ -849,7 +831,7 @@ index 62dffa00..73d91fba 100644 #include "internal.h" -@@ -62,7 +63,7 @@ int alg_test(const char *driver, const char *alg, u32 type, u32 mask) +@@ -62,7 +63,7 @@ int alg_test(const char *driver, const c */ #define IDX1 32 #define IDX2 32400 @@ -937,7 +919,7 @@ index 62dffa00..73d91fba 100644 static void hexdump(unsigned char *buf, unsigned int len) { -@@ -202,7 +212,7 @@ static int wait_async_op(struct tcrypt_result *tr, int ret) +@@ -202,7 +212,7 @@ static int wait_async_op(struct tcrypt_r } static int ahash_partial_update(struct ahash_request **preq, @@ -946,7 +928,7 @@ index 62dffa00..73d91fba 100644 void *hash_buff, int k, int temp, struct scatterlist *sg, const char *algo, char *result, struct tcrypt_result *tresult) { -@@ -259,11 +269,12 @@ static int ahash_partial_update(struct ahash_request **preq, +@@ -259,11 +269,12 @@ out_nostate: return ret; } @@ -962,7 +944,7 @@ index 62dffa00..73d91fba 100644 unsigned int i, j, k, temp; struct scatterlist sg[8]; char *result; -@@ -274,7 +285,7 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template, +@@ -274,7 +285,7 @@ static int __test_hash(struct crypto_aha char *xbuf[XBUFSIZE]; int ret = -ENOMEM; @@ -971,7 +953,7 @@ index 62dffa00..73d91fba 100644 if (!result) return ret; key = kmalloc(MAX_KEYLEN, GFP_KERNEL); -@@ -304,7 +315,7 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template, +@@ -304,7 +315,7 @@ static int __test_hash(struct crypto_aha goto out; j++; @@ -980,7 +962,7 @@ index 62dffa00..73d91fba 100644 hash_buff = xbuf[0]; hash_buff += align_offset; -@@ -379,7 +390,7 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template, +@@ -379,7 +390,7 @@ static int __test_hash(struct crypto_aha continue; j++; @@ -989,7 +971,7 @@ index 62dffa00..73d91fba 100644 temp = 0; sg_init_table(sg, template[i].np); -@@ -457,7 +468,7 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template, +@@ -457,7 +468,7 @@ static int __test_hash(struct crypto_aha continue; j++; @@ -998,7 +980,7 @@ index 62dffa00..73d91fba 100644 ret = -EINVAL; hash_buff = xbuf[0]; -@@ -536,7 +547,8 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template, +@@ -536,7 +547,8 @@ out_nobuf: return ret; } @@ -1008,7 +990,7 @@ index 62dffa00..73d91fba 100644 unsigned int tcount, bool use_digest) { unsigned int alignmask; -@@ -564,7 +576,7 @@ static int test_hash(struct crypto_ahash *tfm, struct hash_testvec *template, +@@ -564,7 +576,7 @@ static int test_hash(struct crypto_ahash } static int __test_aead(struct crypto_aead *tfm, int enc, @@ -1017,7 +999,7 @@ index 62dffa00..73d91fba 100644 const bool diff_dst, const int align_offset) { const char *algo = crypto_tfm_alg_driver_name(crypto_aead_tfm(tfm)); -@@ -955,7 +967,7 @@ static int __test_aead(struct crypto_aead *tfm, int enc, +@@ -955,7 +967,7 @@ out_noxbuf: } static int test_aead(struct crypto_aead *tfm, int enc, @@ -1026,7 +1008,7 @@ index 62dffa00..73d91fba 100644 { unsigned int alignmask; int ret; -@@ -987,8 +999,236 @@ static int test_aead(struct crypto_aead *tfm, int enc, +@@ -987,8 +999,236 @@ static int test_aead(struct crypto_aead return 0; } @@ -1264,7 +1246,7 @@ index 62dffa00..73d91fba 100644 { const char *algo = crypto_tfm_alg_driver_name(crypto_cipher_tfm(tfm)); unsigned int i, j, k; -@@ -1066,7 +1306,8 @@ static int test_cipher(struct crypto_cipher *tfm, int enc, +@@ -1066,7 +1306,8 @@ out_nobuf: } static int __test_skcipher(struct crypto_skcipher *tfm, int enc, @@ -1274,7 +1256,7 @@ index 62dffa00..73d91fba 100644 const bool diff_dst, const int align_offset) { const char *algo = -@@ -1330,7 +1571,8 @@ static int __test_skcipher(struct crypto_skcipher *tfm, int enc, +@@ -1330,7 +1571,8 @@ out_nobuf: } static int test_skcipher(struct crypto_skcipher *tfm, int enc, @@ -1284,7 +1266,7 @@ index 62dffa00..73d91fba 100644 { unsigned int alignmask; int ret; -@@ -1362,8 +1604,10 @@ static int test_skcipher(struct crypto_skcipher *tfm, int enc, +@@ -1362,8 +1604,10 @@ static int test_skcipher(struct crypto_s return 0; } @@ -1297,7 +1279,7 @@ index 62dffa00..73d91fba 100644 { const char *algo = crypto_tfm_alg_driver_name(crypto_comp_tfm(tfm)); unsigned int i; -@@ -1442,7 +1686,154 @@ static int test_comp(struct crypto_comp *tfm, struct comp_testvec *ctemplate, +@@ -1442,7 +1686,154 @@ out: return ret; } @@ -1453,7 +1435,7 @@ index 62dffa00..73d91fba 100644 unsigned int tcount) { const char *algo = crypto_tfm_alg_driver_name(crypto_rng_tfm(tfm)); -@@ -1509,7 +1900,7 @@ static int alg_test_aead(const struct alg_test_desc *desc, const char *driver, +@@ -1509,7 +1900,7 @@ static int alg_test_aead(const struct al struct crypto_aead *tfm; int err = 0; @@ -1462,7 +1444,7 @@ index 62dffa00..73d91fba 100644 if (IS_ERR(tfm)) { printk(KERN_ERR "alg: aead: Failed to load transform for %s: " "%ld\n", driver, PTR_ERR(tfm)); -@@ -1538,7 +1929,7 @@ static int alg_test_cipher(const struct alg_test_desc *desc, +@@ -1538,7 +1929,7 @@ static int alg_test_cipher(const struct struct crypto_cipher *tfm; int err = 0; @@ -1471,7 +1453,7 @@ index 62dffa00..73d91fba 100644 if (IS_ERR(tfm)) { printk(KERN_ERR "alg: cipher: Failed to load transform for " "%s: %ld\n", driver, PTR_ERR(tfm)); -@@ -1567,7 +1958,7 @@ static int alg_test_skcipher(const struct alg_test_desc *desc, +@@ -1567,7 +1958,7 @@ static int alg_test_skcipher(const struc struct crypto_skcipher *tfm; int err = 0; @@ -1480,7 +1462,7 @@ index 62dffa00..73d91fba 100644 if (IS_ERR(tfm)) { printk(KERN_ERR "alg: skcipher: Failed to load transform for " "%s: %ld\n", driver, PTR_ERR(tfm)); -@@ -1593,22 +1984,38 @@ static int alg_test_skcipher(const struct alg_test_desc *desc, +@@ -1593,22 +1984,38 @@ out: static int alg_test_comp(const struct alg_test_desc *desc, const char *driver, u32 type, u32 mask) { @@ -1489,7 +1471,13 @@ index 62dffa00..73d91fba 100644 + struct crypto_acomp *acomp; int err; + u32 algo_type = type & CRYPTO_ALG_TYPE_ACOMPRESS_MASK; -+ + +- tfm = crypto_alloc_comp(driver, type, mask); +- if (IS_ERR(tfm)) { +- printk(KERN_ERR "alg: comp: Failed to load transform for %s: " +- "%ld\n", driver, PTR_ERR(tfm)); +- return PTR_ERR(tfm); +- } + if (algo_type == CRYPTO_ALG_TYPE_ACOMPRESS) { + acomp = crypto_alloc_acomp(driver, type, mask); + if (IS_ERR(acomp)) { @@ -1510,13 +1498,6 @@ index 62dffa00..73d91fba 100644 + return PTR_ERR(comp); + } -- tfm = crypto_alloc_comp(driver, type, mask); -- if (IS_ERR(tfm)) { -- printk(KERN_ERR "alg: comp: Failed to load transform for %s: " -- "%ld\n", driver, PTR_ERR(tfm)); -- return PTR_ERR(tfm); -- } -- - err = test_comp(tfm, desc->suite.comp.comp.vecs, - desc->suite.comp.decomp.vecs, - desc->suite.comp.comp.count, @@ -1532,7 +1513,7 @@ index 62dffa00..73d91fba 100644 return err; } -@@ -1618,7 +2025,7 @@ static int alg_test_hash(const struct alg_test_desc *desc, const char *driver, +@@ -1618,7 +2025,7 @@ static int alg_test_hash(const struct al struct crypto_ahash *tfm; int err; @@ -1541,7 +1522,7 @@ index 62dffa00..73d91fba 100644 if (IS_ERR(tfm)) { printk(KERN_ERR "alg: hash: Failed to load transform for %s: " "%ld\n", driver, PTR_ERR(tfm)); -@@ -1646,7 +2053,7 @@ static int alg_test_crc32c(const struct alg_test_desc *desc, +@@ -1646,7 +2053,7 @@ static int alg_test_crc32c(const struct if (err) goto out; @@ -1550,7 +1531,7 @@ index 62dffa00..73d91fba 100644 if (IS_ERR(tfm)) { printk(KERN_ERR "alg: crc32c: Failed to load transform for %s: " "%ld\n", driver, PTR_ERR(tfm)); -@@ -1688,7 +2095,7 @@ static int alg_test_cprng(const struct alg_test_desc *desc, const char *driver, +@@ -1688,7 +2095,7 @@ static int alg_test_cprng(const struct a struct crypto_rng *rng; int err; @@ -1559,7 +1540,7 @@ index 62dffa00..73d91fba 100644 if (IS_ERR(rng)) { printk(KERN_ERR "alg: cprng: Failed to load transform for %s: " "%ld\n", driver, PTR_ERR(rng)); -@@ -1703,7 +2110,7 @@ static int alg_test_cprng(const struct alg_test_desc *desc, const char *driver, +@@ -1703,7 +2110,7 @@ static int alg_test_cprng(const struct a } @@ -1568,7 +1549,7 @@ index 62dffa00..73d91fba 100644 const char *driver, u32 type, u32 mask) { int ret = -EAGAIN; -@@ -1715,7 +2122,7 @@ static int drbg_cavs_test(struct drbg_testvec *test, int pr, +@@ -1715,7 +2122,7 @@ static int drbg_cavs_test(struct drbg_te if (!buf) return -ENOMEM; @@ -1577,7 +1558,7 @@ index 62dffa00..73d91fba 100644 if (IS_ERR(drng)) { printk(KERN_ERR "alg: drbg: could not allocate DRNG handle for " "%s\n", driver); -@@ -1777,7 +2184,7 @@ static int alg_test_drbg(const struct alg_test_desc *desc, const char *driver, +@@ -1777,7 +2184,7 @@ static int alg_test_drbg(const struct al int err = 0; int pr = 0; int i = 0; @@ -1586,7 +1567,7 @@ index 62dffa00..73d91fba 100644 unsigned int tcount = desc->suite.drbg.count; if (0 == memcmp(driver, "drbg_pr_", 8)) -@@ -1796,7 +2203,7 @@ static int alg_test_drbg(const struct alg_test_desc *desc, const char *driver, +@@ -1796,7 +2203,7 @@ static int alg_test_drbg(const struct al } @@ -1595,7 +1576,7 @@ index 62dffa00..73d91fba 100644 const char *alg) { struct kpp_request *req; -@@ -1888,7 +2295,7 @@ static int do_test_kpp(struct crypto_kpp *tfm, struct kpp_testvec *vec, +@@ -1888,7 +2295,7 @@ free_req: } static int test_kpp(struct crypto_kpp *tfm, const char *alg, @@ -1604,7 +1585,7 @@ index 62dffa00..73d91fba 100644 { int ret, i; -@@ -1909,7 +2316,7 @@ static int alg_test_kpp(const struct alg_test_desc *desc, const char *driver, +@@ -1909,7 +2316,7 @@ static int alg_test_kpp(const struct alg struct crypto_kpp *tfm; int err = 0; @@ -1613,7 +1594,7 @@ index 62dffa00..73d91fba 100644 if (IS_ERR(tfm)) { pr_err("alg: kpp: Failed to load tfm for %s: %ld\n", driver, PTR_ERR(tfm)); -@@ -1924,7 +2331,7 @@ static int alg_test_kpp(const struct alg_test_desc *desc, const char *driver, +@@ -1924,7 +2331,7 @@ static int alg_test_kpp(const struct alg } static int test_akcipher_one(struct crypto_akcipher *tfm, @@ -1622,7 +1603,7 @@ index 62dffa00..73d91fba 100644 { char *xbuf[XBUFSIZE]; struct akcipher_request *req; -@@ -2044,7 +2451,8 @@ static int test_akcipher_one(struct crypto_akcipher *tfm, +@@ -2044,7 +2451,8 @@ free_xbuf: } static int test_akcipher(struct crypto_akcipher *tfm, const char *alg, @@ -1632,7 +1613,7 @@ index 62dffa00..73d91fba 100644 { const char *algo = crypto_tfm_alg_driver_name(crypto_akcipher_tfm(tfm)); -@@ -2068,7 +2476,7 @@ static int alg_test_akcipher(const struct alg_test_desc *desc, +@@ -2068,7 +2476,7 @@ static int alg_test_akcipher(const struc struct crypto_akcipher *tfm; int err = 0; @@ -1641,7 +1622,7 @@ index 62dffa00..73d91fba 100644 if (IS_ERR(tfm)) { pr_err("alg: akcipher: Failed to load tfm for %s: %ld\n", driver, PTR_ERR(tfm)); -@@ -2088,112 +2496,23 @@ static int alg_test_null(const struct alg_test_desc *desc, +@@ -2088,112 +2496,23 @@ static int alg_test_null(const struct al return 0; } @@ -1759,7 +1740,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2201,12 +2520,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2201,12 +2520,7 @@ static const struct alg_test_desc alg_te .test = alg_test_aead, .suite = { .aead = { @@ -1773,7 +1754,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2214,12 +2528,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2214,12 +2528,7 @@ static const struct alg_test_desc alg_te .test = alg_test_aead, .suite = { .aead = { @@ -1787,7 +1768,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2228,12 +2537,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2228,12 +2537,7 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .aead = { @@ -1801,7 +1782,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2245,18 +2549,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2245,18 +2549,8 @@ static const struct alg_test_desc alg_te .test = alg_test_aead, .suite = { .aead = { @@ -1822,7 +1803,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2268,12 +2562,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2268,12 +2562,7 @@ static const struct alg_test_desc alg_te .test = alg_test_aead, .suite = { .aead = { @@ -1836,7 +1817,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2282,12 +2571,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2282,12 +2571,7 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .aead = { @@ -1850,7 +1831,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2296,12 +2580,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2296,12 +2580,7 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .aead = { @@ -1864,7 +1845,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2309,12 +2588,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2309,12 +2588,7 @@ static const struct alg_test_desc alg_te .test = alg_test_aead, .suite = { .aead = { @@ -1878,7 +1859,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2323,12 +2597,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2323,12 +2597,7 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .aead = { @@ -1892,7 +1873,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2344,12 +2613,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2344,12 +2613,7 @@ static const struct alg_test_desc alg_te .test = alg_test_aead, .suite = { .aead = { @@ -1906,7 +1887,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2358,12 +2622,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2358,12 +2622,7 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .aead = { @@ -1920,7 +1901,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2380,12 +2639,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2380,12 +2639,7 @@ static const struct alg_test_desc alg_te .test = alg_test_aead, .suite = { .aead = { @@ -1934,7 +1915,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2393,12 +2647,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2393,12 +2647,7 @@ static const struct alg_test_desc alg_te .test = alg_test_aead, .suite = { .aead = { @@ -1948,7 +1929,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2407,12 +2656,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2407,12 +2656,7 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .aead = { @@ -1962,7 +1943,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2429,14 +2673,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2429,14 +2673,8 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .cipher = { @@ -1979,7 +1960,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2444,14 +2682,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2444,14 +2682,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -1996,7 +1977,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2459,14 +2691,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2459,14 +2691,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2013,7 +1994,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2474,14 +2700,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2474,14 +2700,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2030,7 +2011,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2489,14 +2709,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2489,14 +2709,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2047,7 +2028,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2504,14 +2718,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2504,14 +2718,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2064,7 +2045,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2519,14 +2727,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2519,14 +2727,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2081,7 +2062,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2535,14 +2737,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2535,14 +2737,8 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .cipher = { @@ -2098,7 +2079,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2550,14 +2746,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2550,14 +2746,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2115,7 +2096,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2565,30 +2755,25 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2565,30 +2755,25 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2131,14 +2112,14 @@ index 62dffa00..73d91fba 100644 + .dec = __VECS(tf_cbc_dec_tv_template) } } -+ }, { + }, { + .alg = "cbcmac(aes)", + .fips_allowed = 1, + .test = alg_test_hash, + .suite = { + .hash = __VECS(aes_cbcmac_tv_template) + } - }, { ++ }, { .alg = "ccm(aes)", .test = alg_test_aead, .fips_allowed = 1, @@ -2157,7 +2138,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2596,14 +2781,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2596,14 +2781,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2174,7 +2155,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2611,20 +2790,14 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2611,20 +2790,14 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .test = alg_test_hash, .suite = { @@ -2197,7 +2178,7 @@ index 62dffa00..73d91fba 100644 } }, { .alg = "compress_null", -@@ -2633,94 +2806,30 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2633,94 +2806,30 @@ static const struct alg_test_desc alg_te .alg = "crc32", .test = alg_test_hash, .suite = { @@ -2229,7 +2210,7 @@ index 62dffa00..73d91fba 100644 - } + .hash = __VECS(crct10dif_tv_template) } -- }, { + }, { - .alg = "cryptd(__driver-cbc-aes-aesni)", - .test = alg_test_null, - .fips_allowed = 1, @@ -2278,7 +2259,7 @@ index 62dffa00..73d91fba 100644 - .alg = "cryptd(__ghash-pclmulqdqni)", - .test = alg_test_null, - .fips_allowed = 1, - }, { +- }, { .alg = "ctr(aes)", .test = alg_test_skcipher, .fips_allowed = 1, @@ -2297,7 +2278,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2728,14 +2837,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2728,14 +2837,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2314,7 +2295,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2743,14 +2846,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2743,14 +2846,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2331,7 +2312,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2758,14 +2855,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2758,14 +2855,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2348,7 +2329,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2773,14 +2864,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2773,14 +2864,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2365,7 +2346,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2788,29 +2873,18 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2788,29 +2873,18 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2400,7 +2381,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2818,14 +2892,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2818,14 +2892,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2417,7 +2398,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2833,14 +2901,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2833,14 +2901,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2434,7 +2415,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2848,14 +2910,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2848,14 +2910,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2451,7 +2432,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2864,14 +2920,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2864,14 +2920,8 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .comp = { @@ -2468,7 +2449,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2879,10 +2929,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2879,10 +2929,7 @@ static const struct alg_test_desc alg_te .test = alg_test_kpp, .fips_allowed = 1, .suite = { @@ -2480,7 +2461,7 @@ index 62dffa00..73d91fba 100644 } }, { .alg = "digest_null", -@@ -2892,30 +2939,21 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2892,30 +2939,21 @@ static const struct alg_test_desc alg_te .test = alg_test_drbg, .fips_allowed = 1, .suite = { @@ -2514,7 +2495,7 @@ index 62dffa00..73d91fba 100644 } }, { /* -@@ -2930,11 +2968,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2930,11 +2968,7 @@ static const struct alg_test_desc alg_te .test = alg_test_drbg, .fips_allowed = 1, .suite = { @@ -2527,7 +2508,7 @@ index 62dffa00..73d91fba 100644 } }, { /* covered by drbg_nopr_hmac_sha256 test */ -@@ -2954,10 +2988,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2954,10 +2988,7 @@ static const struct alg_test_desc alg_te .test = alg_test_drbg, .fips_allowed = 1, .suite = { @@ -2539,7 +2520,7 @@ index 62dffa00..73d91fba 100644 } }, { /* covered by drbg_nopr_sha256 test */ -@@ -2973,10 +3004,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2973,10 +3004,7 @@ static const struct alg_test_desc alg_te .test = alg_test_drbg, .fips_allowed = 1, .suite = { @@ -2551,7 +2532,7 @@ index 62dffa00..73d91fba 100644 } }, { /* covered by drbg_pr_ctr_aes128 test */ -@@ -2996,10 +3024,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2996,10 +3024,7 @@ static const struct alg_test_desc alg_te .test = alg_test_drbg, .fips_allowed = 1, .suite = { @@ -2563,7 +2544,7 @@ index 62dffa00..73d91fba 100644 } }, { /* covered by drbg_pr_hmac_sha256 test */ -@@ -3019,10 +3044,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3019,10 +3044,7 @@ static const struct alg_test_desc alg_te .test = alg_test_drbg, .fips_allowed = 1, .suite = { @@ -2575,15 +2556,14 @@ index 62dffa00..73d91fba 100644 } }, { /* covered by drbg_pr_sha256 test */ -@@ -3033,24 +3055,14 @@ static const struct alg_test_desc alg_test_descs[] = { - .alg = "drbg_pr_sha512", +@@ -3034,23 +3056,13 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .test = alg_test_null, -- }, { + }, { - .alg = "ecb(__aes-aesni)", - .test = alg_test_null, - .fips_allowed = 1, - }, { +- }, { .alg = "ecb(aes)", .test = alg_test_skcipher, .fips_allowed = 1, @@ -2602,7 +2582,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3058,14 +3070,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3058,14 +3070,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2619,7 +2599,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3073,14 +3079,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3073,14 +3079,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2636,7 +2616,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3088,14 +3088,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3088,14 +3088,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2653,7 +2633,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3103,14 +3097,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3103,14 +3097,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2670,7 +2650,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3118,14 +3106,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3118,14 +3106,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2687,7 +2667,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3133,14 +3115,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3133,14 +3115,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2704,7 +2684,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3151,14 +3127,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3151,14 +3127,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2721,7 +2701,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3167,14 +3137,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3167,14 +3137,8 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .cipher = { @@ -2738,7 +2718,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3197,14 +3161,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3197,14 +3161,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2755,7 +2735,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3212,14 +3170,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3212,14 +3170,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2772,7 +2752,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3227,14 +3179,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3227,14 +3179,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2789,7 +2769,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3242,14 +3188,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3242,14 +3188,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2806,7 +2786,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3257,14 +3197,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3257,14 +3197,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2823,7 +2803,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3272,14 +3206,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3272,14 +3206,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2840,7 +2820,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3287,14 +3215,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3287,14 +3215,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2857,7 +2837,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3302,14 +3224,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3302,14 +3224,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2874,7 +2854,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3317,10 +3233,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3317,10 +3233,7 @@ static const struct alg_test_desc alg_te .test = alg_test_kpp, .fips_allowed = 1, .suite = { @@ -2886,7 +2866,7 @@ index 62dffa00..73d91fba 100644 } }, { .alg = "gcm(aes)", -@@ -3328,14 +3241,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3328,14 +3241,8 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .aead = { @@ -2903,7 +2883,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3343,136 +3250,94 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3343,136 +3250,94 @@ static const struct alg_test_desc alg_te .test = alg_test_hash, .fips_allowed = 1, .suite = { @@ -3054,7 +3034,7 @@ index 62dffa00..73d91fba 100644 } }, { .alg = "jitterentropy_rng", -@@ -3484,14 +3349,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3484,14 +3349,8 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .cipher = { @@ -3071,7 +3051,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3499,14 +3358,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3499,14 +3358,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -3088,7 +3068,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3514,14 +3367,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3514,14 +3367,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -3105,7 +3085,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3529,14 +3376,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3529,14 +3376,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -3122,7 +3102,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3544,14 +3385,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3544,14 +3385,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -3139,7 +3119,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3559,14 +3394,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3559,14 +3394,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -3156,7 +3136,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3575,14 +3404,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3575,14 +3404,8 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .comp = { @@ -3173,7 +3153,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3591,14 +3414,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3591,14 +3414,8 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .comp = { @@ -3190,7 +3170,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3607,42 +3424,27 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3607,42 +3424,27 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .comp = { @@ -3238,7 +3218,7 @@ index 62dffa00..73d91fba 100644 } }, { .alg = "ofb(aes)", -@@ -3650,14 +3452,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3650,14 +3452,8 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .cipher = { @@ -3255,7 +3235,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3665,24 +3461,15 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3665,24 +3461,15 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -3283,7 +3263,7 @@ index 62dffa00..73d91fba 100644 } }, { .alg = "rfc3686(ctr(aes))", -@@ -3690,14 +3477,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3690,14 +3477,8 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .cipher = { @@ -3300,7 +3280,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3706,14 +3487,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3706,14 +3487,8 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .aead = { @@ -3317,7 +3297,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3722,14 +3497,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3722,14 +3497,8 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .aead = { @@ -3334,7 +3314,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3737,14 +3506,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3737,14 +3506,8 @@ static const struct alg_test_desc alg_te .test = alg_test_aead, .suite = { .aead = { @@ -3351,7 +3331,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3752,14 +3515,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3752,14 +3515,8 @@ static const struct alg_test_desc alg_te .test = alg_test_aead, .suite = { .aead = { @@ -3368,7 +3348,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3767,71 +3524,47 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3767,71 +3524,47 @@ static const struct alg_test_desc alg_te .test = alg_test_aead, .suite = { .aead = { @@ -3448,7 +3428,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3839,162 +3572,120 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3839,162 +3572,120 @@ static const struct alg_test_desc alg_te .test = alg_test_hash, .fips_allowed = 1, .suite = { @@ -3636,7 +3616,7 @@ index 62dffa00..73d91fba 100644 } }, { .alg = "xts(aes)", -@@ -4002,14 +3693,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -4002,14 +3693,8 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .cipher = { @@ -3653,7 +3633,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -4017,14 +3702,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -4017,14 +3702,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -3670,7 +3650,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -4032,14 +3711,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -4032,14 +3711,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -3687,7 +3667,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -4047,14 +3720,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -4047,14 +3720,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -3704,7 +3684,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -4062,14 +3729,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -4062,14 +3729,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -3721,8 +3701,6 @@ index 62dffa00..73d91fba 100644 } } } -diff --git a/crypto/testmgr.h b/crypto/testmgr.h -index 9033088c..ce9f4334 100644 --- a/crypto/testmgr.h +++ b/crypto/testmgr.h @@ -34,9 +34,9 @@ @@ -3892,12 +3870,10 @@ index 9033088c..ce9f4334 100644 +#ifdef __LITTLE_ENDIAN + .key = "\x08\x00" /* rta length */ + "\x01\x00" /* rta type */ - #else --#define RSA_TEST_VECTORS 5 ++#else + .key = "\x00\x08" /* rta length */ + "\x00\x01" /* rta type */ - #endif --static struct akcipher_testvec rsa_tv_template[] = { ++#endif + "\x00\x00\x00\x10" /* enc key length */ + "authenticationkey20benckeyis16_bytes", + .klen = 8 + 20 + 16, @@ -3995,10 +3971,12 @@ index 9033088c..ce9f4334 100644 +#ifdef __LITTLE_ENDIAN + .key = "\x08\x00" /* rta length */ + "\x01\x00" /* rta type */ -+#else + #else +-#define RSA_TEST_VECTORS 5 + .key = "\x00\x08" /* rta length */ + "\x00\x01" /* rta type */ -+#endif + #endif +-static struct akcipher_testvec rsa_tv_template[] = { + "\x00\x00\x00\x10" /* enc key length */ + "authenticationkey20benckeyis16_bytes", + .klen = 8 + 20 + 16, @@ -4074,7 +4052,7 @@ index 9033088c..ce9f4334 100644 { #ifndef CONFIG_CRYPTO_FIPS .key = -@@ -340,6 +554,7 @@ static struct akcipher_testvec rsa_tv_template[] = { +@@ -340,6 +554,7 @@ static struct akcipher_testvec rsa_tv_te .m_size = 8, .c_size = 256, .public_key_vec = true, @@ -4082,7 +4060,7 @@ index 9033088c..ce9f4334 100644 }, { .key = "\x30\x82\x09\x29" /* sequence of 2345 bytes */ -@@ -538,12 +753,11 @@ static struct akcipher_testvec rsa_tv_template[] = { +@@ -538,12 +753,11 @@ static struct akcipher_testvec rsa_tv_te .key_len = 2349, .m_size = 8, .c_size = 512, @@ -4111,7 +4089,7 @@ index 9033088c..ce9f4334 100644 { #ifndef CONFIG_CRYPTO_FIPS .secret = -@@ -856,9 +1065,7 @@ struct kpp_testvec ecdh_tv_template[] = { +@@ -856,9 +1065,7 @@ struct kpp_testvec ecdh_tv_template[] = /* * MD4 test vectors from RFC1320 */ @@ -4122,7 +4100,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .digest = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31" -@@ -899,8 +1106,7 @@ static struct hash_testvec md4_tv_template [] = { +@@ -899,8 +1106,7 @@ static struct hash_testvec md4_tv_templa }, }; @@ -4132,7 +4110,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .digest = "\x6b\x4e\x03\x42\x36\x67\xdb\xb7" -@@ -925,8 +1131,7 @@ static struct hash_testvec sha3_224_tv_template[] = { +@@ -925,8 +1131,7 @@ static struct hash_testvec sha3_224_tv_t }, }; @@ -4142,7 +4120,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .digest = "\xa7\xff\xc6\xf8\xbf\x1e\xd7\x66" -@@ -952,8 +1157,7 @@ static struct hash_testvec sha3_256_tv_template[] = { +@@ -952,8 +1157,7 @@ static struct hash_testvec sha3_256_tv_t }; @@ -4152,7 +4130,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .digest = "\x0c\x63\xa7\x5b\x84\x5e\x4f\x7d" -@@ -985,8 +1189,7 @@ static struct hash_testvec sha3_384_tv_template[] = { +@@ -985,8 +1189,7 @@ static struct hash_testvec sha3_384_tv_t }; @@ -4162,7 +4140,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .digest = "\xa6\x9f\x73\xcc\xa2\x3a\x9a\xc5" -@@ -1027,9 +1230,7 @@ static struct hash_testvec sha3_512_tv_template[] = { +@@ -1027,9 +1230,7 @@ static struct hash_testvec sha3_512_tv_t /* * MD5 test vectors from RFC1321 */ @@ -4173,7 +4151,7 @@ index 9033088c..ce9f4334 100644 { .digest = "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04" "\xe9\x80\x09\x98\xec\xf8\x42\x7e", -@@ -1073,9 +1274,7 @@ static struct hash_testvec md5_tv_template[] = { +@@ -1073,9 +1274,7 @@ static struct hash_testvec md5_tv_templa /* * RIPEMD-128 test vectors from ISO/IEC 10118-3:2004(E) */ @@ -4184,7 +4162,7 @@ index 9033088c..ce9f4334 100644 { .digest = "\xcd\xf2\x62\x13\xa1\x50\xdc\x3e" "\xcb\x61\x0f\x18\xf6\xb3\x8b\x46", -@@ -1137,9 +1336,7 @@ static struct hash_testvec rmd128_tv_template[] = { +@@ -1137,9 +1336,7 @@ static struct hash_testvec rmd128_tv_tem /* * RIPEMD-160 test vectors from ISO/IEC 10118-3:2004(E) */ @@ -4195,7 +4173,7 @@ index 9033088c..ce9f4334 100644 { .digest = "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28" "\x08\x97\x7e\xe8\xf5\x48\xb2\x25\x8d\x31", -@@ -1201,9 +1398,7 @@ static struct hash_testvec rmd160_tv_template[] = { +@@ -1201,9 +1398,7 @@ static struct hash_testvec rmd160_tv_tem /* * RIPEMD-256 test vectors */ @@ -4206,7 +4184,7 @@ index 9033088c..ce9f4334 100644 { .digest = "\x02\xba\x4c\x4e\x5f\x8e\xcd\x18" "\x77\xfc\x52\xd6\x4d\x30\xe3\x7a" -@@ -1269,9 +1464,7 @@ static struct hash_testvec rmd256_tv_template[] = { +@@ -1269,9 +1464,7 @@ static struct hash_testvec rmd256_tv_tem /* * RIPEMD-320 test vectors */ @@ -4217,7 +4195,7 @@ index 9033088c..ce9f4334 100644 { .digest = "\x22\xd6\x5d\x56\x61\x53\x6c\xdc\x75\xc1" "\xfd\xf5\xc6\xde\x7b\x41\xb9\xf2\x73\x25" -@@ -1334,36 +1527,49 @@ static struct hash_testvec rmd320_tv_template[] = { +@@ -1334,36 +1527,49 @@ static struct hash_testvec rmd320_tv_tem } }; @@ -4296,7 +4274,7 @@ index 9033088c..ce9f4334 100644 } }; -@@ -1371,9 +1577,7 @@ static struct hash_testvec crct10dif_tv_template[] = { +@@ -1371,9 +1577,7 @@ static struct hash_testvec crct10dif_tv_ * SHA1 test vectors from from FIPS PUB 180-1 * Long vector from CAVS 5.0 */ @@ -4307,7 +4285,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .psize = 0, -@@ -1563,9 +1767,7 @@ static struct hash_testvec sha1_tv_template[] = { +@@ -1563,9 +1767,7 @@ static struct hash_testvec sha1_tv_templ /* * SHA224 test vectors from from FIPS PUB 180-2 */ @@ -4318,7 +4296,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .psize = 0, -@@ -1737,9 +1939,7 @@ static struct hash_testvec sha224_tv_template[] = { +@@ -1737,9 +1939,7 @@ static struct hash_testvec sha224_tv_tem /* * SHA256 test vectors from from NIST */ @@ -4329,7 +4307,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .psize = 0, -@@ -1910,9 +2110,7 @@ static struct hash_testvec sha256_tv_template[] = { +@@ -1910,9 +2110,7 @@ static struct hash_testvec sha256_tv_tem /* * SHA384 test vectors from from NIST and kerneli */ @@ -4340,7 +4318,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .psize = 0, -@@ -2104,9 +2302,7 @@ static struct hash_testvec sha384_tv_template[] = { +@@ -2104,9 +2302,7 @@ static struct hash_testvec sha384_tv_tem /* * SHA512 test vectors from from NIST and kerneli */ @@ -4351,7 +4329,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .psize = 0, -@@ -2313,9 +2509,7 @@ static struct hash_testvec sha512_tv_template[] = { +@@ -2313,9 +2509,7 @@ static struct hash_testvec sha512_tv_tem * by Vincent Rijmen and Paulo S. L. M. Barreto as part of the NESSIE * submission */ @@ -4362,7 +4340,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .psize = 0, -@@ -2411,9 +2605,7 @@ static struct hash_testvec wp512_tv_template[] = { +@@ -2411,9 +2605,7 @@ static struct hash_testvec wp512_tv_temp }, }; @@ -4373,7 +4351,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .psize = 0, -@@ -2493,9 +2685,7 @@ static struct hash_testvec wp384_tv_template[] = { +@@ -2493,9 +2685,7 @@ static struct hash_testvec wp384_tv_temp }, }; @@ -4384,7 +4362,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .psize = 0, -@@ -2562,9 +2752,7 @@ static struct hash_testvec wp256_tv_template[] = { +@@ -2562,9 +2752,7 @@ static struct hash_testvec wp256_tv_temp /* * TIGER test vectors from Tiger website */ @@ -4395,7 +4373,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .psize = 0, -@@ -2607,9 +2795,7 @@ static struct hash_testvec tgr192_tv_template[] = { +@@ -2607,9 +2795,7 @@ static struct hash_testvec tgr192_tv_tem }, }; @@ -4406,7 +4384,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .psize = 0, -@@ -2652,9 +2838,7 @@ static struct hash_testvec tgr160_tv_template[] = { +@@ -2652,9 +2838,7 @@ static struct hash_testvec tgr160_tv_tem }, }; @@ -4417,7 +4395,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .psize = 0, -@@ -2691,9 +2875,7 @@ static struct hash_testvec tgr128_tv_template[] = { +@@ -2691,9 +2875,7 @@ static struct hash_testvec tgr128_tv_tem }, }; @@ -4428,7 +4406,7 @@ index 9033088c..ce9f4334 100644 { { .key = "\xdf\xa6\xbf\x4d\xed\x81\xdb\x03" -@@ -2808,9 +2990,7 @@ static struct hash_testvec ghash_tv_template[] = +@@ -2808,9 +2990,7 @@ static struct hash_testvec ghash_tv_temp * HMAC-MD5 test vectors from RFC2202 * (These need to be fixed to not use strlen). */ @@ -4439,7 +4417,7 @@ index 9033088c..ce9f4334 100644 { { .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", -@@ -2890,9 +3070,7 @@ static struct hash_testvec hmac_md5_tv_template[] = +@@ -2890,9 +3070,7 @@ static struct hash_testvec hmac_md5_tv_t /* * HMAC-RIPEMD128 test vectors from RFC2286 */ @@ -4450,7 +4428,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", .ksize = 16, -@@ -2971,9 +3149,7 @@ static struct hash_testvec hmac_rmd128_tv_template[] = { +@@ -2971,9 +3149,7 @@ static struct hash_testvec hmac_rmd128_t /* * HMAC-RIPEMD160 test vectors from RFC2286 */ @@ -4461,7 +4439,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", .ksize = 20, -@@ -3052,9 +3228,7 @@ static struct hash_testvec hmac_rmd160_tv_template[] = { +@@ -3052,9 +3228,7 @@ static struct hash_testvec hmac_rmd160_t /* * HMAC-SHA1 test vectors from RFC2202 */ @@ -4472,7 +4450,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", .ksize = 20, -@@ -3135,9 +3309,7 @@ static struct hash_testvec hmac_sha1_tv_template[] = { +@@ -3135,9 +3309,7 @@ static struct hash_testvec hmac_sha1_tv_ /* * SHA224 HMAC test vectors from RFC4231 */ @@ -4483,7 +4461,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" -@@ -3250,9 +3422,7 @@ static struct hash_testvec hmac_sha224_tv_template[] = { +@@ -3250,9 +3422,7 @@ static struct hash_testvec hmac_sha224_t * HMAC-SHA256 test vectors from * draft-ietf-ipsec-ciph-sha-256-01.txt */ @@ -4494,7 +4472,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x01\x02\x03\x04\x05\x06\x07\x08" "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10" -@@ -3387,9 +3557,7 @@ static struct hash_testvec hmac_sha256_tv_template[] = { +@@ -3387,9 +3557,7 @@ static struct hash_testvec hmac_sha256_t }, }; @@ -4505,7 +4483,7 @@ index 9033088c..ce9f4334 100644 { /* From NIST Special Publication 800-38B, AES-128 */ .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6" "\xab\xf7\x15\x88\x09\xcf\x4f\x3c", -@@ -3464,9 +3632,67 @@ static struct hash_testvec aes_cmac128_tv_template[] = { +@@ -3464,9 +3632,67 @@ static struct hash_testvec aes_cmac128_t } }; @@ -4575,7 +4553,7 @@ index 9033088c..ce9f4334 100644 /* * From NIST Special Publication 800-38B, Three Key TDEA * Corrected test vectors from: -@@ -3512,9 +3738,7 @@ static struct hash_testvec des3_ede_cmac64_tv_template[] = { +@@ -3512,9 +3738,7 @@ static struct hash_testvec des3_ede_cmac } }; @@ -4586,7 +4564,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x00\x01\x02\x03\x04\x05\x06\x07" "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", -@@ -3580,36 +3804,35 @@ static struct hash_testvec aes_xcbc128_tv_template[] = { +@@ -3580,36 +3804,35 @@ static struct hash_testvec aes_xcbc128_t } }; @@ -4618,8 +4596,6 @@ index 9033088c..ce9f4334 100644 -static char vmac_string6[129] = {'p', 't', '*', '7', 'l', - 'i', '!', '#', 'w', '0', - 'z', '/', '4', 'A', 'n'}; -- --static struct hash_testvec aes_vmac128_tv_template[] = { +static const char vmac_string1[128] = {'\x01', '\x01', '\x01', '\x01', + '\x02', '\x03', '\x02', '\x02', + '\x02', '\x04', '\x01', '\x07', @@ -4647,12 +4623,13 @@ index 9033088c..ce9f4334 100644 +static const char vmac_string6[129] = {'p', 't', '*', '7', 'l', + 'i', '!', '#', 'w', '0', + 'z', '/', '4', 'A', 'n'}; -+ + +-static struct hash_testvec aes_vmac128_tv_template[] = { +static const struct hash_testvec aes_vmac128_tv_template[] = { { .key = "\x00\x01\x02\x03\x04\x05\x06\x07" "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", -@@ -3687,9 +3910,7 @@ static struct hash_testvec aes_vmac128_tv_template[] = { +@@ -3687,9 +3910,7 @@ static struct hash_testvec aes_vmac128_t * SHA384 HMAC test vectors from RFC4231 */ @@ -4663,7 +4640,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" -@@ -3787,9 +4008,7 @@ static struct hash_testvec hmac_sha384_tv_template[] = { +@@ -3787,9 +4008,7 @@ static struct hash_testvec hmac_sha384_t * SHA512 HMAC test vectors from RFC4231 */ @@ -4674,7 +4651,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" -@@ -3894,9 +4113,7 @@ static struct hash_testvec hmac_sha512_tv_template[] = { +@@ -3894,9 +4113,7 @@ static struct hash_testvec hmac_sha512_t }, }; @@ -4685,7 +4662,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" -@@ -3985,9 +4202,7 @@ static struct hash_testvec hmac_sha3_224_tv_template[] = { +@@ -3985,9 +4202,7 @@ static struct hash_testvec hmac_sha3_224 }, }; @@ -4696,7 +4673,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" -@@ -4076,9 +4291,7 @@ static struct hash_testvec hmac_sha3_256_tv_template[] = { +@@ -4076,9 +4291,7 @@ static struct hash_testvec hmac_sha3_256 }, }; @@ -4707,7 +4684,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" -@@ -4175,9 +4388,7 @@ static struct hash_testvec hmac_sha3_384_tv_template[] = { +@@ -4175,9 +4388,7 @@ static struct hash_testvec hmac_sha3_384 }, }; @@ -4718,7 +4695,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" -@@ -4286,9 +4497,7 @@ static struct hash_testvec hmac_sha3_512_tv_template[] = { +@@ -4286,9 +4497,7 @@ static struct hash_testvec hmac_sha3_512 * Poly1305 test vectors from RFC7539 A.3. */ @@ -4729,7 +4706,7 @@ index 9033088c..ce9f4334 100644 { /* Test Vector #1 */ .plaintext = "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00" -@@ -4533,20 +4742,7 @@ static struct hash_testvec poly1305_tv_template[] = { +@@ -4533,20 +4742,7 @@ static struct hash_testvec poly1305_tv_t /* * DES test vectors. */ @@ -4751,7 +4728,7 @@ index 9033088c..ce9f4334 100644 { /* From Applied Cryptography */ .key = "\x01\x23\x45\x67\x89\xab\xcd\xef", .klen = 8, -@@ -4720,7 +4916,7 @@ static struct cipher_testvec des_enc_tv_template[] = { +@@ -4720,7 +4916,7 @@ static struct cipher_testvec des_enc_tv_ }, }; @@ -4760,7 +4737,7 @@ index 9033088c..ce9f4334 100644 { /* From Applied Cryptography */ .key = "\x01\x23\x45\x67\x89\xab\xcd\xef", .klen = 8, -@@ -4830,7 +5026,7 @@ static struct cipher_testvec des_dec_tv_template[] = { +@@ -4830,7 +5026,7 @@ static struct cipher_testvec des_dec_tv_ }, }; @@ -4769,7 +4746,7 @@ index 9033088c..ce9f4334 100644 { /* From OpenSSL */ .key = "\x01\x23\x45\x67\x89\xab\xcd\xef", .klen = 8, -@@ -4956,7 +5152,7 @@ static struct cipher_testvec des_cbc_enc_tv_template[] = { +@@ -4956,7 +5152,7 @@ static struct cipher_testvec des_cbc_enc }, }; @@ -4778,7 +4755,7 @@ index 9033088c..ce9f4334 100644 { /* FIPS Pub 81 */ .key = "\x01\x23\x45\x67\x89\xab\xcd\xef", .klen = 8, -@@ -5065,7 +5261,7 @@ static struct cipher_testvec des_cbc_dec_tv_template[] = { +@@ -5065,7 +5261,7 @@ static struct cipher_testvec des_cbc_dec }, }; @@ -4787,7 +4764,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Crypto++ */ .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55", .klen = 8, -@@ -5211,7 +5407,7 @@ static struct cipher_testvec des_ctr_enc_tv_template[] = { +@@ -5211,7 +5407,7 @@ static struct cipher_testvec des_ctr_enc }, }; @@ -4796,7 +4773,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Crypto++ */ .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55", .klen = 8, -@@ -5357,7 +5553,7 @@ static struct cipher_testvec des_ctr_dec_tv_template[] = { +@@ -5357,7 +5553,7 @@ static struct cipher_testvec des_ctr_dec }, }; @@ -4805,7 +4782,7 @@ index 9033088c..ce9f4334 100644 { /* These are from openssl */ .key = "\x01\x23\x45\x67\x89\xab\xcd\xef" "\x55\x55\x55\x55\x55\x55\x55\x55" -@@ -5522,7 +5718,7 @@ static struct cipher_testvec des3_ede_enc_tv_template[] = { +@@ -5522,7 +5718,7 @@ static struct cipher_testvec des3_ede_en }, }; @@ -4814,7 +4791,7 @@ index 9033088c..ce9f4334 100644 { /* These are from openssl */ .key = "\x01\x23\x45\x67\x89\xab\xcd\xef" "\x55\x55\x55\x55\x55\x55\x55\x55" -@@ -5687,7 +5883,7 @@ static struct cipher_testvec des3_ede_dec_tv_template[] = { +@@ -5687,7 +5883,7 @@ static struct cipher_testvec des3_ede_de }, }; @@ -4823,7 +4800,7 @@ index 9033088c..ce9f4334 100644 { /* Generated from openssl */ .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24" "\x44\x4D\x99\x5A\x12\xD6\x40\xC0" -@@ -5867,7 +6063,7 @@ static struct cipher_testvec des3_ede_cbc_enc_tv_template[] = { +@@ -5867,7 +6063,7 @@ static struct cipher_testvec des3_ede_cb }, }; @@ -4832,7 +4809,7 @@ index 9033088c..ce9f4334 100644 { /* Generated from openssl */ .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24" "\x44\x4D\x99\x5A\x12\xD6\x40\xC0" -@@ -6047,7 +6243,7 @@ static struct cipher_testvec des3_ede_cbc_dec_tv_template[] = { +@@ -6047,7 +6243,7 @@ static struct cipher_testvec des3_ede_cb }, }; @@ -4841,7 +4818,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Crypto++ */ .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00" "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE" -@@ -6325,7 +6521,7 @@ static struct cipher_testvec des3_ede_ctr_enc_tv_template[] = { +@@ -6325,7 +6521,7 @@ static struct cipher_testvec des3_ede_ct }, }; @@ -4850,7 +4827,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Crypto++ */ .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00" "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE" -@@ -6606,14 +6802,7 @@ static struct cipher_testvec des3_ede_ctr_dec_tv_template[] = { +@@ -6606,14 +6802,7 @@ static struct cipher_testvec des3_ede_ct /* * Blowfish test vectors. */ @@ -4866,7 +4843,7 @@ index 9033088c..ce9f4334 100644 { /* DES test vectors from OpenSSL */ .key = "\x00\x00\x00\x00\x00\x00\x00\x00", .klen = 8, -@@ -6805,7 +6994,7 @@ static struct cipher_testvec bf_enc_tv_template[] = { +@@ -6805,7 +6994,7 @@ static struct cipher_testvec bf_enc_tv_t }, }; @@ -4875,7 +4852,7 @@ index 9033088c..ce9f4334 100644 { /* DES test vectors from OpenSSL */ .key = "\x00\x00\x00\x00\x00\x00\x00\x00", .klen = 8, -@@ -6997,7 +7186,7 @@ static struct cipher_testvec bf_dec_tv_template[] = { +@@ -6997,7 +7186,7 @@ static struct cipher_testvec bf_dec_tv_t }, }; @@ -4884,7 +4861,7 @@ index 9033088c..ce9f4334 100644 { /* From OpenSSL */ .key = "\x01\x23\x45\x67\x89\xab\xcd\xef" "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87", -@@ -7154,7 +7343,7 @@ static struct cipher_testvec bf_cbc_enc_tv_template[] = { +@@ -7154,7 +7343,7 @@ static struct cipher_testvec bf_cbc_enc_ }, }; @@ -4893,7 +4870,7 @@ index 9033088c..ce9f4334 100644 { /* From OpenSSL */ .key = "\x01\x23\x45\x67\x89\xab\xcd\xef" "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87", -@@ -7311,7 +7500,7 @@ static struct cipher_testvec bf_cbc_dec_tv_template[] = { +@@ -7311,7 +7500,7 @@ static struct cipher_testvec bf_cbc_dec_ }, }; @@ -4902,7 +4879,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Crypto++ */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" -@@ -7723,7 +7912,7 @@ static struct cipher_testvec bf_ctr_enc_tv_template[] = { +@@ -7723,7 +7912,7 @@ static struct cipher_testvec bf_ctr_enc_ }, }; @@ -4911,7 +4888,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Crypto++ */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" -@@ -8138,18 +8327,7 @@ static struct cipher_testvec bf_ctr_dec_tv_template[] = { +@@ -8138,18 +8327,7 @@ static struct cipher_testvec bf_ctr_dec_ /* * Twofish test vectors. */ @@ -4931,7 +4908,7 @@ index 9033088c..ce9f4334 100644 { .key = zeroed_string, .klen = 16, -@@ -8317,7 +8495,7 @@ static struct cipher_testvec tf_enc_tv_template[] = { +@@ -8317,7 +8495,7 @@ static struct cipher_testvec tf_enc_tv_t }, }; @@ -4940,7 +4917,7 @@ index 9033088c..ce9f4334 100644 { .key = zeroed_string, .klen = 16, -@@ -8485,7 +8663,7 @@ static struct cipher_testvec tf_dec_tv_template[] = { +@@ -8485,7 +8663,7 @@ static struct cipher_testvec tf_dec_tv_t }, }; @@ -4949,7 +4926,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Nettle */ .key = zeroed_string, .klen = 16, -@@ -8668,7 +8846,7 @@ static struct cipher_testvec tf_cbc_enc_tv_template[] = { +@@ -8668,7 +8846,7 @@ static struct cipher_testvec tf_cbc_enc_ }, }; @@ -4958,7 +4935,7 @@ index 9033088c..ce9f4334 100644 { /* Reverse of the first four above */ .key = zeroed_string, .klen = 16, -@@ -8851,7 +9029,7 @@ static struct cipher_testvec tf_cbc_dec_tv_template[] = { +@@ -8851,7 +9029,7 @@ static struct cipher_testvec tf_cbc_dec_ }, }; @@ -4967,7 +4944,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Crypto++ */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" -@@ -9262,7 +9440,7 @@ static struct cipher_testvec tf_ctr_enc_tv_template[] = { +@@ -9262,7 +9440,7 @@ static struct cipher_testvec tf_ctr_enc_ }, }; @@ -4976,7 +4953,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Crypto++ */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" -@@ -9673,7 +9851,7 @@ static struct cipher_testvec tf_ctr_dec_tv_template[] = { +@@ -9673,7 +9851,7 @@ static struct cipher_testvec tf_ctr_dec_ }, }; @@ -4985,7 +4962,7 @@ index 9033088c..ce9f4334 100644 /* Generated from AES-LRW test vectors */ { .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d" -@@ -9925,7 +10103,7 @@ static struct cipher_testvec tf_lrw_enc_tv_template[] = { +@@ -9925,7 +10103,7 @@ static struct cipher_testvec tf_lrw_enc_ }, }; @@ -4994,7 +4971,7 @@ index 9033088c..ce9f4334 100644 /* Generated from AES-LRW test vectors */ /* same as enc vectors with input and result reversed */ { -@@ -10178,7 +10356,7 @@ static struct cipher_testvec tf_lrw_dec_tv_template[] = { +@@ -10178,7 +10356,7 @@ static struct cipher_testvec tf_lrw_dec_ }, }; @@ -5003,7 +4980,7 @@ index 9033088c..ce9f4334 100644 /* Generated from AES-XTS test vectors */ { .key = "\x00\x00\x00\x00\x00\x00\x00\x00" -@@ -10520,7 +10698,7 @@ static struct cipher_testvec tf_xts_enc_tv_template[] = { +@@ -10520,7 +10698,7 @@ static struct cipher_testvec tf_xts_enc_ }, }; @@ -5012,7 +4989,7 @@ index 9033088c..ce9f4334 100644 /* Generated from AES-XTS test vectors */ /* same as enc vectors with input and result reversed */ { -@@ -10867,25 +11045,7 @@ static struct cipher_testvec tf_xts_dec_tv_template[] = { +@@ -10867,25 +11045,7 @@ static struct cipher_testvec tf_xts_dec_ * Serpent test vectors. These are backwards because Serpent writes * octet sequences in right-to-left mode. */ @@ -5039,7 +5016,7 @@ index 9033088c..ce9f4334 100644 { .input = "\x00\x01\x02\x03\x04\x05\x06\x07" "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", -@@ -11061,7 +11221,7 @@ static struct cipher_testvec serpent_enc_tv_template[] = { +@@ -11061,7 +11221,7 @@ static struct cipher_testvec serpent_enc }, }; @@ -5048,7 +5025,7 @@ index 9033088c..ce9f4334 100644 { /* KeySize=128, PT=0, I=1 */ .input = "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00", -@@ -11111,7 +11271,7 @@ static struct cipher_testvec tnepres_enc_tv_template[] = { +@@ -11111,7 +11271,7 @@ static struct cipher_testvec tnepres_enc }; @@ -5057,7 +5034,7 @@ index 9033088c..ce9f4334 100644 { .input = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47" "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2", -@@ -11287,7 +11447,7 @@ static struct cipher_testvec serpent_dec_tv_template[] = { +@@ -11287,7 +11447,7 @@ static struct cipher_testvec serpent_dec }, }; @@ -5066,7 +5043,7 @@ index 9033088c..ce9f4334 100644 { .input = "\x41\xcc\x6b\x31\x59\x31\x45\x97" "\x6d\x6f\xbb\x38\x4b\x37\x21\x28", -@@ -11328,7 +11488,7 @@ static struct cipher_testvec tnepres_dec_tv_template[] = { +@@ -11328,7 +11488,7 @@ static struct cipher_testvec tnepres_dec }, }; @@ -5075,7 +5052,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Crypto++ */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" -@@ -11469,7 +11629,7 @@ static struct cipher_testvec serpent_cbc_enc_tv_template[] = { +@@ -11469,7 +11629,7 @@ static struct cipher_testvec serpent_cbc }, }; @@ -5084,7 +5061,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Crypto++ */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" -@@ -11610,7 +11770,7 @@ static struct cipher_testvec serpent_cbc_dec_tv_template[] = { +@@ -11610,7 +11770,7 @@ static struct cipher_testvec serpent_cbc }, }; @@ -5093,7 +5070,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Crypto++ */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" -@@ -12021,7 +12181,7 @@ static struct cipher_testvec serpent_ctr_enc_tv_template[] = { +@@ -12021,7 +12181,7 @@ static struct cipher_testvec serpent_ctr }, }; @@ -5102,7 +5079,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Crypto++ */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" -@@ -12432,7 +12592,7 @@ static struct cipher_testvec serpent_ctr_dec_tv_template[] = { +@@ -12432,7 +12592,7 @@ static struct cipher_testvec serpent_ctr }, }; @@ -5111,7 +5088,7 @@ index 9033088c..ce9f4334 100644 /* Generated from AES-LRW test vectors */ { .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d" -@@ -12684,7 +12844,7 @@ static struct cipher_testvec serpent_lrw_enc_tv_template[] = { +@@ -12684,7 +12844,7 @@ static struct cipher_testvec serpent_lrw }, }; @@ -5120,7 +5097,7 @@ index 9033088c..ce9f4334 100644 /* Generated from AES-LRW test vectors */ /* same as enc vectors with input and result reversed */ { -@@ -12937,7 +13097,7 @@ static struct cipher_testvec serpent_lrw_dec_tv_template[] = { +@@ -12937,7 +13097,7 @@ static struct cipher_testvec serpent_lrw }, }; @@ -5129,7 +5106,7 @@ index 9033088c..ce9f4334 100644 /* Generated from AES-XTS test vectors */ { .key = "\x00\x00\x00\x00\x00\x00\x00\x00" -@@ -13279,7 +13439,7 @@ static struct cipher_testvec serpent_xts_enc_tv_template[] = { +@@ -13279,7 +13439,7 @@ static struct cipher_testvec serpent_xts }, }; @@ -5138,7 +5115,7 @@ index 9033088c..ce9f4334 100644 /* Generated from AES-XTS test vectors */ /* same as enc vectors with input and result reversed */ { -@@ -13623,18 +13783,7 @@ static struct cipher_testvec serpent_xts_dec_tv_template[] = { +@@ -13623,18 +13783,7 @@ static struct cipher_testvec serpent_xts }; /* Cast6 test vectors from RFC 2612 */ @@ -5158,7 +5135,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c" "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d", -@@ -13805,7 +13954,7 @@ static struct cipher_testvec cast6_enc_tv_template[] = { +@@ -13805,7 +13954,7 @@ static struct cipher_testvec cast6_enc_t }, }; @@ -5167,7 +5144,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c" "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d", -@@ -13976,7 +14125,7 @@ static struct cipher_testvec cast6_dec_tv_template[] = { +@@ -13976,7 +14125,7 @@ static struct cipher_testvec cast6_dec_t }, }; @@ -5176,7 +5153,7 @@ index 9033088c..ce9f4334 100644 { /* Generated from TF test vectors */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" -@@ -14117,7 +14266,7 @@ static struct cipher_testvec cast6_cbc_enc_tv_template[] = { +@@ -14117,7 +14266,7 @@ static struct cipher_testvec cast6_cbc_e }, }; @@ -5185,7 +5162,7 @@ index 9033088c..ce9f4334 100644 { /* Generated from TF test vectors */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" -@@ -14258,7 +14407,7 @@ static struct cipher_testvec cast6_cbc_dec_tv_template[] = { +@@ -14258,7 +14407,7 @@ static struct cipher_testvec cast6_cbc_d }, }; @@ -5194,7 +5171,7 @@ index 9033088c..ce9f4334 100644 { /* Generated from TF test vectors */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" -@@ -14415,7 +14564,7 @@ static struct cipher_testvec cast6_ctr_enc_tv_template[] = { +@@ -14415,7 +14564,7 @@ static struct cipher_testvec cast6_ctr_e }, }; @@ -5203,7 +5180,7 @@ index 9033088c..ce9f4334 100644 { /* Generated from TF test vectors */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" -@@ -14572,7 +14721,7 @@ static struct cipher_testvec cast6_ctr_dec_tv_template[] = { +@@ -14572,7 +14721,7 @@ static struct cipher_testvec cast6_ctr_d }, }; @@ -5212,7 +5189,7 @@ index 9033088c..ce9f4334 100644 { /* Generated from TF test vectors */ .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c" "\x23\x84\xcb\x1c\x77\xd6\x19\x5d" -@@ -14719,7 +14868,7 @@ static struct cipher_testvec cast6_lrw_enc_tv_template[] = { +@@ -14719,7 +14868,7 @@ static struct cipher_testvec cast6_lrw_e }, }; @@ -5221,7 +5198,7 @@ index 9033088c..ce9f4334 100644 { /* Generated from TF test vectors */ .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c" "\x23\x84\xcb\x1c\x77\xd6\x19\x5d" -@@ -14866,7 +15015,7 @@ static struct cipher_testvec cast6_lrw_dec_tv_template[] = { +@@ -14866,7 +15015,7 @@ static struct cipher_testvec cast6_lrw_d }, }; @@ -5230,7 +5207,7 @@ index 9033088c..ce9f4334 100644 { /* Generated from TF test vectors */ .key = "\x27\x18\x28\x18\x28\x45\x90\x45" "\x23\x53\x60\x28\x74\x71\x35\x26" -@@ -15015,7 +15164,7 @@ static struct cipher_testvec cast6_xts_enc_tv_template[] = { +@@ -15015,7 +15164,7 @@ static struct cipher_testvec cast6_xts_e }, }; @@ -5239,7 +5216,7 @@ index 9033088c..ce9f4334 100644 { /* Generated from TF test vectors */ .key = "\x27\x18\x28\x18\x28\x45\x90\x45" "\x23\x53\x60\x28\x74\x71\x35\x26" -@@ -15168,39 +15317,7 @@ static struct cipher_testvec cast6_xts_dec_tv_template[] = { +@@ -15168,39 +15317,7 @@ static struct cipher_testvec cast6_xts_d /* * AES test vectors. */ @@ -5280,7 +5257,7 @@ index 9033088c..ce9f4334 100644 { /* From FIPS-197 */ .key = "\x00\x01\x02\x03\x04\x05\x06\x07" "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", -@@ -15372,7 +15489,7 @@ static struct cipher_testvec aes_enc_tv_template[] = { +@@ -15372,7 +15489,7 @@ static struct cipher_testvec aes_enc_tv_ }, }; @@ -5289,7 +5266,7 @@ index 9033088c..ce9f4334 100644 { /* From FIPS-197 */ .key = "\x00\x01\x02\x03\x04\x05\x06\x07" "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", -@@ -15544,7 +15661,7 @@ static struct cipher_testvec aes_dec_tv_template[] = { +@@ -15544,7 +15661,7 @@ static struct cipher_testvec aes_dec_tv_ }, }; @@ -5298,7 +5275,7 @@ index 9033088c..ce9f4334 100644 { /* From RFC 3602 */ .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b" "\x51\x2e\x03\xd5\x34\x12\x00\x06", -@@ -15766,7 +15883,7 @@ static struct cipher_testvec aes_cbc_enc_tv_template[] = { +@@ -15766,7 +15883,7 @@ static struct cipher_testvec aes_cbc_enc }, }; @@ -5307,7 +5284,7 @@ index 9033088c..ce9f4334 100644 { /* From RFC 3602 */ .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b" "\x51\x2e\x03\xd5\x34\x12\x00\x06", -@@ -15988,7 +16105,7 @@ static struct cipher_testvec aes_cbc_dec_tv_template[] = { +@@ -15988,7 +16105,7 @@ static struct cipher_testvec aes_cbc_dec }, }; @@ -5316,7 +5293,7 @@ index 9033088c..ce9f4334 100644 { /* Input data from RFC 2410 Case 1 */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -16030,7 +16147,7 @@ static struct aead_testvec hmac_md5_ecb_cipher_null_enc_tv_template[] = { +@@ -16030,7 +16147,7 @@ static struct aead_testvec hmac_md5_ecb_ }, }; @@ -5325,7 +5302,7 @@ index 9033088c..ce9f4334 100644 { #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -16072,7 +16189,7 @@ static struct aead_testvec hmac_md5_ecb_cipher_null_dec_tv_template[] = { +@@ -16072,7 +16189,7 @@ static struct aead_testvec hmac_md5_ecb_ }, }; @@ -5334,7 +5311,7 @@ index 9033088c..ce9f4334 100644 { /* RFC 3602 Case 1 */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -16341,7 +16458,7 @@ static struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = { +@@ -16341,7 +16458,7 @@ static struct aead_testvec hmac_sha1_aes }, }; @@ -5343,7 +5320,7 @@ index 9033088c..ce9f4334 100644 { /* Input data from RFC 2410 Case 1 */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -16387,7 +16504,7 @@ static struct aead_testvec hmac_sha1_ecb_cipher_null_enc_tv_temp[] = { +@@ -16387,7 +16504,7 @@ static struct aead_testvec hmac_sha1_ecb }, }; @@ -5352,7 +5329,7 @@ index 9033088c..ce9f4334 100644 { #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -16433,7 +16550,7 @@ static struct aead_testvec hmac_sha1_ecb_cipher_null_dec_tv_temp[] = { +@@ -16433,7 +16550,7 @@ static struct aead_testvec hmac_sha1_ecb }, }; @@ -5361,7 +5338,7 @@ index 9033088c..ce9f4334 100644 { /* RFC 3602 Case 1 */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -16716,7 +16833,7 @@ static struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = { +@@ -16716,7 +16833,7 @@ static struct aead_testvec hmac_sha256_a }, }; @@ -5370,7 +5347,7 @@ index 9033088c..ce9f4334 100644 { /* RFC 3602 Case 1 */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -17055,9 +17172,7 @@ static struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = { +@@ -17055,9 +17172,7 @@ static struct aead_testvec hmac_sha512_a }, }; @@ -5381,7 +5358,7 @@ index 9033088c..ce9f4334 100644 { /*Generated with cryptopp*/ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -17116,9 +17231,7 @@ static struct aead_testvec hmac_sha1_des_cbc_enc_tv_temp[] = { +@@ -17116,9 +17231,7 @@ static struct aead_testvec hmac_sha1_des }, }; @@ -5392,7 +5369,7 @@ index 9033088c..ce9f4334 100644 { /*Generated with cryptopp*/ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -17177,9 +17290,7 @@ static struct aead_testvec hmac_sha224_des_cbc_enc_tv_temp[] = { +@@ -17177,9 +17290,7 @@ static struct aead_testvec hmac_sha224_d }, }; @@ -5403,7 +5380,7 @@ index 9033088c..ce9f4334 100644 { /*Generated with cryptopp*/ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -17240,9 +17351,7 @@ static struct aead_testvec hmac_sha256_des_cbc_enc_tv_temp[] = { +@@ -17240,9 +17351,7 @@ static struct aead_testvec hmac_sha256_d }, }; @@ -5414,7 +5391,7 @@ index 9033088c..ce9f4334 100644 { /*Generated with cryptopp*/ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -17307,9 +17416,7 @@ static struct aead_testvec hmac_sha384_des_cbc_enc_tv_temp[] = { +@@ -17307,9 +17416,7 @@ static struct aead_testvec hmac_sha384_d }, }; @@ -5425,7 +5402,7 @@ index 9033088c..ce9f4334 100644 { /*Generated with cryptopp*/ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -17378,9 +17485,7 @@ static struct aead_testvec hmac_sha512_des_cbc_enc_tv_temp[] = { +@@ -17378,9 +17485,7 @@ static struct aead_testvec hmac_sha512_d }, }; @@ -5436,7 +5413,7 @@ index 9033088c..ce9f4334 100644 { /*Generated with cryptopp*/ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -17441,9 +17546,7 @@ static struct aead_testvec hmac_sha1_des3_ede_cbc_enc_tv_temp[] = { +@@ -17441,9 +17546,7 @@ static struct aead_testvec hmac_sha1_des }, }; @@ -5447,7 +5424,7 @@ index 9033088c..ce9f4334 100644 { /*Generated with cryptopp*/ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -17504,9 +17607,7 @@ static struct aead_testvec hmac_sha224_des3_ede_cbc_enc_tv_temp[] = { +@@ -17504,9 +17607,7 @@ static struct aead_testvec hmac_sha224_d }, }; @@ -5458,7 +5435,7 @@ index 9033088c..ce9f4334 100644 { /*Generated with cryptopp*/ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -17569,9 +17670,7 @@ static struct aead_testvec hmac_sha256_des3_ede_cbc_enc_tv_temp[] = { +@@ -17569,9 +17670,7 @@ static struct aead_testvec hmac_sha256_d }, }; @@ -5469,7 +5446,7 @@ index 9033088c..ce9f4334 100644 { /*Generated with cryptopp*/ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -17638,9 +17737,7 @@ static struct aead_testvec hmac_sha384_des3_ede_cbc_enc_tv_temp[] = { +@@ -17638,9 +17737,7 @@ static struct aead_testvec hmac_sha384_d }, }; @@ -5480,7 +5457,7 @@ index 9033088c..ce9f4334 100644 { /*Generated with cryptopp*/ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -17711,7 +17808,7 @@ static struct aead_testvec hmac_sha512_des3_ede_cbc_enc_tv_temp[] = { +@@ -17711,7 +17808,7 @@ static struct aead_testvec hmac_sha512_d }, }; @@ -5489,7 +5466,7 @@ index 9033088c..ce9f4334 100644 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */ { /* LRW-32-AES 1 */ .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d" -@@ -17964,7 +18061,7 @@ static struct cipher_testvec aes_lrw_enc_tv_template[] = { +@@ -17964,7 +18061,7 @@ static struct cipher_testvec aes_lrw_enc } }; @@ -5498,7 +5475,7 @@ index 9033088c..ce9f4334 100644 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */ /* same as enc vectors with input and result reversed */ { /* LRW-32-AES 1 */ -@@ -18218,7 +18315,7 @@ static struct cipher_testvec aes_lrw_dec_tv_template[] = { +@@ -18218,7 +18315,7 @@ static struct cipher_testvec aes_lrw_dec } }; @@ -5507,7 +5484,7 @@ index 9033088c..ce9f4334 100644 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */ { /* XTS-AES 1 */ .key = "\x00\x00\x00\x00\x00\x00\x00\x00" -@@ -18561,7 +18658,7 @@ static struct cipher_testvec aes_xts_enc_tv_template[] = { +@@ -18561,7 +18658,7 @@ static struct cipher_testvec aes_xts_enc } }; @@ -5516,7 +5493,7 @@ index 9033088c..ce9f4334 100644 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */ { /* XTS-AES 1 */ .key = "\x00\x00\x00\x00\x00\x00\x00\x00" -@@ -18905,7 +19002,7 @@ static struct cipher_testvec aes_xts_dec_tv_template[] = { +@@ -18905,7 +19002,7 @@ static struct cipher_testvec aes_xts_dec }; @@ -5525,7 +5502,7 @@ index 9033088c..ce9f4334 100644 { /* From NIST Special Publication 800-38A, Appendix F.5 */ .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6" "\xab\xf7\x15\x88\x09\xcf\x4f\x3c", -@@ -19260,7 +19357,7 @@ static struct cipher_testvec aes_ctr_enc_tv_template[] = { +@@ -19260,7 +19357,7 @@ static struct cipher_testvec aes_ctr_enc }, }; @@ -5534,7 +5511,7 @@ index 9033088c..ce9f4334 100644 { /* From NIST Special Publication 800-38A, Appendix F.5 */ .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6" "\xab\xf7\x15\x88\x09\xcf\x4f\x3c", -@@ -19615,7 +19712,7 @@ static struct cipher_testvec aes_ctr_dec_tv_template[] = { +@@ -19615,7 +19712,7 @@ static struct cipher_testvec aes_ctr_dec }, }; @@ -5543,7 +5520,7 @@ index 9033088c..ce9f4334 100644 { /* From RFC 3686 */ .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc" "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e" -@@ -20747,7 +20844,7 @@ static struct cipher_testvec aes_ctr_rfc3686_enc_tv_template[] = { +@@ -20747,7 +20844,7 @@ static struct cipher_testvec aes_ctr_rfc }, }; @@ -5552,7 +5529,7 @@ index 9033088c..ce9f4334 100644 { /* From RFC 3686 */ .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc" "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e" -@@ -20838,7 +20935,7 @@ static struct cipher_testvec aes_ctr_rfc3686_dec_tv_template[] = { +@@ -20838,7 +20935,7 @@ static struct cipher_testvec aes_ctr_rfc }, }; @@ -5561,7 +5538,7 @@ index 9033088c..ce9f4334 100644 /* From NIST Special Publication 800-38A, Appendix F.5 */ { .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6" -@@ -20867,7 +20964,7 @@ static struct cipher_testvec aes_ofb_enc_tv_template[] = { +@@ -20867,7 +20964,7 @@ static struct cipher_testvec aes_ofb_enc } }; @@ -5570,7 +5547,7 @@ index 9033088c..ce9f4334 100644 /* From NIST Special Publication 800-38A, Appendix F.5 */ { .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6" -@@ -20896,7 +20993,7 @@ static struct cipher_testvec aes_ofb_dec_tv_template[] = { +@@ -20896,7 +20993,7 @@ static struct cipher_testvec aes_ofb_dec } }; @@ -5579,7 +5556,7 @@ index 9033088c..ce9f4334 100644 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */ .key = zeroed_string, .klen = 16, -@@ -21056,7 +21153,7 @@ static struct aead_testvec aes_gcm_enc_tv_template[] = { +@@ -21056,7 +21153,7 @@ static struct aead_testvec aes_gcm_enc_t } }; @@ -5588,7 +5565,7 @@ index 9033088c..ce9f4334 100644 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */ .key = zeroed_string, .klen = 32, -@@ -21258,7 +21355,7 @@ static struct aead_testvec aes_gcm_dec_tv_template[] = { +@@ -21258,7 +21355,7 @@ static struct aead_testvec aes_gcm_dec_t } }; @@ -5597,7 +5574,7 @@ index 9033088c..ce9f4334 100644 { /* Generated using Crypto++ */ .key = zeroed_string, .klen = 20, -@@ -21871,7 +21968,7 @@ static struct aead_testvec aes_gcm_rfc4106_enc_tv_template[] = { +@@ -21871,7 +21968,7 @@ static struct aead_testvec aes_gcm_rfc41 } }; @@ -5606,7 +5583,7 @@ index 9033088c..ce9f4334 100644 { /* Generated using Crypto++ */ .key = zeroed_string, .klen = 20, -@@ -22485,7 +22582,7 @@ static struct aead_testvec aes_gcm_rfc4106_dec_tv_template[] = { +@@ -22485,7 +22582,7 @@ static struct aead_testvec aes_gcm_rfc41 } }; @@ -5615,7 +5592,7 @@ index 9033088c..ce9f4334 100644 { /* From draft-mcgrew-gcm-test-01 */ .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda" "\x90\x6a\xc7\x3c\x36\x13\xa6\x34" -@@ -22516,7 +22613,7 @@ static struct aead_testvec aes_gcm_rfc4543_enc_tv_template[] = { +@@ -22516,7 +22613,7 @@ static struct aead_testvec aes_gcm_rfc45 } }; @@ -5624,7 +5601,7 @@ index 9033088c..ce9f4334 100644 { /* From draft-mcgrew-gcm-test-01 */ .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda" "\x90\x6a\xc7\x3c\x36\x13\xa6\x34" -@@ -22575,7 +22672,7 @@ static struct aead_testvec aes_gcm_rfc4543_dec_tv_template[] = { +@@ -22575,7 +22672,7 @@ static struct aead_testvec aes_gcm_rfc45 }, }; @@ -5633,7 +5610,7 @@ index 9033088c..ce9f4334 100644 { /* From RFC 3610 */ .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7" "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf", -@@ -22859,7 +22956,7 @@ static struct aead_testvec aes_ccm_enc_tv_template[] = { +@@ -22859,7 +22956,7 @@ static struct aead_testvec aes_ccm_enc_t } }; @@ -5642,7 +5619,7 @@ index 9033088c..ce9f4334 100644 { /* From RFC 3610 */ .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7" "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf", -@@ -23191,7 +23288,7 @@ static struct aead_testvec aes_ccm_dec_tv_template[] = { +@@ -23191,7 +23288,7 @@ static struct aead_testvec aes_ccm_dec_t * These vectors are copied/generated from the ones for rfc4106 with * the key truncated by one byte.. */ @@ -5651,7 +5628,7 @@ index 9033088c..ce9f4334 100644 { /* Generated using Crypto++ */ .key = zeroed_string, .klen = 19, -@@ -23804,7 +23901,7 @@ static struct aead_testvec aes_ccm_rfc4309_enc_tv_template[] = { +@@ -23804,7 +23901,7 @@ static struct aead_testvec aes_ccm_rfc43 } }; @@ -5660,7 +5637,7 @@ index 9033088c..ce9f4334 100644 { /* Generated using Crypto++ */ .key = zeroed_string, .klen = 19, -@@ -24420,9 +24517,7 @@ static struct aead_testvec aes_ccm_rfc4309_dec_tv_template[] = { +@@ -24420,9 +24517,7 @@ static struct aead_testvec aes_ccm_rfc43 /* * ChaCha20-Poly1305 AEAD test vectors from RFC7539 2.8.2./A.5. */ @@ -5671,7 +5648,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x80\x81\x82\x83\x84\x85\x86\x87" "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f" -@@ -24554,7 +24649,7 @@ static struct aead_testvec rfc7539_enc_tv_template[] = { +@@ -24554,7 +24649,7 @@ static struct aead_testvec rfc7539_enc_t }, }; @@ -5680,7 +5657,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x80\x81\x82\x83\x84\x85\x86\x87" "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f" -@@ -24689,9 +24784,7 @@ static struct aead_testvec rfc7539_dec_tv_template[] = { +@@ -24689,9 +24784,7 @@ static struct aead_testvec rfc7539_dec_t /* * draft-irtf-cfrg-chacha20-poly1305 */ @@ -5691,7 +5668,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a" "\xf3\x33\x88\x86\x04\xf6\xb5\xf0" -@@ -24779,7 +24872,7 @@ static struct aead_testvec rfc7539esp_enc_tv_template[] = { +@@ -24779,7 +24872,7 @@ static struct aead_testvec rfc7539esp_en }, }; @@ -5700,7 +5677,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a" "\xf3\x33\x88\x86\x04\xf6\xb5\xf0" -@@ -24875,7 +24968,7 @@ static struct aead_testvec rfc7539esp_dec_tv_template[] = { +@@ -24875,7 +24968,7 @@ static struct aead_testvec rfc7539esp_de * semiblock of the ciphertext from the test vector. For decryption, iv is * the first semiblock of the ciphertext. */ @@ -5709,7 +5686,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x75\x75\xda\x3a\x93\x60\x7c\xc2" "\xbf\xd8\xce\xc7\xaa\xdf\xd9\xa6", -@@ -24890,7 +24983,7 @@ static struct cipher_testvec aes_kw_enc_tv_template[] = { +@@ -24890,7 +24983,7 @@ static struct cipher_testvec aes_kw_enc_ }, }; @@ -5718,7 +5695,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x80\xaa\x99\x73\x27\xa4\x80\x6b" "\x6a\x7a\x41\xa5\x2b\x86\xc3\x71" -@@ -24913,9 +25006,7 @@ static struct cipher_testvec aes_kw_dec_tv_template[] = { +@@ -24913,9 +25006,7 @@ static struct cipher_testvec aes_kw_dec_ * http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf * Only AES-128 is supported at this time. */ @@ -5729,7 +5706,7 @@ index 9033088c..ce9f4334 100644 { .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42" "\xed\x06\x1c\xab\xb8\xd4\x62\x02", -@@ -25011,7 +25102,7 @@ static struct cprng_testvec ansi_cprng_aes_tv_template[] = { +@@ -25011,7 +25102,7 @@ static struct cprng_testvec ansi_cprng_a * (Hash, HMAC, CTR) are tested with all permutations of use cases (w/ and * w/o personalization string, w/ and w/o additional input string). */ @@ -5738,7 +5715,7 @@ index 9033088c..ce9f4334 100644 { .entropy = (unsigned char *) "\x72\x88\x4c\xcd\x6c\x85\x57\x70\xf7\x0b\x8b\x86" -@@ -25169,7 +25260,7 @@ static struct drbg_testvec drbg_pr_sha256_tv_template[] = { +@@ -25169,7 +25260,7 @@ static struct drbg_testvec drbg_pr_sha25 }, }; @@ -5747,7 +5724,7 @@ index 9033088c..ce9f4334 100644 { .entropy = (unsigned char *) "\x99\x69\xe5\x4b\x47\x03\xff\x31\x78\x5b\x87\x9a" -@@ -25327,7 +25418,7 @@ static struct drbg_testvec drbg_pr_hmac_sha256_tv_template[] = { +@@ -25327,7 +25418,7 @@ static struct drbg_testvec drbg_pr_hmac_ }, }; @@ -5756,7 +5733,7 @@ index 9033088c..ce9f4334 100644 { .entropy = (unsigned char *) "\xd1\x44\xc6\x61\x81\x6d\xca\x9d\x15\x28\x8a\x42" -@@ -25451,7 +25542,7 @@ static struct drbg_testvec drbg_pr_ctr_aes128_tv_template[] = { +@@ -25451,7 +25542,7 @@ static struct drbg_testvec drbg_pr_ctr_a * (Hash, HMAC, CTR) are tested with all permutations of use cases (w/ and * w/o personalization string, w/ and w/o additional input string). */ @@ -5765,7 +5742,7 @@ index 9033088c..ce9f4334 100644 { .entropy = (unsigned char *) "\xa6\x5a\xd0\xf3\x45\xdb\x4e\x0e\xff\xe8\x75\xc3" -@@ -25573,7 +25664,7 @@ static struct drbg_testvec drbg_nopr_sha256_tv_template[] = { +@@ -25573,7 +25664,7 @@ static struct drbg_testvec drbg_nopr_sha }, }; @@ -5774,7 +5751,7 @@ index 9033088c..ce9f4334 100644 { .entropy = (unsigned char *) "\xca\x85\x19\x11\x34\x93\x84\xbf\xfe\x89\xde\x1c" -@@ -25695,7 +25786,7 @@ static struct drbg_testvec drbg_nopr_hmac_sha256_tv_template[] = { +@@ -25695,7 +25786,7 @@ static struct drbg_testvec drbg_nopr_hma }, }; @@ -5783,7 +5760,7 @@ index 9033088c..ce9f4334 100644 { .entropy = (unsigned char *) "\xc3\x5c\x2f\xa2\xa8\x9d\x52\xa1\x1f\xa3\x2a\xa9" -@@ -25719,7 +25810,7 @@ static struct drbg_testvec drbg_nopr_ctr_aes192_tv_template[] = { +@@ -25719,7 +25810,7 @@ static struct drbg_testvec drbg_nopr_ctr }, }; @@ -5792,7 +5769,7 @@ index 9033088c..ce9f4334 100644 { .entropy = (unsigned char *) "\x36\x40\x19\x40\xfa\x8b\x1f\xba\x91\xa1\x66\x1f" -@@ -25743,7 +25834,7 @@ static struct drbg_testvec drbg_nopr_ctr_aes256_tv_template[] = { +@@ -25743,7 +25834,7 @@ static struct drbg_testvec drbg_nopr_ctr }, }; @@ -5801,7 +5778,7 @@ index 9033088c..ce9f4334 100644 { .entropy = (unsigned char *) "\x87\xe1\xc5\x32\x99\x7f\x57\xa3\x5c\x28\x6d\xe8" -@@ -25832,14 +25923,7 @@ static struct drbg_testvec drbg_nopr_ctr_aes128_tv_template[] = { +@@ -25832,14 +25923,7 @@ static struct drbg_testvec drbg_nopr_ctr }; /* Cast5 test vectors from RFC 2144 */ @@ -5817,7 +5794,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x01\x23\x45\x67\x12\x34\x56\x78" "\x23\x45\x67\x89\x34\x56\x78\x9a", -@@ -26000,7 +26084,7 @@ static struct cipher_testvec cast5_enc_tv_template[] = { +@@ -26000,7 +26084,7 @@ static struct cipher_testvec cast5_enc_t }, }; @@ -5826,7 +5803,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x01\x23\x45\x67\x12\x34\x56\x78" "\x23\x45\x67\x89\x34\x56\x78\x9a", -@@ -26161,7 +26245,7 @@ static struct cipher_testvec cast5_dec_tv_template[] = { +@@ -26161,7 +26245,7 @@ static struct cipher_testvec cast5_dec_t }, }; @@ -5835,7 +5812,7 @@ index 9033088c..ce9f4334 100644 { /* Generated from TF test vectors */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A", -@@ -26299,7 +26383,7 @@ static struct cipher_testvec cast5_cbc_enc_tv_template[] = { +@@ -26299,7 +26383,7 @@ static struct cipher_testvec cast5_cbc_e }, }; @@ -5844,7 +5821,7 @@ index 9033088c..ce9f4334 100644 { /* Generated from TF test vectors */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A", -@@ -26437,7 +26521,7 @@ static struct cipher_testvec cast5_cbc_dec_tv_template[] = { +@@ -26437,7 +26521,7 @@ static struct cipher_testvec cast5_cbc_d }, }; @@ -5853,7 +5830,7 @@ index 9033088c..ce9f4334 100644 { /* Generated from TF test vectors */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A", -@@ -26588,7 +26672,7 @@ static struct cipher_testvec cast5_ctr_enc_tv_template[] = { +@@ -26588,7 +26672,7 @@ static struct cipher_testvec cast5_ctr_e }, }; @@ -5862,7 +5839,7 @@ index 9033088c..ce9f4334 100644 { /* Generated from TF test vectors */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A", -@@ -26742,10 +26826,7 @@ static struct cipher_testvec cast5_ctr_dec_tv_template[] = { +@@ -26742,10 +26826,7 @@ static struct cipher_testvec cast5_ctr_d /* * ARC4 test vectors from OpenSSL */ @@ -5874,7 +5851,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x01\x23\x45\x67\x89\xab\xcd\xef", .klen = 8, -@@ -26811,7 +26892,7 @@ static struct cipher_testvec arc4_enc_tv_template[] = { +@@ -26811,7 +26892,7 @@ static struct cipher_testvec arc4_enc_tv }, }; @@ -5883,7 +5860,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x01\x23\x45\x67\x89\xab\xcd\xef", .klen = 8, -@@ -26880,10 +26961,7 @@ static struct cipher_testvec arc4_dec_tv_template[] = { +@@ -26880,10 +26961,7 @@ static struct cipher_testvec arc4_dec_tv /* * TEA test vectors */ @@ -5895,7 +5872,7 @@ index 9033088c..ce9f4334 100644 { .key = zeroed_string, .klen = 16, -@@ -26926,7 +27004,7 @@ static struct cipher_testvec tea_enc_tv_template[] = { +@@ -26926,7 +27004,7 @@ static struct cipher_testvec tea_enc_tv_ } }; @@ -5904,7 +5881,7 @@ index 9033088c..ce9f4334 100644 { .key = zeroed_string, .klen = 16, -@@ -26972,10 +27050,7 @@ static struct cipher_testvec tea_dec_tv_template[] = { +@@ -26972,10 +27050,7 @@ static struct cipher_testvec tea_dec_tv_ /* * XTEA test vectors */ @@ -5916,7 +5893,7 @@ index 9033088c..ce9f4334 100644 { .key = zeroed_string, .klen = 16, -@@ -27018,7 +27093,7 @@ static struct cipher_testvec xtea_enc_tv_template[] = { +@@ -27018,7 +27093,7 @@ static struct cipher_testvec xtea_enc_tv } }; @@ -5925,7 +5902,7 @@ index 9033088c..ce9f4334 100644 { .key = zeroed_string, .klen = 16, -@@ -27064,10 +27139,7 @@ static struct cipher_testvec xtea_dec_tv_template[] = { +@@ -27064,10 +27139,7 @@ static struct cipher_testvec xtea_dec_tv /* * KHAZAD test vectors. */ @@ -5937,7 +5914,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x80\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00", -@@ -27113,7 +27185,7 @@ static struct cipher_testvec khazad_enc_tv_template[] = { +@@ -27113,7 +27185,7 @@ static struct cipher_testvec khazad_enc_ }, }; @@ -5946,7 +5923,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x80\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00", -@@ -27163,12 +27235,7 @@ static struct cipher_testvec khazad_dec_tv_template[] = { +@@ -27163,12 +27235,7 @@ static struct cipher_testvec khazad_dec_ * Anubis test vectors. */ @@ -5960,7 +5937,7 @@ index 9033088c..ce9f4334 100644 { .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe" "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe", -@@ -27231,7 +27298,7 @@ static struct cipher_testvec anubis_enc_tv_template[] = { +@@ -27231,7 +27298,7 @@ static struct cipher_testvec anubis_enc_ }, }; @@ -5969,7 +5946,7 @@ index 9033088c..ce9f4334 100644 { .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe" "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe", -@@ -27294,7 +27361,7 @@ static struct cipher_testvec anubis_dec_tv_template[] = { +@@ -27294,7 +27361,7 @@ static struct cipher_testvec anubis_dec_ }, }; @@ -5978,7 +5955,7 @@ index 9033088c..ce9f4334 100644 { .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe" "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe", -@@ -27329,7 +27396,7 @@ static struct cipher_testvec anubis_cbc_enc_tv_template[] = { +@@ -27329,7 +27396,7 @@ static struct cipher_testvec anubis_cbc_ }, }; @@ -5987,7 +5964,7 @@ index 9033088c..ce9f4334 100644 { .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe" "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe", -@@ -27367,10 +27434,7 @@ static struct cipher_testvec anubis_cbc_dec_tv_template[] = { +@@ -27367,10 +27434,7 @@ static struct cipher_testvec anubis_cbc_ /* * XETA test vectors */ @@ -5999,7 +5976,7 @@ index 9033088c..ce9f4334 100644 { .key = zeroed_string, .klen = 16, -@@ -27413,7 +27477,7 @@ static struct cipher_testvec xeta_enc_tv_template[] = { +@@ -27413,7 +27477,7 @@ static struct cipher_testvec xeta_enc_tv } }; @@ -6008,7 +5985,7 @@ index 9033088c..ce9f4334 100644 { .key = zeroed_string, .klen = 16, -@@ -27459,10 +27523,7 @@ static struct cipher_testvec xeta_dec_tv_template[] = { +@@ -27459,10 +27523,7 @@ static struct cipher_testvec xeta_dec_tv /* * FCrypt test vectors */ @@ -6020,7 +5997,7 @@ index 9033088c..ce9f4334 100644 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */ .key = "\x00\x00\x00\x00\x00\x00\x00\x00", .klen = 8, -@@ -27523,7 +27584,7 @@ static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = { +@@ -27523,7 +27584,7 @@ static struct cipher_testvec fcrypt_pcbc } }; @@ -6029,7 +6006,7 @@ index 9033088c..ce9f4334 100644 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */ .key = "\x00\x00\x00\x00\x00\x00\x00\x00", .klen = 8, -@@ -27587,18 +27648,7 @@ static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = { +@@ -27587,18 +27648,7 @@ static struct cipher_testvec fcrypt_pcbc /* * CAMELLIA test vectors. */ @@ -6049,7 +6026,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x01\x23\x45\x67\x89\xab\xcd\xef" "\xfe\xdc\xba\x98\x76\x54\x32\x10", -@@ -27898,7 +27948,7 @@ static struct cipher_testvec camellia_enc_tv_template[] = { +@@ -27898,7 +27948,7 @@ static struct cipher_testvec camellia_en }, }; @@ -6058,7 +6035,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x01\x23\x45\x67\x89\xab\xcd\xef" "\xfe\xdc\xba\x98\x76\x54\x32\x10", -@@ -28198,7 +28248,7 @@ static struct cipher_testvec camellia_dec_tv_template[] = { +@@ -28198,7 +28248,7 @@ static struct cipher_testvec camellia_de }, }; @@ -6067,7 +6044,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b" "\x51\x2e\x03\xd5\x34\x12\x00\x06", -@@ -28494,7 +28544,7 @@ static struct cipher_testvec camellia_cbc_enc_tv_template[] = { +@@ -28494,7 +28544,7 @@ static struct cipher_testvec camellia_cb }, }; @@ -6076,7 +6053,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b" "\x51\x2e\x03\xd5\x34\x12\x00\x06", -@@ -28790,7 +28840,7 @@ static struct cipher_testvec camellia_cbc_dec_tv_template[] = { +@@ -28790,7 +28840,7 @@ static struct cipher_testvec camellia_cb }, }; @@ -6085,7 +6062,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Crypto++ */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" -@@ -29457,7 +29507,7 @@ static struct cipher_testvec camellia_ctr_enc_tv_template[] = { +@@ -29457,7 +29507,7 @@ static struct cipher_testvec camellia_ct }, }; @@ -6094,7 +6071,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Crypto++ */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" -@@ -30124,7 +30174,7 @@ static struct cipher_testvec camellia_ctr_dec_tv_template[] = { +@@ -30124,7 +30174,7 @@ static struct cipher_testvec camellia_ct }, }; @@ -6103,7 +6080,7 @@ index 9033088c..ce9f4334 100644 /* Generated from AES-LRW test vectors */ { .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d" -@@ -30376,7 +30426,7 @@ static struct cipher_testvec camellia_lrw_enc_tv_template[] = { +@@ -30376,7 +30426,7 @@ static struct cipher_testvec camellia_lr }, }; @@ -6112,7 +6089,7 @@ index 9033088c..ce9f4334 100644 /* Generated from AES-LRW test vectors */ /* same as enc vectors with input and result reversed */ { -@@ -30629,7 +30679,7 @@ static struct cipher_testvec camellia_lrw_dec_tv_template[] = { +@@ -30629,7 +30679,7 @@ static struct cipher_testvec camellia_lr }, }; @@ -6121,7 +6098,7 @@ index 9033088c..ce9f4334 100644 /* Generated from AES-XTS test vectors */ { .key = "\x00\x00\x00\x00\x00\x00\x00\x00" -@@ -30971,7 +31021,7 @@ static struct cipher_testvec camellia_xts_enc_tv_template[] = { +@@ -30971,7 +31021,7 @@ static struct cipher_testvec camellia_xt }, }; @@ -6130,7 +6107,7 @@ index 9033088c..ce9f4334 100644 /* Generated from AES-XTS test vectors */ /* same as enc vectors with input and result reversed */ { -@@ -31317,10 +31367,7 @@ static struct cipher_testvec camellia_xts_dec_tv_template[] = { +@@ -31317,10 +31367,7 @@ static struct cipher_testvec camellia_xt /* * SEED test vectors */ @@ -6142,7 +6119,7 @@ index 9033088c..ce9f4334 100644 { .key = zeroed_string, .klen = 16, -@@ -31362,7 +31409,7 @@ static struct cipher_testvec seed_enc_tv_template[] = { +@@ -31362,7 +31409,7 @@ static struct cipher_testvec seed_enc_tv } }; @@ -6151,7 +6128,7 @@ index 9033088c..ce9f4334 100644 { .key = zeroed_string, .klen = 16, -@@ -31404,8 +31451,7 @@ static struct cipher_testvec seed_dec_tv_template[] = { +@@ -31404,8 +31451,7 @@ static struct cipher_testvec seed_dec_tv } }; @@ -6161,7 +6138,7 @@ index 9033088c..ce9f4334 100644 /* * Testvectors from verified.test-vectors submitted to ECRYPT. * They are truncated to size 39, 64, 111, 129 to test a variety -@@ -32574,8 +32620,7 @@ static struct cipher_testvec salsa20_stream_enc_tv_template[] = { +@@ -32574,8 +32620,7 @@ static struct cipher_testvec salsa20_str }, }; @@ -6171,7 +6148,7 @@ index 9033088c..ce9f4334 100644 { /* RFC7539 A.2. Test Vector #1 */ .key = "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00" -@@ -33086,9 +33131,7 @@ static struct cipher_testvec chacha20_enc_tv_template[] = { +@@ -33086,9 +33131,7 @@ static struct cipher_testvec chacha20_en /* * CTS (Cipher Text Stealing) mode tests */ @@ -6182,7 +6159,7 @@ index 9033088c..ce9f4334 100644 { /* from rfc3962 */ .klen = 16, .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20" -@@ -33190,7 +33233,7 @@ static struct cipher_testvec cts_mode_enc_tv_template[] = { +@@ -33190,7 +33233,7 @@ static struct cipher_testvec cts_mode_en } }; @@ -6203,7 +6180,7 @@ index 9033088c..ce9f4334 100644 { .inlen = 70, .outlen = 38, -@@ -33347,7 +33387,7 @@ static struct comp_testvec deflate_comp_tv_template[] = { +@@ -33347,7 +33387,7 @@ static struct comp_testvec deflate_comp_ }, }; @@ -6212,7 +6189,7 @@ index 9033088c..ce9f4334 100644 { .inlen = 122, .outlen = 191, -@@ -33386,10 +33426,7 @@ static struct comp_testvec deflate_decomp_tv_template[] = { +@@ -33386,10 +33426,7 @@ static struct comp_testvec deflate_decom /* * LZO test vectors (null-terminated strings). */ @@ -6224,7 +6201,7 @@ index 9033088c..ce9f4334 100644 { .inlen = 70, .outlen = 57, -@@ -33429,7 +33466,7 @@ static struct comp_testvec lzo_comp_tv_template[] = { +@@ -33429,7 +33466,7 @@ static struct comp_testvec lzo_comp_tv_t }, }; @@ -6233,7 +6210,7 @@ index 9033088c..ce9f4334 100644 { .inlen = 133, .outlen = 159, -@@ -33472,7 +33509,7 @@ static struct comp_testvec lzo_decomp_tv_template[] = { +@@ -33472,7 +33509,7 @@ static struct comp_testvec lzo_decomp_tv */ #define MICHAEL_MIC_TEST_VECTORS 6 @@ -6242,7 +6219,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x00\x00\x00\x00\x00\x00\x00\x00", .ksize = 8, -@@ -33520,9 +33557,7 @@ static struct hash_testvec michael_mic_tv_template[] = { +@@ -33520,9 +33557,7 @@ static struct hash_testvec michael_mic_t /* * CRC32 test vectors */ @@ -6253,7 +6230,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x87\xa9\xcb\xed", .ksize = 4, -@@ -33954,9 +33989,7 @@ static struct hash_testvec crc32_tv_template[] = { +@@ -33954,9 +33989,7 @@ static struct hash_testvec crc32_tv_temp /* * CRC32C test vectors */ @@ -6264,7 +6241,7 @@ index 9033088c..ce9f4334 100644 { .psize = 0, .digest = "\x00\x00\x00\x00", -@@ -34392,9 +34425,7 @@ static struct hash_testvec crc32c_tv_template[] = { +@@ -34392,9 +34425,7 @@ static struct hash_testvec crc32c_tv_tem /* * Blakcifn CRC test vectors */ @@ -6275,7 +6252,7 @@ index 9033088c..ce9f4334 100644 { .psize = 0, .digest = "\x00\x00\x00\x00", -@@ -34479,9 +34510,6 @@ static struct hash_testvec bfin_crc_tv_template[] = { +@@ -34479,9 +34510,6 @@ static struct hash_testvec bfin_crc_tv_t }; @@ -6285,7 +6262,7 @@ index 9033088c..ce9f4334 100644 static struct comp_testvec lz4_comp_tv_template[] = { { .inlen = 70, -@@ -34512,9 +34540,6 @@ static struct comp_testvec lz4_decomp_tv_template[] = { +@@ -34512,9 +34540,6 @@ static struct comp_testvec lz4_decomp_tv }, }; @@ -6295,9 +6272,6 @@ index 9033088c..ce9f4334 100644 static struct comp_testvec lz4hc_comp_tv_template[] = { { .inlen = 70, -diff --git a/crypto/tls.c b/crypto/tls.c -new file mode 100644 -index 00000000..377226f5 --- /dev/null +++ b/crypto/tls.c @@ -0,0 +1,607 @@ @@ -6908,8 +6882,6 @@ index 00000000..377226f5 + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("TLS 1.0 record encryption"); -diff --git a/drivers/crypto/caam/Kconfig b/drivers/crypto/caam/Kconfig -index 64bf3024..3831a6f7 100644 --- a/drivers/crypto/caam/Kconfig +++ b/drivers/crypto/caam/Kconfig @@ -1,6 +1,11 @@ @@ -6963,7 +6935,7 @@ index 64bf3024..3831a6f7 100644 help Enable the Job Ring's interrupt coalescing feature. -@@ -74,7 +86,6 @@ config CRYPTO_DEV_FSL_CAAM_INTC_TIME_THLD +@@ -74,7 +86,6 @@ config CRYPTO_DEV_FSL_CAAM_INTC_TIME_THL config CRYPTO_DEV_FSL_CAAM_CRYPTO_API tristate "Register algorithm implementations with the Crypto API" @@ -7050,11 +7022,9 @@ index 64bf3024..3831a6f7 100644 + def_tristate (CRYPTO_DEV_FSL_CAAM_CRYPTO_API || \ + CRYPTO_DEV_FSL_CAAM_CRYPTO_API_QI || \ + CRYPTO_DEV_FSL_DPAA2_CAAM) -diff --git a/drivers/crypto/caam/Makefile b/drivers/crypto/caam/Makefile -index 08bf5515..01f73a25 100644 --- a/drivers/crypto/caam/Makefile +++ b/drivers/crypto/caam/Makefile -@@ -5,13 +5,26 @@ ifeq ($(CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG), y) +@@ -5,13 +5,26 @@ ifeq ($(CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG ccflags-y := -DDEBUG endif @@ -7082,8 +7052,6 @@ index 08bf5515..01f73a25 100644 +obj-$(CONFIG_CRYPTO_DEV_FSL_DPAA2_CAAM) += dpaa2_caam.o + +dpaa2_caam-y := caamalg_qi2.o dpseci.o -diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c -index 0d743c63..abf2f52b 100644 --- a/drivers/crypto/caam/caamalg.c +++ b/drivers/crypto/caam/caamalg.c @@ -2,6 +2,7 @@ @@ -7527,7 +7495,7 @@ index 0d743c63..abf2f52b 100644 return 0; } -@@ -470,11 +168,11 @@ static int aead_set_sh_desc(struct crypto_aead *aead) +@@ -470,11 +168,11 @@ static int aead_set_sh_desc(struct crypt unsigned int ivsize = crypto_aead_ivsize(aead); struct caam_ctx *ctx = crypto_aead_ctx(aead); struct device *jrdev = ctx->jrdev; @@ -7543,7 +7511,7 @@ index 0d743c63..abf2f52b 100644 OP_ALG_AAI_CTR_MOD128); const bool is_rfc3686 = alg->caam.rfc3686; -@@ -482,7 +180,7 @@ static int aead_set_sh_desc(struct crypto_aead *aead) +@@ -482,7 +180,7 @@ static int aead_set_sh_desc(struct crypt return 0; /* NULL encryption / decryption */ @@ -7552,7 +7520,7 @@ index 0d743c63..abf2f52b 100644 return aead_null_set_sh_desc(aead); /* -@@ -497,8 +195,14 @@ static int aead_set_sh_desc(struct crypto_aead *aead) +@@ -497,8 +195,14 @@ static int aead_set_sh_desc(struct crypt * RFC3686 specific: * CONTEXT1[255:128] = {NONCE, IV, COUNTER} */ @@ -7568,7 +7536,7 @@ index 0d743c63..abf2f52b 100644 if (alg->caam.geniv) goto skip_enc; -@@ -507,146 +211,64 @@ static int aead_set_sh_desc(struct crypto_aead *aead) +@@ -507,146 +211,64 @@ static int aead_set_sh_desc(struct crypt * Job Descriptor and Shared Descriptors * must all fit into the 64-word Descriptor h/w Buffer */ @@ -7693,8 +7661,7 @@ index 0d743c63..abf2f52b 100644 - - /* Skip assoc data */ - append_seq_fifo_store(desc, 0, FIFOST_TYPE_SKIP | FIFOLDST_VLF); -+ ctx->adata.key_dma = ctx->key_dma; - +- - /* read assoc before reading payload */ - append_seq_fifo_load(desc, 0, FIFOLD_CLASS_CLASS2 | FIFOLD_TYPE_MSG | - KEY_VLF); @@ -7713,7 +7680,8 @@ index 0d743c63..abf2f52b 100644 - LDST_SRCDST_BYTE_CONTEXT | - ((ctx1_iv_off + CTR_RFC3686_IV_SIZE) << - LDST_OFFSET_SHIFT)); -- ++ ctx->adata.key_dma = ctx->key_dma; + - /* Choose operation */ - if (ctr_mode) - append_operation(desc, ctx->class1_alg_type | @@ -7728,13 +7696,13 @@ index 0d743c63..abf2f52b 100644 - append_math_add(desc, VARSEQINLEN, SEQOUTLEN, REG0, CAAM_CMD_SZ); - append_math_add(desc, VARSEQOUTLEN, SEQOUTLEN, REG0, CAAM_CMD_SZ); - aead_append_src_dst(desc, FIFOLD_TYPE_MSG); -+ ctx->adata.key_inline = !!(inl_mask & 1); -+ ctx->cdata.key_inline = !!(inl_mask & 2); - +- - /* Load ICV */ - append_seq_fifo_load(desc, ctx->authsize, FIFOLD_CLASS_CLASS2 | - FIFOLD_TYPE_LAST2 | FIFOLD_TYPE_ICV); -- ++ ctx->adata.key_inline = !!(inl_mask & 1); ++ ctx->cdata.key_inline = !!(inl_mask & 2); + - ctx->sh_desc_dec_dma = dma_map_single(jrdev, desc, - desc_bytes(desc), - DMA_TO_DEVICE); @@ -7757,7 +7725,7 @@ index 0d743c63..abf2f52b 100644 if (!alg->caam.geniv) goto skip_givenc; -@@ -655,107 +277,32 @@ static int aead_set_sh_desc(struct crypto_aead *aead) +@@ -655,107 +277,32 @@ skip_enc: * Job Descriptor and Shared Descriptors * must all fit into the 64-word Descriptor h/w Buffer */ @@ -7767,29 +7735,25 @@ index 0d743c63..abf2f52b 100644 - (is_rfc3686 ? DESC_AEAD_CTR_RFC3686_LEN : 0) <= - CAAM_DESC_BYTES_MAX) - keys_fit_inline = true; +- +- /* aead_givencrypt shared descriptor */ +- desc = ctx->sh_desc_enc; +- +- /* Note: Context registers are saved. */ +- init_sh_desc_key_aead(desc, ctx, keys_fit_inline, is_rfc3686); + if (desc_inline_query(DESC_AEAD_GIVENC_LEN + + (is_rfc3686 ? DESC_AEAD_CTR_RFC3686_LEN : 0), + AUTHENC_DESC_JOB_IO_LEN, data_len, &inl_mask, + ARRAY_SIZE(data_len)) < 0) + return -EINVAL; -- /* aead_givencrypt shared descriptor */ -- desc = ctx->sh_desc_enc; +- if (is_rfc3686) +- goto copy_iv; + if (inl_mask & 1) + ctx->adata.key_virt = ctx->key; + else + ctx->adata.key_dma = ctx->key_dma; -- /* Note: Context registers are saved. */ -- init_sh_desc_key_aead(desc, ctx, keys_fit_inline, is_rfc3686); -+ if (inl_mask & 2) -+ ctx->cdata.key_virt = ctx->key + ctx->adata.keylen_pad; -+ else -+ ctx->cdata.key_dma = ctx->key_dma + ctx->adata.keylen_pad; - -- if (is_rfc3686) -- goto copy_iv; -- - /* Generate IV */ - geniv = NFIFOENTRY_STYPE_PAD | NFIFOENTRY_DEST_DECO | - NFIFOENTRY_DTYPE_MSG | NFIFOENTRY_LC1 | @@ -7834,7 +7798,11 @@ index 0d743c63..abf2f52b 100644 - LDST_SRCDST_WORD_INFO_FIFO | LDST_IMM); - append_load_imm_u32(desc, ivsize, LDST_CLASS_2_CCB | - LDST_SRCDST_WORD_DATASZ_REG | LDST_IMM); -- ++ if (inl_mask & 2) ++ ctx->cdata.key_virt = ctx->key + ctx->adata.keylen_pad; ++ else ++ ctx->cdata.key_dma = ctx->key_dma + ctx->adata.keylen_pad; + - /* Load Counter into CONTEXT1 reg */ - if (is_rfc3686) - append_load_imm_be32(desc, 1, LDST_IMM | LDST_CLASS_1_CCB | @@ -7862,7 +7830,9 @@ index 0d743c63..abf2f52b 100644 - /* Write ICV */ - append_seq_store(desc, ctx->authsize, LDST_CLASS_2_CCB | - LDST_SRCDST_BYTE_CONTEXT); -- ++ ctx->adata.key_inline = !!(inl_mask & 1); ++ ctx->cdata.key_inline = !!(inl_mask & 2); + - ctx->sh_desc_enc_dma = dma_map_single(jrdev, desc, - desc_bytes(desc), - DMA_TO_DEVICE); @@ -7875,9 +7845,6 @@ index 0d743c63..abf2f52b 100644 - DUMP_PREFIX_ADDRESS, 16, 4, desc, - desc_bytes(desc), 1); -#endif -+ ctx->adata.key_inline = !!(inl_mask & 1); -+ ctx->cdata.key_inline = !!(inl_mask & 2); -+ + /* aead_givencrypt shared descriptor */ + desc = ctx->sh_desc_enc; + cnstr_shdsc_aead_givencap(desc, &ctx->cdata, &ctx->adata, ivsize, @@ -7888,7 +7855,7 @@ index 0d743c63..abf2f52b 100644 skip_givenc: return 0; -@@ -776,12 +323,12 @@ static int gcm_set_sh_desc(struct crypto_aead *aead) +@@ -776,12 +323,12 @@ static int gcm_set_sh_desc(struct crypto { struct caam_ctx *ctx = crypto_aead_ctx(aead); struct device *jrdev = ctx->jrdev; @@ -7905,7 +7872,7 @@ index 0d743c63..abf2f52b 100644 return 0; /* -@@ -789,175 +336,35 @@ static int gcm_set_sh_desc(struct crypto_aead *aead) +@@ -789,175 +336,35 @@ static int gcm_set_sh_desc(struct crypto * Job Descriptor and Shared Descriptor * must fit into the 64-word Descriptor h/w Buffer */ @@ -8101,7 +8068,7 @@ index 0d743c63..abf2f52b 100644 return 0; } -@@ -976,11 +383,12 @@ static int rfc4106_set_sh_desc(struct crypto_aead *aead) +@@ -976,11 +383,12 @@ static int rfc4106_set_sh_desc(struct cr { struct caam_ctx *ctx = crypto_aead_ctx(aead); struct device *jrdev = ctx->jrdev; @@ -8117,7 +8084,7 @@ index 0d743c63..abf2f52b 100644 return 0; /* -@@ -988,148 +396,37 @@ static int rfc4106_set_sh_desc(struct crypto_aead *aead) +@@ -988,148 +396,37 @@ static int rfc4106_set_sh_desc(struct cr * Job Descriptor and Shared Descriptor * must fit into the 64-word Descriptor h/w Buffer */ @@ -8288,7 +8255,7 @@ index 0d743c63..abf2f52b 100644 return 0; } -@@ -1149,12 +446,12 @@ static int rfc4543_set_sh_desc(struct crypto_aead *aead) +@@ -1149,12 +446,12 @@ static int rfc4543_set_sh_desc(struct cr { struct caam_ctx *ctx = crypto_aead_ctx(aead); struct device *jrdev = ctx->jrdev; @@ -8305,15 +8272,22 @@ index 0d743c63..abf2f52b 100644 return 0; /* -@@ -1162,151 +459,37 @@ static int rfc4543_set_sh_desc(struct crypto_aead *aead) +@@ -1162,151 +459,37 @@ static int rfc4543_set_sh_desc(struct cr * Job Descriptor and Shared Descriptor * must fit into the 64-word Descriptor h/w Buffer */ - if (DESC_RFC4543_ENC_LEN + GCM_DESC_JOB_IO_LEN + - ctx->enckeylen <= CAAM_DESC_BYTES_MAX) - keys_fit_inline = true; -- -- desc = ctx->sh_desc_enc; ++ if (rem_bytes >= DESC_RFC4543_ENC_LEN) { ++ ctx->cdata.key_inline = true; ++ ctx->cdata.key_virt = ctx->key; ++ } else { ++ ctx->cdata.key_inline = false; ++ ctx->cdata.key_dma = ctx->key_dma; ++ } + + desc = ctx->sh_desc_enc; - - init_sh_desc(desc, HDR_SHARE_SERIAL); - @@ -8370,20 +8344,12 @@ index 0d743c63..abf2f52b 100644 - if (dma_mapping_error(jrdev, ctx->sh_desc_enc_dma)) { - dev_err(jrdev, "unable to map shared descriptor\n"); - return -ENOMEM; -+ if (rem_bytes >= DESC_RFC4543_ENC_LEN) { -+ ctx->cdata.key_inline = true; -+ ctx->cdata.key_virt = ctx->key; -+ } else { -+ ctx->cdata.key_inline = false; -+ ctx->cdata.key_dma = ctx->key_dma; - } +- } -#ifdef DEBUG - print_hex_dump(KERN_ERR, "rfc4543 enc shdesc@"__stringify(__LINE__)": ", - DUMP_PREFIX_ADDRESS, 16, 4, desc, - desc_bytes(desc), 1); -#endif -+ -+ desc = ctx->sh_desc_enc; + cnstr_shdsc_rfc4543_encap(desc, &ctx->cdata, ivsize, ctx->authsize, + false); + dma_sync_single_for_device(jrdev, ctx->sh_desc_enc_dma, @@ -8480,7 +8446,7 @@ index 0d743c63..abf2f52b 100644 return 0; } -@@ -1322,19 +505,9 @@ static int rfc4543_setauthsize(struct crypto_aead *authenc, +@@ -1322,19 +505,9 @@ static int rfc4543_setauthsize(struct cr return 0; } @@ -8500,7 +8466,7 @@ index 0d743c63..abf2f52b 100644 struct caam_ctx *ctx = crypto_aead_ctx(aead); struct device *jrdev = ctx->jrdev; struct crypto_authenc_keys keys; -@@ -1343,53 +516,32 @@ static int aead_setkey(struct crypto_aead *aead, +@@ -1343,53 +516,32 @@ static int aead_setkey(struct crypto_aea if (crypto_authenc_extractkeys(&keys, key, keylen) != 0) goto badkey; @@ -8563,7 +8529,7 @@ index 0d743c63..abf2f52b 100644 badkey: crypto_aead_set_flags(aead, CRYPTO_TFM_RES_BAD_KEY_LEN); return -EINVAL; -@@ -1400,7 +552,6 @@ static int gcm_setkey(struct crypto_aead *aead, +@@ -1400,7 +552,6 @@ static int gcm_setkey(struct crypto_aead { struct caam_ctx *ctx = crypto_aead_ctx(aead); struct device *jrdev = ctx->jrdev; @@ -8571,7 +8537,7 @@ index 0d743c63..abf2f52b 100644 #ifdef DEBUG print_hex_dump(KERN_ERR, "key in @"__stringify(__LINE__)": ", -@@ -1408,21 +559,10 @@ static int gcm_setkey(struct crypto_aead *aead, +@@ -1408,21 +559,10 @@ static int gcm_setkey(struct crypto_aead #endif memcpy(ctx->key, key, keylen); @@ -8596,7 +8562,7 @@ index 0d743c63..abf2f52b 100644 } static int rfc4106_setkey(struct crypto_aead *aead, -@@ -1430,7 +570,6 @@ static int rfc4106_setkey(struct crypto_aead *aead, +@@ -1430,7 +570,6 @@ static int rfc4106_setkey(struct crypto_ { struct caam_ctx *ctx = crypto_aead_ctx(aead); struct device *jrdev = ctx->jrdev; @@ -8604,7 +8570,7 @@ index 0d743c63..abf2f52b 100644 if (keylen < 4) return -EINVAL; -@@ -1446,22 +585,10 @@ static int rfc4106_setkey(struct crypto_aead *aead, +@@ -1446,22 +585,10 @@ static int rfc4106_setkey(struct crypto_ * The last four bytes of the key material are used as the salt value * in the nonce. Update the AES key length. */ @@ -8631,7 +8597,7 @@ index 0d743c63..abf2f52b 100644 } static int rfc4543_setkey(struct crypto_aead *aead, -@@ -1469,7 +596,6 @@ static int rfc4543_setkey(struct crypto_aead *aead, +@@ -1469,7 +596,6 @@ static int rfc4543_setkey(struct crypto_ { struct caam_ctx *ctx = crypto_aead_ctx(aead); struct device *jrdev = ctx->jrdev; @@ -8639,7 +8605,7 @@ index 0d743c63..abf2f52b 100644 if (keylen < 4) return -EINVAL; -@@ -1485,43 +611,28 @@ static int rfc4543_setkey(struct crypto_aead *aead, +@@ -1485,43 +611,28 @@ static int rfc4543_setkey(struct crypto_ * The last four bytes of the key material are used as the salt value * in the nonce. Update the AES key length. */ @@ -8690,7 +8656,7 @@ index 0d743c63..abf2f52b 100644 #ifdef DEBUG print_hex_dump(KERN_ERR, "key in @"__stringify(__LINE__)": ", DUMP_PREFIX_ADDRESS, 16, 4, key, keylen, 1); -@@ -1544,215 +655,33 @@ static int ablkcipher_setkey(struct crypto_ablkcipher *ablkcipher, +@@ -1544,215 +655,33 @@ static int ablkcipher_setkey(struct cryp keylen -= CTR_RFC3686_NONCE_SIZE; } @@ -8733,15 +8699,15 @@ index 0d743c63..abf2f52b 100644 - } - - set_jump_tgt_here(desc, key_jump_cmd); +- +- /* Load iv */ +- append_seq_load(desc, crt->ivsize, LDST_SRCDST_BYTE_CONTEXT | +- LDST_CLASS_1_CCB | (ctx1_iv_off << LDST_OFFSET_SHIFT)); + cnstr_shdsc_ablkcipher_encap(desc, &ctx->cdata, ivsize, is_rfc3686, + ctx1_iv_off); + dma_sync_single_for_device(jrdev, ctx->sh_desc_enc_dma, + desc_bytes(desc), DMA_TO_DEVICE); -- /* Load iv */ -- append_seq_load(desc, crt->ivsize, LDST_SRCDST_BYTE_CONTEXT | -- LDST_CLASS_1_CCB | (ctx1_iv_off << LDST_OFFSET_SHIFT)); -- - /* Load counter into CONTEXT1 reg */ - if (is_rfc3686) - append_load_imm_be32(desc, 1, LDST_IMM | LDST_CLASS_1_CCB | @@ -8923,7 +8889,7 @@ index 0d743c63..abf2f52b 100644 } static int xts_ablkcipher_setkey(struct crypto_ablkcipher *ablkcipher, -@@ -1760,8 +689,7 @@ static int xts_ablkcipher_setkey(struct crypto_ablkcipher *ablkcipher, +@@ -1760,8 +689,7 @@ static int xts_ablkcipher_setkey(struct { struct caam_ctx *ctx = crypto_ablkcipher_ctx(ablkcipher); struct device *jrdev = ctx->jrdev; @@ -8933,7 +8899,7 @@ index 0d743c63..abf2f52b 100644 if (keylen != 2 * AES_MIN_KEY_SIZE && keylen != 2 * AES_MAX_KEY_SIZE) { crypto_ablkcipher_set_flags(ablkcipher, -@@ -1771,126 +699,38 @@ static int xts_ablkcipher_setkey(struct crypto_ablkcipher *ablkcipher, +@@ -1771,126 +699,38 @@ static int xts_ablkcipher_setkey(struct } memcpy(ctx->key, key, keylen); @@ -9089,7 +9055,7 @@ index 0d743c63..abf2f52b 100644 * @hw_desc: the h/w job descriptor followed by any referenced link tables */ struct ablkcipher_edesc { -@@ -1924,10 +764,11 @@ static void caam_unmap(struct device *dev, struct scatterlist *src, +@@ -1924,10 +764,11 @@ static void caam_unmap(struct device *de int sec4_sg_bytes) { if (dst != src) { @@ -9104,7 +9070,7 @@ index 0d743c63..abf2f52b 100644 } if (iv_dma) -@@ -2021,8 +862,7 @@ static void ablkcipher_encrypt_done(struct device *jrdev, u32 *desc, u32 err, +@@ -2021,8 +862,7 @@ static void ablkcipher_encrypt_done(stru dev_err(jrdev, "%s %d: err 0x%x\n", __func__, __LINE__, err); #endif @@ -9114,7 +9080,7 @@ index 0d743c63..abf2f52b 100644 if (err) caam_jr_strstatus(jrdev, err); -@@ -2031,10 +871,10 @@ static void ablkcipher_encrypt_done(struct device *jrdev, u32 *desc, u32 err, +@@ -2031,10 +871,10 @@ static void ablkcipher_encrypt_done(stru print_hex_dump(KERN_ERR, "dstiv @"__stringify(__LINE__)": ", DUMP_PREFIX_ADDRESS, 16, 4, req->info, edesc->src_nents > 1 ? 100 : ivsize, 1); @@ -9128,7 +9094,7 @@ index 0d743c63..abf2f52b 100644 ablkcipher_unmap(jrdev, edesc, req); -@@ -2062,8 +902,7 @@ static void ablkcipher_decrypt_done(struct device *jrdev, u32 *desc, u32 err, +@@ -2062,8 +902,7 @@ static void ablkcipher_decrypt_done(stru dev_err(jrdev, "%s %d: err 0x%x\n", __func__, __LINE__, err); #endif @@ -9138,7 +9104,7 @@ index 0d743c63..abf2f52b 100644 if (err) caam_jr_strstatus(jrdev, err); -@@ -2071,10 +910,10 @@ static void ablkcipher_decrypt_done(struct device *jrdev, u32 *desc, u32 err, +@@ -2071,10 +910,10 @@ static void ablkcipher_decrypt_done(stru print_hex_dump(KERN_ERR, "dstiv @"__stringify(__LINE__)": ", DUMP_PREFIX_ADDRESS, 16, 4, req->info, ivsize, 1); @@ -9152,7 +9118,7 @@ index 0d743c63..abf2f52b 100644 ablkcipher_unmap(jrdev, edesc, req); -@@ -2114,7 +953,7 @@ static void init_aead_job(struct aead_request *req, +@@ -2114,7 +953,7 @@ static void init_aead_job(struct aead_re init_job_desc_shared(desc, ptr, len, HDR_SHARE_DEFER | HDR_REVERSE); if (all_contig) { @@ -9161,7 +9127,7 @@ index 0d743c63..abf2f52b 100644 in_options = 0; } else { src_dma = edesc->sec4_sg_dma; -@@ -2129,7 +968,7 @@ static void init_aead_job(struct aead_request *req, +@@ -2129,7 +968,7 @@ static void init_aead_job(struct aead_re out_options = in_options; if (unlikely(req->src != req->dst)) { @@ -9170,7 +9136,7 @@ index 0d743c63..abf2f52b 100644 dst_dma = sg_dma_address(req->dst); } else { dst_dma = edesc->sec4_sg_dma + -@@ -2175,7 +1014,7 @@ static void init_gcm_job(struct aead_request *req, +@@ -2175,7 +1014,7 @@ static void init_gcm_job(struct aead_req FIFOLD_TYPE_IV | FIFOLD_TYPE_FLUSH1 | 12 | last); /* Append Salt */ if (!generic_gcm) @@ -9179,7 +9145,7 @@ index 0d743c63..abf2f52b 100644 /* Append IV */ append_data(desc, req->iv, ivsize); /* End of blank commands */ -@@ -2190,7 +1029,7 @@ static void init_authenc_job(struct aead_request *req, +@@ -2190,7 +1029,7 @@ static void init_authenc_job(struct aead struct caam_aead_alg, aead); unsigned int ivsize = crypto_aead_ivsize(aead); struct caam_ctx *ctx = crypto_aead_ctx(aead); @@ -9188,7 +9154,7 @@ index 0d743c63..abf2f52b 100644 OP_ALG_AAI_CTR_MOD128); const bool is_rfc3686 = alg->caam.rfc3686; u32 *desc = edesc->hw_desc; -@@ -2236,16 +1075,15 @@ static void init_ablkcipher_job(u32 *sh_desc, dma_addr_t ptr, +@@ -2236,16 +1075,15 @@ static void init_ablkcipher_job(u32 *sh_ int len, sec4_sg_index = 0; #ifdef DEBUG @@ -9210,7 +9176,7 @@ index 0d743c63..abf2f52b 100644 len = desc_len(sh_desc); init_job_desc_shared(desc, ptr, len, HDR_SHARE_DEFER | HDR_REVERSE); -@@ -2261,7 +1099,7 @@ static void init_ablkcipher_job(u32 *sh_desc, dma_addr_t ptr, +@@ -2261,7 +1099,7 @@ static void init_ablkcipher_job(u32 *sh_ append_seq_in_ptr(desc, src_dma, req->nbytes + ivsize, in_options); if (likely(req->src == req->dst)) { @@ -9219,7 +9185,7 @@ index 0d743c63..abf2f52b 100644 dst_dma = sg_dma_address(req->src); } else { dst_dma = edesc->sec4_sg_dma + -@@ -2269,7 +1107,7 @@ static void init_ablkcipher_job(u32 *sh_desc, dma_addr_t ptr, +@@ -2269,7 +1107,7 @@ static void init_ablkcipher_job(u32 *sh_ out_options = LDST_SGF; } } else { @@ -9228,7 +9194,7 @@ index 0d743c63..abf2f52b 100644 dst_dma = sg_dma_address(req->dst); } else { dst_dma = edesc->sec4_sg_dma + -@@ -2296,20 +1134,18 @@ static void init_ablkcipher_giv_job(u32 *sh_desc, dma_addr_t ptr, +@@ -2296,20 +1134,18 @@ static void init_ablkcipher_giv_job(u32 int len, sec4_sg_index = 0; #ifdef DEBUG @@ -9253,7 +9219,7 @@ index 0d743c63..abf2f52b 100644 src_dma = sg_dma_address(req->src); in_options = 0; } else { -@@ -2340,87 +1176,100 @@ static struct aead_edesc *aead_edesc_alloc(struct aead_request *req, +@@ -2340,87 +1176,100 @@ static struct aead_edesc *aead_edesc_all struct crypto_aead *aead = crypto_aead_reqtfm(req); struct caam_ctx *ctx = crypto_aead_ctx(aead); struct device *jrdev = ctx->jrdev; @@ -9409,7 +9375,7 @@ index 0d743c63..abf2f52b 100644 edesc->sec4_sg + sec4_sg_index, 0); } -@@ -2573,13 +1422,9 @@ static int aead_decrypt(struct aead_request *req) +@@ -2573,13 +1422,9 @@ static int aead_decrypt(struct aead_requ u32 *desc; int ret = 0; @@ -9426,7 +9392,7 @@ index 0d743c63..abf2f52b 100644 /* allocate extended descriptor */ edesc = aead_edesc_alloc(req, AUTHENC_DESC_JOB_IO_LEN, -@@ -2619,51 +1464,80 @@ static struct ablkcipher_edesc *ablkcipher_edesc_alloc(struct ablkcipher_request +@@ -2619,51 +1464,80 @@ static struct ablkcipher_edesc *ablkciph struct device *jrdev = ctx->jrdev; gfp_t flags = (req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP) ? GFP_KERNEL : GFP_ATOMIC; @@ -9530,7 +9496,7 @@ index 0d743c63..abf2f52b 100644 return ERR_PTR(-ENOMEM); } -@@ -2673,23 +1547,24 @@ static struct ablkcipher_edesc *ablkcipher_edesc_alloc(struct ablkcipher_request +@@ -2673,23 +1547,24 @@ static struct ablkcipher_edesc *ablkciph edesc->sec4_sg = (void *)edesc + sizeof(struct ablkcipher_edesc) + desc_bytes; @@ -9562,7 +9528,7 @@ index 0d743c63..abf2f52b 100644 return ERR_PTR(-ENOMEM); } -@@ -2701,7 +1576,7 @@ static struct ablkcipher_edesc *ablkcipher_edesc_alloc(struct ablkcipher_request +@@ -2701,7 +1576,7 @@ static struct ablkcipher_edesc *ablkciph sec4_sg_bytes, 1); #endif @@ -9571,7 +9537,7 @@ index 0d743c63..abf2f52b 100644 return edesc; } -@@ -2792,30 +1667,54 @@ static struct ablkcipher_edesc *ablkcipher_giv_edesc_alloc( +@@ -2792,30 +1667,54 @@ static struct ablkcipher_edesc *ablkciph struct crypto_ablkcipher *ablkcipher = crypto_ablkcipher_reqtfm(req); struct caam_ctx *ctx = crypto_ablkcipher_ctx(ablkcipher); struct device *jrdev = ctx->jrdev; @@ -9588,10 +9554,10 @@ index 0d743c63..abf2f52b 100644 + bool out_contig; int ivsize = crypto_ablkcipher_ivsize(ablkcipher); - int sec4_sg_index; +- +- src_nents = sg_count(req->src, req->nbytes); + int dst_sg_idx, sec4_sg_ents, sec4_sg_bytes; -- src_nents = sg_count(req->src, req->nbytes); -- - if (unlikely(req->dst != req->src)) - dst_nents = sg_count(req->dst, req->nbytes); + src_nents = sg_nents_for_len(req->src, req->nbytes); @@ -9642,7 +9608,7 @@ index 0d743c63..abf2f52b 100644 } /* -@@ -2825,21 +1724,29 @@ static struct ablkcipher_edesc *ablkcipher_giv_edesc_alloc( +@@ -2825,21 +1724,29 @@ static struct ablkcipher_edesc *ablkciph iv_dma = dma_map_single(jrdev, greq->giv, ivsize, DMA_TO_DEVICE); if (dma_mapping_error(jrdev, iv_dma)) { dev_err(jrdev, "unable to map IV\n"); @@ -9678,7 +9644,7 @@ index 0d743c63..abf2f52b 100644 return ERR_PTR(-ENOMEM); } -@@ -2849,24 +1756,24 @@ static struct ablkcipher_edesc *ablkcipher_giv_edesc_alloc( +@@ -2849,24 +1756,24 @@ static struct ablkcipher_edesc *ablkciph edesc->sec4_sg = (void *)edesc + sizeof(struct ablkcipher_edesc) + desc_bytes; @@ -9713,7 +9679,7 @@ index 0d743c63..abf2f52b 100644 return ERR_PTR(-ENOMEM); } edesc->iv_dma = iv_dma; -@@ -2878,7 +1785,7 @@ static struct ablkcipher_edesc *ablkcipher_giv_edesc_alloc( +@@ -2878,7 +1785,7 @@ static struct ablkcipher_edesc *ablkciph sec4_sg_bytes, 1); #endif @@ -9722,7 +9688,7 @@ index 0d743c63..abf2f52b 100644 return edesc; } -@@ -2889,7 +1796,7 @@ static int ablkcipher_givencrypt(struct skcipher_givcrypt_request *creq) +@@ -2889,7 +1796,7 @@ static int ablkcipher_givencrypt(struct struct crypto_ablkcipher *ablkcipher = crypto_ablkcipher_reqtfm(req); struct caam_ctx *ctx = crypto_ablkcipher_ctx(ablkcipher); struct device *jrdev = ctx->jrdev; @@ -9739,7 +9705,7 @@ index 0d743c63..abf2f52b 100644 }; static struct caam_alg_template driver_algs[] = { -@@ -3118,7 +2024,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3118,7 +2024,6 @@ static struct caam_aead_alg driver_aeads .caam = { .class2_alg_type = OP_ALG_ALGSEL_MD5 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9747,7 +9713,7 @@ index 0d743c63..abf2f52b 100644 }, }, { -@@ -3140,7 +2045,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3140,7 +2045,6 @@ static struct caam_aead_alg driver_aeads .caam = { .class2_alg_type = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9755,7 +9721,7 @@ index 0d743c63..abf2f52b 100644 }, }, { -@@ -3162,7 +2066,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3162,7 +2066,6 @@ static struct caam_aead_alg driver_aeads .caam = { .class2_alg_type = OP_ALG_ALGSEL_SHA224 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9763,7 +9729,7 @@ index 0d743c63..abf2f52b 100644 }, }, { -@@ -3184,7 +2087,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3184,7 +2087,6 @@ static struct caam_aead_alg driver_aeads .caam = { .class2_alg_type = OP_ALG_ALGSEL_SHA256 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9771,7 +9737,7 @@ index 0d743c63..abf2f52b 100644 }, }, { -@@ -3206,7 +2108,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3206,7 +2108,6 @@ static struct caam_aead_alg driver_aeads .caam = { .class2_alg_type = OP_ALG_ALGSEL_SHA384 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9779,7 +9745,7 @@ index 0d743c63..abf2f52b 100644 }, }, { -@@ -3228,7 +2129,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3228,7 +2129,6 @@ static struct caam_aead_alg driver_aeads .caam = { .class2_alg_type = OP_ALG_ALGSEL_SHA512 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9787,7 +9753,7 @@ index 0d743c63..abf2f52b 100644 }, }, { -@@ -3250,7 +2150,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3250,7 +2150,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_AES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_MD5 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9795,7 +9761,7 @@ index 0d743c63..abf2f52b 100644 }, }, { -@@ -3273,7 +2172,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3273,7 +2172,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_AES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_MD5 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9803,7 +9769,7 @@ index 0d743c63..abf2f52b 100644 .geniv = true, }, }, -@@ -3296,7 +2194,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3296,7 +2194,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_AES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9811,7 +9777,7 @@ index 0d743c63..abf2f52b 100644 }, }, { -@@ -3319,7 +2216,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3319,7 +2216,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_AES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9819,7 +9785,7 @@ index 0d743c63..abf2f52b 100644 .geniv = true, }, }, -@@ -3342,7 +2238,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3342,7 +2238,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_AES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA224 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9827,7 +9793,7 @@ index 0d743c63..abf2f52b 100644 }, }, { -@@ -3365,7 +2260,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3365,7 +2260,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_AES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA224 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9835,7 +9801,7 @@ index 0d743c63..abf2f52b 100644 .geniv = true, }, }, -@@ -3388,7 +2282,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3388,7 +2282,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_AES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA256 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9843,7 +9809,7 @@ index 0d743c63..abf2f52b 100644 }, }, { -@@ -3411,7 +2304,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3411,7 +2304,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_AES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA256 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9851,7 +9817,7 @@ index 0d743c63..abf2f52b 100644 .geniv = true, }, }, -@@ -3434,7 +2326,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3434,7 +2326,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_AES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA384 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9859,7 +9825,7 @@ index 0d743c63..abf2f52b 100644 }, }, { -@@ -3457,7 +2348,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3457,7 +2348,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_AES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA384 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9867,7 +9833,7 @@ index 0d743c63..abf2f52b 100644 .geniv = true, }, }, -@@ -3480,7 +2370,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3480,7 +2370,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_AES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA512 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9875,7 +9841,7 @@ index 0d743c63..abf2f52b 100644 }, }, { -@@ -3503,7 +2392,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3503,7 +2392,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_AES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA512 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9883,7 +9849,7 @@ index 0d743c63..abf2f52b 100644 .geniv = true, }, }, -@@ -3526,7 +2414,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3526,7 +2414,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_3DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_MD5 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9891,7 +9857,7 @@ index 0d743c63..abf2f52b 100644 } }, { -@@ -3549,7 +2436,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3549,7 +2436,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_3DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_MD5 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9899,7 +9865,7 @@ index 0d743c63..abf2f52b 100644 .geniv = true, } }, -@@ -3573,7 +2459,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3573,7 +2459,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_3DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9907,7 +9873,7 @@ index 0d743c63..abf2f52b 100644 }, }, { -@@ -3597,7 +2482,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3597,7 +2482,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_3DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9915,7 +9881,7 @@ index 0d743c63..abf2f52b 100644 .geniv = true, }, }, -@@ -3621,7 +2505,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3621,7 +2505,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_3DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA224 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9923,7 +9889,7 @@ index 0d743c63..abf2f52b 100644 }, }, { -@@ -3645,7 +2528,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3645,7 +2528,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_3DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA224 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9931,7 +9897,7 @@ index 0d743c63..abf2f52b 100644 .geniv = true, }, }, -@@ -3669,7 +2551,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3669,7 +2551,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_3DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA256 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9939,7 +9905,7 @@ index 0d743c63..abf2f52b 100644 }, }, { -@@ -3693,7 +2574,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3693,7 +2574,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_3DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA256 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9947,7 +9913,7 @@ index 0d743c63..abf2f52b 100644 .geniv = true, }, }, -@@ -3717,7 +2597,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3717,7 +2597,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_3DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA384 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9955,7 +9921,7 @@ index 0d743c63..abf2f52b 100644 }, }, { -@@ -3741,7 +2620,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3741,7 +2620,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_3DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA384 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9963,7 +9929,7 @@ index 0d743c63..abf2f52b 100644 .geniv = true, }, }, -@@ -3765,7 +2643,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3765,7 +2643,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_3DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA512 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9971,7 +9937,7 @@ index 0d743c63..abf2f52b 100644 }, }, { -@@ -3789,7 +2666,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3789,7 +2666,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_3DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA512 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9979,7 +9945,7 @@ index 0d743c63..abf2f52b 100644 .geniv = true, }, }, -@@ -3812,7 +2688,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3812,7 +2688,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_MD5 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9987,7 +9953,7 @@ index 0d743c63..abf2f52b 100644 }, }, { -@@ -3835,7 +2710,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3835,7 +2710,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_MD5 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9995,7 +9961,7 @@ index 0d743c63..abf2f52b 100644 .geniv = true, }, }, -@@ -3858,7 +2732,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3858,7 +2732,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10003,7 +9969,7 @@ index 0d743c63..abf2f52b 100644 }, }, { -@@ -3881,7 +2754,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3881,7 +2754,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10011,7 +9977,7 @@ index 0d743c63..abf2f52b 100644 .geniv = true, }, }, -@@ -3904,7 +2776,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3904,7 +2776,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA224 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10019,7 +9985,7 @@ index 0d743c63..abf2f52b 100644 }, }, { -@@ -3927,7 +2798,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3927,7 +2798,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA224 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10027,7 +9993,7 @@ index 0d743c63..abf2f52b 100644 .geniv = true, }, }, -@@ -3950,7 +2820,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3950,7 +2820,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA256 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10035,7 +10001,7 @@ index 0d743c63..abf2f52b 100644 }, }, { -@@ -3973,7 +2842,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3973,7 +2842,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA256 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10043,7 +10009,7 @@ index 0d743c63..abf2f52b 100644 .geniv = true, }, }, -@@ -3996,7 +2864,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3996,7 +2864,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA384 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10051,7 +10017,7 @@ index 0d743c63..abf2f52b 100644 }, }, { -@@ -4019,7 +2886,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4019,7 +2886,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA384 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10059,7 +10025,7 @@ index 0d743c63..abf2f52b 100644 .geniv = true, }, }, -@@ -4042,7 +2908,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4042,7 +2908,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA512 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10067,7 +10033,7 @@ index 0d743c63..abf2f52b 100644 }, }, { -@@ -4065,7 +2930,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4065,7 +2930,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA512 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10075,7 +10041,7 @@ index 0d743c63..abf2f52b 100644 .geniv = true, }, }, -@@ -4090,7 +2954,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4090,7 +2954,6 @@ static struct caam_aead_alg driver_aeads OP_ALG_AAI_CTR_MOD128, .class2_alg_type = OP_ALG_ALGSEL_MD5 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10083,7 +10049,7 @@ index 0d743c63..abf2f52b 100644 .rfc3686 = true, }, }, -@@ -4115,7 +2978,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4115,7 +2978,6 @@ static struct caam_aead_alg driver_aeads OP_ALG_AAI_CTR_MOD128, .class2_alg_type = OP_ALG_ALGSEL_MD5 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10091,7 +10057,7 @@ index 0d743c63..abf2f52b 100644 .rfc3686 = true, .geniv = true, }, -@@ -4141,7 +3003,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4141,7 +3003,6 @@ static struct caam_aead_alg driver_aeads OP_ALG_AAI_CTR_MOD128, .class2_alg_type = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10099,7 +10065,7 @@ index 0d743c63..abf2f52b 100644 .rfc3686 = true, }, }, -@@ -4166,7 +3027,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4166,7 +3027,6 @@ static struct caam_aead_alg driver_aeads OP_ALG_AAI_CTR_MOD128, .class2_alg_type = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10107,7 +10073,7 @@ index 0d743c63..abf2f52b 100644 .rfc3686 = true, .geniv = true, }, -@@ -4192,7 +3052,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4192,7 +3052,6 @@ static struct caam_aead_alg driver_aeads OP_ALG_AAI_CTR_MOD128, .class2_alg_type = OP_ALG_ALGSEL_SHA224 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10115,7 +10081,7 @@ index 0d743c63..abf2f52b 100644 .rfc3686 = true, }, }, -@@ -4217,7 +3076,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4217,7 +3076,6 @@ static struct caam_aead_alg driver_aeads OP_ALG_AAI_CTR_MOD128, .class2_alg_type = OP_ALG_ALGSEL_SHA224 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10123,7 +10089,7 @@ index 0d743c63..abf2f52b 100644 .rfc3686 = true, .geniv = true, }, -@@ -4243,7 +3101,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4243,7 +3101,6 @@ static struct caam_aead_alg driver_aeads OP_ALG_AAI_CTR_MOD128, .class2_alg_type = OP_ALG_ALGSEL_SHA256 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10131,7 +10097,7 @@ index 0d743c63..abf2f52b 100644 .rfc3686 = true, }, }, -@@ -4268,7 +3125,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4268,7 +3125,6 @@ static struct caam_aead_alg driver_aeads OP_ALG_AAI_CTR_MOD128, .class2_alg_type = OP_ALG_ALGSEL_SHA256 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10139,7 +10105,7 @@ index 0d743c63..abf2f52b 100644 .rfc3686 = true, .geniv = true, }, -@@ -4294,7 +3150,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4294,7 +3150,6 @@ static struct caam_aead_alg driver_aeads OP_ALG_AAI_CTR_MOD128, .class2_alg_type = OP_ALG_ALGSEL_SHA384 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10147,7 +10113,7 @@ index 0d743c63..abf2f52b 100644 .rfc3686 = true, }, }, -@@ -4319,7 +3174,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4319,7 +3174,6 @@ static struct caam_aead_alg driver_aeads OP_ALG_AAI_CTR_MOD128, .class2_alg_type = OP_ALG_ALGSEL_SHA384 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10155,7 +10121,7 @@ index 0d743c63..abf2f52b 100644 .rfc3686 = true, .geniv = true, }, -@@ -4345,7 +3199,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4345,7 +3199,6 @@ static struct caam_aead_alg driver_aeads OP_ALG_AAI_CTR_MOD128, .class2_alg_type = OP_ALG_ALGSEL_SHA512 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10163,7 +10129,7 @@ index 0d743c63..abf2f52b 100644 .rfc3686 = true, }, }, -@@ -4370,7 +3223,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4370,7 +3223,6 @@ static struct caam_aead_alg driver_aeads OP_ALG_AAI_CTR_MOD128, .class2_alg_type = OP_ALG_ALGSEL_SHA512 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10209,7 +10175,7 @@ index 0d743c63..abf2f52b 100644 return 0; } -@@ -4421,25 +3291,9 @@ static int caam_aead_init(struct crypto_aead *tfm) +@@ -4421,25 +3291,9 @@ static int caam_aead_init(struct crypto_ static void caam_exit_common(struct caam_ctx *ctx) { @@ -10238,7 +10204,7 @@ index 0d743c63..abf2f52b 100644 caam_jr_free(ctx->jrdev); } -@@ -4515,7 +3369,6 @@ static struct caam_crypto_alg *caam_alg_alloc(struct caam_alg_template +@@ -4515,7 +3369,6 @@ static struct caam_crypto_alg *caam_alg_ t_alg->caam.class1_alg_type = template->class1_alg_type; t_alg->caam.class2_alg_type = template->class2_alg_type; @@ -10246,9 +10212,6 @@ index 0d743c63..abf2f52b 100644 return t_alg; } -diff --git a/drivers/crypto/caam/caamalg_desc.c b/drivers/crypto/caam/caamalg_desc.c -new file mode 100644 -index 00000000..d162120a --- /dev/null +++ b/drivers/crypto/caam/caamalg_desc.c @@ -0,0 +1,1913 @@ @@ -12165,9 +12128,6 @@ index 00000000..d162120a +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("FSL CAAM descriptor support"); +MODULE_AUTHOR("Freescale Semiconductor - NMG/STC"); -diff --git a/drivers/crypto/caam/caamalg_desc.h b/drivers/crypto/caam/caamalg_desc.h -new file mode 100644 -index 00000000..6b436f65 --- /dev/null +++ b/drivers/crypto/caam/caamalg_desc.h @@ -0,0 +1,127 @@ @@ -12298,9 +12258,6 @@ index 00000000..6b436f65 +void cnstr_shdsc_xts_ablkcipher_decap(u32 * const desc, struct alginfo *cdata); + +#endif /* _CAAMALG_DESC_H_ */ -diff --git a/drivers/crypto/caam/caamalg_qi.c b/drivers/crypto/caam/caamalg_qi.c -new file mode 100644 -index 00000000..d6a9b0c5 --- /dev/null +++ b/drivers/crypto/caam/caamalg_qi.c @@ -0,0 +1,2877 @@ @@ -15181,9 +15138,6 @@ index 00000000..d6a9b0c5 +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("Support for crypto API using CAAM-QI backend"); +MODULE_AUTHOR("Freescale Semiconductor"); -diff --git a/drivers/crypto/caam/caamalg_qi2.c b/drivers/crypto/caam/caamalg_qi2.c -new file mode 100644 -index 00000000..f0316346 --- /dev/null +++ b/drivers/crypto/caam/caamalg_qi2.c @@ -0,0 +1,4428 @@ @@ -19615,9 +19569,6 @@ index 00000000..f0316346 +MODULE_DESCRIPTION("Freescale DPAA2 CAAM Driver"); + +module_fsl_mc_driver(dpaa2_caam_driver); -diff --git a/drivers/crypto/caam/caamalg_qi2.h b/drivers/crypto/caam/caamalg_qi2.h -new file mode 100644 -index 00000000..2ba179db --- /dev/null +++ b/drivers/crypto/caam/caamalg_qi2.h @@ -0,0 +1,265 @@ @@ -19886,8 +19837,6 @@ index 00000000..2ba179db +int dpaa2_caam_enqueue(struct device *dev, struct caam_request *req); + +#endif /* _CAAMALG_QI2_H_ */ -diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c -index 631337c2..698580b6 100644 --- a/drivers/crypto/caam/caamhash.c +++ b/drivers/crypto/caam/caamhash.c @@ -72,7 +72,7 @@ @@ -19953,7 +19902,7 @@ index 631337c2..698580b6 100644 /* Common job descriptor seq in/out ptr routines */ /* Map state->caam_ctx, and append seq_out_ptr command that points to it */ -@@ -175,36 +194,27 @@ static inline dma_addr_t map_seq_out_ptr_result(u32 *desc, struct device *jrdev, +@@ -175,36 +194,27 @@ static inline dma_addr_t map_seq_out_ptr return dst_dma; } @@ -19999,15 +19948,14 @@ index 631337c2..698580b6 100644 - buf_dma = buf_map_to_sec4_sg(jrdev, sec4_sg, buf, buflen); - else - buf_dma = 0; -- -- return buf_dma; + dma_to_sec4_sg_one(sec4_sg, state->buf_dma, buflen, 0); -+ + +- return buf_dma; + return 0; } /* Map state->caam_ctx, and add it to link table */ -@@ -224,89 +234,54 @@ static inline int ctx_map_to_sec4_sg(u32 *desc, struct device *jrdev, +@@ -224,89 +234,54 @@ static inline int ctx_map_to_sec4_sg(u32 return 0; } @@ -20055,18 +20003,23 @@ index 631337c2..698580b6 100644 { - /* Calculate remaining bytes to read */ - append_math_add(desc, VARSEQINLEN, SEQINLEN, REG0, CAAM_CMD_SZ); -- ++ u32 op = ctx->adata.algtype; ++ u32 *skip_key_load; + - /* Read remaining bytes */ - append_seq_fifo_load(desc, 0, FIFOLD_CLASS_CLASS2 | FIFOLD_TYPE_LAST2 | - FIFOLD_TYPE_MSG | KEY_VLF); -+ u32 op = ctx->adata.algtype; -+ u32 *skip_key_load; ++ init_sh_desc(desc, HDR_SHARE_SERIAL); - /* Store class2 context bytes */ - append_seq_store(desc, digestsize, LDST_CLASS_2_CCB | - LDST_SRCDST_BYTE_CONTEXT); -} -+ init_sh_desc(desc, HDR_SHARE_SERIAL); ++ /* Append key if it has been set; ahash update excluded */ ++ if ((state != OP_ALG_AS_UPDATE) && (ctx->adata.keylen)) { ++ /* Skip key loading if already shared */ ++ skip_key_load = append_jump(desc, JUMP_JSL | JUMP_TEST_ALL | ++ JUMP_COND_SHRD); -/* - * For ahash update, final and finup, import context, read and write to seqout @@ -20076,12 +20029,7 @@ index 631337c2..698580b6 100644 - struct caam_hash_ctx *ctx) -{ - init_sh_desc_key_ahash(desc, ctx); -+ /* Append key if it has been set; ahash update excluded */ -+ if ((state != OP_ALG_AS_UPDATE) && (ctx->adata.keylen)) { -+ /* Skip key loading if already shared */ -+ skip_key_load = append_jump(desc, JUMP_JSL | JUMP_TEST_ALL | -+ JUMP_COND_SHRD); - +- - /* Import context from software */ - append_cmd(desc, CMD_SEQ_LOAD | LDST_SRCDST_BYTE_CONTEXT | - LDST_CLASS_2_CCB | ctx->ctx_len); @@ -20129,7 +20077,7 @@ index 631337c2..698580b6 100644 } static int ahash_set_sh_desc(struct crypto_ahash *ahash) -@@ -314,34 +289,13 @@ static int ahash_set_sh_desc(struct crypto_ahash *ahash) +@@ -314,34 +289,13 @@ static int ahash_set_sh_desc(struct cryp struct caam_hash_ctx *ctx = crypto_ahash_ctx(ahash); int digestsize = crypto_ahash_digestsize(ahash); struct device *jrdev = ctx->jrdev; @@ -20167,7 +20115,7 @@ index 631337c2..698580b6 100644 #ifdef DEBUG print_hex_dump(KERN_ERR, "ahash update shdesc@"__stringify(__LINE__)": ", -@@ -350,17 +304,9 @@ static int ahash_set_sh_desc(struct crypto_ahash *ahash) +@@ -350,17 +304,9 @@ static int ahash_set_sh_desc(struct cryp /* ahash_update_first shared descriptor */ desc = ctx->sh_desc_update_first; @@ -20188,7 +20136,7 @@ index 631337c2..698580b6 100644 #ifdef DEBUG print_hex_dump(KERN_ERR, "ahash update first shdesc@"__stringify(__LINE__)": ", -@@ -369,53 +315,20 @@ static int ahash_set_sh_desc(struct crypto_ahash *ahash) +@@ -369,53 +315,20 @@ static int ahash_set_sh_desc(struct cryp /* ahash_final shared descriptor */ desc = ctx->sh_desc_fin; @@ -20248,7 +20196,7 @@ index 631337c2..698580b6 100644 #ifdef DEBUG print_hex_dump(KERN_ERR, "ahash digest shdesc@"__stringify(__LINE__)": ", -@@ -426,14 +339,6 @@ static int ahash_set_sh_desc(struct crypto_ahash *ahash) +@@ -426,14 +339,6 @@ static int ahash_set_sh_desc(struct cryp return 0; } @@ -20263,7 +20211,7 @@ index 631337c2..698580b6 100644 /* Digest hash size if it is too large */ static int hash_digest_key(struct caam_hash_ctx *ctx, const u8 *key_in, u32 *keylen, u8 *key_out, u32 digestsize) -@@ -469,7 +374,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, const u8 *key_in, +@@ -469,7 +374,7 @@ static int hash_digest_key(struct caam_h } /* Job descriptor to perform unkeyed hash on key_in */ @@ -20272,7 +20220,7 @@ index 631337c2..698580b6 100644 OP_ALG_AS_INITFINAL); append_seq_in_ptr(desc, src_dma, *keylen, 0); append_seq_fifo_load(desc, *keylen, FIFOLD_CLASS_CLASS2 | -@@ -513,10 +418,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, const u8 *key_in, +@@ -513,10 +418,7 @@ static int hash_digest_key(struct caam_h static int ahash_setkey(struct crypto_ahash *ahash, const u8 *key, unsigned int keylen) { @@ -20283,7 +20231,7 @@ index 631337c2..698580b6 100644 int blocksize = crypto_tfm_alg_blocksize(&ahash->base); int digestsize = crypto_ahash_digestsize(ahash); int ret; -@@ -539,43 +441,19 @@ static int ahash_setkey(struct crypto_ahash *ahash, +@@ -539,43 +441,19 @@ static int ahash_setkey(struct crypto_ah key = hashed_key; } @@ -20331,7 +20279,7 @@ index 631337c2..698580b6 100644 bad_free_key: kfree(hashed_key); crypto_ahash_set_flags(ahash, CRYPTO_TFM_RES_BAD_KEY_LEN); -@@ -604,6 +482,8 @@ static inline void ahash_unmap(struct device *dev, +@@ -604,6 +482,8 @@ static inline void ahash_unmap(struct de struct ahash_edesc *edesc, struct ahash_request *req, int dst_len) { @@ -20340,7 +20288,7 @@ index 631337c2..698580b6 100644 if (edesc->src_nents) dma_unmap_sg(dev, req->src, edesc->src_nents, DMA_TO_DEVICE); if (edesc->dst_dma) -@@ -612,6 +492,12 @@ static inline void ahash_unmap(struct device *dev, +@@ -612,6 +492,12 @@ static inline void ahash_unmap(struct de if (edesc->sec4_sg_bytes) dma_unmap_single(dev, edesc->sec4_sg_dma, edesc->sec4_sg_bytes, DMA_TO_DEVICE); @@ -20353,7 +20301,7 @@ index 631337c2..698580b6 100644 } static inline void ahash_unmap_ctx(struct device *dev, -@@ -643,8 +529,7 @@ static void ahash_done(struct device *jrdev, u32 *desc, u32 err, +@@ -643,8 +529,7 @@ static void ahash_done(struct device *jr dev_err(jrdev, "%s %d: err 0x%x\n", __func__, __LINE__, err); #endif @@ -20363,7 +20311,7 @@ index 631337c2..698580b6 100644 if (err) caam_jr_strstatus(jrdev, err); -@@ -671,19 +556,19 @@ static void ahash_done_bi(struct device *jrdev, u32 *desc, u32 err, +@@ -671,19 +556,19 @@ static void ahash_done_bi(struct device struct ahash_edesc *edesc; struct crypto_ahash *ahash = crypto_ahash_reqtfm(req); struct caam_hash_ctx *ctx = crypto_ahash_ctx(ahash); @@ -20386,7 +20334,7 @@ index 631337c2..698580b6 100644 kfree(edesc); #ifdef DEBUG -@@ -713,8 +598,7 @@ static void ahash_done_ctx_src(struct device *jrdev, u32 *desc, u32 err, +@@ -713,8 +598,7 @@ static void ahash_done_ctx_src(struct de dev_err(jrdev, "%s %d: err 0x%x\n", __func__, __LINE__, err); #endif @@ -20396,7 +20344,7 @@ index 631337c2..698580b6 100644 if (err) caam_jr_strstatus(jrdev, err); -@@ -741,19 +625,19 @@ static void ahash_done_ctx_dst(struct device *jrdev, u32 *desc, u32 err, +@@ -741,19 +625,19 @@ static void ahash_done_ctx_dst(struct de struct ahash_edesc *edesc; struct crypto_ahash *ahash = crypto_ahash_reqtfm(req); struct caam_hash_ctx *ctx = crypto_ahash_ctx(ahash); @@ -20419,7 +20367,7 @@ index 631337c2..698580b6 100644 kfree(edesc); #ifdef DEBUG -@@ -835,13 +719,12 @@ static int ahash_update_ctx(struct ahash_request *req) +@@ -835,13 +719,12 @@ static int ahash_update_ctx(struct ahash struct caam_hash_ctx *ctx = crypto_ahash_ctx(ahash); struct caam_hash_state *state = ahash_request_ctx(req); struct device *jrdev = ctx->jrdev; @@ -20439,7 +20387,7 @@ index 631337c2..698580b6 100644 int in_len = *buflen + req->nbytes, to_hash; u32 *desc; int src_nents, mapped_nents, sec4_sg_bytes, sec4_sg_src_index; -@@ -895,10 +778,9 @@ static int ahash_update_ctx(struct ahash_request *req) +@@ -895,10 +778,9 @@ static int ahash_update_ctx(struct ahash if (ret) goto unmap_ctx; @@ -20453,7 +20401,7 @@ index 631337c2..698580b6 100644 if (mapped_nents) { sg_to_sec4_sg_last(req->src, mapped_nents, -@@ -909,12 +791,10 @@ static int ahash_update_ctx(struct ahash_request *req) +@@ -909,12 +791,10 @@ static int ahash_update_ctx(struct ahash to_hash - *buflen, *next_buflen, 0); } else { @@ -20468,7 +20416,7 @@ index 631337c2..698580b6 100644 desc = edesc->hw_desc; edesc->sec4_sg_dma = dma_map_single(jrdev, edesc->sec4_sg, -@@ -969,12 +849,9 @@ static int ahash_final_ctx(struct ahash_request *req) +@@ -969,12 +849,9 @@ static int ahash_final_ctx(struct ahash_ struct caam_hash_ctx *ctx = crypto_ahash_ctx(ahash); struct caam_hash_state *state = ahash_request_ctx(req); struct device *jrdev = ctx->jrdev; @@ -20484,7 +20432,7 @@ index 631337c2..698580b6 100644 u32 *desc; int sec4_sg_bytes, sec4_sg_src_index; int digestsize = crypto_ahash_digestsize(ahash); -@@ -1001,11 +878,11 @@ static int ahash_final_ctx(struct ahash_request *req) +@@ -1001,11 +878,11 @@ static int ahash_final_ctx(struct ahash_ if (ret) goto unmap_ctx; @@ -20501,7 +20449,7 @@ index 631337c2..698580b6 100644 edesc->sec4_sg_dma = dma_map_single(jrdev, edesc->sec4_sg, sec4_sg_bytes, DMA_TO_DEVICE); -@@ -1048,12 +925,9 @@ static int ahash_finup_ctx(struct ahash_request *req) +@@ -1048,12 +925,9 @@ static int ahash_finup_ctx(struct ahash_ struct caam_hash_ctx *ctx = crypto_ahash_ctx(ahash); struct caam_hash_state *state = ahash_request_ctx(req); struct device *jrdev = ctx->jrdev; @@ -20517,7 +20465,7 @@ index 631337c2..698580b6 100644 u32 *desc; int sec4_sg_src_index; int src_nents, mapped_nents; -@@ -1082,7 +956,7 @@ static int ahash_finup_ctx(struct ahash_request *req) +@@ -1082,7 +956,7 @@ static int ahash_finup_ctx(struct ahash_ /* allocate space for base edesc and hw desc commands, link tables */ edesc = ahash_edesc_alloc(ctx, sec4_sg_src_index + mapped_nents, @@ -20526,7 +20474,7 @@ index 631337c2..698580b6 100644 flags); if (!edesc) { dma_unmap_sg(jrdev, req->src, src_nents, DMA_TO_DEVICE); -@@ -1098,9 +972,9 @@ static int ahash_finup_ctx(struct ahash_request *req) +@@ -1098,9 +972,9 @@ static int ahash_finup_ctx(struct ahash_ if (ret) goto unmap_ctx; @@ -20539,7 +20487,7 @@ index 631337c2..698580b6 100644 ret = ahash_edesc_add_src(ctx, edesc, req, mapped_nents, sec4_sg_src_index, ctx->ctx_len + buflen, -@@ -1136,15 +1010,18 @@ static int ahash_digest(struct ahash_request *req) +@@ -1136,15 +1010,18 @@ static int ahash_digest(struct ahash_req { struct crypto_ahash *ahash = crypto_ahash_reqtfm(req); struct caam_hash_ctx *ctx = crypto_ahash_ctx(ahash); @@ -20560,7 +20508,7 @@ index 631337c2..698580b6 100644 src_nents = sg_nents_for_len(req->src, req->nbytes); if (src_nents < 0) { dev_err(jrdev, "Invalid number of src SG.\n"); -@@ -1215,10 +1092,10 @@ static int ahash_final_no_ctx(struct ahash_request *req) +@@ -1215,10 +1092,10 @@ static int ahash_final_no_ctx(struct aha struct caam_hash_ctx *ctx = crypto_ahash_ctx(ahash); struct caam_hash_state *state = ahash_request_ctx(req); struct device *jrdev = ctx->jrdev; @@ -20575,7 +20523,7 @@ index 631337c2..698580b6 100644 u32 *desc; int digestsize = crypto_ahash_digestsize(ahash); struct ahash_edesc *edesc; -@@ -1276,13 +1153,12 @@ static int ahash_update_no_ctx(struct ahash_request *req) +@@ -1276,13 +1153,12 @@ static int ahash_update_no_ctx(struct ah struct caam_hash_ctx *ctx = crypto_ahash_ctx(ahash); struct caam_hash_state *state = ahash_request_ctx(req); struct device *jrdev = ctx->jrdev; @@ -20595,7 +20543,7 @@ index 631337c2..698580b6 100644 int in_len = *buflen + req->nbytes, to_hash; int sec4_sg_bytes, src_nents, mapped_nents; struct ahash_edesc *edesc; -@@ -1331,8 +1207,10 @@ static int ahash_update_no_ctx(struct ahash_request *req) +@@ -1331,8 +1207,10 @@ static int ahash_update_no_ctx(struct ah edesc->sec4_sg_bytes = sec4_sg_bytes; edesc->dst_dma = 0; @@ -20608,7 +20556,7 @@ index 631337c2..698580b6 100644 sg_to_sec4_sg_last(req->src, mapped_nents, edesc->sec4_sg + 1, 0); -@@ -1342,8 +1220,6 @@ static int ahash_update_no_ctx(struct ahash_request *req) +@@ -1342,8 +1220,6 @@ static int ahash_update_no_ctx(struct ah *next_buflen, 0); } @@ -20617,7 +20565,7 @@ index 631337c2..698580b6 100644 desc = edesc->hw_desc; edesc->sec4_sg_dma = dma_map_single(jrdev, edesc->sec4_sg, -@@ -1403,12 +1279,9 @@ static int ahash_finup_no_ctx(struct ahash_request *req) +@@ -1403,12 +1279,9 @@ static int ahash_finup_no_ctx(struct aha struct caam_hash_ctx *ctx = crypto_ahash_ctx(ahash); struct caam_hash_state *state = ahash_request_ctx(req); struct device *jrdev = ctx->jrdev; @@ -20633,7 +20581,7 @@ index 631337c2..698580b6 100644 u32 *desc; int sec4_sg_bytes, sec4_sg_src_index, src_nents, mapped_nents; int digestsize = crypto_ahash_digestsize(ahash); -@@ -1450,9 +1323,9 @@ static int ahash_finup_no_ctx(struct ahash_request *req) +@@ -1450,9 +1323,9 @@ static int ahash_finup_no_ctx(struct aha edesc->src_nents = src_nents; edesc->sec4_sg_bytes = sec4_sg_bytes; @@ -20646,7 +20594,7 @@ index 631337c2..698580b6 100644 ret = ahash_edesc_add_src(ctx, edesc, req, mapped_nents, 1, buflen, req->nbytes); -@@ -1496,11 +1369,10 @@ static int ahash_update_first(struct ahash_request *req) +@@ -1496,11 +1369,10 @@ static int ahash_update_first(struct aha struct caam_hash_ctx *ctx = crypto_ahash_ctx(ahash); struct caam_hash_state *state = ahash_request_ctx(req); struct device *jrdev = ctx->jrdev; @@ -20662,7 +20610,7 @@ index 631337c2..698580b6 100644 int to_hash; u32 *desc; int src_nents, mapped_nents; -@@ -1582,6 +1454,7 @@ static int ahash_update_first(struct ahash_request *req) +@@ -1582,6 +1454,7 @@ static int ahash_update_first(struct aha state->final = ahash_final_no_ctx; scatterwalk_map_and_copy(next_buf, req->src, 0, req->nbytes, 0); @@ -20678,7 +20626,7 @@ index 631337c2..698580b6 100644 }; /* ahash descriptors */ -@@ -1714,7 +1586,6 @@ static struct caam_hash_template driver_hash[] = { +@@ -1714,7 +1586,6 @@ static struct caam_hash_template driver_ }, }, .alg_type = OP_ALG_ALGSEL_SHA1, @@ -20686,7 +20634,7 @@ index 631337c2..698580b6 100644 }, { .name = "sha224", .driver_name = "sha224-caam", -@@ -1736,7 +1607,6 @@ static struct caam_hash_template driver_hash[] = { +@@ -1736,7 +1607,6 @@ static struct caam_hash_template driver_ }, }, .alg_type = OP_ALG_ALGSEL_SHA224, @@ -20694,7 +20642,7 @@ index 631337c2..698580b6 100644 }, { .name = "sha256", .driver_name = "sha256-caam", -@@ -1758,7 +1628,6 @@ static struct caam_hash_template driver_hash[] = { +@@ -1758,7 +1628,6 @@ static struct caam_hash_template driver_ }, }, .alg_type = OP_ALG_ALGSEL_SHA256, @@ -20702,7 +20650,7 @@ index 631337c2..698580b6 100644 }, { .name = "sha384", .driver_name = "sha384-caam", -@@ -1780,7 +1649,6 @@ static struct caam_hash_template driver_hash[] = { +@@ -1780,7 +1649,6 @@ static struct caam_hash_template driver_ }, }, .alg_type = OP_ALG_ALGSEL_SHA384, @@ -20710,7 +20658,7 @@ index 631337c2..698580b6 100644 }, { .name = "sha512", .driver_name = "sha512-caam", -@@ -1802,7 +1670,6 @@ static struct caam_hash_template driver_hash[] = { +@@ -1802,7 +1670,6 @@ static struct caam_hash_template driver_ }, }, .alg_type = OP_ALG_ALGSEL_SHA512, @@ -20718,7 +20666,7 @@ index 631337c2..698580b6 100644 }, { .name = "md5", .driver_name = "md5-caam", -@@ -1824,14 +1691,12 @@ static struct caam_hash_template driver_hash[] = { +@@ -1824,14 +1691,12 @@ static struct caam_hash_template driver_ }, }, .alg_type = OP_ALG_ALGSEL_MD5, @@ -20733,7 +20681,7 @@ index 631337c2..698580b6 100644 struct ahash_alg ahash_alg; }; -@@ -1853,6 +1718,7 @@ static int caam_hash_cra_init(struct crypto_tfm *tfm) +@@ -1853,6 +1718,7 @@ static int caam_hash_cra_init(struct cry HASH_MSG_LEN + SHA256_DIGEST_SIZE, HASH_MSG_LEN + 64, HASH_MSG_LEN + SHA512_DIGEST_SIZE }; @@ -20741,7 +20689,7 @@ index 631337c2..698580b6 100644 /* * Get a Job ring from Job Ring driver to ensure in-order -@@ -1863,11 +1729,31 @@ static int caam_hash_cra_init(struct crypto_tfm *tfm) +@@ -1863,11 +1729,31 @@ static int caam_hash_cra_init(struct cry pr_err("Job Ring Device allocation for transform failed\n"); return PTR_ERR(ctx->jrdev); } @@ -20776,7 +20724,7 @@ index 631337c2..698580b6 100644 OP_ALG_ALGSEL_SHIFT]; crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm), -@@ -1879,30 +1765,10 @@ static void caam_hash_cra_exit(struct crypto_tfm *tfm) +@@ -1879,30 +1765,10 @@ static void caam_hash_cra_exit(struct cr { struct caam_hash_ctx *ctx = crypto_tfm_ctx(tfm); @@ -20811,7 +20759,7 @@ index 631337c2..698580b6 100644 caam_jr_free(ctx->jrdev); } -@@ -1961,7 +1827,6 @@ caam_hash_alloc(struct caam_hash_template *template, +@@ -1961,7 +1827,6 @@ caam_hash_alloc(struct caam_hash_templat alg->cra_type = &crypto_ahash_type; t_alg->alg_type = template->alg_type; @@ -20819,8 +20767,6 @@ index 631337c2..698580b6 100644 return t_alg; } -diff --git a/drivers/crypto/caam/caampkc.c b/drivers/crypto/caam/caampkc.c -index 354a16ab..4fcb378e 100644 --- a/drivers/crypto/caam/caampkc.c +++ b/drivers/crypto/caam/caampkc.c @@ -18,6 +18,10 @@ @@ -20834,7 +20780,7 @@ index 354a16ab..4fcb378e 100644 static void rsa_io_unmap(struct device *dev, struct rsa_edesc *edesc, struct akcipher_request *req) -@@ -54,6 +58,42 @@ static void rsa_priv_f1_unmap(struct device *dev, struct rsa_edesc *edesc, +@@ -54,6 +58,42 @@ static void rsa_priv_f1_unmap(struct dev dma_unmap_single(dev, pdb->d_dma, key->d_sz, DMA_TO_DEVICE); } @@ -20877,7 +20823,7 @@ index 354a16ab..4fcb378e 100644 /* RSA Job Completion handler */ static void rsa_pub_done(struct device *dev, u32 *desc, u32 err, void *context) { -@@ -90,6 +130,42 @@ static void rsa_priv_f1_done(struct device *dev, u32 *desc, u32 err, +@@ -90,6 +130,42 @@ static void rsa_priv_f1_done(struct devi akcipher_request_complete(req, err); } @@ -20920,7 +20866,7 @@ index 354a16ab..4fcb378e 100644 static struct rsa_edesc *rsa_edesc_alloc(struct akcipher_request *req, size_t desclen) { -@@ -97,8 +173,8 @@ static struct rsa_edesc *rsa_edesc_alloc(struct akcipher_request *req, +@@ -97,8 +173,8 @@ static struct rsa_edesc *rsa_edesc_alloc struct caam_rsa_ctx *ctx = akcipher_tfm_ctx(tfm); struct device *dev = ctx->dev; struct rsa_edesc *edesc; @@ -20931,7 +20877,7 @@ index 354a16ab..4fcb378e 100644 int sgc; int sec4_sg_index, sec4_sg_len = 0, sec4_sg_bytes; int src_nents, dst_nents; -@@ -258,6 +334,172 @@ static int set_rsa_priv_f1_pdb(struct akcipher_request *req, +@@ -258,6 +334,172 @@ static int set_rsa_priv_f1_pdb(struct ak return 0; } @@ -21104,7 +21050,7 @@ index 354a16ab..4fcb378e 100644 static int caam_rsa_enc(struct akcipher_request *req) { struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req); -@@ -301,24 +543,14 @@ static int caam_rsa_enc(struct akcipher_request *req) +@@ -301,24 +543,14 @@ init_fail: return ret; } @@ -21130,7 +21076,7 @@ index 354a16ab..4fcb378e 100644 /* Allocate extended descriptor */ edesc = rsa_edesc_alloc(req, DESC_RSA_PRIV_F1_LEN); if (IS_ERR(edesc)) -@@ -344,17 +576,147 @@ static int caam_rsa_dec(struct akcipher_request *req) +@@ -344,17 +576,147 @@ init_fail: return ret; } @@ -21284,7 +21230,7 @@ index 354a16ab..4fcb378e 100644 } /** -@@ -370,10 +732,9 @@ static inline u8 *caam_read_raw_data(const u8 *buf, size_t *nbytes) +@@ -370,10 +732,9 @@ static inline u8 *caam_read_raw_data(con { u8 *val; @@ -21298,7 +21244,7 @@ index 354a16ab..4fcb378e 100644 val = kzalloc(*nbytes, GFP_DMA | GFP_KERNEL); if (!val) -@@ -395,7 +756,7 @@ static int caam_rsa_set_pub_key(struct crypto_akcipher *tfm, const void *key, +@@ -395,7 +756,7 @@ static int caam_rsa_set_pub_key(struct c unsigned int keylen) { struct caam_rsa_ctx *ctx = akcipher_tfm_ctx(tfm); @@ -21307,7 +21253,7 @@ index 354a16ab..4fcb378e 100644 struct caam_rsa_key *rsa_key = &ctx->key; int ret; -@@ -437,11 +798,69 @@ static int caam_rsa_set_pub_key(struct crypto_akcipher *tfm, const void *key, +@@ -437,11 +798,69 @@ err: return -ENOMEM; } @@ -21378,7 +21324,7 @@ index 354a16ab..4fcb378e 100644 struct caam_rsa_key *rsa_key = &ctx->key; int ret; -@@ -483,6 +902,8 @@ static int caam_rsa_set_priv_key(struct crypto_akcipher *tfm, const void *key, +@@ -483,6 +902,8 @@ static int caam_rsa_set_priv_key(struct memcpy(rsa_key->d, raw_key.d, raw_key.d_sz); memcpy(rsa_key->e, raw_key.e, raw_key.e_sz); @@ -21387,15 +21333,12 @@ index 354a16ab..4fcb378e 100644 return 0; err: -diff --git a/drivers/crypto/caam/caampkc.h b/drivers/crypto/caam/caampkc.h -index f595d159..87ab75e9 100644 --- a/drivers/crypto/caam/caampkc.h +++ b/drivers/crypto/caam/caampkc.h -@@ -12,22 +12,76 @@ - #include "compat.h" +@@ -13,21 +13,75 @@ #include "pdb.h" -+/** + /** + * caam_priv_key_form - CAAM RSA private key representation + * CAAM RSA private key may have either of three forms. + * @@ -21427,7 +21370,7 @@ index f595d159..87ab75e9 100644 + FORM3 +}; + - /** ++/** * caam_rsa_key - CAAM RSA key structure. Keys are allocated in DMA zone. * @n : RSA modulus raw byte stream * @e : RSA public exponent raw byte stream @@ -21485,8 +21428,6 @@ index f595d159..87ab75e9 100644 +void init_rsa_priv_f3_desc(u32 *desc, struct rsa_priv_f3_pdb *pdb); #endif -diff --git a/drivers/crypto/caam/caamrng.c b/drivers/crypto/caam/caamrng.c -index 9b92af2c..fde07d4f 100644 --- a/drivers/crypto/caam/caamrng.c +++ b/drivers/crypto/caam/caamrng.c @@ -52,7 +52,7 @@ @@ -21498,7 +21439,7 @@ index 9b92af2c..fde07d4f 100644 /* Buffer, its dma address and lock */ struct buf_data { -@@ -100,8 +100,7 @@ static void rng_done(struct device *jrdev, u32 *desc, u32 err, void *context) +@@ -100,8 +100,7 @@ static void rng_done(struct device *jrde { struct buf_data *bd; @@ -21508,7 +21449,7 @@ index 9b92af2c..fde07d4f 100644 if (err) caam_jr_strstatus(jrdev, err); -@@ -196,9 +195,6 @@ static inline int rng_create_sh_desc(struct caam_rng_ctx *ctx) +@@ -196,9 +195,6 @@ static inline int rng_create_sh_desc(str init_sh_desc(desc, HDR_SHARE_SERIAL); @@ -21518,7 +21459,7 @@ index 9b92af2c..fde07d4f 100644 /* Generate random bytes */ append_operation(desc, OP_ALG_ALGSEL_RNG | OP_TYPE_CLASS1_ALG); -@@ -289,11 +285,7 @@ static int caam_init_rng(struct caam_rng_ctx *ctx, struct device *jrdev) +@@ -289,11 +285,7 @@ static int caam_init_rng(struct caam_rng if (err) return err; @@ -21540,8 +21481,6 @@ index 9b92af2c..fde07d4f 100644 if (!rng_ctx) { err = -ENOMEM; goto free_caam_alloc; -diff --git a/drivers/crypto/caam/compat.h b/drivers/crypto/caam/compat.h -index 7149cd24..4e084f51 100644 --- a/drivers/crypto/caam/compat.h +++ b/drivers/crypto/caam/compat.h @@ -16,6 +16,7 @@ @@ -21552,8 +21491,6 @@ index 7149cd24..4e084f51 100644 #include #include #include -diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c -index 98468b96..8f9642c6 100644 --- a/drivers/crypto/caam/ctrl.c +++ b/drivers/crypto/caam/ctrl.c @@ -2,40 +2,41 @@ @@ -21608,7 +21545,7 @@ index 98468b96..8f9642c6 100644 /* * Descriptor to instantiate RNG State Handle 0 in normal mode and -@@ -270,7 +271,7 @@ static int deinstantiate_rng(struct device *ctrldev, int state_handle_mask) +@@ -270,7 +271,7 @@ static int deinstantiate_rng(struct devi /* * If the corresponding bit is set, then it means the state * handle was initialized by us, and thus it needs to be @@ -21617,7 +21554,7 @@ index 98468b96..8f9642c6 100644 */ if ((1 << sh_idx) & state_handle_mask) { /* -@@ -303,20 +304,24 @@ static int caam_remove(struct platform_device *pdev) +@@ -303,20 +304,24 @@ static int caam_remove(struct platform_d struct device *ctrldev; struct caam_drv_private *ctrlpriv; struct caam_ctrl __iomem *ctrl; @@ -21650,7 +21587,7 @@ index 98468b96..8f9642c6 100644 deinstantiate_rng(ctrldev, ctrlpriv->rng4_sh_init); /* Shut down debug views */ -@@ -331,8 +336,8 @@ static int caam_remove(struct platform_device *pdev) +@@ -331,8 +336,8 @@ static int caam_remove(struct platform_d clk_disable_unprepare(ctrlpriv->caam_ipg); clk_disable_unprepare(ctrlpriv->caam_mem); clk_disable_unprepare(ctrlpriv->caam_aclk); @@ -21661,7 +21598,7 @@ index 98468b96..8f9642c6 100644 return 0; } -@@ -366,11 +371,8 @@ static void kick_trng(struct platform_device *pdev, int ent_delay) +@@ -366,11 +371,8 @@ static void kick_trng(struct platform_de */ val = (rd_reg32(&r4tst->rtsdctl) & RTSDCTL_ENT_DLY_MASK) >> RTSDCTL_ENT_DLY_SHIFT; @@ -21675,7 +21612,7 @@ index 98468b96..8f9642c6 100644 val = rd_reg32(&r4tst->rtsdctl); val = (val & ~RTSDCTL_ENT_DLY_MASK) | -@@ -382,15 +384,12 @@ static void kick_trng(struct platform_device *pdev, int ent_delay) +@@ -382,15 +384,12 @@ static void kick_trng(struct platform_de wr_reg32(&r4tst->rtfrqmax, RTFRQMAX_DISABLE); /* read the control register */ val = rd_reg32(&r4tst->rtmctl); @@ -21738,7 +21675,7 @@ index 98468b96..8f9642c6 100644 struct device *dev; struct device_node *nprop, *np; struct caam_ctrl __iomem *ctrl; -@@ -452,9 +449,10 @@ static int caam_probe(struct platform_device *pdev) +@@ -452,9 +449,10 @@ static int caam_probe(struct platform_de dev = &pdev->dev; dev_set_drvdata(dev, ctrlpriv); @@ -21750,7 +21687,7 @@ index 98468b96..8f9642c6 100644 /* Enable clocking */ clk = caam_drv_identify_clk(&pdev->dev, "ipg"); if (IS_ERR(clk)) { -@@ -483,14 +481,16 @@ static int caam_probe(struct platform_device *pdev) +@@ -483,14 +481,16 @@ static int caam_probe(struct platform_de } ctrlpriv->caam_aclk = clk; @@ -21774,7 +21711,7 @@ index 98468b96..8f9642c6 100644 ret = clk_prepare_enable(ctrlpriv->caam_ipg); if (ret < 0) { -@@ -511,11 +511,13 @@ static int caam_probe(struct platform_device *pdev) +@@ -511,11 +511,13 @@ static int caam_probe(struct platform_de goto disable_caam_mem; } @@ -21793,7 +21730,7 @@ index 98468b96..8f9642c6 100644 } /* Get configuration properties from device tree */ -@@ -542,13 +544,13 @@ static int caam_probe(struct platform_device *pdev) +@@ -542,13 +544,13 @@ static int caam_probe(struct platform_de else BLOCK_OFFSET = PG_SIZE_64K; @@ -21812,7 +21749,7 @@ index 98468b96..8f9642c6 100644 BLOCK_OFFSET * DECO_BLOCK_NUMBER ); -@@ -557,12 +559,17 @@ static int caam_probe(struct platform_device *pdev) +@@ -557,12 +559,17 @@ static int caam_probe(struct platform_de /* * Enable DECO watchdogs and, if this is a PHYS_ADDR_T_64BIT kernel, @@ -21835,7 +21772,7 @@ index 98468b96..8f9642c6 100644 /* * Read the Compile Time paramters and SCFGR to determine -@@ -590,64 +597,67 @@ static int caam_probe(struct platform_device *pdev) +@@ -590,64 +597,67 @@ static int caam_probe(struct platform_de JRSTART_JR1_START | JRSTART_JR2_START | JRSTART_JR3_START); @@ -21942,7 +21879,7 @@ index 98468b96..8f9642c6 100644 } /* If no QI and no rings specified, quit and go home */ -@@ -662,8 +672,10 @@ static int caam_probe(struct platform_device *pdev) +@@ -662,8 +672,10 @@ static int caam_probe(struct platform_de /* * If SEC has RNG version >= 4 and RNG state handle has not been * already instantiated, do RNG instantiation @@ -21954,7 +21891,7 @@ index 98468b96..8f9642c6 100644 ctrlpriv->rng4_sh_init = rd_reg32(&ctrl->r4tst[0].rdsta); /* -@@ -731,77 +743,46 @@ static int caam_probe(struct platform_device *pdev) +@@ -731,77 +743,46 @@ static int caam_probe(struct platform_de /* Report "alive" for developer to see */ dev_info(dev, "device ID = 0x%016llx (Era %d)\n", caam_id, caam_get_era()); @@ -22066,7 +22003,7 @@ index 98468b96..8f9642c6 100644 ctrlpriv->ctl_kek_wrap.size = KEK_KEY_SIZE * sizeof(u32); ctrlpriv->ctl_kek = debugfs_create_blob("kek", S_IRUSR | -@@ -809,7 +790,7 @@ static int caam_probe(struct platform_device *pdev) +@@ -809,7 +790,7 @@ static int caam_probe(struct platform_de ctrlpriv->ctl, &ctrlpriv->ctl_kek_wrap); @@ -22075,7 +22012,7 @@ index 98468b96..8f9642c6 100644 ctrlpriv->ctl_tkek_wrap.size = KEK_KEY_SIZE * sizeof(u32); ctrlpriv->ctl_tkek = debugfs_create_blob("tkek", S_IRUSR | -@@ -817,7 +798,7 @@ static int caam_probe(struct platform_device *pdev) +@@ -817,7 +798,7 @@ static int caam_probe(struct platform_de ctrlpriv->ctl, &ctrlpriv->ctl_tkek_wrap); @@ -22084,7 +22021,7 @@ index 98468b96..8f9642c6 100644 ctrlpriv->ctl_tdsk_wrap.size = KEK_KEY_SIZE * sizeof(u32); ctrlpriv->ctl_tdsk = debugfs_create_blob("tdsk", S_IRUSR | -@@ -828,13 +809,17 @@ static int caam_probe(struct platform_device *pdev) +@@ -828,13 +809,17 @@ static int caam_probe(struct platform_de return 0; caam_remove: @@ -22103,7 +22040,7 @@ index 98468b96..8f9642c6 100644 disable_caam_aclk: clk_disable_unprepare(ctrlpriv->caam_aclk); disable_caam_mem: -@@ -844,17 +829,6 @@ static int caam_probe(struct platform_device *pdev) +@@ -844,17 +829,6 @@ disable_caam_ipg: return ret; } @@ -22121,8 +22058,6 @@ index 98468b96..8f9642c6 100644 static struct platform_driver caam_driver = { .driver = { .name = "caam", -diff --git a/drivers/crypto/caam/ctrl.h b/drivers/crypto/caam/ctrl.h -index cac5402a..7e7bf68c 100644 --- a/drivers/crypto/caam/ctrl.h +++ b/drivers/crypto/caam/ctrl.h @@ -10,4 +10,6 @@ @@ -22132,8 +22067,6 @@ index cac5402a..7e7bf68c 100644 +extern bool caam_dpaa2; + #endif /* CTRL_H */ -diff --git a/drivers/crypto/caam/desc.h b/drivers/crypto/caam/desc.h -index 513b6646..6ec6f8c3 100644 --- a/drivers/crypto/caam/desc.h +++ b/drivers/crypto/caam/desc.h @@ -22,12 +22,6 @@ @@ -22259,8 +22192,6 @@ index 513b6646..6ec6f8c3 100644 +#define CCTRL_UNLOAD_SBOX 0x10000000 + #endif /* DESC_H */ -diff --git a/drivers/crypto/caam/desc_constr.h b/drivers/crypto/caam/desc_constr.h -index a8cd8a78..2d9dbeca 100644 --- a/drivers/crypto/caam/desc_constr.h +++ b/drivers/crypto/caam/desc_constr.h @@ -4,6 +4,9 @@ @@ -22320,7 +22251,7 @@ index a8cd8a78..2d9dbeca 100644 { u32 pdb_len = (pdb_bytes + CAAM_CMD_SZ - 1) / CAAM_CMD_SZ; -@@ -72,19 +76,20 @@ static inline void init_sh_desc_pdb(u32 *desc, u32 options, size_t pdb_bytes) +@@ -72,19 +76,20 @@ static inline void init_sh_desc_pdb(u32 options); } @@ -22344,7 +22275,7 @@ index a8cd8a78..2d9dbeca 100644 { dma_addr_t *offset = (dma_addr_t *)desc_end(desc); -@@ -94,8 +99,8 @@ static inline void append_ptr(u32 *desc, dma_addr_t ptr) +@@ -94,8 +99,8 @@ static inline void append_ptr(u32 *desc, CAAM_PTR_SZ / CAAM_CMD_SZ); } @@ -22355,7 +22286,7 @@ index a8cd8a78..2d9dbeca 100644 { PRINT_POS; init_job_desc(desc, HDR_SHARED | options | -@@ -103,7 +108,7 @@ static inline void init_job_desc_shared(u32 *desc, dma_addr_t ptr, int len, +@@ -103,7 +108,7 @@ static inline void init_job_desc_shared( append_ptr(desc, ptr); } @@ -22364,7 +22295,7 @@ index a8cd8a78..2d9dbeca 100644 { u32 *offset = desc_end(desc); -@@ -114,7 +119,7 @@ static inline void append_data(u32 *desc, void *data, int len) +@@ -114,7 +119,7 @@ static inline void append_data(u32 *desc (len + CAAM_CMD_SZ - 1) / CAAM_CMD_SZ); } @@ -22373,7 +22304,7 @@ index a8cd8a78..2d9dbeca 100644 { u32 *cmd = desc_end(desc); -@@ -125,7 +130,7 @@ static inline void append_cmd(u32 *desc, u32 command) +@@ -125,7 +130,7 @@ static inline void append_cmd(u32 *desc, #define append_u32 append_cmd @@ -22382,7 +22313,7 @@ index a8cd8a78..2d9dbeca 100644 { u32 *offset = desc_end(desc); -@@ -142,14 +147,14 @@ static inline void append_u64(u32 *desc, u64 data) +@@ -142,14 +147,14 @@ static inline void append_u64(u32 *desc, } /* Write command without affecting header, and return pointer to next word */ @@ -22399,7 +22330,7 @@ index a8cd8a78..2d9dbeca 100644 u32 command) { append_cmd(desc, command | len); -@@ -157,7 +162,7 @@ static inline void append_cmd_ptr(u32 *desc, dma_addr_t ptr, int len, +@@ -157,7 +162,7 @@ static inline void append_cmd_ptr(u32 *d } /* Write length after pointer, rather than inside command */ @@ -22408,7 +22339,7 @@ index a8cd8a78..2d9dbeca 100644 unsigned int len, u32 command) { append_cmd(desc, command); -@@ -166,7 +171,7 @@ static inline void append_cmd_ptr_extlen(u32 *desc, dma_addr_t ptr, +@@ -166,7 +171,7 @@ static inline void append_cmd_ptr_extlen append_cmd(desc, len); } @@ -22417,7 +22348,7 @@ index a8cd8a78..2d9dbeca 100644 u32 command) { append_cmd(desc, command | IMMEDIATE | len); -@@ -174,7 +179,7 @@ static inline void append_cmd_data(u32 *desc, void *data, int len, +@@ -174,7 +179,7 @@ static inline void append_cmd_data(u32 * } #define APPEND_CMD_RET(cmd, op) \ @@ -22426,7 +22357,7 @@ index a8cd8a78..2d9dbeca 100644 { \ u32 *cmd = desc_end(desc); \ PRINT_POS; \ -@@ -183,14 +188,15 @@ static inline u32 *append_##cmd(u32 *desc, u32 options) \ +@@ -183,14 +188,15 @@ static inline u32 *append_##cmd(u32 *des } APPEND_CMD_RET(jump, JUMP) APPEND_CMD_RET(move, MOVE) @@ -22444,7 +22375,7 @@ index a8cd8a78..2d9dbeca 100644 { u32 val = caam32_to_cpu(*move_cmd); -@@ -200,7 +206,7 @@ static inline void set_move_tgt_here(u32 *desc, u32 *move_cmd) +@@ -200,7 +206,7 @@ static inline void set_move_tgt_here(u32 } #define APPEND_CMD(cmd, op) \ @@ -22453,7 +22384,7 @@ index a8cd8a78..2d9dbeca 100644 { \ PRINT_POS; \ append_cmd(desc, CMD_##op | options); \ -@@ -208,7 +214,8 @@ static inline void append_##cmd(u32 *desc, u32 options) \ +@@ -208,7 +214,8 @@ static inline void append_##cmd(u32 *des APPEND_CMD(operation, OPERATION) #define APPEND_CMD_LEN(cmd, op) \ @@ -22463,7 +22394,7 @@ index a8cd8a78..2d9dbeca 100644 { \ PRINT_POS; \ append_cmd(desc, CMD_##op | len | options); \ -@@ -220,8 +227,8 @@ APPEND_CMD_LEN(seq_fifo_load, SEQ_FIFO_LOAD) +@@ -220,8 +227,8 @@ APPEND_CMD_LEN(seq_fifo_load, SEQ_FIFO_L APPEND_CMD_LEN(seq_fifo_store, SEQ_FIFO_STORE) #define APPEND_CMD_PTR(cmd, op) \ @@ -22485,7 +22416,7 @@ index a8cd8a78..2d9dbeca 100644 { u32 cmd_src; -@@ -249,7 +256,8 @@ static inline void append_store(u32 *desc, dma_addr_t ptr, unsigned int len, +@@ -249,7 +256,8 @@ static inline void append_store(u32 *des } #define APPEND_SEQ_PTR_INTLEN(cmd, op) \ @@ -22513,7 +22444,7 @@ index a8cd8a78..2d9dbeca 100644 unsigned int len, u32 options) \ { \ PRINT_POS; \ -@@ -287,7 +295,7 @@ APPEND_CMD_PTR_EXTLEN(seq_out_ptr, SEQ_OUT_PTR) +@@ -287,7 +295,7 @@ APPEND_CMD_PTR_EXTLEN(seq_out_ptr, SEQ_O * the size of its type */ #define APPEND_CMD_PTR_LEN(cmd, op, type) \ @@ -22522,7 +22453,7 @@ index a8cd8a78..2d9dbeca 100644 type len, u32 options) \ { \ PRINT_POS; \ -@@ -304,7 +312,7 @@ APPEND_CMD_PTR_LEN(seq_out_ptr, SEQ_OUT_PTR, u32) +@@ -304,7 +312,7 @@ APPEND_CMD_PTR_LEN(seq_out_ptr, SEQ_OUT_ * from length of immediate data provided, e.g., split keys */ #define APPEND_CMD_PTR_TO_IMM2(cmd, op) \ @@ -22531,7 +22462,7 @@ index a8cd8a78..2d9dbeca 100644 unsigned int data_len, \ unsigned int len, u32 options) \ { \ -@@ -315,7 +323,7 @@ static inline void append_##cmd##_as_imm(u32 *desc, void *data, \ +@@ -315,7 +323,7 @@ static inline void append_##cmd##_as_imm APPEND_CMD_PTR_TO_IMM2(key, KEY); #define APPEND_CMD_RAW_IMM(cmd, op, type) \ @@ -22607,9 +22538,6 @@ index a8cd8a78..2d9dbeca 100644 +} + +#endif /* DESC_CONSTR_H */ -diff --git a/drivers/crypto/caam/dpseci.c b/drivers/crypto/caam/dpseci.c -new file mode 100644 -index 00000000..410cd790 --- /dev/null +++ b/drivers/crypto/caam/dpseci.c @@ -0,0 +1,859 @@ @@ -23472,9 +23400,6 @@ index 00000000..410cd790 + + return 0; +} -diff --git a/drivers/crypto/caam/dpseci.h b/drivers/crypto/caam/dpseci.h -new file mode 100644 -index 00000000..d37489c6 --- /dev/null +++ b/drivers/crypto/caam/dpseci.h @@ -0,0 +1,395 @@ @@ -23873,9 +23798,6 @@ index 00000000..d37489c6 + u16 token, struct dpseci_congestion_notification_cfg *cfg); + +#endif /* _DPSECI_H_ */ -diff --git a/drivers/crypto/caam/dpseci_cmd.h b/drivers/crypto/caam/dpseci_cmd.h -new file mode 100644 -index 00000000..7624315e --- /dev/null +++ b/drivers/crypto/caam/dpseci_cmd.h @@ -0,0 +1,261 @@ @@ -24140,8 +24062,6 @@ index 00000000..7624315e +}; + +#endif /* _DPSECI_CMD_H_ */ -diff --git a/drivers/crypto/caam/error.c b/drivers/crypto/caam/error.c -index 33e41ea8..31963397 100644 --- a/drivers/crypto/caam/error.c +++ b/drivers/crypto/caam/error.c @@ -6,11 +6,54 @@ @@ -24256,7 +24176,7 @@ index 33e41ea8..31963397 100644 static const char * const cha_id_list[] = { "", "AES", -@@ -146,10 +237,9 @@ static void report_ccb_status(struct device *jrdev, const u32 status, +@@ -146,10 +237,9 @@ static void report_ccb_status(struct dev strlen(rng_err_id_list[err_id])) { /* RNG-only error */ err_str = rng_err_id_list[err_id]; @@ -24269,7 +24189,7 @@ index 33e41ea8..31963397 100644 /* * CCB ICV check failures are part of normal operation life; -@@ -198,6 +288,27 @@ static void report_deco_status(struct device *jrdev, const u32 status, +@@ -198,6 +288,27 @@ static void report_deco_status(struct de status, error, idx_str, idx, err_str, err_err_code); } @@ -24297,7 +24217,7 @@ index 33e41ea8..31963397 100644 static void report_jr_status(struct device *jrdev, const u32 status, const char *error) { -@@ -212,7 +323,7 @@ static void report_cond_code_status(struct device *jrdev, const u32 status, +@@ -212,7 +323,7 @@ static void report_cond_code_status(stru status, error, __func__); } @@ -24306,7 +24226,7 @@ index 33e41ea8..31963397 100644 { static const struct stat_src { void (*report_ssed)(struct device *jrdev, const u32 status, -@@ -224,7 +335,7 @@ void caam_jr_strstatus(struct device *jrdev, u32 status) +@@ -224,7 +335,7 @@ void caam_jr_strstatus(struct device *jr { report_ccb_status, "CCB" }, { report_jump_status, "Jump" }, { report_deco_status, "DECO" }, @@ -24315,14 +24235,12 @@ index 33e41ea8..31963397 100644 { report_jr_status, "Job Ring" }, { report_cond_code_status, "Condition Code" }, { NULL, NULL }, -@@ -250,4 +361,4 @@ void caam_jr_strstatus(struct device *jrdev, u32 status) +@@ -250,4 +361,4 @@ void caam_jr_strstatus(struct device *jr else dev_err(jrdev, "%d: unknown error source\n", ssrc); } -EXPORT_SYMBOL(caam_jr_strstatus); +EXPORT_SYMBOL(caam_strstatus); -diff --git a/drivers/crypto/caam/error.h b/drivers/crypto/caam/error.h -index b6350b0d..751ddcac 100644 --- a/drivers/crypto/caam/error.h +++ b/drivers/crypto/caam/error.h @@ -7,5 +7,13 @@ @@ -24340,8 +24258,6 @@ index b6350b0d..751ddcac 100644 + int rowsize, int groupsize, struct scatterlist *sg, + size_t tlen, bool ascii); #endif /* CAAM_ERROR_H */ -diff --git a/drivers/crypto/caam/intern.h b/drivers/crypto/caam/intern.h -index 5d4c0507..a5236125 100644 --- a/drivers/crypto/caam/intern.h +++ b/drivers/crypto/caam/intern.h @@ -41,6 +41,7 @@ struct caam_drv_private_jr { @@ -24401,8 +24317,6 @@ index 5d4c0507..a5236125 100644 +#endif + #endif /* INTERN_H */ -diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c -index 757c27f9..d258953f 100644 --- a/drivers/crypto/caam/jr.c +++ b/drivers/crypto/caam/jr.c @@ -9,6 +9,7 @@ @@ -24413,7 +24327,7 @@ index 757c27f9..d258953f 100644 #include "regs.h" #include "jr.h" #include "desc.h" -@@ -73,6 +74,8 @@ static int caam_jr_shutdown(struct device *dev) +@@ -73,6 +74,8 @@ static int caam_jr_shutdown(struct devic ret = caam_reset_hw_jr(dev); @@ -24422,7 +24336,7 @@ index 757c27f9..d258953f 100644 /* Release interrupt */ free_irq(jrp->irq, dev); -@@ -128,7 +131,7 @@ static irqreturn_t caam_jr_interrupt(int irq, void *st_dev) +@@ -128,7 +131,7 @@ static irqreturn_t caam_jr_interrupt(int /* * Check the output ring for ready responses, kick @@ -24431,7 +24345,7 @@ index 757c27f9..d258953f 100644 */ irqstate = rd_reg32(&jrp->rregs->jrintstatus); if (!irqstate) -@@ -150,13 +153,18 @@ static irqreturn_t caam_jr_interrupt(int irq, void *st_dev) +@@ -150,13 +153,18 @@ static irqreturn_t caam_jr_interrupt(int /* Have valid interrupt at this point, just ACK and trigger */ wr_reg32(&jrp->rregs->jrintstatus, irqstate); @@ -24453,7 +24367,7 @@ index 757c27f9..d258953f 100644 struct caam_drv_private_jr *jrp = dev_get_drvdata(dev); void (*usercall)(struct device *dev, u32 *desc, u32 status, void *arg); u32 *userdesc, userstatus; -@@ -230,8 +238,6 @@ static irqreturn_t caam_jr_threadirq(int irq, void *st_dev) +@@ -230,8 +238,6 @@ static irqreturn_t caam_jr_threadirq(int /* reenable / unmask IRQs */ clrsetbits_32(&jrp->rregs->rconfig_lo, JRCFG_IMSK, 0); @@ -24462,7 +24376,7 @@ index 757c27f9..d258953f 100644 } /** -@@ -389,10 +395,11 @@ static int caam_jr_init(struct device *dev) +@@ -389,10 +395,11 @@ static int caam_jr_init(struct device *d jrp = dev_get_drvdata(dev); @@ -24477,7 +24391,7 @@ index 757c27f9..d258953f 100644 if (error) { dev_err(dev, "can't connect JobR %d interrupt (%d)\n", jrp->ridx, jrp->irq); -@@ -454,6 +461,7 @@ static int caam_jr_init(struct device *dev) +@@ -454,6 +461,7 @@ out_free_inpring: out_free_irq: free_irq(jrp->irq, dev); out_kill_deq: @@ -24485,7 +24399,7 @@ index 757c27f9..d258953f 100644 return error; } -@@ -489,15 +497,28 @@ static int caam_jr_probe(struct platform_device *pdev) +@@ -489,15 +497,28 @@ static int caam_jr_probe(struct platform return -ENOMEM; } @@ -24521,7 +24435,7 @@ index 757c27f9..d258953f 100644 /* Identify the interrupt */ jrpriv->irq = irq_of_parse_and_map(nprop, 0); -@@ -520,7 +541,7 @@ static int caam_jr_probe(struct platform_device *pdev) +@@ -520,7 +541,7 @@ static int caam_jr_probe(struct platform return 0; } @@ -24530,11 +24444,9 @@ index 757c27f9..d258953f 100644 { .compatible = "fsl,sec-v4.0-job-ring", }, -diff --git a/drivers/crypto/caam/key_gen.c b/drivers/crypto/caam/key_gen.c -index 3ce1d5cd..a523ed77 100644 --- a/drivers/crypto/caam/key_gen.c +++ b/drivers/crypto/caam/key_gen.c -@@ -41,15 +41,29 @@ Split key generation----------------------------------------------- +@@ -41,15 +41,29 @@ Split key generation-------------------- [06] 0x64260028 fifostr: class2 mdsplit-jdk len=40 @0xffe04000 */ @@ -24567,7 +24479,7 @@ index 3ce1d5cd..a523ed77 100644 desc = kmalloc(CAAM_CMD_SZ * 6 + CAAM_PTR_SZ * 2, GFP_KERNEL | GFP_DMA); if (!desc) { dev_err(jrdev, "unable to allocate key input memory\n"); -@@ -63,7 +77,7 @@ int gen_split_key(struct device *jrdev, u8 *key_out, int split_key_len, +@@ -63,7 +77,7 @@ int gen_split_key(struct device *jrdev, goto out_free; } @@ -24576,7 +24488,7 @@ index 3ce1d5cd..a523ed77 100644 DMA_FROM_DEVICE); if (dma_mapping_error(jrdev, dma_addr_out)) { dev_err(jrdev, "unable to map key output memory\n"); -@@ -74,7 +88,9 @@ int gen_split_key(struct device *jrdev, u8 *key_out, int split_key_len, +@@ -74,7 +88,9 @@ int gen_split_key(struct device *jrdev, append_key(desc, dma_addr_in, keylen, CLASS_2 | KEY_DEST_CLASS_REG); /* Sets MDHA up into an HMAC-INIT */ @@ -24587,7 +24499,7 @@ index 3ce1d5cd..a523ed77 100644 /* * do a FIFO_LOAD of zero, this will trigger the internal key expansion -@@ -87,7 +103,7 @@ int gen_split_key(struct device *jrdev, u8 *key_out, int split_key_len, +@@ -87,7 +103,7 @@ int gen_split_key(struct device *jrdev, * FIFO_STORE with the explicit split-key content store * (0x26 output type) */ @@ -24596,7 +24508,7 @@ index 3ce1d5cd..a523ed77 100644 LDST_CLASS_2_CCB | FIFOST_TYPE_SPLIT_KEK); #ifdef DEBUG -@@ -108,11 +124,11 @@ int gen_split_key(struct device *jrdev, u8 *key_out, int split_key_len, +@@ -108,11 +124,11 @@ int gen_split_key(struct device *jrdev, #ifdef DEBUG print_hex_dump(KERN_ERR, "ctx.key@"__stringify(__LINE__)": ", DUMP_PREFIX_ADDRESS, 16, 4, key_out, @@ -24610,8 +24522,6 @@ index 3ce1d5cd..a523ed77 100644 DMA_FROM_DEVICE); out_unmap_in: dma_unmap_single(jrdev, dma_addr_in, keylen, DMA_TO_DEVICE); -diff --git a/drivers/crypto/caam/key_gen.h b/drivers/crypto/caam/key_gen.h -index c5588f6d..851a7c86 100644 --- a/drivers/crypto/caam/key_gen.h +++ b/drivers/crypto/caam/key_gen.h @@ -5,6 +5,36 @@ @@ -24661,8 +24571,6 @@ index c5588f6d..851a7c86 100644 +int gen_split_key(struct device *jrdev, u8 *key_out, + struct alginfo * const adata, const u8 *key_in, u32 keylen, + int max_keylen); -diff --git a/drivers/crypto/caam/pdb.h b/drivers/crypto/caam/pdb.h -index aaa00dd1..31e59963 100644 --- a/drivers/crypto/caam/pdb.h +++ b/drivers/crypto/caam/pdb.h @@ -483,6 +483,8 @@ struct dsa_verify_pdb { @@ -24746,11 +24654,9 @@ index aaa00dd1..31e59963 100644 +} __packed; + #endif -diff --git a/drivers/crypto/caam/pkc_desc.c b/drivers/crypto/caam/pkc_desc.c -index 4e4183e6..9e2ce6fe 100644 --- a/drivers/crypto/caam/pkc_desc.c +++ b/drivers/crypto/caam/pkc_desc.c -@@ -34,3 +34,39 @@ void init_rsa_priv_f1_desc(u32 *desc, struct rsa_priv_f1_pdb *pdb) +@@ -34,3 +34,39 @@ void init_rsa_priv_f1_desc(u32 *desc, st append_operation(desc, OP_TYPE_UNI_PROTOCOL | OP_PCLID_RSADEC_PRVKEY | RSA_PRIV_KEY_FRM_1); } @@ -24790,9 +24696,6 @@ index 4e4183e6..9e2ce6fe 100644 + append_operation(desc, OP_TYPE_UNI_PROTOCOL | OP_PCLID_RSADEC_PRVKEY | + RSA_PRIV_KEY_FRM_3); +} -diff --git a/drivers/crypto/caam/qi.c b/drivers/crypto/caam/qi.c -new file mode 100644 -index 00000000..48185d55 --- /dev/null +++ b/drivers/crypto/caam/qi.c @@ -0,0 +1,797 @@ @@ -25593,9 +25496,6 @@ index 00000000..48185d55 + dev_info(qidev, "Linux CAAM Queue I/F driver initialised\n"); + return 0; +} -diff --git a/drivers/crypto/caam/qi.h b/drivers/crypto/caam/qi.h -new file mode 100644 -index 00000000..0c2e68b3 --- /dev/null +++ b/drivers/crypto/caam/qi.h @@ -0,0 +1,204 @@ @@ -25803,8 +25703,6 @@ index 00000000..0c2e68b3 +void qi_cache_free(void *obj); + +#endif /* __QI_H__ */ -diff --git a/drivers/crypto/caam/regs.h b/drivers/crypto/caam/regs.h -index 84d2f838..74eb8c6c 100644 --- a/drivers/crypto/caam/regs.h +++ b/drivers/crypto/caam/regs.h @@ -2,6 +2,7 @@ @@ -25823,7 +25721,7 @@ index 84d2f838..74eb8c6c 100644 #define caam_to_cpu(len) \ static inline u##len caam##len ## _to_cpu(u##len val) \ -@@ -154,13 +156,10 @@ static inline u64 rd_reg64(void __iomem *reg) +@@ -154,13 +156,10 @@ static inline u64 rd_reg64(void __iomem #else /* CONFIG_64BIT */ static inline void wr_reg64(void __iomem *reg, u64 data) { @@ -25839,7 +25737,7 @@ index 84d2f838..74eb8c6c 100644 wr_reg32((u32 __iomem *)(reg), data >> 32); wr_reg32((u32 __iomem *)(reg) + 1, data); } -@@ -168,41 +167,40 @@ static inline void wr_reg64(void __iomem *reg, u64 data) +@@ -168,41 +167,40 @@ static inline void wr_reg64(void __iomem static inline u64 rd_reg64(void __iomem *reg) { @@ -25923,9 +25821,6 @@ index 84d2f838..74eb8c6c 100644 #define JRSTA_CCBERR_JUMP 0x08000000 #define JRSTA_CCBERR_INDEX_MASK 0xff00 #define JRSTA_CCBERR_INDEX_SHIFT 8 -diff --git a/drivers/crypto/caam/sg_sw_qm.h b/drivers/crypto/caam/sg_sw_qm.h -new file mode 100644 -index 00000000..3b3cabc4 --- /dev/null +++ b/drivers/crypto/caam/sg_sw_qm.h @@ -0,0 +1,126 @@ @@ -26055,9 +25950,6 @@ index 00000000..3b3cabc4 +} + +#endif /* __SG_SW_QM_H */ -diff --git a/drivers/crypto/caam/sg_sw_qm2.h b/drivers/crypto/caam/sg_sw_qm2.h -new file mode 100644 -index 00000000..31b44075 --- /dev/null +++ b/drivers/crypto/caam/sg_sw_qm2.h @@ -0,0 +1,81 @@ @@ -26142,8 +26034,6 @@ index 00000000..31b44075 +} + +#endif /* _SG_SW_QM2_H_ */ -diff --git a/drivers/crypto/caam/sg_sw_sec4.h b/drivers/crypto/caam/sg_sw_sec4.h -index 41cd5a35..936b1b63 100644 --- a/drivers/crypto/caam/sg_sw_sec4.h +++ b/drivers/crypto/caam/sg_sw_sec4.h @@ -5,9 +5,19 @@ @@ -26186,7 +26076,7 @@ index 41cd5a35..936b1b63 100644 #ifdef DEBUG print_hex_dump(KERN_ERR, "sec4_sg_ptr@: ", DUMP_PREFIX_ADDRESS, 16, 4, sec4_sg_ptr, -@@ -43,6 +59,14 @@ sg_to_sec4_sg(struct scatterlist *sg, int sg_count, +@@ -43,6 +59,14 @@ sg_to_sec4_sg(struct scatterlist *sg, in return sec4_sg_ptr - 1; } @@ -26201,7 +26091,7 @@ index 41cd5a35..936b1b63 100644 /* * convert scatterlist to h/w link table format * scatterlist must have been previously dma mapped -@@ -52,31 +76,7 @@ static inline void sg_to_sec4_sg_last(struct scatterlist *sg, int sg_count, +@@ -52,31 +76,7 @@ static inline void sg_to_sec4_sg_last(st u16 offset) { sec4_sg_ptr = sg_to_sec4_sg(sg, sg_count, sec4_sg_ptr, offset); @@ -26235,11 +26125,9 @@ index 41cd5a35..936b1b63 100644 - return sg_nents; -} +#endif /* _SG_SW_SEC4_H_ */ -diff --git a/drivers/net/wireless/rsi/rsi_91x_usb.c b/drivers/net/wireless/rsi/rsi_91x_usb.c -index ef5d394f..cc8deece 100644 --- a/drivers/net/wireless/rsi/rsi_91x_usb.c +++ b/drivers/net/wireless/rsi/rsi_91x_usb.c -@@ -516,7 +516,7 @@ static int rsi_probe(struct usb_interface *pfunction, +@@ -516,7 +516,7 @@ err: /** * rsi_disconnect() - This function performs the reverse of the probe function, @@ -26248,11 +26136,9 @@ index ef5d394f..cc8deece 100644 * @pfunction: Pointer to the USB interface structure. * * Return: None. -diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c -index defffa75..ec88ed9c 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c -@@ -211,7 +211,7 @@ static void deinit_irq(struct net_device *dev) +@@ -211,7 +211,7 @@ static void deinit_irq(struct net_device vif = netdev_priv(dev); wilc = vif->wilc; @@ -26261,11 +26147,9 @@ index defffa75..ec88ed9c 100644 if (wilc->dev_irq_num) { free_irq(wilc->dev_irq_num, wilc); gpio_free(wilc->gpio); -diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c -index 60d8b055..02d3e721 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c -@@ -2359,7 +2359,7 @@ int wilc_deinit_host_int(struct net_device *net) +@@ -2359,7 +2359,7 @@ int wilc_deinit_host_int(struct net_devi del_timer_sync(&wilc_during_ip_timer); if (s32Error) @@ -26274,9 +26158,6 @@ index 60d8b055..02d3e721 100644 return s32Error; } -diff --git a/include/crypto/acompress.h b/include/crypto/acompress.h -new file mode 100644 -index 00000000..e328b524 --- /dev/null +++ b/include/crypto/acompress.h @@ -0,0 +1,269 @@ @@ -26549,9 +26430,6 @@ index 00000000..e328b524 +} + +#endif -diff --git a/include/crypto/internal/acompress.h b/include/crypto/internal/acompress.h -new file mode 100644 -index 00000000..1de2b5af --- /dev/null +++ b/include/crypto/internal/acompress.h @@ -0,0 +1,81 @@ @@ -26636,9 +26514,6 @@ index 00000000..1de2b5af +int crypto_unregister_acomp(struct acomp_alg *alg); + +#endif -diff --git a/include/crypto/internal/scompress.h b/include/crypto/internal/scompress.h -new file mode 100644 -index 00000000..3fda3c56 --- /dev/null +++ b/include/crypto/internal/scompress.h @@ -0,0 +1,136 @@ @@ -26778,8 +26653,6 @@ index 00000000..3fda3c56 +int crypto_unregister_scomp(struct scomp_alg *alg); + +#endif -diff --git a/include/linux/crypto.h b/include/linux/crypto.h -index 7cee5551..8348d83d 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h @@ -50,6 +50,8 @@ @@ -26799,8 +26672,6 @@ index 7cee5551..8348d83d 100644 #define CRYPTO_ALG_LARVAL 0x00000010 #define CRYPTO_ALG_DEAD 0x00000020 -diff --git a/include/uapi/linux/cryptouser.h b/include/uapi/linux/cryptouser.h -index 79b5ded2..11d21fce 100644 --- a/include/uapi/linux/cryptouser.h +++ b/include/uapi/linux/cryptouser.h @@ -46,6 +46,7 @@ enum crypto_attr_type_t { @@ -26821,8 +26692,6 @@ index 79b5ded2..11d21fce 100644 + #define CRYPTO_REPORT_MAXSIZE (sizeof(struct crypto_user_alg) + \ sizeof(struct crypto_report_blkcipher)) -diff --git a/scripts/spelling.txt b/scripts/spelling.txt -index 163c720d..8392f89c 100644 --- a/scripts/spelling.txt +++ b/scripts/spelling.txt @@ -305,6 +305,9 @@ defintion||definition @@ -26835,11 +26704,9 @@ index 163c720d..8392f89c 100644 deivce||device delared||declared delare||declare -diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c -index 504c7cd7..d8577374 100644 --- a/sound/soc/amd/acp-pcm-dma.c +++ b/sound/soc/amd/acp-pcm-dma.c -@@ -506,7 +506,7 @@ static int acp_init(void __iomem *acp_mmio) +@@ -506,7 +506,7 @@ static int acp_init(void __iomem *acp_mm return 0; } @@ -26848,6 +26715,3 @@ index 504c7cd7..d8577374 100644 static int acp_deinit(void __iomem *acp_mmio) { u32 val; --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/805-dma-support-layerscape.patch b/target/linux/layerscape/patches-4.9/805-dma-support-layerscape.patch index 29fc301abd..703aeed3e5 100644 --- a/target/linux/layerscape/patches-4.9/805-dma-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/805-dma-support-layerscape.patch @@ -28,8 +28,6 @@ Signed-off-by: Yangbo Lu create mode 100644 drivers/dma/dpaa2-qdma/fsl_dpdmai_cmd.h create mode 100644 drivers/dma/fsl-qdma.c -diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig -index 141aefbe..e5b0fb0b 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig @@ -192,6 +192,20 @@ config FSL_EDMA @@ -53,8 +51,6 @@ index 141aefbe..e5b0fb0b 100644 config FSL_RAID tristate "Freescale RAID engine Support" depends on FSL_SOC && !ASYNC_TX_ENABLE_CHANNEL_SWITCH -diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile -index e4dc9cac..1226cbb4 100644 --- a/drivers/dma/Makefile +++ b/drivers/dma/Makefile @@ -29,6 +29,8 @@ obj-$(CONFIG_DW_DMAC_CORE) += dw/ @@ -66,9 +62,6 @@ index e4dc9cac..1226cbb4 100644 obj-$(CONFIG_FSL_RAID) += fsl_raid.o obj-$(CONFIG_HSU_DMA) += hsu/ obj-$(CONFIG_IMG_MDC_DMA) += img-mdc-dma.o -diff --git a/drivers/dma/dpaa2-qdma/Kconfig b/drivers/dma/dpaa2-qdma/Kconfig -new file mode 100644 -index 00000000..084e34bf --- /dev/null +++ b/drivers/dma/dpaa2-qdma/Kconfig @@ -0,0 +1,8 @@ @@ -80,9 +73,6 @@ index 00000000..084e34bf + ---help--- + NXP Data Path Acceleration Architecture 2 QDMA driver, + using the NXP MC bus driver. -diff --git a/drivers/dma/dpaa2-qdma/Makefile b/drivers/dma/dpaa2-qdma/Makefile -new file mode 100644 -index 00000000..ba599ac6 --- /dev/null +++ b/drivers/dma/dpaa2-qdma/Makefile @@ -0,0 +1,8 @@ @@ -94,9 +84,6 @@ index 00000000..ba599ac6 +obj-$(CONFIG_FSL_DPAA2_QDMA) += fsl-dpaa2-qdma.o + +fsl-dpaa2-qdma-objs := dpaa2-qdma.o dpdmai.o -diff --git a/drivers/dma/dpaa2-qdma/dpaa2-qdma.c b/drivers/dma/dpaa2-qdma/dpaa2-qdma.c -new file mode 100644 -index 00000000..ad6b03f7 --- /dev/null +++ b/drivers/dma/dpaa2-qdma/dpaa2-qdma.c @@ -0,0 +1,986 @@ @@ -1086,9 +1073,6 @@ index 00000000..ad6b03f7 + +MODULE_DESCRIPTION("NXP DPAA2 qDMA driver"); +MODULE_LICENSE("Dual BSD/GPL"); -diff --git a/drivers/dma/dpaa2-qdma/dpaa2-qdma.h b/drivers/dma/dpaa2-qdma/dpaa2-qdma.h -new file mode 100644 -index 00000000..71a00db8 --- /dev/null +++ b/drivers/dma/dpaa2-qdma/dpaa2-qdma.h @@ -0,0 +1,262 @@ @@ -1354,9 +1338,6 @@ index 00000000..71a00db8 +#define SG_POOL_SIZE (sizeof(struct qdma_sg_blk) +\ + sizeof(struct dpaa2_qdma_sg) * NUM_SG_PER_BLK) +#endif /* __DPAA2_QDMA_H */ -diff --git a/drivers/dma/dpaa2-qdma/dpdmai.c b/drivers/dma/dpaa2-qdma/dpdmai.c -new file mode 100644 -index 00000000..ad13fc1e --- /dev/null +++ b/drivers/dma/dpaa2-qdma/dpdmai.c @@ -0,0 +1,454 @@ @@ -1814,9 +1795,6 @@ index 00000000..ad13fc1e + + return 0; +} -diff --git a/drivers/dma/dpaa2-qdma/fsl_dpdmai.h b/drivers/dma/dpaa2-qdma/fsl_dpdmai.h -new file mode 100644 -index 00000000..e931ce16 --- /dev/null +++ b/drivers/dma/dpaa2-qdma/fsl_dpdmai.h @@ -0,0 +1,521 @@ @@ -2341,9 +2319,6 @@ index 00000000..e931ce16 + struct dpdmai_tx_queue_attr *attr); + +#endif /* __FSL_DPDMAI_H */ -diff --git a/drivers/dma/dpaa2-qdma/fsl_dpdmai_cmd.h b/drivers/dma/dpaa2-qdma/fsl_dpdmai_cmd.h -new file mode 100644 -index 00000000..7d403c01 --- /dev/null +++ b/drivers/dma/dpaa2-qdma/fsl_dpdmai_cmd.h @@ -0,0 +1,222 @@ @@ -2569,9 +2544,6 @@ index 00000000..7d403c01 + MC_RSP_OP(cmd, 1, 0, 32, uint32_t, attr->fqid) + +#endif /* _FSL_DPDMAI_CMD_H */ -diff --git a/drivers/dma/fsl-qdma.c b/drivers/dma/fsl-qdma.c -new file mode 100644 -index 00000000..6c4c2813 --- /dev/null +++ b/drivers/dma/fsl-qdma.c @@ -0,0 +1,1201 @@ @@ -3776,6 +3748,3 @@ index 00000000..6c4c2813 +MODULE_ALIAS("platform:fsl-qdma"); +MODULE_DESCRIPTION("Freescale qDMA engine driver"); +MODULE_LICENSE("GPL v2"); --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/806-flextimer-support-layerscape.patch b/target/linux/layerscape/patches-4.9/806-flextimer-support-layerscape.patch index 190e8d5307..711fde77de 100644 --- a/target/linux/layerscape/patches-4.9/806-flextimer-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/806-flextimer-support-layerscape.patch @@ -14,11 +14,9 @@ Signed-off-by: Yangbo Lu 2 files changed, 290 insertions(+), 4 deletions(-) create mode 100644 drivers/soc/fsl/layerscape/ftm_alarm.c -diff --git a/drivers/clocksource/fsl_ftm_timer.c b/drivers/clocksource/fsl_ftm_timer.c -index 738515b8..770bbbca 100644 --- a/drivers/clocksource/fsl_ftm_timer.c +++ b/drivers/clocksource/fsl_ftm_timer.c -@@ -83,11 +83,11 @@ static inline void ftm_counter_disable(void __iomem *base) +@@ -83,11 +83,11 @@ static inline void ftm_counter_disable(v static inline void ftm_irq_acknowledge(void __iomem *base) { @@ -34,9 +32,6 @@ index 738515b8..770bbbca 100644 } static inline void ftm_irq_enable(void __iomem *base) -diff --git a/drivers/soc/fsl/layerscape/ftm_alarm.c b/drivers/soc/fsl/layerscape/ftm_alarm.c -new file mode 100644 -index 00000000..6f9882ff --- /dev/null +++ b/drivers/soc/fsl/layerscape/ftm_alarm.c @@ -0,0 +1,286 @@ @@ -326,6 +321,3 @@ index 00000000..6f9882ff + return platform_driver_register(&ftm_alarm_driver); +} +device_initcall(ftm_alarm_init); --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/807-gpu-support-layerscape.patch b/target/linux/layerscape/patches-4.9/807-gpu-support-layerscape.patch index 8321d392aa..6c81b00449 100644 --- a/target/linux/layerscape/patches-4.9/807-gpu-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/807-gpu-support-layerscape.patch @@ -11,11 +11,9 @@ Signed-off-by: Yangbo Lu drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) -diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c -index cc2fde2a..54f60ba1 100644 --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c -@@ -225,7 +225,6 @@ static int fsl_dcu_drm_pm_suspend(struct device *dev) +@@ -225,7 +225,6 @@ static int fsl_dcu_drm_pm_suspend(struct if (!fsl_dev) return 0; @@ -23,7 +21,7 @@ index cc2fde2a..54f60ba1 100644 drm_kms_helper_poll_disable(fsl_dev->drm); console_lock(); -@@ -243,6 +242,8 @@ static int fsl_dcu_drm_pm_suspend(struct device *dev) +@@ -243,6 +242,8 @@ static int fsl_dcu_drm_pm_suspend(struct return PTR_ERR(fsl_dev->state); } @@ -32,7 +30,7 @@ index cc2fde2a..54f60ba1 100644 clk_disable_unprepare(fsl_dev->pix_clk); clk_disable_unprepare(fsl_dev->clk); -@@ -263,6 +264,14 @@ static int fsl_dcu_drm_pm_resume(struct device *dev) +@@ -263,6 +264,14 @@ static int fsl_dcu_drm_pm_resume(struct return ret; } @@ -47,7 +45,7 @@ index cc2fde2a..54f60ba1 100644 if (fsl_dev->tcon) fsl_tcon_bypass_enable(fsl_dev->tcon); fsl_dcu_drm_init_planes(fsl_dev->drm); -@@ -273,7 +282,6 @@ static int fsl_dcu_drm_pm_resume(struct device *dev) +@@ -273,7 +282,6 @@ static int fsl_dcu_drm_pm_resume(struct console_unlock(); drm_kms_helper_poll_enable(fsl_dev->drm); @@ -55,7 +53,7 @@ index cc2fde2a..54f60ba1 100644 return 0; } -@@ -389,6 +397,12 @@ static int fsl_dcu_drm_probe(struct platform_device *pdev) +@@ -389,6 +397,12 @@ static int fsl_dcu_drm_probe(struct plat goto disable_clk; } @@ -68,6 +66,3 @@ index cc2fde2a..54f60ba1 100644 fsl_dev->tcon = fsl_tcon_init(dev); drm = drm_dev_alloc(driver, dev); --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/808-guts-support-layerscape.patch b/target/linux/layerscape/patches-4.9/808-guts-support-layerscape.patch index 51476dac5f..ffda8a6cf8 100644 --- a/target/linux/layerscape/patches-4.9/808-guts-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/808-guts-support-layerscape.patch @@ -16,11 +16,9 @@ Signed-off-by: Yangbo Lu 3 files changed, 323 insertions(+), 52 deletions(-) create mode 100644 drivers/soc/fsl/guts.c -diff --git a/drivers/base/soc.c b/drivers/base/soc.c -index 0c5cf872..0e701e22 100644 --- a/drivers/base/soc.c +++ b/drivers/base/soc.c -@@ -167,19 +167,23 @@ static int soc_device_match_one(struct device *dev, void *arg) +@@ -167,19 +167,23 @@ static int soc_device_match_one(struct d const struct soc_device_attribute *match = arg; if (match->machine && @@ -48,9 +46,6 @@ index 0c5cf872..0e701e22 100644 return 0; return 1; -diff --git a/drivers/soc/fsl/guts.c b/drivers/soc/fsl/guts.c -new file mode 100644 -index 00000000..7d28784a --- /dev/null +++ b/drivers/soc/fsl/guts.c @@ -0,0 +1,238 @@ @@ -292,8 +287,6 @@ index 00000000..7d28784a + platform_driver_unregister(&fsl_guts_driver); +} +module_exit(fsl_guts_exit); -diff --git a/include/linux/fsl/guts.h b/include/linux/fsl/guts.h -index 649e9171..3efa3b86 100644 --- a/include/linux/fsl/guts.h +++ b/include/linux/fsl/guts.h @@ -29,83 +29,112 @@ @@ -457,6 +450,3 @@ index 649e9171..3efa3b86 100644 /* Alternate function signal multiplex control */ #define MPC85xx_PMUXCR_QE(x) (0x8000 >> (x)) --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/809-i2c-support-layerscape.patch b/target/linux/layerscape/patches-4.9/809-i2c-support-layerscape.patch index fd4371adb1..edb61b5c71 100644 --- a/target/linux/layerscape/patches-4.9/809-i2c-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/809-i2c-support-layerscape.patch @@ -13,11 +13,9 @@ Signed-off-by: Yangbo Lu drivers/i2c/muxes/i2c-mux-pca954x.c | 43 +++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) -diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c -index 47fc1f1a..a35c366b 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c -@@ -889,6 +889,14 @@ static int i2c_imx_xfer(struct i2c_adapter *adapter, +@@ -889,6 +889,14 @@ static int i2c_imx_xfer(struct i2c_adapt dev_dbg(&i2c_imx->adapter.dev, "<%s>\n", __func__); @@ -32,7 +30,7 @@ index 47fc1f1a..a35c366b 100644 result = pm_runtime_get_sync(i2c_imx->adapter.dev.parent); if (result < 0) goto out; -@@ -1100,7 +1108,7 @@ static int i2c_imx_probe(struct platform_device *pdev) +@@ -1100,7 +1108,7 @@ static int i2c_imx_probe(struct platform } /* Request IRQ */ @@ -41,8 +39,6 @@ index 47fc1f1a..a35c366b 100644 pdev->name, i2c_imx); if (ret) { dev_err(&pdev->dev, "can't claim irq %d\n", irq); -diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c -index 9c4ac26c..3c27ab84 100644 --- a/drivers/i2c/muxes/i2c-mux-pca954x.c +++ b/drivers/i2c/muxes/i2c-mux-pca954x.c @@ -74,6 +74,7 @@ struct pca954x { @@ -53,7 +49,7 @@ index 9c4ac26c..3c27ab84 100644 }; /* Provide specs for the PCA954x types we know about */ -@@ -196,6 +197,13 @@ static int pca954x_deselect_mux(struct i2c_mux_core *muxc, u32 chan) +@@ -196,6 +197,13 @@ static int pca954x_deselect_mux(struct i if (!(data->deselect & (1 << chan))) return 0; @@ -67,7 +63,7 @@ index 9c4ac26c..3c27ab84 100644 /* Deselect active channel */ data->last_chan = 0; return pca954x_reg_write(muxc->parent, client, data->last_chan); -@@ -228,6 +236,28 @@ static int pca954x_probe(struct i2c_client *client, +@@ -228,6 +236,28 @@ static int pca954x_probe(struct i2c_clie return -ENOMEM; data = i2c_mux_priv(muxc); @@ -96,7 +92,7 @@ index 9c4ac26c..3c27ab84 100644 i2c_set_clientdata(client, muxc); data->client = client; -@@ -240,11 +270,16 @@ static int pca954x_probe(struct i2c_client *client, +@@ -240,11 +270,16 @@ static int pca954x_probe(struct i2c_clie * that the mux is in fact present. This also * initializes the mux to disconnected state. */ @@ -113,7 +109,7 @@ index 9c4ac26c..3c27ab84 100644 match = of_match_device(of_match_ptr(pca954x_of_match), &client->dev); if (match) data->chip = of_device_get_match_data(&client->dev); -@@ -252,6 +287,7 @@ static int pca954x_probe(struct i2c_client *client, +@@ -252,6 +287,7 @@ static int pca954x_probe(struct i2c_clie data->chip = &chips[id->driver_data]; data->last_chan = 0; /* force the first selection */ @@ -121,7 +117,7 @@ index 9c4ac26c..3c27ab84 100644 idle_disconnect_dt = of_node && of_property_read_bool(of_node, "i2c-mux-idle-disconnect"); -@@ -312,6 +348,13 @@ static int pca954x_resume(struct device *dev) +@@ -312,6 +348,13 @@ static int pca954x_resume(struct device struct i2c_mux_core *muxc = i2c_get_clientdata(client); struct pca954x *data = i2c_mux_priv(muxc); @@ -135,6 +131,3 @@ index 9c4ac26c..3c27ab84 100644 data->last_chan = 0; return i2c_smbus_write_byte(client, 0); } --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/810-iommu-support-layerscape.patch b/target/linux/layerscape/patches-4.9/810-iommu-support-layerscape.patch index dd536093e3..4c298d7209 100644 --- a/target/linux/layerscape/patches-4.9/810-iommu-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/810-iommu-support-layerscape.patch @@ -23,11 +23,9 @@ Signed-off-by: Yangbo Lu include/linux/iommu.h | 55 +++++++--- 10 files changed, 645 insertions(+), 115 deletions(-) -diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c -index c380b7e8..93199931 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c -@@ -373,6 +373,8 @@ static struct iommu_group *acpihid_device_group(struct device *dev) +@@ -373,6 +373,8 @@ static struct iommu_group *acpihid_devic if (!entry->group) entry->group = generic_device_group(dev); @@ -36,7 +34,7 @@ index c380b7e8..93199931 100644 return entry->group; } -@@ -3159,9 +3161,10 @@ static bool amd_iommu_capable(enum iommu_cap cap) +@@ -3159,9 +3161,10 @@ static bool amd_iommu_capable(enum iommu return false; } @@ -49,7 +47,7 @@ index c380b7e8..93199931 100644 struct unity_map_entry *entry; int devid; -@@ -3170,41 +3173,56 @@ static void amd_iommu_get_dm_regions(struct device *dev, +@@ -3170,41 +3173,56 @@ static void amd_iommu_get_dm_regions(str return; list_for_each_entry(entry, &amd_iommu_unity_map, list) { @@ -120,7 +118,7 @@ index c380b7e8..93199931 100644 { struct dma_ops_domain *dma_dom = to_dma_ops_domain(to_pdomain(domain)); unsigned long start, end; -@@ -3228,9 +3246,9 @@ static const struct iommu_ops amd_iommu_ops = { +@@ -3228,9 +3246,9 @@ static const struct iommu_ops amd_iommu_ .add_device = amd_iommu_add_device, .remove_device = amd_iommu_remove_device, .device_group = amd_iommu_device_group, @@ -133,8 +131,6 @@ index c380b7e8..93199931 100644 .pgsize_bitmap = AMD_IOMMU_PGSIZES, }; -diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c -index e6f9b2d7..e3ed8dc5 100644 --- a/drivers/iommu/arm-smmu-v3.c +++ b/drivers/iommu/arm-smmu-v3.c @@ -410,6 +410,9 @@ @@ -147,7 +143,7 @@ index e6f9b2d7..e3ed8dc5 100644 static bool disable_bypass; module_param_named(disable_bypass, disable_bypass, bool, S_IRUGO); MODULE_PARM_DESC(disable_bypass, -@@ -1370,8 +1373,6 @@ static bool arm_smmu_capable(enum iommu_cap cap) +@@ -1370,8 +1373,6 @@ static bool arm_smmu_capable(enum iommu_ switch (cap) { case IOMMU_CAP_CACHE_COHERENCY: return true; @@ -156,7 +152,7 @@ index e6f9b2d7..e3ed8dc5 100644 case IOMMU_CAP_NOEXEC: return true; default: -@@ -1709,6 +1710,9 @@ arm_smmu_iova_to_phys(struct iommu_domain *domain, dma_addr_t iova) +@@ -1709,6 +1710,9 @@ arm_smmu_iova_to_phys(struct iommu_domai struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain); struct io_pgtable_ops *ops = smmu_domain->pgtbl_ops; @@ -166,7 +162,7 @@ index e6f9b2d7..e3ed8dc5 100644 if (!ops) return 0; -@@ -1880,6 +1884,31 @@ static int arm_smmu_of_xlate(struct device *dev, struct of_phandle_args *args) +@@ -1880,6 +1884,31 @@ static int arm_smmu_of_xlate(struct devi return iommu_fwspec_add_ids(dev, args->args, 1); } @@ -207,8 +203,6 @@ index e6f9b2d7..e3ed8dc5 100644 .pgsize_bitmap = -1UL, /* Restricted during device attach */ }; -diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c -index 8f728144..df18dac3 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -49,6 +49,7 @@ @@ -237,7 +231,7 @@ index 8f728144..df18dac3 100644 static int force_stage; module_param(force_stage, int, S_IRUGO); MODULE_PARM_DESC(force_stage, -@@ -1343,6 +1348,9 @@ static phys_addr_t arm_smmu_iova_to_phys(struct iommu_domain *domain, +@@ -1343,6 +1348,9 @@ static phys_addr_t arm_smmu_iova_to_phys struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain); struct io_pgtable_ops *ops= smmu_domain->pgtbl_ops; @@ -247,7 +241,7 @@ index 8f728144..df18dac3 100644 if (!ops) return 0; -@@ -1368,8 +1376,6 @@ static bool arm_smmu_capable(enum iommu_cap cap) +@@ -1368,8 +1376,6 @@ static bool arm_smmu_capable(enum iommu_ * requests. */ return true; @@ -256,7 +250,7 @@ index 8f728144..df18dac3 100644 case IOMMU_CAP_NOEXEC: return true; default: -@@ -1478,10 +1484,12 @@ static struct iommu_group *arm_smmu_device_group(struct device *dev) +@@ -1478,10 +1484,12 @@ static struct iommu_group *arm_smmu_devi } if (group) @@ -270,7 +264,7 @@ index 8f728144..df18dac3 100644 else group = generic_device_group(dev); -@@ -1534,17 +1542,44 @@ static int arm_smmu_domain_set_attr(struct iommu_domain *domain, +@@ -1534,17 +1542,44 @@ out_unlock: static int arm_smmu_of_xlate(struct device *dev, struct of_phandle_args *args) { @@ -325,7 +319,7 @@ index 8f728144..df18dac3 100644 .pgsize_bitmap = -1UL, /* Restricted during device attach */ }; -@@ -1581,16 +1618,22 @@ static void arm_smmu_device_reset(struct arm_smmu_device *smmu) +@@ -1581,16 +1618,22 @@ static void arm_smmu_device_reset(struct for (i = 0; i < smmu->num_mapping_groups; ++i) arm_smmu_write_sme(smmu, i); @@ -357,7 +351,7 @@ index 8f728144..df18dac3 100644 writel_relaxed(reg, gr0_base + ARM_SMMU_GR0_sACR); } -@@ -2024,6 +2067,11 @@ static int arm_smmu_device_dt_probe(struct platform_device *pdev) +@@ -2024,6 +2067,11 @@ static int arm_smmu_device_dt_probe(stru bus_set_iommu(&pci_bus_type, &arm_smmu_ops); } #endif @@ -369,8 +363,6 @@ index 8f728144..df18dac3 100644 return 0; } -diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c -index 1520e7f0..3ade4153 100644 --- a/drivers/iommu/dma-iommu.c +++ b/drivers/iommu/dma-iommu.c @@ -37,15 +37,50 @@ struct iommu_dma_msi_page { @@ -428,11 +420,10 @@ index 1520e7f0..3ade4153 100644 } int iommu_dma_init(void) -@@ -61,26 +96,54 @@ int iommu_dma_init(void) - * callback when domain->type == IOMMU_DOMAIN_DMA. +@@ -62,25 +97,53 @@ int iommu_dma_init(void) */ int iommu_get_dma_cookie(struct iommu_domain *domain) -+{ + { + if (domain->iova_cookie) + return -EEXIST; + @@ -457,7 +448,7 @@ index 1520e7f0..3ade4153 100644 + * used by the devices attached to @domain. + */ +int iommu_get_msi_cookie(struct iommu_domain *domain, dma_addr_t base) - { ++{ struct iommu_dma_cookie *cookie; + if (domain->type != IOMMU_DOMAIN_UNMANAGED) @@ -488,7 +479,7 @@ index 1520e7f0..3ade4153 100644 * * IOMMU drivers should normally call this from their domain_free callback. */ -@@ -92,7 +155,7 @@ void iommu_put_dma_cookie(struct iommu_domain *domain) +@@ -92,7 +155,7 @@ void iommu_put_dma_cookie(struct iommu_d if (!cookie) return; @@ -497,7 +488,7 @@ index 1520e7f0..3ade4153 100644 put_iova_domain(&cookie->iovad); list_for_each_entry_safe(msi, tmp, &cookie->msi_page_list, list) { -@@ -104,21 +167,99 @@ void iommu_put_dma_cookie(struct iommu_domain *domain) +@@ -104,21 +167,99 @@ void iommu_put_dma_cookie(struct iommu_d } EXPORT_SYMBOL(iommu_put_dma_cookie); @@ -603,7 +594,7 @@ index 1520e7f0..3ade4153 100644 } /** -@@ -136,11 +277,12 @@ static void iova_reserve_pci_windows(struct pci_dev *dev, +@@ -136,11 +277,12 @@ static void iova_reserve_pci_windows(str int iommu_dma_init_domain(struct iommu_domain *domain, dma_addr_t base, u64 size, struct device *dev) { @@ -619,7 +610,7 @@ index 1520e7f0..3ade4153 100644 /* Use the smallest supported page size for IOVA granularity */ order = __ffs(domain->pgsize_bitmap); -@@ -160,22 +302,37 @@ int iommu_dma_init_domain(struct iommu_domain *domain, dma_addr_t base, +@@ -160,22 +302,37 @@ int iommu_dma_init_domain(struct iommu_d end_pfn = min_t(unsigned long, end_pfn, domain->geometry.aperture_end >> order); } @@ -666,7 +657,7 @@ index 1520e7f0..3ade4153 100644 } EXPORT_SYMBOL(iommu_dma_init_domain); -@@ -643,11 +800,12 @@ static struct iommu_dma_msi_page *iommu_dma_get_msi_page(struct device *dev, +@@ -643,11 +800,12 @@ static struct iommu_dma_msi_page *iommu_ { struct iommu_dma_cookie *cookie = domain->iova_cookie; struct iommu_dma_msi_page *msi_page; @@ -681,7 +672,7 @@ index 1520e7f0..3ade4153 100644 list_for_each_entry(msi_page, &cookie->msi_page_list, list) if (msi_page->phys == msi_addr) return msi_page; -@@ -656,13 +814,18 @@ static struct iommu_dma_msi_page *iommu_dma_get_msi_page(struct device *dev, +@@ -656,13 +814,18 @@ static struct iommu_dma_msi_page *iommu_ if (!msi_page) return NULL; @@ -706,7 +697,7 @@ index 1520e7f0..3ade4153 100644 goto out_free_iova; INIT_LIST_HEAD(&msi_page->list); -@@ -670,7 +833,10 @@ static struct iommu_dma_msi_page *iommu_dma_get_msi_page(struct device *dev, +@@ -670,7 +833,10 @@ static struct iommu_dma_msi_page *iommu_ return msi_page; out_free_iova: @@ -718,7 +709,7 @@ index 1520e7f0..3ade4153 100644 out_free_page: kfree(msi_page); return NULL; -@@ -711,7 +877,7 @@ void iommu_dma_map_msi_msg(int irq, struct msi_msg *msg) +@@ -711,7 +877,7 @@ void iommu_dma_map_msi_msg(int irq, stru msg->data = ~0U; } else { msg->address_hi = upper_32_bits(msi_page->iova); @@ -727,8 +718,6 @@ index 1520e7f0..3ade4153 100644 msg->address_lo += lower_32_bits(msi_page->iova); } } -diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c -index 002f8a42..befbfd30 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -440,6 +440,7 @@ struct dmar_rmrr_unit { @@ -739,7 +728,7 @@ index 002f8a42..befbfd30 100644 }; struct dmar_atsr_unit { -@@ -4250,27 +4251,40 @@ static inline void init_iommu_pm_ops(void) {} +@@ -4250,27 +4251,40 @@ static inline void init_iommu_pm_ops(voi int __init dmar_parse_one_rmrr(struct acpi_dmar_header *header, void *arg) { struct acpi_dmar_reserved_memory *rmrr; @@ -793,7 +782,7 @@ index 002f8a42..befbfd30 100644 kfree(rmrru); } -@@ -5219,6 +5234,45 @@ static void intel_iommu_remove_device(struct device *dev) +@@ -5219,6 +5234,45 @@ static void intel_iommu_remove_device(st iommu_device_unlink(iommu->iommu_dev, dev); } @@ -839,7 +828,7 @@ index 002f8a42..befbfd30 100644 #ifdef CONFIG_INTEL_IOMMU_SVM #define MAX_NR_PASID_BITS (20) static inline unsigned long intel_iommu_get_pts(struct intel_iommu *iommu) -@@ -5349,19 +5403,21 @@ struct intel_iommu *intel_svm_device_to_iommu(struct device *dev) +@@ -5349,19 +5403,21 @@ struct intel_iommu *intel_svm_device_to_ #endif /* CONFIG_INTEL_IOMMU_SVM */ static const struct iommu_ops intel_iommu_ops = { @@ -874,8 +863,6 @@ index 002f8a42..befbfd30 100644 }; static void quirk_iommu_g4x_gfx(struct pci_dev *dev) -diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c -index 87d3060f..372fc463 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -68,6 +68,13 @@ struct iommu_group_attribute { @@ -892,7 +879,7 @@ index 87d3060f..372fc463 100644 #define IOMMU_GROUP_ATTR(_name, _mode, _show, _store) \ struct iommu_group_attribute iommu_group_attr_##_name = \ __ATTR(_name, _mode, _show, _store) -@@ -133,8 +140,131 @@ static ssize_t iommu_group_show_name(struct iommu_group *group, char *buf) +@@ -133,8 +140,131 @@ static ssize_t iommu_group_show_name(str return sprintf(buf, "%s\n", group->name); } @@ -1024,7 +1011,7 @@ index 87d3060f..372fc463 100644 static void iommu_group_release(struct kobject *kobj) { struct iommu_group *group = to_iommu_group(kobj); -@@ -212,6 +342,11 @@ struct iommu_group *iommu_group_alloc(void) +@@ -212,6 +342,11 @@ struct iommu_group *iommu_group_alloc(vo */ kobject_put(&group->kobj); @@ -1036,7 +1023,7 @@ index 87d3060f..372fc463 100644 pr_debug("Allocated group %d\n", group->id); return group; -@@ -318,7 +453,7 @@ static int iommu_group_create_direct_mappings(struct iommu_group *group, +@@ -318,7 +453,7 @@ static int iommu_group_create_direct_map struct device *dev) { struct iommu_domain *domain = group->default_domain; @@ -1045,7 +1032,7 @@ index 87d3060f..372fc463 100644 struct list_head mappings; unsigned long pg_size; int ret = 0; -@@ -331,18 +466,21 @@ static int iommu_group_create_direct_mappings(struct iommu_group *group, +@@ -331,18 +466,21 @@ static int iommu_group_create_direct_map pg_size = 1UL << __ffs(domain->pgsize_bitmap); INIT_LIST_HEAD(&mappings); @@ -1070,7 +1057,7 @@ index 87d3060f..372fc463 100644 for (addr = start; addr < end; addr += pg_size) { phys_addr_t phys_addr; -@@ -358,7 +496,7 @@ static int iommu_group_create_direct_mappings(struct iommu_group *group, +@@ -358,7 +496,7 @@ static int iommu_group_create_direct_map } out: @@ -1079,11 +1066,10 @@ index 87d3060f..372fc463 100644 return ret; } -@@ -562,6 +700,19 @@ struct iommu_group *iommu_group_get(struct device *dev) - } +@@ -563,6 +701,19 @@ struct iommu_group *iommu_group_get(stru EXPORT_SYMBOL_GPL(iommu_group_get); -+/** + /** + * iommu_group_ref_get - Increment reference on a group + * @group: the group to use, must not be NULL + * @@ -1096,10 +1082,11 @@ index 87d3060f..372fc463 100644 + return group; +} + - /** ++/** * iommu_group_put - Decrement group reference * @group: the group to use -@@ -1557,20 +1708,38 @@ int iommu_domain_set_attr(struct iommu_domain *domain, + * +@@ -1557,20 +1708,38 @@ int iommu_domain_set_attr(struct iommu_d } EXPORT_SYMBOL_GPL(iommu_domain_set_attr); @@ -1144,11 +1131,9 @@ index 87d3060f..372fc463 100644 } /* Request that a device is direct mapped by the IOMMU */ -diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c -index b12c12d7..9799daea 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c -@@ -410,6 +410,8 @@ static struct iommu_group *mtk_iommu_device_group(struct device *dev) +@@ -410,6 +410,8 @@ static struct iommu_group *mtk_iommu_dev data->m4u_group = iommu_group_alloc(); if (IS_ERR(data->m4u_group)) dev_err(dev, "Failed to allocate M4U IOMMU group\n"); @@ -1157,11 +1142,9 @@ index b12c12d7..9799daea 100644 } return data->m4u_group; } -diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c -index b8aeb076..c7063e9d 100644 --- a/drivers/iommu/mtk_iommu_v1.c +++ b/drivers/iommu/mtk_iommu_v1.c -@@ -502,6 +502,8 @@ static struct iommu_group *mtk_iommu_device_group(struct device *dev) +@@ -502,6 +502,8 @@ static struct iommu_group *mtk_iommu_dev data->m4u_group = iommu_group_alloc(); if (IS_ERR(data->m4u_group)) dev_err(dev, "Failed to allocate M4U IOMMU group\n"); @@ -1170,8 +1153,6 @@ index b8aeb076..c7063e9d 100644 } return data->m4u_group; } -diff --git a/include/linux/dma-iommu.h b/include/linux/dma-iommu.h -index 32c58906..36d3206d 100644 --- a/include/linux/dma-iommu.h +++ b/include/linux/dma-iommu.h @@ -27,6 +27,7 @@ int iommu_dma_init(void); @@ -1182,7 +1163,7 @@ index 32c58906..36d3206d 100644 void iommu_put_dma_cookie(struct iommu_domain *domain); /* Setup call for arch DMA mapping code */ -@@ -66,6 +67,7 @@ int iommu_dma_mapping_error(struct device *dev, dma_addr_t dma_addr); +@@ -66,6 +67,7 @@ int iommu_dma_mapping_error(struct devic /* The DMA API isn't _quite_ the whole story, though... */ void iommu_dma_map_msi_msg(int irq, struct msi_msg *msg); @@ -1190,7 +1171,7 @@ index 32c58906..36d3206d 100644 #else -@@ -82,6 +84,11 @@ static inline int iommu_get_dma_cookie(struct iommu_domain *domain) +@@ -82,6 +84,11 @@ static inline int iommu_get_dma_cookie(s return -ENODEV; } @@ -1202,7 +1183,7 @@ index 32c58906..36d3206d 100644 static inline void iommu_put_dma_cookie(struct iommu_domain *domain) { } -@@ -90,6 +97,10 @@ static inline void iommu_dma_map_msi_msg(int irq, struct msi_msg *msg) +@@ -90,6 +97,10 @@ static inline void iommu_dma_map_msi_msg { } @@ -1213,8 +1194,6 @@ index 32c58906..36d3206d 100644 #endif /* CONFIG_IOMMU_DMA */ #endif /* __KERNEL__ */ #endif /* __DMA_IOMMU_H */ -diff --git a/include/linux/iommu.h b/include/linux/iommu.h -index 436dc213..188599f5 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -117,18 +117,32 @@ enum iommu_attr { @@ -1283,7 +1262,7 @@ index 436dc213..188599f5 100644 /* Window handling functions */ int (*domain_window_enable)(struct iommu_domain *domain, u32 wnd_nr, -@@ -233,9 +248,14 @@ extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, dma_addr_t io +@@ -233,9 +248,14 @@ extern phys_addr_t iommu_iova_to_phys(st extern void iommu_set_fault_handler(struct iommu_domain *domain, iommu_fault_handler_t handler, void *token); @@ -1300,7 +1279,7 @@ index 436dc213..188599f5 100644 extern int iommu_attach_group(struct iommu_domain *domain, struct iommu_group *group); -@@ -253,6 +273,7 @@ extern void iommu_group_remove_device(struct device *dev); +@@ -253,6 +273,7 @@ extern void iommu_group_remove_device(st extern int iommu_group_for_each_dev(struct iommu_group *group, void *data, int (*fn)(struct device *, void *)); extern struct iommu_group *iommu_group_get(struct device *dev); @@ -1308,7 +1287,7 @@ index 436dc213..188599f5 100644 extern void iommu_group_put(struct iommu_group *group); extern int iommu_group_register_notifier(struct iommu_group *group, struct notifier_block *nb); -@@ -439,16 +460,22 @@ static inline void iommu_set_fault_handler(struct iommu_domain *domain, +@@ -439,16 +460,22 @@ static inline void iommu_set_fault_handl { } @@ -1333,6 +1312,3 @@ index 436dc213..188599f5 100644 static inline int iommu_request_dm_for_dev(struct device *dev) { return -ENODEV; --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/811-irqchip-support-layerscape.patch b/target/linux/layerscape/patches-4.9/811-irqchip-support-layerscape.patch index c10abfbf87..ab16306983 100644 --- a/target/linux/layerscape/patches-4.9/811-irqchip-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/811-irqchip-support-layerscape.patch @@ -16,20 +16,16 @@ Signed-off-by: Yangbo Lu kernel/irq/msi.c | 4 ++-- 5 files changed, 79 insertions(+), 2 deletions(-) -diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile -index e4dbfc85..53d2cd54 100644 --- a/drivers/irqchip/Makefile +++ b/drivers/irqchip/Makefile -@@ -74,3 +74,4 @@ obj-$(CONFIG_LS_SCFG_MSI) += irq-ls-scfg-msi.o +@@ -74,3 +74,4 @@ obj-$(CONFIG_LS_SCFG_MSI) += irq-ls-scf obj-$(CONFIG_EZNPS_GIC) += irq-eznps.o obj-$(CONFIG_ARCH_ASPEED) += irq-aspeed-vic.o obj-$(CONFIG_STM32_EXTI) += irq-stm32-exti.o +obj-$(CONFIG_QUICC_ENGINE) += irq-qeic.o -diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c -index acb9d250..2f1c8826 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c -@@ -1659,6 +1659,7 @@ static int its_init_domain(struct fwnode_handle *handle, struct its_node *its) +@@ -1659,6 +1659,7 @@ static int its_init_domain(struct fwnode inner_domain->parent = its_parent; inner_domain->bus_token = DOMAIN_BUS_NEXUS; @@ -37,8 +33,6 @@ index acb9d250..2f1c8826 100644 info->ops = &its_msi_domain_ops; info->data = its; inner_domain->host_data = info; -diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h -index ffb84604..188eced6 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -183,6 +183,12 @@ enum { @@ -54,7 +48,7 @@ index ffb84604..188eced6 100644 /* * Flags starting from IRQ_DOMAIN_FLAG_NONCORE are reserved * for implementation specific purposes and ignored by the -@@ -216,6 +222,7 @@ struct irq_domain *irq_domain_add_legacy(struct device_node *of_node, +@@ -216,6 +222,7 @@ struct irq_domain *irq_domain_add_legacy void *host_data); extern struct irq_domain *irq_find_matching_fwspec(struct irq_fwspec *fwspec, enum irq_domain_bus_token bus_token); @@ -62,7 +56,7 @@ index ffb84604..188eced6 100644 extern void irq_set_default_host(struct irq_domain *host); extern int irq_domain_alloc_descs(int virq, unsigned int nr_irqs, irq_hw_number_t hwirq, int node, -@@ -446,6 +453,19 @@ static inline bool irq_domain_is_ipi_single(struct irq_domain *domain) +@@ -446,6 +453,19 @@ static inline bool irq_domain_is_ipi_sin { return domain->flags & IRQ_DOMAIN_FLAG_IPI_SINGLE; } @@ -82,7 +76,7 @@ index ffb84604..188eced6 100644 #else /* CONFIG_IRQ_DOMAIN_HIERARCHY */ static inline void irq_domain_activate_irq(struct irq_data *data) { } static inline void irq_domain_deactivate_irq(struct irq_data *data) { } -@@ -477,6 +497,22 @@ static inline bool irq_domain_is_ipi_single(struct irq_domain *domain) +@@ -477,6 +497,22 @@ static inline bool irq_domain_is_ipi_sin { return false; } @@ -105,15 +99,12 @@ index ffb84604..188eced6 100644 #endif /* CONFIG_IRQ_DOMAIN_HIERARCHY */ #else /* CONFIG_IRQ_DOMAIN */ -diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c -index b59e6768..31805f23 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c -@@ -277,6 +277,31 @@ struct irq_domain *irq_find_matching_fwspec(struct irq_fwspec *fwspec, - } +@@ -278,6 +278,31 @@ struct irq_domain *irq_find_matching_fws EXPORT_SYMBOL_GPL(irq_find_matching_fwspec); -+/** + /** + * irq_domain_check_msi_remap - Check whether all MSI irq domains implement + * IRQ remapping + * @@ -138,10 +129,11 @@ index b59e6768..31805f23 100644 +} +EXPORT_SYMBOL_GPL(irq_domain_check_msi_remap); + - /** ++/** * irq_set_default_host() - Set a "default" irq domain * @domain: default domain pointer -@@ -1408,6 +1433,20 @@ static void irq_domain_check_hierarchy(struct irq_domain *domain) + * +@@ -1408,6 +1433,20 @@ static void irq_domain_check_hierarchy(s if (domain->ops->alloc) domain->flags |= IRQ_DOMAIN_FLAG_HIERARCHY; } @@ -162,11 +154,9 @@ index b59e6768..31805f23 100644 #else /* CONFIG_IRQ_DOMAIN_HIERARCHY */ /** * irq_domain_get_irq_data - Get irq_data associated with @virq and @domain -diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c -index 8a3e8727..2e2b2c45 100644 --- a/kernel/irq/msi.c +++ b/kernel/irq/msi.c -@@ -272,8 +272,8 @@ struct irq_domain *msi_create_irq_domain(struct fwnode_handle *fwnode, +@@ -272,8 +272,8 @@ struct irq_domain *msi_create_irq_domain if (info->flags & MSI_FLAG_USE_DEF_CHIP_OPS) msi_domain_update_chip_ops(info); @@ -177,6 +167,3 @@ index 8a3e8727..2e2b2c45 100644 } int msi_domain_prepare_irqs(struct irq_domain *domain, struct device *dev, --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/812-mmc-layerscape-support.patch b/target/linux/layerscape/patches-4.9/812-mmc-layerscape-support.patch index ff19a6da03..6cad565ad2 100644 --- a/target/linux/layerscape/patches-4.9/812-mmc-layerscape-support.patch +++ b/target/linux/layerscape/patches-4.9/812-mmc-layerscape-support.patch @@ -17,8 +17,6 @@ Signed-off-by: Yangbo Lu drivers/mmc/host/sdhci.h | 3 + 5 files changed, 306 insertions(+), 46 deletions(-) -diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig -index 5274f503..a1135a92 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -144,6 +144,7 @@ config MMC_SDHCI_OF_ESDHC @@ -29,8 +27,6 @@ index 5274f503..a1135a92 100644 help This selects the Freescale eSDHC controller support. -diff --git a/drivers/mmc/host/sdhci-esdhc.h b/drivers/mmc/host/sdhci-esdhc.h -index de132e28..98898a30 100644 --- a/drivers/mmc/host/sdhci-esdhc.h +++ b/drivers/mmc/host/sdhci-esdhc.h @@ -24,30 +24,46 @@ @@ -57,10 +53,12 @@ index de132e28..98898a30 100644 -#define ESDHC_CTRL_4BITBUS (0x1 << 1) -#define ESDHC_CTRL_8BITBUS (0x2 << 1) -#define ESDHC_CTRL_BUSWIDTH_MASK (0x3 << 1) - +- -/* OF-specific */ -#define ESDHC_DMA_SYSCTL 0x40c -#define ESDHC_DMA_SNOOP 0x00000040 + +-#define ESDHC_HOST_CONTROL_RES 0x01 +/* Present State Register */ +#define ESDHC_PRSSTAT 0x24 +#define ESDHC_CLOCK_STABLE 0x00000008 @@ -89,8 +87,7 @@ index de132e28..98898a30 100644 +/* Tuning Block Control Register */ +#define ESDHC_TBCTL 0x120 +#define ESDHC_TB_EN 0x00000004 - --#define ESDHC_HOST_CONTROL_RES 0x01 ++ +/* Control Register for DMA transfer */ +#define ESDHC_DMA_SYSCTL 0x40c +#define ESDHC_PERIPHERAL_CLK_SEL 0x00080000 @@ -98,8 +95,6 @@ index de132e28..98898a30 100644 +#define ESDHC_DMA_SNOOP 0x00000040 #endif /* _DRIVERS_MMC_SDHCI_ESDHC_H */ -diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c -index 3c27401c..4b0f375b 100644 --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c @@ -16,8 +16,12 @@ @@ -128,7 +123,7 @@ index 3c27401c..4b0f375b 100644 /** * esdhc_read*_fixup - Fixup the value read from incompatible eSDHC register * to make it compatible with SD spec. -@@ -80,6 +88,17 @@ static u32 esdhc_readl_fixup(struct sdhci_host *host, +@@ -80,6 +88,17 @@ static u32 esdhc_readl_fixup(struct sdhc return ret; } @@ -146,7 +141,7 @@ index 3c27401c..4b0f375b 100644 ret = value; return ret; } -@@ -87,6 +106,8 @@ static u32 esdhc_readl_fixup(struct sdhci_host *host, +@@ -87,6 +106,8 @@ static u32 esdhc_readl_fixup(struct sdhc static u16 esdhc_readw_fixup(struct sdhci_host *host, int spec_reg, u32 value) { @@ -155,7 +150,7 @@ index 3c27401c..4b0f375b 100644 u16 ret; int shift = (spec_reg & 0x2) * 8; -@@ -94,6 +115,12 @@ static u16 esdhc_readw_fixup(struct sdhci_host *host, +@@ -94,6 +115,12 @@ static u16 esdhc_readw_fixup(struct sdhc ret = value & 0xffff; else ret = (value >> shift) & 0xffff; @@ -168,7 +163,7 @@ index 3c27401c..4b0f375b 100644 return ret; } -@@ -235,7 +262,11 @@ static u32 esdhc_be_readl(struct sdhci_host *host, int reg) +@@ -235,7 +262,11 @@ static u32 esdhc_be_readl(struct sdhci_h u32 ret; u32 value; @@ -181,7 +176,7 @@ index 3c27401c..4b0f375b 100644 ret = esdhc_readl_fixup(host, reg, value); return ret; -@@ -246,7 +277,11 @@ static u32 esdhc_le_readl(struct sdhci_host *host, int reg) +@@ -246,7 +277,11 @@ static u32 esdhc_le_readl(struct sdhci_h u32 ret; u32 value; @@ -194,7 +189,7 @@ index 3c27401c..4b0f375b 100644 ret = esdhc_readl_fixup(host, reg, value); return ret; -@@ -404,15 +439,25 @@ static int esdhc_of_enable_dma(struct sdhci_host *host) +@@ -404,15 +439,25 @@ static int esdhc_of_enable_dma(struct sd static unsigned int esdhc_of_get_max_clock(struct sdhci_host *host) { struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -222,7 +217,7 @@ index 3c27401c..4b0f375b 100644 } static void esdhc_of_set_clock(struct sdhci_host *host, unsigned int clock) -@@ -421,17 +466,34 @@ static void esdhc_of_set_clock(struct sdhci_host *host, unsigned int clock) +@@ -421,17 +466,34 @@ static void esdhc_of_set_clock(struct sd struct sdhci_esdhc *esdhc = sdhci_pltfm_priv(pltfm_host); int pre_div = 1; int div = 1; @@ -258,7 +253,7 @@ index 3c27401c..4b0f375b 100644 /* Workaround to reduce the clock frequency for p1010 esdhc */ if (of_find_compatible_node(NULL, NULL, "fsl,p1010-esdhc")) { if (clock > 20000000) -@@ -441,8 +503,8 @@ static void esdhc_of_set_clock(struct sdhci_host *host, unsigned int clock) +@@ -441,8 +503,8 @@ static void esdhc_of_set_clock(struct sd } temp = sdhci_readl(host, ESDHC_SYSTEM_CONTROL); @@ -269,7 +264,7 @@ index 3c27401c..4b0f375b 100644 sdhci_writel(host, temp, ESDHC_SYSTEM_CONTROL); while (host->max_clk / pre_div / 16 > clock && pre_div < 256) -@@ -462,7 +524,20 @@ static void esdhc_of_set_clock(struct sdhci_host *host, unsigned int clock) +@@ -462,7 +524,20 @@ static void esdhc_of_set_clock(struct sd | (div << ESDHC_DIVIDER_SHIFT) | (pre_div << ESDHC_PREDIV_SHIFT)); sdhci_writel(host, temp, ESDHC_SYSTEM_CONTROL); @@ -291,7 +286,7 @@ index 3c27401c..4b0f375b 100644 } static void esdhc_pltfm_set_bus_width(struct sdhci_host *host, int width) -@@ -487,6 +562,33 @@ static void esdhc_pltfm_set_bus_width(struct sdhci_host *host, int width) +@@ -487,6 +562,33 @@ static void esdhc_pltfm_set_bus_width(st sdhci_writel(host, ctrl, ESDHC_PROCTL); } @@ -325,7 +320,7 @@ index 3c27401c..4b0f375b 100644 static void esdhc_reset(struct sdhci_host *host, u8 mask) { sdhci_reset(host, mask); -@@ -495,6 +597,95 @@ static void esdhc_reset(struct sdhci_host *host, u8 mask) +@@ -495,6 +597,95 @@ static void esdhc_reset(struct sdhci_hos sdhci_writel(host, host->ier, SDHCI_SIGNAL_ENABLE); } @@ -421,7 +416,7 @@ index 3c27401c..4b0f375b 100644 #ifdef CONFIG_PM_SLEEP static u32 esdhc_proctl; static int esdhc_of_suspend(struct device *dev) -@@ -575,10 +766,19 @@ static const struct sdhci_pltfm_data sdhci_esdhc_le_pdata = { +@@ -575,10 +766,19 @@ static const struct sdhci_pltfm_data sdh .ops = &sdhci_esdhc_le_ops, }; @@ -441,7 +436,7 @@ index 3c27401c..4b0f375b 100644 u16 host_ver; pltfm_host = sdhci_priv(host); -@@ -588,6 +788,36 @@ static void esdhc_init(struct platform_device *pdev, struct sdhci_host *host) +@@ -588,6 +788,36 @@ static void esdhc_init(struct platform_d esdhc->vendor_ver = (host_ver & SDHCI_VENDOR_VER_MASK) >> SDHCI_VENDOR_VER_SHIFT; esdhc->spec_ver = host_ver & SDHCI_SPEC_VER_MASK; @@ -478,7 +473,7 @@ index 3c27401c..4b0f375b 100644 } static int sdhci_esdhc_probe(struct platform_device *pdev) -@@ -610,6 +840,11 @@ static int sdhci_esdhc_probe(struct platform_device *pdev) +@@ -610,6 +840,11 @@ static int sdhci_esdhc_probe(struct plat if (IS_ERR(host)) return PTR_ERR(host); @@ -490,11 +485,9 @@ index 3c27401c..4b0f375b 100644 esdhc_init(pdev, host); sdhci_get_of_property(pdev); -diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c -index 7d275e72..099c3bf5 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c -@@ -1624,26 +1624,24 @@ static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) +@@ -1624,26 +1624,24 @@ static void sdhci_set_ios(struct mmc_hos ctrl = sdhci_readb(host, SDHCI_HOST_CONTROL); @@ -535,7 +528,7 @@ index 7d275e72..099c3bf5 100644 if (!host->preset_enabled) { sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL); /* -@@ -1956,7 +1954,7 @@ static int sdhci_prepare_hs400_tuning(struct mmc_host *mmc, struct mmc_ios *ios) +@@ -1956,7 +1954,7 @@ static int sdhci_prepare_hs400_tuning(st return 0; } @@ -544,7 +537,7 @@ index 7d275e72..099c3bf5 100644 { struct sdhci_host *host = mmc_priv(mmc); u16 ctrl; -@@ -2015,6 +2013,9 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode) +@@ -2015,6 +2013,9 @@ static int sdhci_execute_tuning(struct m return err; } @@ -554,7 +547,7 @@ index 7d275e72..099c3bf5 100644 ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); ctrl |= SDHCI_CTRL_EXEC_TUNING; if (host->quirks2 & SDHCI_QUIRK2_TUNING_WORK_AROUND) -@@ -2127,9 +2128,10 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode) +@@ -2127,9 +2128,10 @@ static int sdhci_execute_tuning(struct m ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); @@ -568,7 +561,7 @@ index 7d275e72..099c3bf5 100644 } while (ctrl & SDHCI_CTRL_EXEC_TUNING); /* -@@ -2165,6 +2167,7 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode) +@@ -2165,6 +2167,7 @@ out_unlock: spin_unlock_irqrestore(&host->lock, flags); return err; } @@ -576,7 +569,7 @@ index 7d275e72..099c3bf5 100644 static int sdhci_select_drive_strength(struct mmc_card *card, unsigned int max_dtr, int host_drv, -@@ -2997,6 +3000,8 @@ struct sdhci_host *sdhci_alloc_host(struct device *dev, +@@ -2997,6 +3000,8 @@ struct sdhci_host *sdhci_alloc_host(stru host->flags = SDHCI_SIGNALING_330; @@ -585,8 +578,6 @@ index 7d275e72..099c3bf5 100644 return host; } -diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h -index 2570455b..088bed43 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -524,6 +524,8 @@ struct sdhci_host { @@ -598,7 +589,7 @@ index 2570455b..088bed43 100644 unsigned long private[0] ____cacheline_aligned; }; -@@ -689,6 +691,7 @@ void sdhci_set_power_noreg(struct sdhci_host *host, unsigned char mode, +@@ -689,6 +691,7 @@ void sdhci_set_power_noreg(struct sdhci_ void sdhci_set_bus_width(struct sdhci_host *host, int width); void sdhci_reset(struct sdhci_host *host, u8 mask); void sdhci_set_uhs_signaling(struct sdhci_host *host, unsigned timing); @@ -606,6 +597,3 @@ index 2570455b..088bed43 100644 #ifdef CONFIG_PM extern int sdhci_suspend_host(struct sdhci_host *host); --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/813-qe-support-layerscape.patch b/target/linux/layerscape/patches-4.9/813-qe-support-layerscape.patch index ad5dd28d63..3675f3350d 100644 --- a/target/linux/layerscape/patches-4.9/813-qe-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/813-qe-support-layerscape.patch @@ -26,45 +26,559 @@ Signed-off-by: Yangbo Lu delete mode 100644 drivers/soc/fsl/qe/qe_ic.h delete mode 100644 include/soc/fsl/qe/qe_ic.h -diff --git a/drivers/soc/fsl/qe/qe_ic.c b/drivers/irqchip/irq-qeic.c -similarity index 54% -rename from drivers/soc/fsl/qe/qe_ic.c -rename to drivers/irqchip/irq-qeic.c -index ec2ca864..21e3b43c 100644 --- a/drivers/soc/fsl/qe/qe_ic.c -+++ b/drivers/irqchip/irq-qeic.c -@@ -1,7 +1,7 @@ - /* ++++ /dev/null +@@ -1,512 +0,0 @@ +-/* - * arch/powerpc/sysdev/qe_lib/qe_ic.c -+ * drivers/irqchip/irq-qeic.c - * +- * - * Copyright (C) 2006 Freescale Semiconductor, Inc. All rights reserved. +- * +- * Author: Li Yang +- * Based on code from Shlomi Gridish +- * +- * QUICC ENGINE Interrupt Controller +- * +- * This program is free software; you can redistribute it and/or modify it +- * under the terms of the GNU General Public License as published by the +- * Free Software Foundation; either version 2 of the License, or (at your +- * option) any later version. +- */ +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-#include "qe_ic.h" +- +-static DEFINE_RAW_SPINLOCK(qe_ic_lock); +- +-static struct qe_ic_info qe_ic_info[] = { +- [1] = { +- .mask = 0x00008000, +- .mask_reg = QEIC_CIMR, +- .pri_code = 0, +- .pri_reg = QEIC_CIPWCC, +- }, +- [2] = { +- .mask = 0x00004000, +- .mask_reg = QEIC_CIMR, +- .pri_code = 1, +- .pri_reg = QEIC_CIPWCC, +- }, +- [3] = { +- .mask = 0x00002000, +- .mask_reg = QEIC_CIMR, +- .pri_code = 2, +- .pri_reg = QEIC_CIPWCC, +- }, +- [10] = { +- .mask = 0x00000040, +- .mask_reg = QEIC_CIMR, +- .pri_code = 1, +- .pri_reg = QEIC_CIPZCC, +- }, +- [11] = { +- .mask = 0x00000020, +- .mask_reg = QEIC_CIMR, +- .pri_code = 2, +- .pri_reg = QEIC_CIPZCC, +- }, +- [12] = { +- .mask = 0x00000010, +- .mask_reg = QEIC_CIMR, +- .pri_code = 3, +- .pri_reg = QEIC_CIPZCC, +- }, +- [13] = { +- .mask = 0x00000008, +- .mask_reg = QEIC_CIMR, +- .pri_code = 4, +- .pri_reg = QEIC_CIPZCC, +- }, +- [14] = { +- .mask = 0x00000004, +- .mask_reg = QEIC_CIMR, +- .pri_code = 5, +- .pri_reg = QEIC_CIPZCC, +- }, +- [15] = { +- .mask = 0x00000002, +- .mask_reg = QEIC_CIMR, +- .pri_code = 6, +- .pri_reg = QEIC_CIPZCC, +- }, +- [20] = { +- .mask = 0x10000000, +- .mask_reg = QEIC_CRIMR, +- .pri_code = 3, +- .pri_reg = QEIC_CIPRTA, +- }, +- [25] = { +- .mask = 0x00800000, +- .mask_reg = QEIC_CRIMR, +- .pri_code = 0, +- .pri_reg = QEIC_CIPRTB, +- }, +- [26] = { +- .mask = 0x00400000, +- .mask_reg = QEIC_CRIMR, +- .pri_code = 1, +- .pri_reg = QEIC_CIPRTB, +- }, +- [27] = { +- .mask = 0x00200000, +- .mask_reg = QEIC_CRIMR, +- .pri_code = 2, +- .pri_reg = QEIC_CIPRTB, +- }, +- [28] = { +- .mask = 0x00100000, +- .mask_reg = QEIC_CRIMR, +- .pri_code = 3, +- .pri_reg = QEIC_CIPRTB, +- }, +- [32] = { +- .mask = 0x80000000, +- .mask_reg = QEIC_CIMR, +- .pri_code = 0, +- .pri_reg = QEIC_CIPXCC, +- }, +- [33] = { +- .mask = 0x40000000, +- .mask_reg = QEIC_CIMR, +- .pri_code = 1, +- .pri_reg = QEIC_CIPXCC, +- }, +- [34] = { +- .mask = 0x20000000, +- .mask_reg = QEIC_CIMR, +- .pri_code = 2, +- .pri_reg = QEIC_CIPXCC, +- }, +- [35] = { +- .mask = 0x10000000, +- .mask_reg = QEIC_CIMR, +- .pri_code = 3, +- .pri_reg = QEIC_CIPXCC, +- }, +- [36] = { +- .mask = 0x08000000, +- .mask_reg = QEIC_CIMR, +- .pri_code = 4, +- .pri_reg = QEIC_CIPXCC, +- }, +- [40] = { +- .mask = 0x00800000, +- .mask_reg = QEIC_CIMR, +- .pri_code = 0, +- .pri_reg = QEIC_CIPYCC, +- }, +- [41] = { +- .mask = 0x00400000, +- .mask_reg = QEIC_CIMR, +- .pri_code = 1, +- .pri_reg = QEIC_CIPYCC, +- }, +- [42] = { +- .mask = 0x00200000, +- .mask_reg = QEIC_CIMR, +- .pri_code = 2, +- .pri_reg = QEIC_CIPYCC, +- }, +- [43] = { +- .mask = 0x00100000, +- .mask_reg = QEIC_CIMR, +- .pri_code = 3, +- .pri_reg = QEIC_CIPYCC, +- }, +-}; +- +-static inline u32 qe_ic_read(volatile __be32 __iomem * base, unsigned int reg) +-{ +- return in_be32(base + (reg >> 2)); +-} +- +-static inline void qe_ic_write(volatile __be32 __iomem * base, unsigned int reg, +- u32 value) +-{ +- out_be32(base + (reg >> 2), value); +-} +- +-static inline struct qe_ic *qe_ic_from_irq(unsigned int virq) +-{ +- return irq_get_chip_data(virq); +-} +- +-static inline struct qe_ic *qe_ic_from_irq_data(struct irq_data *d) +-{ +- return irq_data_get_irq_chip_data(d); +-} +- +-static void qe_ic_unmask_irq(struct irq_data *d) +-{ +- struct qe_ic *qe_ic = qe_ic_from_irq_data(d); +- unsigned int src = irqd_to_hwirq(d); +- unsigned long flags; +- u32 temp; +- +- raw_spin_lock_irqsave(&qe_ic_lock, flags); +- +- temp = qe_ic_read(qe_ic->regs, qe_ic_info[src].mask_reg); +- qe_ic_write(qe_ic->regs, qe_ic_info[src].mask_reg, +- temp | qe_ic_info[src].mask); +- +- raw_spin_unlock_irqrestore(&qe_ic_lock, flags); +-} +- +-static void qe_ic_mask_irq(struct irq_data *d) +-{ +- struct qe_ic *qe_ic = qe_ic_from_irq_data(d); +- unsigned int src = irqd_to_hwirq(d); +- unsigned long flags; +- u32 temp; +- +- raw_spin_lock_irqsave(&qe_ic_lock, flags); +- +- temp = qe_ic_read(qe_ic->regs, qe_ic_info[src].mask_reg); +- qe_ic_write(qe_ic->regs, qe_ic_info[src].mask_reg, +- temp & ~qe_ic_info[src].mask); +- +- /* Flush the above write before enabling interrupts; otherwise, +- * spurious interrupts will sometimes happen. To be 100% sure +- * that the write has reached the device before interrupts are +- * enabled, the mask register would have to be read back; however, +- * this is not required for correctness, only to avoid wasting +- * time on a large number of spurious interrupts. In testing, +- * a sync reduced the observed spurious interrupts to zero. +- */ +- mb(); +- +- raw_spin_unlock_irqrestore(&qe_ic_lock, flags); +-} +- +-static struct irq_chip qe_ic_irq_chip = { +- .name = "QEIC", +- .irq_unmask = qe_ic_unmask_irq, +- .irq_mask = qe_ic_mask_irq, +- .irq_mask_ack = qe_ic_mask_irq, +-}; +- +-static int qe_ic_host_match(struct irq_domain *h, struct device_node *node, +- enum irq_domain_bus_token bus_token) +-{ +- /* Exact match, unless qe_ic node is NULL */ +- struct device_node *of_node = irq_domain_get_of_node(h); +- return of_node == NULL || of_node == node; +-} +- +-static int qe_ic_host_map(struct irq_domain *h, unsigned int virq, +- irq_hw_number_t hw) +-{ +- struct qe_ic *qe_ic = h->host_data; +- struct irq_chip *chip; +- +- if (hw >= ARRAY_SIZE(qe_ic_info)) { +- pr_err("%s: Invalid hw irq number for QEIC\n", __func__); +- return -EINVAL; +- } +- +- if (qe_ic_info[hw].mask == 0) { +- printk(KERN_ERR "Can't map reserved IRQ\n"); +- return -EINVAL; +- } +- /* Default chip */ +- chip = &qe_ic->hc_irq; +- +- irq_set_chip_data(virq, qe_ic); +- irq_set_status_flags(virq, IRQ_LEVEL); +- +- irq_set_chip_and_handler(virq, chip, handle_level_irq); +- +- return 0; +-} +- +-static const struct irq_domain_ops qe_ic_host_ops = { +- .match = qe_ic_host_match, +- .map = qe_ic_host_map, +- .xlate = irq_domain_xlate_onetwocell, +-}; +- +-/* Return an interrupt vector or NO_IRQ if no interrupt is pending. */ +-unsigned int qe_ic_get_low_irq(struct qe_ic *qe_ic) +-{ +- int irq; +- +- BUG_ON(qe_ic == NULL); +- +- /* get the interrupt source vector. */ +- irq = qe_ic_read(qe_ic->regs, QEIC_CIVEC) >> 26; +- +- if (irq == 0) +- return NO_IRQ; +- +- return irq_linear_revmap(qe_ic->irqhost, irq); +-} +- +-/* Return an interrupt vector or NO_IRQ if no interrupt is pending. */ +-unsigned int qe_ic_get_high_irq(struct qe_ic *qe_ic) +-{ +- int irq; +- +- BUG_ON(qe_ic == NULL); +- +- /* get the interrupt source vector. */ +- irq = qe_ic_read(qe_ic->regs, QEIC_CHIVEC) >> 26; +- +- if (irq == 0) +- return NO_IRQ; +- +- return irq_linear_revmap(qe_ic->irqhost, irq); +-} +- +-void __init qe_ic_init(struct device_node *node, unsigned int flags, +- void (*low_handler)(struct irq_desc *desc), +- void (*high_handler)(struct irq_desc *desc)) +-{ +- struct qe_ic *qe_ic; +- struct resource res; +- u32 temp = 0, ret, high_active = 0; +- +- ret = of_address_to_resource(node, 0, &res); +- if (ret) +- return; +- +- qe_ic = kzalloc(sizeof(*qe_ic), GFP_KERNEL); +- if (qe_ic == NULL) +- return; +- +- qe_ic->irqhost = irq_domain_add_linear(node, NR_QE_IC_INTS, +- &qe_ic_host_ops, qe_ic); +- if (qe_ic->irqhost == NULL) { +- kfree(qe_ic); +- return; +- } +- +- qe_ic->regs = ioremap(res.start, resource_size(&res)); +- +- qe_ic->hc_irq = qe_ic_irq_chip; +- +- qe_ic->virq_high = irq_of_parse_and_map(node, 0); +- qe_ic->virq_low = irq_of_parse_and_map(node, 1); +- +- if (qe_ic->virq_low == NO_IRQ) { +- printk(KERN_ERR "Failed to map QE_IC low IRQ\n"); +- kfree(qe_ic); +- return; +- } +- +- /* default priority scheme is grouped. If spread mode is */ +- /* required, configure cicr accordingly. */ +- if (flags & QE_IC_SPREADMODE_GRP_W) +- temp |= CICR_GWCC; +- if (flags & QE_IC_SPREADMODE_GRP_X) +- temp |= CICR_GXCC; +- if (flags & QE_IC_SPREADMODE_GRP_Y) +- temp |= CICR_GYCC; +- if (flags & QE_IC_SPREADMODE_GRP_Z) +- temp |= CICR_GZCC; +- if (flags & QE_IC_SPREADMODE_GRP_RISCA) +- temp |= CICR_GRTA; +- if (flags & QE_IC_SPREADMODE_GRP_RISCB) +- temp |= CICR_GRTB; +- +- /* choose destination signal for highest priority interrupt */ +- if (flags & QE_IC_HIGH_SIGNAL) { +- temp |= (SIGNAL_HIGH << CICR_HPIT_SHIFT); +- high_active = 1; +- } +- +- qe_ic_write(qe_ic->regs, QEIC_CICR, temp); +- +- irq_set_handler_data(qe_ic->virq_low, qe_ic); +- irq_set_chained_handler(qe_ic->virq_low, low_handler); +- +- if (qe_ic->virq_high != NO_IRQ && +- qe_ic->virq_high != qe_ic->virq_low) { +- irq_set_handler_data(qe_ic->virq_high, qe_ic); +- irq_set_chained_handler(qe_ic->virq_high, high_handler); +- } +-} +- +-void qe_ic_set_highest_priority(unsigned int virq, int high) +-{ +- struct qe_ic *qe_ic = qe_ic_from_irq(virq); +- unsigned int src = virq_to_hw(virq); +- u32 temp = 0; +- +- temp = qe_ic_read(qe_ic->regs, QEIC_CICR); +- +- temp &= ~CICR_HP_MASK; +- temp |= src << CICR_HP_SHIFT; +- +- temp &= ~CICR_HPIT_MASK; +- temp |= (high ? SIGNAL_HIGH : SIGNAL_LOW) << CICR_HPIT_SHIFT; +- +- qe_ic_write(qe_ic->regs, QEIC_CICR, temp); +-} +- +-/* Set Priority level within its group, from 1 to 8 */ +-int qe_ic_set_priority(unsigned int virq, unsigned int priority) +-{ +- struct qe_ic *qe_ic = qe_ic_from_irq(virq); +- unsigned int src = virq_to_hw(virq); +- u32 temp; +- +- if (priority > 8 || priority == 0) +- return -EINVAL; +- if (WARN_ONCE(src >= ARRAY_SIZE(qe_ic_info), +- "%s: Invalid hw irq number for QEIC\n", __func__)) +- return -EINVAL; +- if (qe_ic_info[src].pri_reg == 0) +- return -EINVAL; +- +- temp = qe_ic_read(qe_ic->regs, qe_ic_info[src].pri_reg); +- +- if (priority < 4) { +- temp &= ~(0x7 << (32 - priority * 3)); +- temp |= qe_ic_info[src].pri_code << (32 - priority * 3); +- } else { +- temp &= ~(0x7 << (24 - priority * 3)); +- temp |= qe_ic_info[src].pri_code << (24 - priority * 3); +- } +- +- qe_ic_write(qe_ic->regs, qe_ic_info[src].pri_reg, temp); +- +- return 0; +-} +- +-/* Set a QE priority to use high irq, only priority 1~2 can use high irq */ +-int qe_ic_set_high_priority(unsigned int virq, unsigned int priority, int high) +-{ +- struct qe_ic *qe_ic = qe_ic_from_irq(virq); +- unsigned int src = virq_to_hw(virq); +- u32 temp, control_reg = QEIC_CICNR, shift = 0; +- +- if (priority > 2 || priority == 0) +- return -EINVAL; +- if (WARN_ONCE(src >= ARRAY_SIZE(qe_ic_info), +- "%s: Invalid hw irq number for QEIC\n", __func__)) +- return -EINVAL; +- +- switch (qe_ic_info[src].pri_reg) { +- case QEIC_CIPZCC: +- shift = CICNR_ZCC1T_SHIFT; +- break; +- case QEIC_CIPWCC: +- shift = CICNR_WCC1T_SHIFT; +- break; +- case QEIC_CIPYCC: +- shift = CICNR_YCC1T_SHIFT; +- break; +- case QEIC_CIPXCC: +- shift = CICNR_XCC1T_SHIFT; +- break; +- case QEIC_CIPRTA: +- shift = CRICR_RTA1T_SHIFT; +- control_reg = QEIC_CRICR; +- break; +- case QEIC_CIPRTB: +- shift = CRICR_RTB1T_SHIFT; +- control_reg = QEIC_CRICR; +- break; +- default: +- return -EINVAL; +- } +- +- shift += (2 - priority) * 2; +- temp = qe_ic_read(qe_ic->regs, control_reg); +- temp &= ~(SIGNAL_MASK << shift); +- temp |= (high ? SIGNAL_HIGH : SIGNAL_LOW) << shift; +- qe_ic_write(qe_ic->regs, control_reg, temp); +- +- return 0; +-} +- +-static struct bus_type qe_ic_subsys = { +- .name = "qe_ic", +- .dev_name = "qe_ic", +-}; +- +-static struct device device_qe_ic = { +- .id = 0, +- .bus = &qe_ic_subsys, +-}; +- +-static int __init init_qe_ic_sysfs(void) +-{ +- int rc; +- +- printk(KERN_DEBUG "Registering qe_ic with sysfs...\n"); +- +- rc = subsys_system_register(&qe_ic_subsys, NULL); +- if (rc) { +- printk(KERN_ERR "Failed registering qe_ic sys class\n"); +- return -ENODEV; +- } +- rc = device_register(&device_qe_ic); +- if (rc) { +- printk(KERN_ERR "Failed registering qe_ic sys device\n"); +- return -ENODEV; +- } +- return 0; +-} +- +-subsys_initcall(init_qe_ic_sysfs); +--- /dev/null ++++ b/drivers/irqchip/irq-qeic.c +@@ -0,0 +1,605 @@ ++/* ++ * drivers/irqchip/irq-qeic.c ++ * + * Copyright (C) 2016 Freescale Semiconductor, Inc. All rights reserved. - * - * Author: Li Yang - * Based on code from Shlomi Gridish -@@ -18,7 +18,11 @@ - #include - #include - #include ++ * ++ * Author: Li Yang ++ * Based on code from Shlomi Gridish ++ * ++ * QUICC ENGINE Interrupt Controller ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++#include ++#include ++#include ++#include +#include +#include - #include ++#include +#include +#include - #include - #include - #include -@@ -26,11 +30,136 @@ - #include - #include - #include --#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include +#include - #include --#include - --#include "qe_ic.h" ++#include ++ +#define NR_QE_IC_INTS 64 + +/* QE IC registers offset */ @@ -165,97 +679,319 @@ index ec2ca864..21e3b43c 100644 + /* The remapper for this QEIC */ + struct irq_domain *irqhost; + -+ /* The "linux" controller struct */ -+ struct irq_chip hc_irq; ++ /* The "linux" controller struct */ ++ struct irq_chip hc_irq; ++ ++ /* VIRQ numbers of QE high/low irqs */ ++ unsigned int virq_high; ++ unsigned int virq_low; ++}; ++ ++/* ++ * QE interrupt controller internal structure ++ */ ++struct qe_ic_info { ++ /* location of this source at the QIMR register. */ ++ u32 mask; ++ ++ /* Mask register offset */ ++ u32 mask_reg; ++ ++ /* ++ * for grouped interrupts sources - the interrupt ++ * code as appears at the group priority register ++ */ ++ u8 pri_code; ++ ++ /* Group priority register offset */ ++ u32 pri_reg; ++}; ++ ++static DEFINE_RAW_SPINLOCK(qe_ic_lock); ++ ++static struct qe_ic_info qe_ic_info[] = { ++ [1] = { ++ .mask = 0x00008000, ++ .mask_reg = QEIC_CIMR, ++ .pri_code = 0, ++ .pri_reg = QEIC_CIPWCC, ++ }, ++ [2] = { ++ .mask = 0x00004000, ++ .mask_reg = QEIC_CIMR, ++ .pri_code = 1, ++ .pri_reg = QEIC_CIPWCC, ++ }, ++ [3] = { ++ .mask = 0x00002000, ++ .mask_reg = QEIC_CIMR, ++ .pri_code = 2, ++ .pri_reg = QEIC_CIPWCC, ++ }, ++ [10] = { ++ .mask = 0x00000040, ++ .mask_reg = QEIC_CIMR, ++ .pri_code = 1, ++ .pri_reg = QEIC_CIPZCC, ++ }, ++ [11] = { ++ .mask = 0x00000020, ++ .mask_reg = QEIC_CIMR, ++ .pri_code = 2, ++ .pri_reg = QEIC_CIPZCC, ++ }, ++ [12] = { ++ .mask = 0x00000010, ++ .mask_reg = QEIC_CIMR, ++ .pri_code = 3, ++ .pri_reg = QEIC_CIPZCC, ++ }, ++ [13] = { ++ .mask = 0x00000008, ++ .mask_reg = QEIC_CIMR, ++ .pri_code = 4, ++ .pri_reg = QEIC_CIPZCC, ++ }, ++ [14] = { ++ .mask = 0x00000004, ++ .mask_reg = QEIC_CIMR, ++ .pri_code = 5, ++ .pri_reg = QEIC_CIPZCC, ++ }, ++ [15] = { ++ .mask = 0x00000002, ++ .mask_reg = QEIC_CIMR, ++ .pri_code = 6, ++ .pri_reg = QEIC_CIPZCC, ++ }, ++ [20] = { ++ .mask = 0x10000000, ++ .mask_reg = QEIC_CRIMR, ++ .pri_code = 3, ++ .pri_reg = QEIC_CIPRTA, ++ }, ++ [25] = { ++ .mask = 0x00800000, ++ .mask_reg = QEIC_CRIMR, ++ .pri_code = 0, ++ .pri_reg = QEIC_CIPRTB, ++ }, ++ [26] = { ++ .mask = 0x00400000, ++ .mask_reg = QEIC_CRIMR, ++ .pri_code = 1, ++ .pri_reg = QEIC_CIPRTB, ++ }, ++ [27] = { ++ .mask = 0x00200000, ++ .mask_reg = QEIC_CRIMR, ++ .pri_code = 2, ++ .pri_reg = QEIC_CIPRTB, ++ }, ++ [28] = { ++ .mask = 0x00100000, ++ .mask_reg = QEIC_CRIMR, ++ .pri_code = 3, ++ .pri_reg = QEIC_CIPRTB, ++ }, ++ [32] = { ++ .mask = 0x80000000, ++ .mask_reg = QEIC_CIMR, ++ .pri_code = 0, ++ .pri_reg = QEIC_CIPXCC, ++ }, ++ [33] = { ++ .mask = 0x40000000, ++ .mask_reg = QEIC_CIMR, ++ .pri_code = 1, ++ .pri_reg = QEIC_CIPXCC, ++ }, ++ [34] = { ++ .mask = 0x20000000, ++ .mask_reg = QEIC_CIMR, ++ .pri_code = 2, ++ .pri_reg = QEIC_CIPXCC, ++ }, ++ [35] = { ++ .mask = 0x10000000, ++ .mask_reg = QEIC_CIMR, ++ .pri_code = 3, ++ .pri_reg = QEIC_CIPXCC, ++ }, ++ [36] = { ++ .mask = 0x08000000, ++ .mask_reg = QEIC_CIMR, ++ .pri_code = 4, ++ .pri_reg = QEIC_CIPXCC, ++ }, ++ [40] = { ++ .mask = 0x00800000, ++ .mask_reg = QEIC_CIMR, ++ .pri_code = 0, ++ .pri_reg = QEIC_CIPYCC, ++ }, ++ [41] = { ++ .mask = 0x00400000, ++ .mask_reg = QEIC_CIMR, ++ .pri_code = 1, ++ .pri_reg = QEIC_CIPYCC, ++ }, ++ [42] = { ++ .mask = 0x00200000, ++ .mask_reg = QEIC_CIMR, ++ .pri_code = 2, ++ .pri_reg = QEIC_CIPYCC, ++ }, ++ [43] = { ++ .mask = 0x00100000, ++ .mask_reg = QEIC_CIMR, ++ .pri_code = 3, ++ .pri_reg = QEIC_CIPYCC, ++ }, ++}; ++ ++static inline u32 qe_ic_read(__be32 __iomem *base, unsigned int reg) ++{ ++ return ioread32be(base + (reg >> 2)); ++} ++ ++static inline void qe_ic_write(__be32 __iomem *base, unsigned int reg, ++ u32 value) ++{ ++ iowrite32be(value, base + (reg >> 2)); ++} ++ ++static inline struct qe_ic *qe_ic_from_irq(unsigned int virq) ++{ ++ return irq_get_chip_data(virq); ++} ++ ++static inline struct qe_ic *qe_ic_from_irq_data(struct irq_data *d) ++{ ++ return irq_data_get_irq_chip_data(d); ++} ++ ++static void qe_ic_unmask_irq(struct irq_data *d) ++{ ++ struct qe_ic *qe_ic = qe_ic_from_irq_data(d); ++ unsigned int src = irqd_to_hwirq(d); ++ unsigned long flags; ++ u32 temp; ++ ++ raw_spin_lock_irqsave(&qe_ic_lock, flags); ++ ++ temp = qe_ic_read(qe_ic->regs, qe_ic_info[src].mask_reg); ++ qe_ic_write(qe_ic->regs, qe_ic_info[src].mask_reg, ++ temp | qe_ic_info[src].mask); ++ ++ raw_spin_unlock_irqrestore(&qe_ic_lock, flags); ++} ++ ++static void qe_ic_mask_irq(struct irq_data *d) ++{ ++ struct qe_ic *qe_ic = qe_ic_from_irq_data(d); ++ unsigned int src = irqd_to_hwirq(d); ++ unsigned long flags; ++ u32 temp; ++ ++ raw_spin_lock_irqsave(&qe_ic_lock, flags); ++ ++ temp = qe_ic_read(qe_ic->regs, qe_ic_info[src].mask_reg); ++ qe_ic_write(qe_ic->regs, qe_ic_info[src].mask_reg, ++ temp & ~qe_ic_info[src].mask); ++ ++ /* Flush the above write before enabling interrupts; otherwise, ++ * spurious interrupts will sometimes happen. To be 100% sure ++ * that the write has reached the device before interrupts are ++ * enabled, the mask register would have to be read back; however, ++ * this is not required for correctness, only to avoid wasting ++ * time on a large number of spurious interrupts. In testing, ++ * a sync reduced the observed spurious interrupts to zero. ++ */ ++ mb(); ++ ++ raw_spin_unlock_irqrestore(&qe_ic_lock, flags); ++} ++ ++static struct irq_chip qe_ic_irq_chip = { ++ .name = "QEIC", ++ .irq_unmask = qe_ic_unmask_irq, ++ .irq_mask = qe_ic_mask_irq, ++ .irq_mask_ack = qe_ic_mask_irq, ++}; ++ ++static int qe_ic_host_match(struct irq_domain *h, struct device_node *node, ++ enum irq_domain_bus_token bus_token) ++{ ++ /* Exact match, unless qe_ic node is NULL */ ++ struct device_node *of_node = irq_domain_get_of_node(h); ++ return of_node == NULL || of_node == node; ++} ++ ++static int qe_ic_host_map(struct irq_domain *h, unsigned int virq, ++ irq_hw_number_t hw) ++{ ++ struct qe_ic *qe_ic = h->host_data; ++ struct irq_chip *chip; ++ ++ if (hw >= ARRAY_SIZE(qe_ic_info)) { ++ pr_err("%s: Invalid hw irq number for QEIC\n", __func__); ++ return -EINVAL; ++ } + -+ /* VIRQ numbers of QE high/low irqs */ -+ unsigned int virq_high; -+ unsigned int virq_low; -+}; ++ if (qe_ic_info[hw].mask == 0) { ++ printk(KERN_ERR "Can't map reserved IRQ\n"); ++ return -EINVAL; ++ } ++ /* Default chip */ ++ chip = &qe_ic->hc_irq; + -+/* -+ * QE interrupt controller internal structure -+ */ -+struct qe_ic_info { -+ /* location of this source at the QIMR register. */ -+ u32 mask; ++ irq_set_chip_data(virq, qe_ic); ++ irq_set_status_flags(virq, IRQ_LEVEL); + -+ /* Mask register offset */ -+ u32 mask_reg; ++ irq_set_chip_and_handler(virq, chip, handle_level_irq); + -+ /* -+ * for grouped interrupts sources - the interrupt -+ * code as appears at the group priority register -+ */ -+ u8 pri_code; ++ return 0; ++} + -+ /* Group priority register offset */ -+ u32 pri_reg; ++static const struct irq_domain_ops qe_ic_host_ops = { ++ .match = qe_ic_host_match, ++ .map = qe_ic_host_map, ++ .xlate = irq_domain_xlate_onetwocell, +}; - - static DEFINE_RAW_SPINLOCK(qe_ic_lock); - -@@ -175,15 +304,15 @@ static struct qe_ic_info qe_ic_info[] = { - }, - }; - --static inline u32 qe_ic_read(volatile __be32 __iomem * base, unsigned int reg) -+static inline u32 qe_ic_read(__be32 __iomem *base, unsigned int reg) - { -- return in_be32(base + (reg >> 2)); -+ return ioread32be(base + (reg >> 2)); - } - --static inline void qe_ic_write(volatile __be32 __iomem * base, unsigned int reg, -+static inline void qe_ic_write(__be32 __iomem *base, unsigned int reg, - u32 value) - { -- out_be32(base + (reg >> 2), value); -+ iowrite32be(value, base + (reg >> 2)); - } - - static inline struct qe_ic *qe_ic_from_irq(unsigned int virq) -@@ -285,8 +414,8 @@ static const struct irq_domain_ops qe_ic_host_ops = { - .xlate = irq_domain_xlate_onetwocell, - }; - --/* Return an interrupt vector or NO_IRQ if no interrupt is pending. */ --unsigned int qe_ic_get_low_irq(struct qe_ic *qe_ic) ++ +/* Return an interrupt vector or 0 if no interrupt is pending. */ +static unsigned int qe_ic_get_low_irq(struct qe_ic *qe_ic) - { - int irq; - -@@ -296,13 +425,13 @@ unsigned int qe_ic_get_low_irq(struct qe_ic *qe_ic) - irq = qe_ic_read(qe_ic->regs, QEIC_CIVEC) >> 26; - - if (irq == 0) -- return NO_IRQ; ++{ ++ int irq; ++ ++ BUG_ON(qe_ic == NULL); ++ ++ /* get the interrupt source vector. */ ++ irq = qe_ic_read(qe_ic->regs, QEIC_CIVEC) >> 26; ++ ++ if (irq == 0) + return 0; - - return irq_linear_revmap(qe_ic->irqhost, irq); - } - --/* Return an interrupt vector or NO_IRQ if no interrupt is pending. */ --unsigned int qe_ic_get_high_irq(struct qe_ic *qe_ic) ++ ++ return irq_linear_revmap(qe_ic->irqhost, irq); ++} ++ +/* Return an interrupt vector or 0 if no interrupt is pending. */ +static unsigned int qe_ic_get_high_irq(struct qe_ic *qe_ic) - { - int irq; - -@@ -312,32 +441,96 @@ unsigned int qe_ic_get_high_irq(struct qe_ic *qe_ic) - irq = qe_ic_read(qe_ic->regs, QEIC_CHIVEC) >> 26; - - if (irq == 0) -- return NO_IRQ; ++{ ++ int irq; ++ ++ BUG_ON(qe_ic == NULL); ++ ++ /* get the interrupt source vector. */ ++ irq = qe_ic_read(qe_ic->regs, QEIC_CHIVEC) >> 26; ++ ++ if (irq == 0) + return 0; - - return irq_linear_revmap(qe_ic->irqhost, irq); - } - --void __init qe_ic_init(struct device_node *node, unsigned int flags, -- void (*low_handler)(struct irq_desc *desc), -- void (*high_handler)(struct irq_desc *desc)) ++ ++ return irq_linear_revmap(qe_ic->irqhost, irq); ++} ++ +static inline void qe_ic_cascade_low_ipic(struct irq_desc *desc) +{ + struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); @@ -315,167 +1051,82 @@ index ec2ca864..21e3b43c 100644 +} + +static int __init qe_ic_init(struct device_node *node, unsigned int flags) - { - struct qe_ic *qe_ic; - struct resource res; -- u32 temp = 0, ret, high_active = 0; ++{ ++ struct qe_ic *qe_ic; ++ struct resource res; + u32 temp = 0, high_active = 0; + int ret = 0; + + if (!node) + return -ENODEV; - - ret = of_address_to_resource(node, 0, &res); -- if (ret) -- return; ++ ++ ret = of_address_to_resource(node, 0, &res); + if (ret) { + ret = -ENODEV; + goto err_put_node; + } - - qe_ic = kzalloc(sizeof(*qe_ic), GFP_KERNEL); -- if (qe_ic == NULL) -- return; ++ ++ qe_ic = kzalloc(sizeof(*qe_ic), GFP_KERNEL); + if (qe_ic == NULL) { + ret = -ENOMEM; + goto err_put_node; + } - - qe_ic->irqhost = irq_domain_add_linear(node, NR_QE_IC_INTS, - &qe_ic_host_ops, qe_ic); - if (qe_ic->irqhost == NULL) { -- kfree(qe_ic); -- return; ++ ++ qe_ic->irqhost = irq_domain_add_linear(node, NR_QE_IC_INTS, ++ &qe_ic_host_ops, qe_ic); ++ if (qe_ic->irqhost == NULL) { + ret = -ENOMEM; + goto err_free_qe_ic; - } - - qe_ic->regs = ioremap(res.start, resource_size(&res)); -@@ -347,10 +540,10 @@ void __init qe_ic_init(struct device_node *node, unsigned int flags, - qe_ic->virq_high = irq_of_parse_and_map(node, 0); - qe_ic->virq_low = irq_of_parse_and_map(node, 1); - -- if (qe_ic->virq_low == NO_IRQ) { -- printk(KERN_ERR "Failed to map QE_IC low IRQ\n"); -- kfree(qe_ic); -- return; ++ } ++ ++ qe_ic->regs = ioremap(res.start, resource_size(&res)); ++ ++ qe_ic->hc_irq = qe_ic_irq_chip; ++ ++ qe_ic->virq_high = irq_of_parse_and_map(node, 0); ++ qe_ic->virq_low = irq_of_parse_and_map(node, 1); ++ + if (qe_ic->virq_low == 0) { + pr_err("Failed to map QE_IC low IRQ\n"); + ret = -ENOMEM; + goto err_domain_remove; - } - - /* default priority scheme is grouped. If spread mode is */ -@@ -377,136 +570,36 @@ void __init qe_ic_init(struct device_node *node, unsigned int flags, - qe_ic_write(qe_ic->regs, QEIC_CICR, temp); - - irq_set_handler_data(qe_ic->virq_low, qe_ic); -- irq_set_chained_handler(qe_ic->virq_low, low_handler); ++ } ++ ++ /* default priority scheme is grouped. If spread mode is */ ++ /* required, configure cicr accordingly. */ ++ if (flags & QE_IC_SPREADMODE_GRP_W) ++ temp |= CICR_GWCC; ++ if (flags & QE_IC_SPREADMODE_GRP_X) ++ temp |= CICR_GXCC; ++ if (flags & QE_IC_SPREADMODE_GRP_Y) ++ temp |= CICR_GYCC; ++ if (flags & QE_IC_SPREADMODE_GRP_Z) ++ temp |= CICR_GZCC; ++ if (flags & QE_IC_SPREADMODE_GRP_RISCA) ++ temp |= CICR_GRTA; ++ if (flags & QE_IC_SPREADMODE_GRP_RISCB) ++ temp |= CICR_GRTB; ++ ++ /* choose destination signal for highest priority interrupt */ ++ if (flags & QE_IC_HIGH_SIGNAL) { ++ temp |= (SIGNAL_HIGH << CICR_HPIT_SHIFT); ++ high_active = 1; ++ } ++ ++ qe_ic_write(qe_ic->regs, QEIC_CICR, temp); ++ ++ irq_set_handler_data(qe_ic->virq_low, qe_ic); + irq_set_chained_handler(qe_ic->virq_low, qe_ic_cascade_low_mpic); - -- if (qe_ic->virq_high != NO_IRQ && ++ + if (qe_ic->virq_high != 0 && - qe_ic->virq_high != qe_ic->virq_low) { - irq_set_handler_data(qe_ic->virq_high, qe_ic); -- irq_set_chained_handler(qe_ic->virq_high, high_handler); -- } --} -- --void qe_ic_set_highest_priority(unsigned int virq, int high) --{ -- struct qe_ic *qe_ic = qe_ic_from_irq(virq); -- unsigned int src = virq_to_hw(virq); -- u32 temp = 0; -- -- temp = qe_ic_read(qe_ic->regs, QEIC_CICR); -- -- temp &= ~CICR_HP_MASK; -- temp |= src << CICR_HP_SHIFT; -- -- temp &= ~CICR_HPIT_MASK; -- temp |= (high ? SIGNAL_HIGH : SIGNAL_LOW) << CICR_HPIT_SHIFT; -- -- qe_ic_write(qe_ic->regs, QEIC_CICR, temp); --} -- --/* Set Priority level within its group, from 1 to 8 */ --int qe_ic_set_priority(unsigned int virq, unsigned int priority) --{ -- struct qe_ic *qe_ic = qe_ic_from_irq(virq); -- unsigned int src = virq_to_hw(virq); -- u32 temp; -- -- if (priority > 8 || priority == 0) -- return -EINVAL; -- if (WARN_ONCE(src >= ARRAY_SIZE(qe_ic_info), -- "%s: Invalid hw irq number for QEIC\n", __func__)) -- return -EINVAL; -- if (qe_ic_info[src].pri_reg == 0) -- return -EINVAL; -- -- temp = qe_ic_read(qe_ic->regs, qe_ic_info[src].pri_reg); -- -- if (priority < 4) { -- temp &= ~(0x7 << (32 - priority * 3)); -- temp |= qe_ic_info[src].pri_code << (32 - priority * 3); -- } else { -- temp &= ~(0x7 << (24 - priority * 3)); -- temp |= qe_ic_info[src].pri_code << (24 - priority * 3); ++ qe_ic->virq_high != qe_ic->virq_low) { ++ irq_set_handler_data(qe_ic->virq_high, qe_ic); + irq_set_chained_handler(qe_ic->virq_high, + qe_ic_cascade_high_mpic); - } -- -- qe_ic_write(qe_ic->regs, qe_ic_info[src].pri_reg, temp); -- ++ } + of_node_put(node); - return 0; --} -- --/* Set a QE priority to use high irq, only priority 1~2 can use high irq */ --int qe_ic_set_high_priority(unsigned int virq, unsigned int priority, int high) --{ -- struct qe_ic *qe_ic = qe_ic_from_irq(virq); -- unsigned int src = virq_to_hw(virq); -- u32 temp, control_reg = QEIC_CICNR, shift = 0; -- -- if (priority > 2 || priority == 0) -- return -EINVAL; -- if (WARN_ONCE(src >= ARRAY_SIZE(qe_ic_info), -- "%s: Invalid hw irq number for QEIC\n", __func__)) -- return -EINVAL; -- -- switch (qe_ic_info[src].pri_reg) { -- case QEIC_CIPZCC: -- shift = CICNR_ZCC1T_SHIFT; -- break; -- case QEIC_CIPWCC: -- shift = CICNR_WCC1T_SHIFT; -- break; -- case QEIC_CIPYCC: -- shift = CICNR_YCC1T_SHIFT; -- break; -- case QEIC_CIPXCC: -- shift = CICNR_XCC1T_SHIFT; -- break; -- case QEIC_CIPRTA: -- shift = CRICR_RTA1T_SHIFT; -- control_reg = QEIC_CRICR; -- break; -- case QEIC_CIPRTB: -- shift = CRICR_RTB1T_SHIFT; -- control_reg = QEIC_CRICR; -- break; -- default: -- return -EINVAL; -- } -- -- shift += (2 - priority) * 2; -- temp = qe_ic_read(qe_ic->regs, control_reg); -- temp &= ~(SIGNAL_MASK << shift); -- temp |= (high ? SIGNAL_HIGH : SIGNAL_LOW) << shift; -- qe_ic_write(qe_ic->regs, control_reg, temp); - -- return 0; ++ return 0; ++ +err_domain_remove: + irq_domain_remove(qe_ic->irqhost); +err_free_qe_ic: @@ -483,50 +1134,24 @@ index ec2ca864..21e3b43c 100644 +err_put_node: + of_node_put(node); + return ret; - } - --static struct bus_type qe_ic_subsys = { -- .name = "qe_ic", -- .dev_name = "qe_ic", --}; -- --static struct device device_qe_ic = { -- .id = 0, -- .bus = &qe_ic_subsys, --}; -- --static int __init init_qe_ic_sysfs(void) ++} ++ +static int __init init_qe_ic(struct device_node *node, + struct device_node *parent) - { -- int rc; ++{ + int ret; - -- printk(KERN_DEBUG "Registering qe_ic with sysfs...\n"); ++ + ret = qe_ic_init(node, 0); + if (ret) + return ret; - -- rc = subsys_system_register(&qe_ic_subsys, NULL); -- if (rc) { -- printk(KERN_ERR "Failed registering qe_ic sys class\n"); -- return -ENODEV; -- } -- rc = device_register(&device_qe_ic); -- if (rc) { -- printk(KERN_ERR "Failed registering qe_ic sys device\n"); -- return -ENODEV; -- } - return 0; - } - --subsys_initcall(init_qe_ic_sysfs); ++ ++ return 0; ++} ++ +IRQCHIP_DECLARE(qeic, "fsl,qe-ic", init_qe_ic); -diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c -index 65647533..27e11404 100644 --- a/drivers/net/wan/fsl_ucc_hdlc.c +++ b/drivers/net/wan/fsl_ucc_hdlc.c -@@ -381,8 +381,8 @@ static netdev_tx_t ucc_hdlc_tx(struct sk_buff *skb, struct net_device *dev) +@@ -381,8 +381,8 @@ static netdev_tx_t ucc_hdlc_tx(struct sk /* set bd status and length */ bd_status = (bd_status & T_W_S) | T_R_S | T_I_S | T_L_S | T_TC_S; @@ -536,7 +1161,7 @@ index 65647533..27e11404 100644 /* Move to next BD in the ring */ if (!(bd_status & T_W_S)) -@@ -457,7 +457,7 @@ static int hdlc_rx_done(struct ucc_hdlc_private *priv, int rx_work_limit) +@@ -457,7 +457,7 @@ static int hdlc_rx_done(struct ucc_hdlc_ struct sk_buff *skb; hdlc_device *hdlc = dev_to_hdlc(dev); struct qe_bd *bd; @@ -545,8 +1170,6 @@ index 65647533..27e11404 100644 u16 length, howmany = 0; u8 *bdbuffer; int i; -diff --git a/drivers/soc/fsl/qe/Kconfig b/drivers/soc/fsl/qe/Kconfig -index 73a2e08b..b26b6431 100644 --- a/drivers/soc/fsl/qe/Kconfig +++ b/drivers/soc/fsl/qe/Kconfig @@ -4,7 +4,7 @@ @@ -558,8 +1181,6 @@ index 73a2e08b..b26b6431 100644 select GENERIC_ALLOCATOR select CRC32 help -diff --git a/drivers/soc/fsl/qe/Makefile b/drivers/soc/fsl/qe/Makefile -index 2031d385..51e47264 100644 --- a/drivers/soc/fsl/qe/Makefile +++ b/drivers/soc/fsl/qe/Makefile @@ -1,7 +1,7 @@ @@ -571,8 +1192,6 @@ index 2031d385..51e47264 100644 obj-$(CONFIG_CPM) += qe_common.o obj-$(CONFIG_UCC) += ucc.o obj-$(CONFIG_UCC_SLOW) += ucc_slow.o -diff --git a/drivers/soc/fsl/qe/qe.c b/drivers/soc/fsl/qe/qe.c -index 2707a827..2b53e852 100644 --- a/drivers/soc/fsl/qe/qe.c +++ b/drivers/soc/fsl/qe/qe.c @@ -33,8 +33,6 @@ @@ -614,7 +1233,7 @@ index 2707a827..2b53e852 100644 } else { if (cmd == QE_ASSIGN_PAGE) { /* Here device is the SNUM, not sub-block */ -@@ -134,20 +144,26 @@ int qe_issue_cmd(u32 cmd, u32 device, u8 mcn_protocol, u32 cmd_input) +@@ -134,20 +144,26 @@ int qe_issue_cmd(u32 cmd, u32 device, u8 mcn_shift = QE_CR_MCN_NORMAL_SHIFT; } @@ -672,7 +1291,7 @@ index 2707a827..2b53e852 100644 of_node_put(qe); -@@ -221,7 +237,7 @@ int qe_setbrg(enum qe_clock brg, unsigned int rate, unsigned int multiplier) +@@ -221,7 +237,7 @@ int qe_setbrg(enum qe_clock brg, unsigne tempval = ((divisor - 1) << QE_BRGC_DIVISOR_SHIFT) | QE_BRGC_ENABLE | div16; @@ -694,7 +1313,7 @@ index 2707a827..2b53e852 100644 return 0; } -@@ -395,14 +411,14 @@ static void qe_upload_microcode(const void *base, +@@ -395,14 +411,14 @@ static void qe_upload_microcode(const vo "uploading microcode '%s'\n", ucode->id); /* Use auto-increment */ @@ -713,7 +1332,7 @@ index 2707a827..2b53e852 100644 } /* -@@ -487,7 +503,7 @@ int qe_upload_firmware(const struct qe_firmware *firmware) +@@ -487,7 +503,7 @@ int qe_upload_firmware(const struct qe_f * If the microcode calls for it, split the I-RAM. */ if (!firmware->split) @@ -722,7 +1341,7 @@ index 2707a827..2b53e852 100644 if (firmware->soc.model) printk(KERN_INFO -@@ -521,11 +537,11 @@ int qe_upload_firmware(const struct qe_firmware *firmware) +@@ -521,11 +537,11 @@ int qe_upload_firmware(const struct qe_f u32 trap = be32_to_cpu(ucode->traps[j]); if (trap) @@ -761,9 +1380,6 @@ index 2707a827..2b53e852 100644 if ((num_of_snums < 28) || (num_of_snums > QE_NUM_OF_SNUM)) { /* No QE ever has fewer than 28 SNUMs */ pr_err("QE: number of snum is invalid\n"); -diff --git a/drivers/soc/fsl/qe/qe_ic.h b/drivers/soc/fsl/qe/qe_ic.h -deleted file mode 100644 -index 926a2ed4..00000000 --- a/drivers/soc/fsl/qe/qe_ic.h +++ /dev/null @@ -1,103 +0,0 @@ @@ -870,8 +1486,6 @@ index 926a2ed4..00000000 -}; - -#endif /* _POWERPC_SYSDEV_QE_IC_H */ -diff --git a/drivers/soc/fsl/qe/qe_io.c b/drivers/soc/fsl/qe/qe_io.c -index 7ae59abc..8966e8b6 100644 --- a/drivers/soc/fsl/qe/qe_io.c +++ b/drivers/soc/fsl/qe/qe_io.c @@ -22,8 +22,6 @@ @@ -883,7 +1497,7 @@ index 7ae59abc..8966e8b6 100644 #undef DEBUG -@@ -61,16 +59,16 @@ void __par_io_config_pin(struct qe_pio_regs __iomem *par_io, u8 pin, int dir, +@@ -61,16 +59,16 @@ void __par_io_config_pin(struct qe_pio_r pin_mask1bit = (u32) (1 << (QE_PIO_PINS - (pin + 1))); /* Set open drain, if required */ @@ -905,7 +1519,7 @@ index 7ae59abc..8966e8b6 100644 /* get all bits mask for 2 bit per port */ pin_mask2bits = (u32) (0x3 << (QE_PIO_PINS - -@@ -82,34 +80,30 @@ void __par_io_config_pin(struct qe_pio_regs __iomem *par_io, u8 pin, int dir, +@@ -82,34 +80,30 @@ void __par_io_config_pin(struct qe_pio_r /* clear and set 2 bits mask */ if (pin > (QE_PIO_PINS / 2) - 1) { @@ -950,7 +1564,7 @@ index 7ae59abc..8966e8b6 100644 } } EXPORT_SYMBOL(__par_io_config_pin); -@@ -137,12 +131,12 @@ int par_io_data_set(u8 port, u8 pin, u8 val) +@@ -137,12 +131,12 @@ int par_io_data_set(u8 port, u8 pin, u8 /* calculate pin location */ pin_mask = (u32) (1 << (QE_PIO_PINS - 1 - pin)); @@ -966,11 +1580,9 @@ index 7ae59abc..8966e8b6 100644 return 0; } -diff --git a/drivers/soc/fsl/qe/qe_tdm.c b/drivers/soc/fsl/qe/qe_tdm.c -index a1048b44..818e6798 100644 --- a/drivers/soc/fsl/qe/qe_tdm.c +++ b/drivers/soc/fsl/qe/qe_tdm.c -@@ -227,10 +227,10 @@ void ucc_tdm_init(struct ucc_tdm *utdm, struct ucc_tdm_info *ut_info) +@@ -227,10 +227,10 @@ void ucc_tdm_init(struct ucc_tdm *utdm, &siram[siram_entry_id * 32 + 0x200 + i]); } @@ -985,11 +1597,9 @@ index a1048b44..818e6798 100644 /* Set SIxMR register */ sixmr = SIMR_SAD(siram_entry_id); -diff --git a/drivers/soc/fsl/qe/ucc.c b/drivers/soc/fsl/qe/ucc.c -index c646d871..bc64b834 100644 --- a/drivers/soc/fsl/qe/ucc.c +++ b/drivers/soc/fsl/qe/ucc.c -@@ -39,7 +39,7 @@ int ucc_set_qe_mux_mii_mng(unsigned int ucc_num) +@@ -39,7 +39,7 @@ int ucc_set_qe_mux_mii_mng(unsigned int return -EINVAL; spin_lock_irqsave(&cmxgcr_lock, flags); @@ -998,7 +1608,7 @@ index c646d871..bc64b834 100644 ucc_num << QE_CMXGCR_MII_ENET_MNG_SHIFT); spin_unlock_irqrestore(&cmxgcr_lock, flags); -@@ -84,7 +84,7 @@ int ucc_set_type(unsigned int ucc_num, enum ucc_speed_type speed) +@@ -84,7 +84,7 @@ int ucc_set_type(unsigned int ucc_num, e return -EINVAL; } @@ -1007,7 +1617,7 @@ index c646d871..bc64b834 100644 UCC_GUEMR_SET_RESERVED3 | speed); return 0; -@@ -113,9 +113,9 @@ int ucc_mux_set_grant_tsa_bkpt(unsigned int ucc_num, int set, u32 mask) +@@ -113,9 +113,9 @@ int ucc_mux_set_grant_tsa_bkpt(unsigned get_cmxucr_reg(ucc_num, &cmxucr, ®_num, &shift); if (set) @@ -1019,7 +1629,7 @@ index c646d871..bc64b834 100644 return 0; } -@@ -211,7 +211,7 @@ int ucc_set_qe_mux_rxtx(unsigned int ucc_num, enum qe_clock clock, +@@ -211,7 +211,7 @@ int ucc_set_qe_mux_rxtx(unsigned int ucc if (mode == COMM_DIR_RX) shift += 4; @@ -1028,11 +1638,9 @@ index c646d871..bc64b834 100644 clock_bits << shift); return 0; -diff --git a/drivers/soc/fsl/qe/ucc_fast.c b/drivers/soc/fsl/qe/ucc_fast.c -index 83d8d16e..5115e935 100644 --- a/drivers/soc/fsl/qe/ucc_fast.c +++ b/drivers/soc/fsl/qe/ucc_fast.c -@@ -33,41 +33,41 @@ void ucc_fast_dump_regs(struct ucc_fast_private * uccf) +@@ -33,41 +33,41 @@ void ucc_fast_dump_regs(struct ucc_fast_ printk(KERN_INFO "Base address: 0x%p\n", uccf->uf_regs); printk(KERN_INFO "gumr : addr=0x%p, val=0x%08x\n", @@ -1092,7 +1700,7 @@ index 83d8d16e..5115e935 100644 } EXPORT_SYMBOL(ucc_fast_dump_regs); -@@ -89,7 +89,7 @@ EXPORT_SYMBOL(ucc_fast_get_qe_cr_subblock); +@@ -89,7 +89,7 @@ EXPORT_SYMBOL(ucc_fast_get_qe_cr_subbloc void ucc_fast_transmit_on_demand(struct ucc_fast_private * uccf) { @@ -1101,7 +1709,7 @@ index 83d8d16e..5115e935 100644 } EXPORT_SYMBOL(ucc_fast_transmit_on_demand); -@@ -101,7 +101,7 @@ void ucc_fast_enable(struct ucc_fast_private * uccf, enum comm_dir mode) +@@ -101,7 +101,7 @@ void ucc_fast_enable(struct ucc_fast_pri uf_regs = uccf->uf_regs; /* Enable reception and/or transmission on this UCC. */ @@ -1110,7 +1718,7 @@ index 83d8d16e..5115e935 100644 if (mode & COMM_DIR_TX) { gumr |= UCC_FAST_GUMR_ENT; uccf->enabled_tx = 1; -@@ -110,7 +110,7 @@ void ucc_fast_enable(struct ucc_fast_private * uccf, enum comm_dir mode) +@@ -110,7 +110,7 @@ void ucc_fast_enable(struct ucc_fast_pri gumr |= UCC_FAST_GUMR_ENR; uccf->enabled_rx = 1; } @@ -1119,7 +1727,7 @@ index 83d8d16e..5115e935 100644 } EXPORT_SYMBOL(ucc_fast_enable); -@@ -122,7 +122,7 @@ void ucc_fast_disable(struct ucc_fast_private * uccf, enum comm_dir mode) +@@ -122,7 +122,7 @@ void ucc_fast_disable(struct ucc_fast_pr uf_regs = uccf->uf_regs; /* Disable reception and/or transmission on this UCC. */ @@ -1128,7 +1736,7 @@ index 83d8d16e..5115e935 100644 if (mode & COMM_DIR_TX) { gumr &= ~UCC_FAST_GUMR_ENT; uccf->enabled_tx = 0; -@@ -131,7 +131,7 @@ void ucc_fast_disable(struct ucc_fast_private * uccf, enum comm_dir mode) +@@ -131,7 +131,7 @@ void ucc_fast_disable(struct ucc_fast_pr gumr &= ~UCC_FAST_GUMR_ENR; uccf->enabled_rx = 0; } @@ -1137,7 +1745,7 @@ index 83d8d16e..5115e935 100644 } EXPORT_SYMBOL(ucc_fast_disable); -@@ -263,12 +263,13 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc +@@ -263,12 +263,13 @@ int ucc_fast_init(struct ucc_fast_info * gumr |= uf_info->tenc; gumr |= uf_info->tcrc; gumr |= uf_info->mode; @@ -1153,7 +1761,7 @@ index 83d8d16e..5115e935 100644 printk(KERN_ERR "%s: cannot allocate MURAM for TX FIFO\n", __func__); uccf->ucc_fast_tx_virtual_fifo_base_offset = 0; -@@ -281,7 +282,8 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc +@@ -281,7 +282,8 @@ int ucc_fast_init(struct ucc_fast_info * qe_muram_alloc(uf_info->urfs + UCC_FAST_RECEIVE_VIRTUAL_FIFO_SIZE_FUDGE_FACTOR, UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT); @@ -1163,7 +1771,7 @@ index 83d8d16e..5115e935 100644 printk(KERN_ERR "%s: cannot allocate MURAM for RX FIFO\n", __func__); uccf->ucc_fast_rx_virtual_fifo_base_offset = 0; -@@ -290,15 +292,15 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc +@@ -290,15 +292,15 @@ int ucc_fast_init(struct ucc_fast_info * } /* Set Virtual Fifo registers */ @@ -1187,7 +1795,7 @@ index 83d8d16e..5115e935 100644 /* Mux clocking */ /* Grant Support */ -@@ -366,14 +368,14 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc +@@ -366,14 +368,14 @@ int ucc_fast_init(struct ucc_fast_info * } /* Set interrupt mask register at UCC level. */ @@ -1204,8 +1812,6 @@ index 83d8d16e..5115e935 100644 *uccf_ret = uccf; return 0; -diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c -index 481eb298..ee409fdf 100644 --- a/drivers/tty/serial/ucc_uart.c +++ b/drivers/tty/serial/ucc_uart.c @@ -34,6 +34,7 @@ @@ -1216,8 +1822,6 @@ index 481eb298..ee409fdf 100644 #include /* -diff --git a/include/soc/fsl/qe/qe.h b/include/soc/fsl/qe/qe.h -index 70339d79..f7a14f2d 100644 --- a/include/soc/fsl/qe/qe.h +++ b/include/soc/fsl/qe/qe.h @@ -21,7 +21,6 @@ @@ -1228,9 +1832,6 @@ index 70339d79..f7a14f2d 100644 #include #include #include -diff --git a/include/soc/fsl/qe/qe_ic.h b/include/soc/fsl/qe/qe_ic.h -deleted file mode 100644 -index 1e155ca6..00000000 --- a/include/soc/fsl/qe/qe_ic.h +++ /dev/null @@ -1,139 +0,0 @@ @@ -1373,6 +1974,3 @@ index 1e155ca6..00000000 -} - -#endif /* _ASM_POWERPC_QE_IC_H */ --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/814-rtc-support-layerscape.patch b/target/linux/layerscape/patches-4.9/814-rtc-support-layerscape.patch index b186fb31ee..0c726fbb7b 100644 --- a/target/linux/layerscape/patches-4.9/814-rtc-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/814-rtc-support-layerscape.patch @@ -12,9 +12,6 @@ Signed-off-by: Yangbo Lu 1 file changed, 665 insertions(+) create mode 100644 drivers/rtc/rtc-pcf85263.c -diff --git a/drivers/rtc/rtc-pcf85263.c b/drivers/rtc/rtc-pcf85263.c -new file mode 100644 -index 00000000..629c2840 --- /dev/null +++ b/drivers/rtc/rtc-pcf85263.c @@ -0,0 +1,665 @@ @@ -683,6 +680,3 @@ index 00000000..629c2840 +MODULE_DESCRIPTION("PCF85263 RTC Driver"); +MODULE_LICENSE("GPL"); + --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/815-spi-support-layerscape.patch b/target/linux/layerscape/patches-4.9/815-spi-support-layerscape.patch index eab230ef27..b9c5316518 100644 --- a/target/linux/layerscape/patches-4.9/815-spi-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/815-spi-support-layerscape.patch @@ -15,8 +15,6 @@ Signed-off-by: Yangbo Lu drivers/spi/spi-fsl-dspi.c | 309 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 305 insertions(+), 5 deletions(-) -diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig -index b7995474..8e281e47 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -365,6 +365,7 @@ config SPI_FSL_SPI @@ -27,8 +25,6 @@ index b7995474..8e281e47 100644 depends on SOC_VF610 || SOC_LS1021A || ARCH_LAYERSCAPE || COMPILE_TEST help This enables support for the Freescale DSPI controller in master -diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c -index a67b0ff6..15201645 100644 --- a/drivers/spi/spi-fsl-dspi.c +++ b/drivers/spi/spi-fsl-dspi.c @@ -15,6 +15,8 @@ @@ -86,7 +82,7 @@ index a67b0ff6..15201645 100644 .max_clock_factor = 2, }; -@@ -140,6 +151,23 @@ static const struct fsl_dspi_devtype_data ls2085a_data = { +@@ -140,6 +151,23 @@ static const struct fsl_dspi_devtype_dat .max_clock_factor = 8, }; @@ -122,7 +118,7 @@ index a67b0ff6..15201645 100644 static inline int is_double_byte_mode(struct fsl_dspi *dspi) { unsigned int val; -@@ -177,6 +208,255 @@ static inline int is_double_byte_mode(struct fsl_dspi *dspi) +@@ -177,6 +208,255 @@ static inline int is_double_byte_mode(st return ((val & SPI_FRAME_BITS_MASK) == SPI_FRAME_BITS(8)) ? 0 : 1; } @@ -378,7 +374,7 @@ index a67b0ff6..15201645 100644 static void hz_to_spi_baud(char *pbr, char *br, int speed_hz, unsigned long clkrate) { -@@ -425,6 +705,12 @@ static int dspi_transfer_one_message(struct spi_master *master, +@@ -425,6 +705,12 @@ static int dspi_transfer_one_message(str regmap_write(dspi->regmap, SPI_RSER, SPI_RSER_TCFQE); dspi_tcfq_write(dspi); break; @@ -391,7 +387,7 @@ index a67b0ff6..15201645 100644 default: dev_err(&dspi->pdev->dev, "unsupported trans_mode %u\n", trans_mode); -@@ -432,9 +718,13 @@ static int dspi_transfer_one_message(struct spi_master *master, +@@ -432,9 +718,13 @@ static int dspi_transfer_one_message(str goto out; } @@ -408,7 +404,7 @@ index a67b0ff6..15201645 100644 if (transfer->delay_usecs) udelay(transfer->delay_usecs); -@@ -712,7 +1002,8 @@ static int dspi_probe(struct platform_device *pdev) +@@ -712,7 +1002,8 @@ static int dspi_probe(struct platform_de if (IS_ERR(dspi->regmap)) { dev_err(&pdev->dev, "failed to init regmap: %ld\n", PTR_ERR(dspi->regmap)); @@ -418,7 +414,7 @@ index a67b0ff6..15201645 100644 } dspi_init(dspi); -@@ -740,6 +1031,13 @@ static int dspi_probe(struct platform_device *pdev) +@@ -740,6 +1031,13 @@ static int dspi_probe(struct platform_de if (ret) goto out_master_put; @@ -432,7 +428,7 @@ index a67b0ff6..15201645 100644 master->max_speed_hz = clk_get_rate(dspi->clk) / dspi->devtype_data->max_clock_factor; -@@ -768,6 +1066,7 @@ static int dspi_remove(struct platform_device *pdev) +@@ -768,6 +1066,7 @@ static int dspi_remove(struct platform_d struct fsl_dspi *dspi = spi_master_get_devdata(master); /* Disconnect from the SPI framework */ @@ -440,6 +436,3 @@ index a67b0ff6..15201645 100644 clk_disable_unprepare(dspi->clk); spi_unregister_master(dspi->master); --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/816-tty-serial-support-layerscape.patch b/target/linux/layerscape/patches-4.9/816-tty-serial-support-layerscape.patch index 3e0d30f61d..a14df9d70e 100644 --- a/target/linux/layerscape/patches-4.9/816-tty-serial-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/816-tty-serial-support-layerscape.patch @@ -13,8 +13,6 @@ Signed-off-by: Yangbo Lu drivers/tty/serial/fsl_lpuart.c | 66 ++++++++++++++++++++++++++++------------- 1 file changed, 46 insertions(+), 20 deletions(-) -diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c -index 76103f2c..61453820 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -231,6 +231,8 @@ @@ -26,7 +24,7 @@ index 76103f2c..61453820 100644 struct lpuart_port { struct uart_port port; struct clk *clk; -@@ -1348,6 +1350,18 @@ lpuart_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -1348,6 +1350,18 @@ lpuart_set_termios(struct uart_port *por /* ask the core to calculate the divisor */ baud = uart_get_baud_rate(port, termios, old, 50, port->uartclk / 16); @@ -45,7 +43,7 @@ index 76103f2c..61453820 100644 spin_lock_irqsave(&sport->port.lock, flags); sport->port.read_status_mask = 0; -@@ -1397,22 +1411,11 @@ lpuart_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -1397,22 +1411,11 @@ lpuart_set_termios(struct uart_port *por /* restore control register */ writeb(old_cr2, sport->port.membase + UARTCR2); @@ -71,7 +69,7 @@ index 76103f2c..61453820 100644 } spin_unlock_irqrestore(&sport->port.lock, flags); -@@ -1640,6 +1643,13 @@ lpuart_console_write(struct console *co, const char *s, unsigned int count) +@@ -1640,6 +1643,13 @@ lpuart_console_write(struct console *co, { struct lpuart_port *sport = lpuart_ports[co->index]; unsigned char old_cr2, cr2; @@ -85,7 +83,7 @@ index 76103f2c..61453820 100644 /* first save CR2 and then disable interrupts */ cr2 = old_cr2 = readb(sport->port.membase + UARTCR2); -@@ -1654,6 +1664,9 @@ lpuart_console_write(struct console *co, const char *s, unsigned int count) +@@ -1654,6 +1664,9 @@ lpuart_console_write(struct console *co, barrier(); writeb(old_cr2, sport->port.membase + UARTCR2); @@ -95,7 +93,7 @@ index 76103f2c..61453820 100644 } static void -@@ -1661,6 +1674,13 @@ lpuart32_console_write(struct console *co, const char *s, unsigned int count) +@@ -1661,6 +1674,13 @@ lpuart32_console_write(struct console *c { struct lpuart_port *sport = lpuart_ports[co->index]; unsigned long old_cr, cr; @@ -109,7 +107,7 @@ index 76103f2c..61453820 100644 /* first save CR2 and then disable interrupts */ cr = old_cr = lpuart32_read(sport->port.membase + UARTCTRL); -@@ -1675,6 +1695,9 @@ lpuart32_console_write(struct console *co, const char *s, unsigned int count) +@@ -1675,6 +1695,9 @@ lpuart32_console_write(struct console *c barrier(); lpuart32_write(old_cr, sport->port.membase + UARTCTRL); @@ -119,7 +117,7 @@ index 76103f2c..61453820 100644 } /* -@@ -1899,9 +1922,13 @@ static int lpuart_probe(struct platform_device *pdev) +@@ -1899,9 +1922,13 @@ static int lpuart_probe(struct platform_ ret = of_alias_get_id(np, "serial"); if (ret < 0) { @@ -135,7 +133,7 @@ index 76103f2c..61453820 100644 sport->port.line = ret; sport->lpuart32 = of_device_is_compatible(np, "fsl,ls1021a-lpuart"); -@@ -1983,6 +2010,7 @@ static int lpuart_remove(struct platform_device *pdev) +@@ -1983,6 +2010,7 @@ static int lpuart_remove(struct platform struct lpuart_port *sport = platform_get_drvdata(pdev); uart_remove_one_port(&lpuart_reg, &sport->port); @@ -143,7 +141,7 @@ index 76103f2c..61453820 100644 clk_disable_unprepare(sport->clk); -@@ -2067,12 +2095,10 @@ static int lpuart_resume(struct device *dev) +@@ -2067,12 +2095,10 @@ static int lpuart_resume(struct device * if (sport->lpuart_dma_rx_use) { if (sport->port.irq_wake) { @@ -158,6 +156,3 @@ index 76103f2c..61453820 100644 } } --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/817-usb-support-layerscape.patch b/target/linux/layerscape/patches-4.9/817-usb-support-layerscape.patch index ce29f5b17a..147b03ae27 100644 --- a/target/linux/layerscape/patches-4.9/817-usb-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/817-usb-support-layerscape.patch @@ -34,11 +34,9 @@ Signed-off-by: Yangbo Lu include/linux/usb/of.h | 2 + 17 files changed, 726 insertions(+), 73 deletions(-) -diff --git a/drivers/usb/common/common.c b/drivers/usb/common/common.c -index 5ef8da6e..176dee01 100644 --- a/drivers/usb/common/common.c +++ b/drivers/usb/common/common.c -@@ -105,6 +105,56 @@ static const char *const usb_dr_modes[] = { +@@ -105,6 +105,56 @@ static const char *const usb_dr_modes[] [USB_DR_MODE_OTG] = "otg", }; @@ -95,11 +93,9 @@ index 5ef8da6e..176dee01 100644 static enum usb_dr_mode usb_get_dr_mode_from_string(const char *str) { int ret; -diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c -index 80d4ef31..e23acf03 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -4412,6 +4412,14 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1, +@@ -4412,6 +4412,14 @@ hub_port_init(struct usb_hub *hub, struc else speed = usb_speed_string(udev->speed); @@ -114,11 +110,9 @@ index 80d4ef31..e23acf03 100644 if (udev->speed < USB_SPEED_SUPER) dev_info(&udev->dev, "%s %s USB device number %d using %s\n", -diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c -index fea44690..e34ef90a 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c -@@ -58,6 +58,7 @@ static int dwc3_get_dr_mode(struct dwc3 *dwc) +@@ -58,6 +58,7 @@ static int dwc3_get_dr_mode(struct dwc3 enum usb_dr_mode mode; struct device *dev = dwc->dev; unsigned int hw_mode; @@ -126,7 +120,7 @@ index fea44690..e34ef90a 100644 if (dwc->dr_mode == USB_DR_MODE_UNKNOWN) dwc->dr_mode = USB_DR_MODE_OTG; -@@ -83,6 +84,24 @@ static int dwc3_get_dr_mode(struct dwc3 *dwc) +@@ -83,6 +84,24 @@ static int dwc3_get_dr_mode(struct dwc3 mode = USB_DR_MODE_HOST; break; default: @@ -151,7 +145,7 @@ index fea44690..e34ef90a 100644 if (IS_ENABLED(CONFIG_USB_DWC3_HOST)) mode = USB_DR_MODE_HOST; else if (IS_ENABLED(CONFIG_USB_DWC3_GADGET)) -@@ -213,8 +232,9 @@ static void dwc3_frame_length_adjustment(struct dwc3 *dwc) +@@ -213,8 +232,9 @@ static void dwc3_frame_length_adjustment reg = dwc3_readl(dwc->regs, DWC3_GFLADJ); dft = reg & DWC3_GFLADJ_30MHZ_MASK; @@ -163,7 +157,7 @@ index fea44690..e34ef90a 100644 reg &= ~DWC3_GFLADJ_30MHZ_MASK; reg |= DWC3_GFLADJ_30MHZ_SDBND_SEL | dwc->fladj; dwc3_writel(dwc->regs, DWC3_GFLADJ, reg); -@@ -579,6 +599,99 @@ static int dwc3_phy_setup(struct dwc3 *dwc) +@@ -579,6 +599,99 @@ static int dwc3_phy_setup(struct dwc3 *d return 0; } @@ -263,7 +257,7 @@ index fea44690..e34ef90a 100644 static void dwc3_core_exit(struct dwc3 *dwc) { dwc3_event_buffers_cleanup(dwc); -@@ -721,6 +834,8 @@ static int dwc3_core_init(struct dwc3 *dwc) +@@ -721,6 +834,8 @@ static int dwc3_core_init(struct dwc3 *d if (ret) goto err1; @@ -272,7 +266,7 @@ index fea44690..e34ef90a 100644 /* Adjust Frame Length */ dwc3_frame_length_adjustment(dwc); -@@ -919,11 +1034,109 @@ static void dwc3_core_exit_mode(struct dwc3 *dwc) +@@ -919,11 +1034,109 @@ static void dwc3_core_exit_mode(struct d } } @@ -382,7 +376,7 @@ index fea44690..e34ef90a 100644 struct resource *res; struct dwc3 *dwc; u8 lpm_nyet_threshold; -@@ -955,6 +1168,11 @@ static int dwc3_probe(struct platform_device *pdev) +@@ -955,6 +1168,11 @@ static int dwc3_probe(struct platform_de dwc->xhci_resources[0].flags = res->flags; dwc->xhci_resources[0].name = res->name; @@ -394,7 +388,7 @@ index fea44690..e34ef90a 100644 res->start += DWC3_GLOBALS_REGS_START; /* -@@ -997,6 +1215,12 @@ static int dwc3_probe(struct platform_device *pdev) +@@ -997,6 +1215,12 @@ static int dwc3_probe(struct platform_de dwc->usb3_lpm_capable = device_property_read_bool(dev, "snps,usb3_lpm_capable"); @@ -407,7 +401,7 @@ index fea44690..e34ef90a 100644 dwc->disable_scramble_quirk = device_property_read_bool(dev, "snps,disable_scramble_quirk"); dwc->u2exit_lfps_quirk = device_property_read_bool(dev, -@@ -1041,6 +1265,8 @@ static int dwc3_probe(struct platform_device *pdev) +@@ -1041,6 +1265,8 @@ static int dwc3_probe(struct platform_de dwc->hird_threshold = hird_threshold | (dwc->is_utmi_l1_suspend << 4); @@ -416,7 +410,7 @@ index fea44690..e34ef90a 100644 platform_set_drvdata(pdev, dwc); dwc3_cache_hwparams(dwc); -@@ -1064,6 +1290,11 @@ static int dwc3_probe(struct platform_device *pdev) +@@ -1064,6 +1290,11 @@ static int dwc3_probe(struct platform_de if (ret < 0) goto err1; @@ -428,8 +422,6 @@ index fea44690..e34ef90a 100644 pm_runtime_forbid(dev); ret = dwc3_alloc_event_buffers(dwc, DWC3_EVENT_BUFFERS_SIZE); -diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h -index 884c4371..9151eef4 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -26,6 +26,7 @@ @@ -547,8 +539,6 @@ index 884c4371..9151eef4 100644 }; /* -------------------------------------------------------------------------- */ -diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c -index 626d87d5..f1b98273 100644 --- a/drivers/usb/dwc3/host.c +++ b/drivers/usb/dwc3/host.c @@ -17,6 +17,8 @@ @@ -584,8 +574,6 @@ index 626d87d5..f1b98273 100644 dwc->xhci = xhci; ret = platform_device_add_resources(xhci, dwc->xhci_resources, -diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c b/drivers/usb/gadget/udc/fsl_udc_core.c -index aac0ce8a..fe49e758 100644 --- a/drivers/usb/gadget/udc/fsl_udc_core.c +++ b/drivers/usb/gadget/udc/fsl_udc_core.c @@ -198,7 +198,11 @@ __acquires(ep->udc->lock) @@ -601,7 +589,7 @@ index aac0ce8a..fe49e758 100644 spin_lock(&ep->udc->lock); ep->stopped = stopped; -@@ -245,10 +249,10 @@ static int dr_controller_setup(struct fsl_udc *udc) +@@ -245,10 +249,10 @@ static int dr_controller_setup(struct fs if (udc->pdata->have_sysif_regs) { if (udc->pdata->controller_ver) { /* controller version 1.6 or above */ @@ -614,7 +602,7 @@ index aac0ce8a..fe49e758 100644 } } portctrl |= PORTSCX_PTS_ULPI; -@@ -257,13 +261,14 @@ static int dr_controller_setup(struct fsl_udc *udc) +@@ -257,13 +261,14 @@ static int dr_controller_setup(struct fs portctrl |= PORTSCX_PTW_16BIT; /* fall through */ case FSL_USB2_PHY_UTMI: @@ -631,7 +619,7 @@ index aac0ce8a..fe49e758 100644 mdelay(FSL_UTMI_PHY_DLY); /* Delay for UTMI PHY CLK to become stable - 10ms*/ } -@@ -329,22 +334,22 @@ static int dr_controller_setup(struct fsl_udc *udc) +@@ -329,22 +334,22 @@ static int dr_controller_setup(struct fs /* Config control enable i/o output, cpu endian register */ #ifndef CONFIG_ARCH_MXC if (udc->pdata->have_sysif_regs) { @@ -659,7 +647,7 @@ index aac0ce8a..fe49e758 100644 } #endif -@@ -1057,7 +1062,7 @@ static int fsl_ep_fifo_status(struct usb_ep *_ep) +@@ -1057,7 +1062,7 @@ static int fsl_ep_fifo_status(struct usb struct ep_queue_head *qh; ep = container_of(_ep, struct fsl_ep, ep); @@ -668,7 +656,7 @@ index aac0ce8a..fe49e758 100644 return -ENODEV; udc = (struct fsl_udc *)ep->udc; -@@ -1599,14 +1604,13 @@ static int process_ep_req(struct fsl_udc *udc, int pipe, +@@ -1599,14 +1604,13 @@ static int process_ep_req(struct fsl_udc struct fsl_req *curr_req) { struct ep_td_struct *curr_td; @@ -684,7 +672,7 @@ index aac0ce8a..fe49e758 100644 actual = curr_req->req.length; for (j = 0; j < curr_req->dtd_count; j++) { -@@ -1651,11 +1655,9 @@ static int process_ep_req(struct fsl_udc *udc, int pipe, +@@ -1651,11 +1655,9 @@ static int process_ep_req(struct fsl_udc status = -EPROTO; break; } else { @@ -696,7 +684,7 @@ index aac0ce8a..fe49e758 100644 VDBG("dTD transmitted successful"); } -@@ -1698,7 +1700,7 @@ static void dtd_complete_irq(struct fsl_udc *udc) +@@ -1698,7 +1700,7 @@ static void dtd_complete_irq(struct fsl_ curr_ep = get_ep_by_pipe(udc, i); /* If the ep is configured */ @@ -705,7 +693,7 @@ index aac0ce8a..fe49e758 100644 WARNING("Invalid EP?"); continue; } -@@ -2420,10 +2422,12 @@ static int fsl_udc_probe(struct platform_device *pdev) +@@ -2420,10 +2422,12 @@ static int fsl_udc_probe(struct platform usb_sys_regs = (void *)dr_regs + USB_DR_SYS_OFFSET; #endif @@ -718,7 +706,7 @@ index aac0ce8a..fe49e758 100644 /* Read Device Controller Capability Parameters register */ dccparams = fsl_readl(&dr_regs->dccparams); -@@ -2463,9 +2467,11 @@ static int fsl_udc_probe(struct platform_device *pdev) +@@ -2463,9 +2467,11 @@ static int fsl_udc_probe(struct platform dr_controller_setup(udc_controller); } @@ -730,7 +718,7 @@ index aac0ce8a..fe49e758 100644 /* Setup gadget structure */ udc_controller->gadget.ops = &fsl_gadget_ops; -@@ -2478,6 +2484,7 @@ static int fsl_udc_probe(struct platform_device *pdev) +@@ -2478,6 +2484,7 @@ static int fsl_udc_probe(struct platform /* Setup gadget.dev and register with kernel */ dev_set_name(&udc_controller->gadget.dev, "gadget"); udc_controller->gadget.dev.of_node = pdev->dev.of_node; @@ -738,7 +726,7 @@ index aac0ce8a..fe49e758 100644 if (!IS_ERR_OR_NULL(udc_controller->transceiver)) udc_controller->gadget.is_otg = 1; -@@ -2529,7 +2536,9 @@ static int fsl_udc_probe(struct platform_device *pdev) +@@ -2529,7 +2536,9 @@ err_free_irq: err_iounmap: if (pdata->exit) pdata->exit(pdev); @@ -748,7 +736,7 @@ index aac0ce8a..fe49e758 100644 err_iounmap_noclk: iounmap(dr_regs); err_release_mem_region: -@@ -2557,8 +2566,9 @@ static int fsl_udc_remove(struct platform_device *pdev) +@@ -2557,8 +2566,9 @@ static int fsl_udc_remove(struct platfor udc_controller->done = &done; usb_del_gadget_udc(&udc_controller->gadget); @@ -759,7 +747,7 @@ index aac0ce8a..fe49e758 100644 /* DR has been stopped in usb_gadget_unregister_driver() */ remove_proc_file(); -@@ -2570,7 +2580,7 @@ static int fsl_udc_remove(struct platform_device *pdev) +@@ -2570,7 +2580,7 @@ static int fsl_udc_remove(struct platfor dma_pool_destroy(udc_controller->td_pool); free_irq(udc_controller->irq, udc_controller); iounmap(dr_regs); @@ -768,8 +756,6 @@ index aac0ce8a..fe49e758 100644 release_mem_region(res->start, resource_size(res)); /* free udc --wait for the release() finished */ -diff --git a/drivers/usb/gadget/udc/fsl_usb2_udc.h b/drivers/usb/gadget/udc/fsl_usb2_udc.h -index 84715625..f76c4ddd 100644 --- a/drivers/usb/gadget/udc/fsl_usb2_udc.h +++ b/drivers/usb/gadget/udc/fsl_usb2_udc.h @@ -20,6 +20,10 @@ @@ -802,8 +788,6 @@ index 84715625..f76c4ddd 100644 #endif #endif -diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig -index 0b80cee3..a57d95c3 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -165,7 +165,7 @@ config XPS_USB_HCD_XILINX @@ -815,8 +799,6 @@ index 0b80cee3..a57d95c3 100644 select USB_EHCI_ROOT_HUB_TT ---help--- Variation of ARC USB block used in some Freescale chips. -diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c -index 9f5ffb62..cd16860c 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c @@ -37,13 +37,141 @@ @@ -961,7 +943,7 @@ index 9f5ffb62..cd16860c 100644 /* configure so an HC device and id are always provided */ /* always called with process context; sleeping is OK */ -@@ -131,6 +259,12 @@ static int fsl_ehci_drv_probe(struct platform_device *pdev) +@@ -131,6 +259,12 @@ static int fsl_ehci_drv_probe(struct pla clrsetbits_be32(hcd->regs + FSL_SOC_USB_CTRL, CONTROL_REGISTER_W1C_MASK, 0x4); @@ -974,7 +956,7 @@ index 9f5ffb62..cd16860c 100644 /* * Enable UTMI phy and program PTS field in UTMI mode before asserting * controller reset for USB Controller version 2.5 -@@ -143,16 +277,20 @@ static int fsl_ehci_drv_probe(struct platform_device *pdev) +@@ -143,16 +277,20 @@ static int fsl_ehci_drv_probe(struct pla /* Don't need to set host mode here. It will be done by tdi_reset() */ @@ -997,7 +979,7 @@ index 9f5ffb62..cd16860c 100644 dev_dbg(&pdev->dev, "hcd=0x%p ehci=0x%p, phy=0x%p\n", hcd, ehci, hcd->usb_phy); -@@ -168,6 +306,11 @@ static int fsl_ehci_drv_probe(struct platform_device *pdev) +@@ -168,6 +306,11 @@ static int fsl_ehci_drv_probe(struct pla retval = -ENODEV; goto err2; } @@ -1009,7 +991,7 @@ index 9f5ffb62..cd16860c 100644 } #endif return retval; -@@ -181,6 +324,18 @@ static int fsl_ehci_drv_probe(struct platform_device *pdev) +@@ -181,6 +324,18 @@ static int fsl_ehci_drv_probe(struct pla return retval; } @@ -1028,7 +1010,7 @@ index 9f5ffb62..cd16860c 100644 static int ehci_fsl_setup_phy(struct usb_hcd *hcd, enum fsl_usb2_phy_modes phy_mode, unsigned int port_offset) -@@ -219,6 +374,21 @@ static int ehci_fsl_setup_phy(struct usb_hcd *hcd, +@@ -219,6 +374,21 @@ static int ehci_fsl_setup_phy(struct usb /* fall through */ case FSL_USB2_PHY_UTMI: case FSL_USB2_PHY_UTMI_DUAL: @@ -1050,7 +1032,7 @@ index 9f5ffb62..cd16860c 100644 if (pdata->have_sysif_regs && pdata->controller_ver) { /* controller version 1.6 or above */ clrsetbits_be32(non_ehci + FSL_SOC_USB_CTRL, -@@ -292,14 +462,9 @@ static int ehci_fsl_usb_setup(struct ehci_hcd *ehci) +@@ -292,14 +462,9 @@ static int ehci_fsl_usb_setup(struct ehc return -EINVAL; if (pdata->operating_mode == FSL_USB2_MPH_HOST) { @@ -1066,7 +1048,7 @@ index 9f5ffb62..cd16860c 100644 ehci->has_fsl_port_bug = 1; if (pdata->port_enables & FSL_USB2_PORT0_ENABLED) -@@ -379,16 +544,57 @@ static int ehci_fsl_setup(struct usb_hcd *hcd) +@@ -379,16 +544,57 @@ static int ehci_fsl_setup(struct usb_hcd return retval; } @@ -1131,7 +1113,7 @@ index 9f5ffb62..cd16860c 100644 #ifdef CONFIG_PPC_MPC512x static int ehci_fsl_mpc512x_drv_suspend(struct device *dev) -@@ -535,26 +741,43 @@ static inline int ehci_fsl_mpc512x_drv_resume(struct device *dev) +@@ -535,26 +741,43 @@ static inline int ehci_fsl_mpc512x_drv_r } #endif /* CONFIG_PPC_MPC512x */ @@ -1182,7 +1164,7 @@ index 9f5ffb62..cd16860c 100644 if (!fsl_deep_sleep()) return 0; -@@ -568,12 +791,34 @@ static int ehci_fsl_drv_resume(struct device *dev) +@@ -568,12 +791,34 @@ static int ehci_fsl_drv_resume(struct de struct ehci_fsl *ehci_fsl = hcd_to_ehci_fsl(hcd); struct ehci_hcd *ehci = hcd_to_ehci(hcd); void __iomem *non_ehci = hcd->regs; @@ -1217,8 +1199,6 @@ index 9f5ffb62..cd16860c 100644 ehci_prepare_ports_for_controller_resume(ehci); if (!fsl_deep_sleep()) return 0; -diff --git a/drivers/usb/host/ehci-fsl.h b/drivers/usb/host/ehci-fsl.h -index 1a8a60a5..42ea2976 100644 --- a/drivers/usb/host/ehci-fsl.h +++ b/drivers/usb/host/ehci-fsl.h @@ -63,4 +63,7 @@ @@ -1229,11 +1209,9 @@ index 1a8a60a5..42ea2976 100644 +/* Retry count for checking UTMI PHY CLK validity */ +#define UTMI_PHY_CLK_VALID_CHK_RETRY 5 #endif /* _EHCI_FSL_H */ -diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c -index 255acca8..c8838c33 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c -@@ -305,6 +305,8 @@ static int ehci_bus_suspend (struct usb_hcd *hcd) +@@ -305,6 +305,8 @@ static int ehci_bus_suspend (struct usb_ USB_PORT_STAT_HIGH_SPEED) fs_idle_delay = true; ehci_writel(ehci, t2, reg); @@ -1242,11 +1220,9 @@ index 255acca8..c8838c33 100644 changed = 1; } } -diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h -index 3b06bb77..f296d1fb 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h -@@ -180,6 +180,9 @@ struct ehci_hcd { /* one per controller */ +@@ -180,6 +180,9 @@ struct ehci_hcd { /* one per controlle unsigned periodic_count; /* periodic activity count */ unsigned uframe_periodic_max; /* max periodic time per uframe */ @@ -1256,7 +1232,7 @@ index 3b06bb77..f296d1fb 100644 /* list of itds & sitds completed while now_frame was still active */ struct list_head cached_itd_list; -@@ -706,8 +709,10 @@ ehci_port_speed(struct ehci_hcd *ehci, unsigned int portsc) +@@ -706,8 +709,10 @@ ehci_port_speed(struct ehci_hcd *ehci, u * incoming packets get corrupted in HS mode */ #define ehci_has_fsl_hs_errata(e) ((e)->has_fsl_hs_errata) @@ -1267,11 +1243,9 @@ index 3b06bb77..f296d1fb 100644 #endif /* -diff --git a/drivers/usb/host/fsl-mph-dr-of.c b/drivers/usb/host/fsl-mph-dr-of.c -index f07ccb25..1e59ea9f 100644 --- a/drivers/usb/host/fsl-mph-dr-of.c +++ b/drivers/usb/host/fsl-mph-dr-of.c -@@ -226,6 +226,18 @@ static int fsl_usb2_mph_dr_of_probe(struct platform_device *ofdev) +@@ -226,6 +226,18 @@ static int fsl_usb2_mph_dr_of_probe(stru of_property_read_bool(np, "fsl,usb-erratum-a007792"); pdata->has_fsl_erratum_a005275 = of_property_read_bool(np, "fsl,usb-erratum-a005275"); @@ -1290,8 +1264,6 @@ index f07ccb25..1e59ea9f 100644 /* * Determine whether phy_clk_valid needs to be checked -diff --git a/drivers/usb/phy/phy-fsl-usb.c b/drivers/usb/phy/phy-fsl-usb.c -index 94eb2923..836355fa 100644 --- a/drivers/usb/phy/phy-fsl-usb.c +++ b/drivers/usb/phy/phy-fsl-usb.c @@ -1,5 +1,5 @@ @@ -1309,7 +1281,7 @@ index 94eb2923..836355fa 100644 struct device *dev; struct fsl_otg *otg_dev = container_of(otg->usb_phy, struct fsl_otg, phy); -@@ -486,6 +487,7 @@ int fsl_otg_start_host(struct otg_fsm *fsm, int on) +@@ -486,6 +487,7 @@ int fsl_otg_start_host(struct otg_fsm *f otg_reset_controller(); VDBG("host on......\n"); if (dev->driver->pm && dev->driver->pm->resume) { @@ -1317,7 +1289,7 @@ index 94eb2923..836355fa 100644 retval = dev->driver->pm->resume(dev); if (fsm->id) { /* default-b */ -@@ -510,8 +512,11 @@ int fsl_otg_start_host(struct otg_fsm *fsm, int on) +@@ -510,8 +512,11 @@ int fsl_otg_start_host(struct otg_fsm *f else { VDBG("host off......\n"); if (dev && dev->driver) { @@ -1330,7 +1302,7 @@ index 94eb2923..836355fa 100644 if (fsm->id) /* default-b */ fsl_otg_drv_vbus(fsm, 0); -@@ -539,8 +544,17 @@ int fsl_otg_start_gadget(struct otg_fsm *fsm, int on) +@@ -539,8 +544,17 @@ int fsl_otg_start_gadget(struct otg_fsm dev = otg->gadget->dev.parent; if (on) { @@ -1349,7 +1321,7 @@ index 94eb2923..836355fa 100644 } else { if (dev->driver->suspend) dev->driver->suspend(dev, otg_suspend_state); -@@ -672,6 +686,10 @@ static void fsl_otg_event(struct work_struct *work) +@@ -672,6 +686,10 @@ static void fsl_otg_event(struct work_st fsl_otg_start_host(fsm, 0); otg_drv_vbus(fsm, 0); fsl_otg_start_gadget(fsm, 1); @@ -1360,7 +1332,7 @@ index 94eb2923..836355fa 100644 } } -@@ -724,6 +742,7 @@ irqreturn_t fsl_otg_isr(int irq, void *dev_id) +@@ -724,6 +742,7 @@ irqreturn_t fsl_otg_isr(int irq, void *d { struct otg_fsm *fsm = &((struct fsl_otg *)dev_id)->fsm; struct usb_otg *otg = ((struct fsl_otg *)dev_id)->phy.otg; @@ -1368,7 +1340,7 @@ index 94eb2923..836355fa 100644 u32 otg_int_src, otg_sc; otg_sc = fsl_readl(&usb_dr_regs->otgsc); -@@ -753,18 +772,8 @@ irqreturn_t fsl_otg_isr(int irq, void *dev_id) +@@ -753,18 +772,8 @@ irqreturn_t fsl_otg_isr(int irq, void *d otg->gadget->is_a_peripheral = !fsm->id; VDBG("ID int (ID is %d)\n", fsm->id); @@ -1389,7 +1361,7 @@ index 94eb2923..836355fa 100644 return IRQ_HANDLED; } } -@@ -923,12 +932,32 @@ int usb_otg_start(struct platform_device *pdev) +@@ -923,12 +932,32 @@ int usb_otg_start(struct platform_device temp &= ~(PORTSC_PHY_TYPE_SEL | PORTSC_PTW); switch (pdata->phy_mode) { case FSL_USB2_PHY_ULPI: @@ -1422,8 +1394,6 @@ index 94eb2923..836355fa 100644 temp |= PORTSC_PTS_UTMI; /* fall through */ default: -diff --git a/drivers/usb/phy/phy-fsl-usb.h b/drivers/usb/phy/phy-fsl-usb.h -index 23149954..c4c08730 100644 --- a/drivers/usb/phy/phy-fsl-usb.h +++ b/drivers/usb/phy/phy-fsl-usb.h @@ -199,6 +199,14 @@ @@ -1441,8 +1411,6 @@ index 23149954..c4c08730 100644 /* BCSR5 */ #define BCSR5_INT_USB (0x02) -diff --git a/include/linux/usb.h b/include/linux/usb.h -index eba1f10e..c334e281 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -362,6 +362,7 @@ struct usb_bus { @@ -1453,8 +1421,6 @@ index eba1f10e..c334e281 100644 unsigned is_b_host:1; /* true during some HNP roleswitches */ unsigned b_hnp_enable:1; /* OTG: did A-Host enable HNP? */ unsigned no_stop_on_short:1; /* -diff --git a/include/linux/usb/of.h b/include/linux/usb/of.h -index 5ff9032e..2a57e0d2 100644 --- a/include/linux/usb/of.h +++ b/include/linux/usb/of.h @@ -11,6 +11,8 @@ @@ -1466,6 +1432,3 @@ index 5ff9032e..2a57e0d2 100644 #if IS_ENABLED(CONFIG_OF) enum usb_dr_mode of_usb_get_dr_mode_by_phy(struct device_node *np, int arg0); bool of_usb_host_tpl_support(struct device_node *np); --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/818-vfio-support-layerscape.patch b/target/linux/layerscape/patches-4.9/818-vfio-support-layerscape.patch index 1dba7b3158..4854738d38 100644 --- a/target/linux/layerscape/patches-4.9/818-vfio-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/818-vfio-support-layerscape.patch @@ -27,8 +27,6 @@ Signed-off-by: Yangbo Lu create mode 100644 drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c create mode 100644 drivers/vfio/fsl-mc/vfio_fsl_mc_private.h -diff --git a/drivers/vfio/Kconfig b/drivers/vfio/Kconfig -index da6e2ce7..8a8a33e0 100644 --- a/drivers/vfio/Kconfig +++ b/drivers/vfio/Kconfig @@ -48,4 +48,5 @@ menuconfig VFIO_NOIOMMU @@ -37,18 +35,13 @@ index da6e2ce7..8a8a33e0 100644 source "drivers/vfio/platform/Kconfig" +source "drivers/vfio/fsl-mc/Kconfig" source "virt/lib/Kconfig" -diff --git a/drivers/vfio/Makefile b/drivers/vfio/Makefile -index 7b8a31f6..560f0c67 100644 --- a/drivers/vfio/Makefile +++ b/drivers/vfio/Makefile -@@ -7,3 +7,4 @@ obj-$(CONFIG_VFIO_IOMMU_SPAPR_TCE) += vfio_iommu_spapr_tce.o +@@ -7,3 +7,4 @@ obj-$(CONFIG_VFIO_IOMMU_SPAPR_TCE) += vf obj-$(CONFIG_VFIO_SPAPR_EEH) += vfio_spapr_eeh.o obj-$(CONFIG_VFIO_PCI) += pci/ obj-$(CONFIG_VFIO_PLATFORM) += platform/ +obj-$(CONFIG_VFIO_FSL_MC) += fsl-mc/ -diff --git a/drivers/vfio/fsl-mc/Kconfig b/drivers/vfio/fsl-mc/Kconfig -new file mode 100644 -index 00000000..b1a527d6 --- /dev/null +++ b/drivers/vfio/fsl-mc/Kconfig @@ -0,0 +1,9 @@ @@ -61,17 +54,11 @@ index 00000000..b1a527d6 + fsl-mc bus devices using the VFIO framework. + + If you don't know what to do here, say N. -diff --git a/drivers/vfio/fsl-mc/Makefile b/drivers/vfio/fsl-mc/Makefile -new file mode 100644 -index 00000000..2aca75af --- /dev/null +++ b/drivers/vfio/fsl-mc/Makefile @@ -0,0 +1,2 @@ +vfio-fsl_mc-y := vfio_fsl_mc.o +obj-$(CONFIG_VFIO_FSL_MC) += vfio_fsl_mc.o vfio_fsl_mc_intr.o -diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc.c b/drivers/vfio/fsl-mc/vfio_fsl_mc.c -new file mode 100644 -index 00000000..9dc32d27 --- /dev/null +++ b/drivers/vfio/fsl-mc/vfio_fsl_mc.c @@ -0,0 +1,753 @@ @@ -828,9 +815,6 @@ index 00000000..9dc32d27 +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR(DRIVER_AUTHOR); +MODULE_DESCRIPTION(DRIVER_DESC); -diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c b/drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c -new file mode 100644 -index 00000000..eb244bb0 --- /dev/null +++ b/drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c @@ -0,0 +1,199 @@ @@ -1033,9 +1017,6 @@ index 00000000..eb244bb0 + + return ret; +} -diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc_private.h b/drivers/vfio/fsl-mc/vfio_fsl_mc_private.h -new file mode 100644 -index 00000000..34e75754 --- /dev/null +++ b/drivers/vfio/fsl-mc/vfio_fsl_mc_private.h @@ -0,0 +1,55 @@ @@ -1094,8 +1075,6 @@ index 00000000..34e75754 + unsigned int start, unsigned int count, + void *data); +#endif /* VFIO_PCI_PRIVATE_H */ -diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c -index 1d48e62f..f0a39331 100644 --- a/drivers/vfio/vfio_iommu_type1.c +++ b/drivers/vfio/vfio_iommu_type1.c @@ -36,6 +36,8 @@ @@ -1107,7 +1086,7 @@ index 1d48e62f..f0a39331 100644 #define DRIVER_VERSION "0.2" #define DRIVER_AUTHOR "Alex Williamson " -@@ -720,6 +722,27 @@ static void vfio_test_domain_fgsp(struct vfio_domain *domain) +@@ -720,6 +722,27 @@ static void vfio_test_domain_fgsp(struct __free_pages(pages, order); } @@ -1135,7 +1114,7 @@ index 1d48e62f..f0a39331 100644 static int vfio_iommu_type1_attach_group(void *iommu_data, struct iommu_group *iommu_group) { -@@ -728,6 +751,8 @@ static int vfio_iommu_type1_attach_group(void *iommu_data, +@@ -728,6 +751,8 @@ static int vfio_iommu_type1_attach_group struct vfio_domain *domain, *d; struct bus_type *bus = NULL; int ret; @@ -1144,7 +1123,7 @@ index 1d48e62f..f0a39331 100644 mutex_lock(&iommu->lock); -@@ -774,11 +799,15 @@ static int vfio_iommu_type1_attach_group(void *iommu_data, +@@ -774,11 +799,15 @@ static int vfio_iommu_type1_attach_group if (ret) goto out_domain; @@ -1162,7 +1141,7 @@ index 1d48e62f..f0a39331 100644 pr_warn("%s: No interrupt remapping support. Use the module param \"allow_unsafe_interrupts\" to enable VFIO IOMMU support on this platform\n", __func__); ret = -EPERM; -@@ -820,6 +849,12 @@ static int vfio_iommu_type1_attach_group(void *iommu_data, +@@ -820,6 +849,12 @@ static int vfio_iommu_type1_attach_group if (ret) goto out_detach; @@ -1175,8 +1154,6 @@ index 1d48e62f..f0a39331 100644 list_add(&domain->next, &iommu->domain_list); mutex_unlock(&iommu->lock); -diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h -index 255a2113..1bbaa13d 100644 --- a/include/uapi/linux/vfio.h +++ b/include/uapi/linux/vfio.h @@ -198,6 +198,7 @@ struct vfio_device_info { @@ -1187,6 +1164,3 @@ index 255a2113..1bbaa13d 100644 __u32 num_regions; /* Max region index + 1 */ __u32 num_irqs; /* Max IRQ index + 1 */ }; --- -2.14.1 - -- 2.25.1