layerscape: refresh patches

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
openwrt-18.06
Stijn Tintel 2017-10-08 16:34:37 +03:00
parent 239dff6697
commit d2fdece2e1
29 changed files with 2414 additions and 3610 deletions

View File

@ -43,8 +43,6 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
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

View File

@ -37,8 +37,6 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
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 <asm/mach-types.h>
#include <asm/mach/map.h>
@@ -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 <linux/pci.h>
#include <linux/pci-acpi.h>
#include <linux/pci-ecam.h>
@@ -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

View File

@ -23,11 +23,9 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
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

View File

@ -17,8 +17,6 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
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 <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_platform.h>
@@ -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

View File

@ -30,8 +30,6 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
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 <Minghuan.Lian@freescale.com>");
+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 <Minghuan.Lian@freescale.com>");
+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, &reg16);
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, &reg32);
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

View File

@ -26,8 +26,6 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
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 <Shaohui.Xie@freescale.com>");
+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

View File

@ -92,9 +92,6 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
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 <roy.pledge@freescale.com>");
+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 <trace/define_trace.h>
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

View File

@ -11,8 +11,6 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
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

View File

@ -13,8 +13,6 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
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

View File

@ -13,8 +13,6 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
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

View File

@ -28,8 +28,6 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
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

View File

@ -14,11 +14,9 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
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

View File

@ -11,11 +11,9 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
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

View File

@ -16,11 +16,9 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
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

View File

@ -13,11 +13,9 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
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

View File

@ -23,11 +23,9 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
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

View File

@ -16,20 +16,16 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
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

View File

@ -17,8 +17,6 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
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

View File

@ -12,9 +12,6 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
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

View File

@ -15,8 +15,6 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
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

View File

@ -13,8 +13,6 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
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

View File

@ -34,11 +34,9 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
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

View File

@ -27,8 +27,6 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
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 <alex.williamson@redhat.com>"
@@ -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