- 30 8月, 2017 8 次提交
-
-
由 Hou Zhiqiang 提交于
Now that the Class Code fixup in dw_pcie_setup_rc() works, remove the fixup from the Layerscape driver. Signed-off-by: NHou Zhiqiang <Zhiqiang.Hou@nxp.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NRoy Zang <tie-fei.zang@freescale.com>
-
由 Hou Zhiqiang 提交于
The read-only DBI registers can be written only when the "Write to RO Registers Using DBI" (DBI_RO_WR_EN) field of MISC_CONTROL_1_OFF is set. Add accessors to enable and disable write permission, and use them instead of accessing MISC_CONTROL_1_OFF directly. Signed-off-by: NHou Zhiqiang <Zhiqiang.Hou@nxp.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NJoao Pinto <jpinto@synopsys.com> Acked-by: NRoy Zang <tie-fei.zang@freescale.com>
-
由 Hou Zhiqiang 提交于
Disable all the outbound windows to avoid one transaction hitting multiple outbound windows. dw_pcie_setup_rc() will reconfigure the outbound windows, which may conflict with windows configured by the bootloader. Signed-off-by: NHou Zhiqiang <Zhiqiang.Hou@nxp.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NRoy Zang <tie-fei.zang@freescale.com>
-
由 Hou Zhiqiang 提交于
ls1021_pcie_host_init() duplicated the code in the generic ls_pcie_host_init(). Call ls_pcie_host_init() instead of duplicating the code. Signed-off-by: NHou Zhiqiang <Zhiqiang.Hou@nxp.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NRoy Zang <tie-fei.zang@freescale.com>
-
由 Hou Zhiqiang 提交于
We will use the generic ls_pcie_link_up() and ls_pcie_host_init() from device-specific routines. Move the generic functions earlier in the file so we won't need forward declarations. This is strictly a code move with no functional change intended. Signed-off-by: NHou Zhiqiang <Zhiqiang.Hou@nxp.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NRoy Zang <tie-fei.zang@freescale.com>
-
由 Hou Zhiqiang 提交于
The current code depends on class code and multifunction fixups done by the bootloader. Perform these fixups in ls1021_pcie_host_init() to remove this dependency. Signed-off-by: NHou Zhiqiang <Zhiqiang.Hou@nxp.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NRoy Zang <tie-fei.zang@freescale.com>
-
由 Hou Zhiqiang 提交于
The STRFMR1 is not a DBI read-only register, so move it out from the write-enable bracket. Signed-off-by: NHou Zhiqiang <Zhiqiang.Hou@nxp.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NRoy Zang <tie-fei.zang@freescale.com>
-
由 Hou Zhiqiang 提交于
We called dw_pcie_setup_rc() from the ls1021a host init function, but not from the common ls_pcie_host_init() function, so platforms other than ls1021a still depended on initialization by the bootloader. Call dw_pcie_setup_rc() from ls_pcie_host_init() to reduce dependencies on the bootloader. Signed-off-by: NHou Zhiqiang <Zhiqiang.Hou@nxp.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NRoy Zang <tie-fei.zang@freescale.com>
-
- 04 8月, 2017 1 次提交
-
-
由 Bjorn Andersson 提交于
In several dwc-based drivers, ->host_init() can fail, so make sure to propagate and handle this to avoid continuing operation of a driver or hardware in an invalid state. Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NJoao Pinto <jpinto@synopsys.com> Acked-by: NJingoo Han <jingoohan1@gmail.com>
-
- 03 7月, 2017 1 次提交
-
-
由 Jisheng Zhang 提交于
The dw_pcie_host_ops structures are never modified. Constify these structures such that these can be write-protected. Signed-off-by: NJisheng Zhang <jszhang@marvell.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NJingoo Han <jingoohan1@gmail.com> Acked-by: NKishon Vijay Abraham I <kishon@ti.com>
-
- 28 4月, 2017 1 次提交
-
-
由 Brian Norris 提交于
Many PCI host controller drivers aren't prepared to have their devices unbound from them forcefully (e.g., through /sys/.../<driver>/unbind), as they don't provide any driver .remove callback, where they'd detach the root bus, release resources, etc. Keeping the driver built in (i.e., not a loadable module) is not enough; and providing no .remove callback just means we don't do any teardown. To rule out the possibility of unbinding a device via sysfs, we need to set the ".suppress_bind_attrs" field. I found the suspect drivers via the following search: git grep -l platform_driver $(git grep -L -e '\.remove' -e suppress_bind_attrs drivers/pci/) Then I inspected them to ensure that (a) they set up a PCI bus in their probe() and (b) they don't have a remove() callback for undoing the setup Suggested-by: NBjorn Helgaas <helgaas@kernel.org> Signed-off-by: NBrian Norris <briannorris@chromium.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 25 4月, 2017 1 次提交
-
-
由 Lorenzo Pieralisi 提交于
PCI configuration space should be mapped with a memory region type that generates on the CPU host bus non-posted write transations. Update the driver to use the devm_pci_remap_cfg* interface to make sure the correct memory mappings for PCI configuration space are used. Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Cc: Mingkai Hu <mingkai.hu@freescale.com> Cc: Minghuan Lian <minghuan.Lian@freescale.com> Cc: Roy Zang <tie-fei.zang@freescale.com>
-
- 25 2月, 2017 1 次提交
-
-
由 Guenter Roeck 提交于
Fix the following crash, seen in dwc/pci-imx6. Unable to handle kernel NULL pointer dereference at virtual address 00000070 pgd = c0004000 [00000070] *pgd=00000000 Internal error: Oops: 805 [#1] SMP ARM Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.10.0-09686-g9e314890 #1 Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) task: cb850000 task.stack: cb84e000 PC is at imx6_pcie_probe+0x2f4/0x414 ... While at it, fix the same problem in various drivers instead of waiting for individual crash reports. The change in the imx6 driver was tested with qemu. The changes in other drivers are based on code inspection and have been compile tested only. Fixes: 442ec4c0 ("PCI: dwc: all: Split struct pcie_port into host-only and core structures") Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org> # designware-plat Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NKishon Vijay Abraham I <kishon@ti.com>
-
- 22 2月, 2017 3 次提交
-
-
由 Kishon Vijay Abraham I 提交于
Keep only the host-specific members in struct pcie_port and move the common members (i.e common to both host and endpoint) to struct dw_pcie. This is in preparation for adding endpoint mode support to designware driver. While at that also fix checkpatch warnings. Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> CC: Jingoo Han <jingoohan1@gmail.com> CC: Richard Zhu <hongxing.zhu@nxp.com> CC: Lucas Stach <l.stach@pengutronix.de> CC: Murali Karicheri <m-karicheri2@ti.com> CC: Minghuan Lian <minghuan.Lian@freescale.com> CC: Mingkai Hu <mingkai.hu@freescale.com> CC: Roy Zang <tie-fei.zang@freescale.com> CC: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> CC: Niklas Cassel <niklas.cassel@axis.com> CC: Jesper Nilsson <jesper.nilsson@axis.com> CC: Joao Pinto <Joao.Pinto@synopsys.com> CC: Zhou Wang <wangzhou1@hisilicon.com> CC: Gabriele Paoloni <gabriele.paoloni@huawei.com> CC: Stanimir Varbanov <svarbanov@mm-sol.com> CC: Pratyush Anand <pratyush.anand@gmail.com>
-
由 Kishon Vijay Abraham I 提交于
Add platform_set_drvdata() in all designware-based drivers to store the private data structure of the driver so that dev_set_drvdata() can be used to get back private data structure in add_pcie_port/host_init. This is in preparation for splitting struct pcie_port into core and host only structures. After the split pcie_port will not be part of the driver's private data structure and *container_of* used now to get the private data pointer cannot be used. Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> CC: Jingoo Han <jingoohan1@gmail.com> CC: Richard Zhu <hongxing.zhu@nxp.com> CC: Lucas Stach <l.stach@pengutronix.de> CC: Murali Karicheri <m-karicheri2@ti.com> CC: Minghuan Lian <minghuan.Lian@freescale.com> CC: Mingkai Hu <mingkai.hu@freescale.com> CC: Roy Zang <tie-fei.zang@freescale.com> CC: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> CC: Niklas Cassel <niklas.cassel@axis.com> CC: Jesper Nilsson <jesper.nilsson@axis.com> CC: Joao Pinto <Joao.Pinto@synopsys.com> CC: Zhou Wang <wangzhou1@hisilicon.com> CC: Gabriele Paoloni <gabriele.paoloni@huawei.com> CC: Stanimir Varbanov <svarbanov@mm-sol.com> CC: Pratyush Anand <pratyush.anand@gmail.com>
-
由 Kishon Vijay Abraham I 提交于
Group all the PCI drivers that use DesignWare core in dwc directory. dwc IP is capable of operating in both host mode and device mode and keeping it inside the *host* directory is misleading. Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NJingoo Han <jingoohan1@gmail.com> Acked-By: NJoao Pinto <jpinto@synopsys.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Minghuan Lian <minghuan.Lian@freescale.com> Cc: Mingkai Hu <mingkai.hu@freescale.com> Cc: Roy Zang <tie-fei.zang@freescale.com> Cc: Richard Zhu <hongxing.zhu@nxp.com> Cc: Lucas Stach <l.stach@pengutronix.de> Cc: Murali Karicheri <m-karicheri2@ti.com> Cc: Pratyush Anand <pratyush.anand@gmail.com> Cc: Niklas Cassel <niklas.cassel@axis.com> Cc: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Zhou Wang <wangzhou1@hisilicon.com> Cc: Gabriele Paoloni <gabriele.paoloni@huawei.com> Cc: Stanimir Varbanov <svarbanov@mm-sol.com>
-
- 01 2月, 2017 1 次提交
-
-
由 Bjorn Helgaas 提交于
The only way to call ls_pcie_probe() is to match an entry in ls_pcie_of_match[], so match cannot be NULL. Use of_device_get_match_data() to retrieve the drvdata pointer. No functional change intended. Based-on-suggestion-from: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 12 11月, 2016 2 次提交
-
-
由 Mingkai Hu 提交于
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: NMingkai Hu <mingkai.hu@nxp.com> Signed-off-by: NMinghuan Lian <Minghuan.Lian@nxp.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Wei Yongjun 提交于
There is an error message from devm_ioremap_resource() already, so remove the dev_err() call to avoid redundant error messages. Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 17 10月, 2016 1 次提交
-
-
由 Marc Zyngier 提交于
Commit fefe6733 ("PCI: layerscape: Move struct pcie_port setup to probe function") changed the init ordering of the pcie structure, but started to use the pcie->drvdata field before initializing it. Mayhem follows. Fix this by moving the drvdata assignment right before the first use. Tested on LS2085a. Fixes: efe6733e516 ("PCI: layerscape: Move struct pcie_port setup to probe function") Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 12 10月, 2016 7 次提交
-
-
由 Bjorn Helgaas 提交于
Reorder struct ls_pcie to put generic fields first. No functional change intended. Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Bjorn Helgaas 提交于
ls_add_pcie_port() doesn't use the platform_device pointer passed to it, so remove it. No functional change intended. Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Bjorn Helgaas 提交于
Do the basic pcie_port setup in the probe function for consistency with other drivers. No functional change intended. Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Bjorn Helgaas 提交于
Only interfaces used from outside the driver, e.g., those called by the DesignWare core, need to accept pointers to the generic struct pcie_port. Internal interfaces can accept pointers to the device-specific struct, which makes them more straightforward. No functional change intended. Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Bjorn Helgaas 提交于
Remove the struct ls_pcie.dbi member, which is a duplicate of the generic pp.dbi_base member. No functional change intended. Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Bjorn Helgaas 提交于
The layerscape driver never uses the platform drvdata pointer, so don't bother setting it. No functional change intended. Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Bjorn Helgaas 提交于
Use a local "struct device *dev" for brevity and consistency with other drivers. No functional change intended. Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 02 8月, 2016 1 次提交
-
-
由 Paul Gortmaker 提交于
This code is not being built as a module by anyone: drivers/pci/host/Kconfig:config PCI_LAYERSCAPE drivers/pci/host/Kconfig: bool "Freescale Layerscape PCIe controller" Remove uses of MODULE_DESCRIPTION(), MODULE_AUTHOR(), MODULE_LICENSE(), etc., so that when reading the driver there is no doubt it is builtin-only. The information is preserved in comments at the top of the file. Replace module_platform_driver() with builtin_platform_driver(), which uses the same init level priority, so init ordering is unchanged. Note that MODULE_DEVICE_TABLE is a no-op for non-modular code. [bhelgaas: changelog] Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> CC: Minghuan Lian <minghuan.Lian@freescale.com> CC: Mingkai Hu <mingkai.hu@freescale.com> CC: Roy Zang <tie-fei.zang@freescale.com>
-
- 01 3月, 2016 1 次提交
-
-
由 Minghuan Lian 提交于
Some kinds of Layerscape PCIe controllers will forward the received message TLPs to system application address space, which could corrupt system memory or lead to a system hang. Enable MSG_DROP to fix this issue. Signed-off-by: NMinghuan Lian <Minghuan.Lian@nxp.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 06 2月, 2016 1 次提交
-
-
由 Yang Shi 提交于
The Layerscape PCI host driver must recognize ls2085a compatible when using firmware with ls2085a compatible property, otherwise the PCI bus won't be detected even though ls2085a compatible is included by the dts. Signed-off-by: NYang Shi <yang.shi@linaro.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 03 11月, 2015 7 次提交
-
-
由 Minghuan Lian 提交于
Layerscape PCIe has its own MSI implementation. Register ls_pcie_msi_host_init() to avoid using DesignWare's MSI. [bhelgaas: add comment] Signed-off-by: NMinghuan Lian <Minghuan.Lian@freescale.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Minghuan Lian 提交于
Both LS1043a and LS2080a are based on ARMv8 64-bit architecture and have similar PCIe implementation. LUT is added to controller. Add LS1043a and LS2080a support. [bhelgaas: move unused field removal into separate patch, include DT update] Signed-off-by: Bhupesh Sharma <bhupesh.sharma@freescale.com> (DT update) Signed-off-by: NMinghuan Lian <Minghuan.Lian@freescale.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: Arnd Bergmann <arnd@arndb.de> (DT update)
-
由 Minghuan Lian 提交于
Removed unused node, dev, and bus fields from struct ls_pcie. [bhelgaas: split into separate patch] Signed-off-by: NMinghuan Lian <Minghuan.Lian@freescale.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Minghuan Lian 提交于
Update the ls_add_pcie_port() signature to keep it consistent with the other DesignWare-based host drivers. Signed-off-by: NMinghuan Lian <Minghuan.Lian@freescale.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Minghuan Lian 提交于
For the LS1021a PCIe controller, some status registers are located in SCFG, unlike other Layerscape devices. Move SCFG-related code to ls1021_pcie_host_init() and rename ls_pcie_link_up() to ls1021_pcie_link_up() because LTSSM status is also in SCFG. Signed-off-by: NMinghuan Lian <Minghuan.Lian@freescale.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Minghuan Lian 提交于
Layerscape PCIe controller supports root complex (RC) and endpoint (EP) modes, which can be set by RCW. If not in RC mode, return -ENODEV without claiming the controller. Signed-off-by: NMinghuan Lian <Minghuan.Lian@freescale.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Minghuan Lian 提交于
ls_pcie_establish_link() does not do any real operation, except to wait for the linkup establishment. In fact, this is not necessary. Moreover, each PCIe controller not inserted device will increase the Linux startup time about 200ms. Remove ls_pcie_establish_link(). Signed-off-by: NMinghuan Lian <Minghuan.Lian@freescale.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 11 6月, 2015 3 次提交
-
-
由 Bjorn Helgaas 提交于
All the DesignWare-based host drivers loop waiting for the link to come up, but they do it several ways that are needlessly different. Wait for the link to come up in a consistent style across all the DesignWare drivers. No functional change. Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NPratyush Anand <pratyush.anand@gmail.com>
-
由 Bjorn Helgaas 提交于
All other DesignWare-based drivers have a *_establish_link() function. This functionality is trivial for Layerscape, but factor out a ls_pcie_establish_link() for consistency with the other drivers. No functional change. Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NPratyush Anand <pratyush.anand@gmail.com>
-
由 Bjorn Helgaas 提交于
All the other DesignWare-based drivers use dw_pcie_link_up(), so use it in this driver, too, for consistency. No functional change. Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NPratyush Anand <pratyush.anand@gmail.com>
-