summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-09-25spi: spi-fsl-dspi: Fix incorrect freeing of DMA allocated buffersSanchayan Maity
Buffers allocated with a call to dma_alloc_coherent should be freed with dma_free_coherent instead of the currently used devm_kfree. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Zhikang Zhang <zhikang.zhang@nxp.com>
2017-09-25spi: spi-fsl-dspi: Fix SPI transfer issue when using multiple SPI_IOC_MESSAGESanchayan Maity
Current DMA implementation had a bug where the DMA transfer would exit the loop in dspi_transfer_one_message after the completion of a single transfer. This results in a multi message transfer submitted with SPI_IOC_MESSAGE to terminate incorrectly without an error. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> Reviewed-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Zhikang Zhang <zhikang.zhang@nxp.com>
2017-09-25spi: spi-fsl-dspi: Add DMA support for VybridSanchayan Maity
Add DMA support for Vybrid. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Zhikang Zhang <zhikang.zhang@nxp.com>
2017-09-25PCI: layerscape: Add support for ls2088aHou Zhiqiang
commit 71ca9d68e282482f4e67cebac2b287b9f11d826a [dwc -> host] Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Integrated-by: Zhao Qiang <qiang.zhao@nxp.com> Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
2017-09-25PCI: layerscape: Add LS1046a supportMingkai Hu
commit 1d77040bde2d21dc7db575d4b43c1da24c94cca1 [context adjustment] Add support for the LS1046a PCIe controller. This device has a different LUT_DBG offset, so add "lut_dbg" to ls_pcie_drvdata to describe this difference. [bhelgaas: changelog, remove now-unused PCIE_LUT_DBG] Signed-off-by: Mingkai Hu <mingkai.hu@nxp.com> Signed-off-by: Minghuan Lian <Minghuan.Lian@nxp.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Integrated-by: Zhao Qiang <qiang.zhao@nxp.com>
2017-09-25Disable ATU configuration and call dw_pcie_setup_rc in host_init functionhongbo.wang
Signed-off-by: hongbo.wang <hongbo.wang@nxp.com> Integrated-by: Zhao Qiang <qiang.zhao@nxp.com>
2017-09-25pci:add support aer/pme interrupts with none MSI/MSI-X/INTx modePo Liu
[pcie part] On some platforms, root port doesn't support MSI/MSI-X/INTx in RC mode. When chip support the aer/pme interrupts with none MSI/MSI-X/INTx mode, maybe there is interrupt line for aer pme etc. Search the interrupt number in the fdt file. Then fixup the dev->irq with it. Signed-off-by: Po Liu <po.liu@nxp.com> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Integrated-by: Zhao Qiang <qiang.zhao@nxp.com>
2017-09-25PCI/portdrv: Use pci_irq_alloc_vectors()Christoph Hellwig
Use pci_irq_alloc_vectors() and greatly simplify the code by managing the vector number for the subservices directly. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2017-09-25PCI: Remove service driver load/unload messagesBjorn Helgaas
Remove the "service driver %s loaded" and unloaded messages. All service drivers already log something in their probe functions, where they can log more useful details. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2017-09-25irqchip/ls-scfg-msi: add MSI affinity supportMinghuan Lian
For LS1046a and LS1043a v1.1, the MSI controller has 4 MSIRs and 4 GIC SPI interrupts which can be associated with different Core. So we can support affinity to improve the performance. The MSI message data is a byte for Layerscape MSI. 7 6 5 4 3 2 1 0 | - | IBS | SRS | SRS bit0-1 is to select a MSIR which is associated with a CPU. IBS bit2-6 of ls1046, bit2-4 of ls1043a v1.1 is to select bit of the MSIR. With affinity, only bits of MSIR0(srs=0 cpu0) are available. All other bits of the MSIR1-3(cpu1-3) are reserved. The MSI hwirq always equals bit index of the MSIR0. When changing affinity, MSI message data will be appended corresponding SRS then MSI will be moved to the corresponding core. But in affinity mode, there is only 8 MSI interrupts for a controller of LS1043a v1.1. It cannot meet the requirement of the some PCIe devices such as 4 ports Ethernet card. In contrast, without affinity, all MSIRs can be used for core 0, the MSI interrupts can up to 32. So the parameter is added to control affinity mode. "lsmsi=no-affinity" will disable affinity and increase MSI interrupt number. Signed-off-by: Minghuan Lian <Minghuan.Lian@nxp.com> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2017-09-25irqchip/ls-scfg-msi: add LS1043a v1.1 MSI supportMinghuan Lian
A MSI controller of LS1043a v1.0 only includes one MSIR and is assigned one GIC interrupt. In order to support affinity, LS1043a v1.1 MSI is assigned 4 MSIRs and 4 GIC interrupts. But the MSIR has the different offset and only supports 8 MSIs. The bits between variable bit_start and bit_end in structure ls_scfg_msir are used to show 8 MSI interrupts. msir_irqs and msir_base are added to describe the difference of MSI between LS1043a v1.1 and other SoCs. Signed-off-by: Minghuan Lian <Minghuan.Lian@nxp.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2017-09-25irqchip/ls-scfg-msi: add LS1046a MSI supportMinghuan Lian
LS1046a includes 4 MSIRs, each MSIR is assigned a dedicate GIC SPI interrupt and provides 32 MSI interrupts. Compared to previous MSI, LS1046a's IBS(interrupt bit select) shift is changed to 2 and total MSI interrupt number is changed to 128. The patch adds structure 'ls_scfg_msir' to describe MSIR setting and 'ibs_shift' to store the different value between the SoCs. Signed-off-by: Minghuan Lian <Minghuan.Lian@nxp.com> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2017-09-25irqchip/ls-scfg-msi: fix typo of MSI compatible stringsMinghuan Lian
The patch is to fix typo of the Layerscape SCFG MSI dts compatible strings. "1" is replaced by "l". Signed-off-by: Minghuan Lian <Minghuan.Lian@nxp.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2017-09-25Add macro ehci_has_fsl_susp_errata for fix arm64 compiled issue.yinbo.zhu
Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
2017-09-25usb: udc: for fix 1021atwr compiled issueyinbo.zhu
remove the powerpc configures for fix ls1021atwr compiled issue. Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
2017-09-25usb: kconfig: remove dependency FSL_SOC for ehci fsl driverRajesh Bhagat
CONFIG_USB_EHCI_FSL is not dependent on FSL_SOC, it can be built on non-PPC platforms. Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
2017-09-25usb: dwc3: add function of_usb_get_dr_modeyinbo.zhu
Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
2017-09-25usb: dwc3: Implement workaround for Erratum A009116Nikhil Badola
Write fladj register adjusts (micro)frame length to appropriate value thus avoiding USB 2.0 devices to time-out over a longer run Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
2017-09-25usb: pm: Fix usb pm support for deep-sleepRamneek Mehresh
Make sure that saving and restoration of usb phy registers only happen in case of deep-sleep, and not for any other feature like sleep, etc. Also export pm_suspend_state() and set_pm_suspend_state() Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
2017-09-25usb: fsl: Compile out USB clk functionsNikhil Badola
Compile out USB clk functions for PPC platforms as there is no usb clk specific initialization on any of these platforms Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
2017-09-25usb: gadget: Introduce FSL_USB2_PHY_UTMI_DUAL for usb gadgetNikhil Badola
Introduce FSL_USB2_PHY_UTMI_DUAL in gadget driver for setting phy in SOCs with utmi dual phy Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
2017-09-25usb: gadget: Fix kernel boot dump for usb gadegt drvRamneek Mehresh
Copy of_node property only for host mode so as to fix gadget mode kernel dump messages Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
2017-09-25usb: host: Fix usb suspend/resume for deep-sleepRamneek Mehresh
Save usb controller and phy registers for deep-sleep Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
2017-09-25usb: host: Modify workaround for USB Erratum A005697Nikhil Badola
Change the position of delay introduced by erratum A005697 workaround Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com> Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
2017-09-25usb: pm: Fix sleep/deep-sleep issue for external ULPI phyRamneek Mehresh
External ULPI phy registers are not to be restored during normal sleep when phy power is not cut-off. In addition, phy saving/restoration needs to happen only during deep-sleep Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
2017-09-25usb: fsl: Fix deep-sleep resume issue caused by usbRamneek Mehresh
usb ip driver needs to save and restore all registers including phy registers across deep-sleep. This is required since latest changes in u-boot code doesn't re-init usb phy anymore during deep-sleep resume Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com> Signed-off-by: Suresh Gupta <suresh.gupta@freescale.com> Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
2017-09-25usb: pm: Fix pm defect in rcpm driver for usb ipRamneek Mehresh
Pass device-tree usb node offset to each usb device structure. This is required by rcpm driver to get mask setting for ip exception register to make/remove usb as wake-up source for sleep/deep-sleep Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
2017-09-25usb: fsl: Set USB_EN bit to select ULPI phyNikhil Badola
Set USB_EN bit to select ULPI phy for USB controller version 2.5 Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
2017-09-25usb :fsl: Remove USB Errata checking codeNikhil Badola
Remove USB errata checking code from driver. Applicability of erratum is retrieved by reading corresponding property in device tree. This property is written during device tree fixup. Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com> Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
2017-09-25usb: DWC3: fix usb cause crash issueyinbo.zhu
remove dwc3_frame_length_adjustment for fix crash issue. Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
2017-09-25usb: gadget: Port USB EHCI Gadget driver for LS102XANikhil Badola
Change raw read/write accessors to ioread/writebe32 for big endian registers Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
2017-09-25usb: gadget: Remove compilation error for usb EHCI gadgetNikhil Badola
Remove compilation errors from USB EHCI gadget driver Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
2017-09-25usb: host: Add Deep Sleep support for USB drvNikhil Badola
Saves and Restores USB register context when the system goes to deep sleep and resumes from it. This is required only when USB controller and phys are OFF during Deep Sleep Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com> Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
2017-09-25usb: host: Modify PHY_CLK_VALID bit usageRamneek Mehresh
PHY_CLK_VALID bit is de-featured for all controller versions before 2.4, and is only to be used for internal UTMI phy Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
2017-09-25usb: phy: Workaround for USB erratum-A005728Suresh Gupta
PHY_CLK_VALID bit for UTMI PHY in USBDR does not set even if PHY is providing valid clock. Workaround for this involves resetting of PHY and check PHY_CLK_VALID bit multiple times. If PHY_CLK_VALID bit is still not set even after 5 retries, it would be safe to deaclare that PHY clock is not available. This erratum is applicable for USBDR less then ver 2.4. Signed-off-by: Suresh Gupta <B42813@freescale.com> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
2017-09-25usb: host: Stops USB controller init if PLL fails to lockyinbo.zhu
USB erratum-A006918 workaround tries to start internal PHY inside uboot (when PLL fails to lock). However, if the workaround also fails, then USB initialization is also stopped inside Linux. Erratum-A006918 workaround failure creates "fsl,erratum_a006918" node in device-tree. Presence of this node in device-tree is used to stop USB controller initialization in Linux Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com> Signed-off-by: Suresh Gupta <suresh.gupta@freescale.com> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
2017-09-25usb: gadget: Fix USB gadget drv start issueRamneek Mehresh
Move synchronization delay b/w host and gadget drv from fsl_udc_resume() to fsl_otg_start_gadget() to prevent msleep() getting called from inside interrupt context. Gadget resume always gets called from inside interrupt context except during ID change. Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
2017-09-25usb: host: Remove host drv upon otg bring-upRamneek Mehresh
Change have_hcd variable to remove/suspend host driver on completion of otg initialization for otg auto detect Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
2017-09-25usb: host: Add support to add/remove usb host driverRamneek Mehresh
Add workqueue to add/remove host driver (outside interrupt context) upon each id change Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
2017-09-25usb: gadget: Add host-gadget drv sync delayRamneek Mehresh
Resolve synchronization issue between host and gadget drivers upon role-reversal Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
2017-09-25usb: host: enable USB wakeupZhao Chenhui
To enable USB wakeup feature, * Add a interrupt flag IRQF_NO_SUSPEND to avoid the USB interrupt disabled when suspending. * Set the USB module as a wakeup source. Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com> Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
2017-09-25usb: fsl: Correct endpoint name checkingNikhil Badola
Endpoint name being statically defined cannot be NULL hence checking name's first two character with "ep" for endpoint validity Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
2017-09-25usb: gadget: add a sanity check for complete handlerRajesh Bhagat
complete handler is replaced by usb_gadget_giveback_request by below commit,Which removed the sanity check which was added for fsl specific gadget driver.usb: gadget: Refactor request completion Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
2017-09-25usb: gadget: Correct NULL pointer checking in fsl gadgetNikhil Badola
Correct NULL pointer checking for endpoint descriptor before it gets dereferenced Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
2017-09-25usb: fsl: Remove unused variableNikhil Badola
Remove unused variable td_complete Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
2017-09-25usb: fsl: Check memory resource before releasing itNikhil Badola
Check memory resource existence before releasing it to avoid NULL pointer dereference Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
2017-09-25usb: gadget: Turn on cache snooping hardware in usb gadgetNikhil Badola
Turn on cache snooping hardware in usb gadget for PPC 64-bit Kernel Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
2017-09-25USB: Gadget: Set dma_ops for FSL USB Gadget DeviceSuresh Gupta
Signed-off-by: Suresh Gupta <suresh.gupta@freescale.com>
2017-09-25usb: hub: Resolve OTG crash issue with another hostRamneek Mehresh
Resolves kernel crash issue when a USB flash drive is inserted into USB1 port with USB2 port configured as otg Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
2017-09-25usb: gadget: Turn on cache snooping hardware for 64-bit KernelSuresh Gupta
Turn on cache snooping hardware for 64-bit Kernel Signed-off-by: Suresh Gupta <suresh.gupta@freescale.com>