- 22 4月, 2017 1 次提交
-
-
由 Brian Norris 提交于
Now that we've exported pci_remap_iospace() and added proper remove() support, there's no reason this can't be a loadable module. Signed-off-by: NBrian Norris <briannorris@chromium.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NShawn Lin <shawn.lin@rock-chips.com>
-
- 21 4月, 2017 1 次提交
-
-
由 Brian Norris 提交于
Currently, if we try to unbind the platform device, the remove will succeed, but the removal won't undo most of the registration, leaving partially-configured PCI devices in the system. This allows, for example, a simple 'lspci' to crash the system, as it will try to touch the freed (via devm_*) driver structures, e.g., on RK3399: # echo f8000000.pcie > /sys/bus/platform/drivers/rockchip-pcie/unbind # lspci So let's implement device remove(). Signed-off-by: NBrian Norris <briannorris@chromium.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NShawn Lin <shawn.lin@rock-chips.com>
-
- 12 4月, 2017 1 次提交
-
-
由 Shawn Lin 提交于
All platforms using Rockchip use a common clock for the Root Port and the slot connected to it. Indicate this by setting the Slot Clock Configuration (PCI_EXP_LNKSTA_SLC) bit in the Root Port's Link Status. Per the Implementation Note in the spec (PCIe r3.1, sec 7.8.7), if the downstream component also sets PCI_EXP_LNKSTA_SLC, software may set the Common Clock Configuration (PCI_EXP_LNKCTL_CCC) bits on both ends of the Link. This is done by pcie_aspm_configure_common_clock(). Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com> Cc: Brian Norris <briannorris@chromium.org> Cc: jeffy.chen <jeffy.chen@rock-chips.com>
-
- 04 4月, 2017 1 次提交
-
-
由 Shawn Lin 提交于
Rockchip Root Ports support either 64 or 128 byte Read Completion Boundary (RCB). Set the RCB bit in the Link Control register to indicate this. A 128 byte RCB significantly improves performance of NVMe with libaio. [bhelgaas: changelog] Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Cc: Brian Norris <briannorris@chromium.org> Cc: Jeffy Chen <jeffy.chen@rock-chips.com>
-
- 24 3月, 2017 3 次提交
-
-
由 Brian Norris 提交于
There's no way to get here with 'err != 0'. Just return 0 to be more obvious and prevent future changes from accidentally erroring out here without going through the right error paths. Signed-off-by: NBrian Norris <briannorris@chromium.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Bjorn Helgaas 提交于
If regulator_get_current_limit() returns 0 or error, return early so the body of the function doesn't have to be indented as the body of an "if" statement. No functional change intended. Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Brian Norris 提交于
regulator_get_current_limit() can return negative error codes. We saved the return value in an unsigned "curr", and a subsequent check interpreted a negative error code as a positive (invalid) current limit. Save the return code as a signed value, which avoids messages like this, seen on Samsung Chromebook Plus: rockchip-pcie f8000000.pcie: invalid power supply [bhelgaas: changelog] Fixes: 4816c4c7 ("PCI: rockchip: Provide captured slot power limit and scale") Signed-off-by: NBrian Norris <briannorris@chromium.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NShawn Lin <shawn.lin@rock-chips.com>
-
- 01 3月, 2017 1 次提交
-
-
由 Ley Foon Tan 提交于
eb576712 ("PCI: altera: Simplify TLB_CFG_DW0 usage") used TLP_FMTTYPE_CFGRD* (instead of TLP_FMTTYPE_CFGWR*) for TLP writes, which causes writing to configuration space to fail. Fix it by using correct FMTTYPE for write operation. Fixes: eb576712 ("PCI: altera: Simplify TLB_CFG_DW0 usage") Signed-off-by: NLey Foon Tan <ley.foon.tan@intel.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> CC: stable@vger.kernel.org # v4.9+
-
- 22 2月, 2017 1 次提交
-
-
由 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>
-
- 21 2月, 2017 1 次提交
-
-
由 Jaehoon Chung 提交于
Switch the pci-exynos driver to generic PHY framework. At the same time backward compatibility is preserved: Warning will be printed for old DTB. Refer to the binding file: - Documentation/devicetree/bindings/pci/samsung,exynos5440-pcie.txt Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NPankaj Dubey <pankaj.dubey@samsung.com> Reviewed-by: NAlim Akhtar <alim.akhtar@samsung.com> Acked-by: NKrzysztof Kozlowski <krzk@kernel.org> Acked-by: NJingoo Han <jingoohan1@gmail.com>
-
- 18 2月, 2017 3 次提交
-
-
由 Yadi Hu 提交于
Previously we extracted 'Completion Status' from b14:12, but it is actually b15:13. Extract it from the correct bits. Signed-off-by: Hu Yadi<yadi.hu@windriver.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NLey Foon Tan <ley.foon.tan@intel.com>
-
由 Shawn Lin 提交于
The TRM says the vendor ID in the RC's configure space can be rewritten and the value must be the same as the value read from the local core configure space. But we misread that and didn't notice it before. Actually we should only able to rewrite it from the local core configure space. Fix that issue to make lspci show the correct IP vendor infomation. Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Haiyang Zhang 提交于
Use the device serial number as the PCI domain. The serial numbers start with 1 and are unique within a VM. So names, such as VF NIC names, that include domain number as part of the name, can be shorter than that based on part of bus UUID previously. The new names will also stay same for VMs created with copied VHD and same number of devices. Signed-off-by: NHaiyang Zhang <haiyangz@microsoft.com> Signed-off-by: NStephen Hemminger <sthemmin@microsoft.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NK. Y. Srinivasan <kys@microsoft.com>
-
- 11 2月, 2017 6 次提交
-
-
由 Niyas Ahmed S T 提交于
Currently the Exynos PCIe driver only supports the Exynos5440 SoC. Refactor the driver to allow support for other Exynos SoC. Following are the main changes in this patch: 1) Add separate structs for memory, clock resources Future Exynos SoC will have different hardware resources such as iomem, clocks, regmap handles, etc., so keeping these resources in separate structs will let us initialize them via per-SoC ops and avoid littering the code with of_machine_is_compatible(). 2) Add exynos_pcie_ops struct which will allow us to support the differences in resources in different Exynos SoC. No functional change intended. Signed-off-by: NNiyas Ahmed S T <niyas.ahmed@samsung.com> Signed-off-by: NPankaj Dubey <pankaj.dubey@samsung.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Reviewed-by: NAlim Akhtar <alim.akhtar@samsung.com> Reviewed-by: NJaehoon Chung <jh80.chung@samsung.com> Acked-by: NKrzysztof Kozlowski <krzk@kernel.org> Acked-by: NJingoo Han <jingoohan1@gmail.com>
-
由 Shawn Lin 提交于
rockchip_pcie_probe() calls of_pci_get_host_bridge_resources() to parse resources from DT and build a resource list. The caller is responsible for disposing of the resource list. This is normally done by pci_release_host_bridge_dev() when the host bridge is removed. If the host bridge probe fails, dispose of the resource list in the probe error path. [bhelgaas: changelog] Suggested-by: NBjorn Helgaas <bhelgaas@google.com> Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Andrey Smirnov 提交于
Fix a typo in the "pcie_inbound_axi clock missing or invalid" error message. Signed-off-by: NAndrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NLucas Stach <l.stach@pengutronix.de> CC: yurovsky@gmail.com CC: Fabio Estevam <fabio.estevam@nxp.com>
-
由 Dexuan Cui 提交于
The devfn of 00:02.0 is 0x10. devfn_to_wslot(0x10) == 0x2, and wslot_to_devfn(0x2) should be 0x10, while it's 0x2 in the current code. Due to this, hv_eject_device_work() -> pci_get_domain_bus_and_slot() returns NULL and pci_stop_and_remove_bus_device() is not called. Later when the real device driver's .remove() is invoked by hv_pci_remove() -> pci_stop_root_bus(), some warnings can be noticed because the VM has lost the access to the underlying device at that time. Signed-off-by: NJake Oshins <jakeo@microsoft.com> Signed-off-by: NDexuan Cui <decui@microsoft.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NHaiyang Zhang <haiyangz@microsoft.com> CC: stable@vger.kernel.org CC: K. Y. Srinivasan <kys@microsoft.com> CC: Stephen Hemminger <sthemmin@microsoft.com>
-
由 Bharat Kumar Gogada 提交于
Remove support for vendor-defined messages which are not supported by AXI. Signed-off-by: NBharat Kumar Gogada <bharatku@xilinx.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Bjorn Helgaas 提交于
Make sure PCIe MPS settings are valid when we enumerate a new hierarchy. Based-on-patch-by: NJon Mason <jon.mason@broadcom.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 09 2月, 2017 10 次提交
-
-
由 Dongdong Liu 提交于
pci_fixup_irqs() is problematic because: - it's called when we enumerate a host bridge, so we don't fixup IRQs for hot-added PCI devices, and - it fixes up IRQs for all PCI devices in the system, so if we call it multiple times, e.g., if we have several host controllers, we may reallocate an IRQ for a device after a driver has already claimed it. We plan to replace pci_fixup_irqs() soon, but we still need it on ARM because we don't have any other generic method for doing this. On ARM64, we don't need pci_fixup_irqs() because we do IRQ setup when we bind a driver to the device (in the pci_device_probe() -> pcibios_alloc_irq() path). pci-host-common.c is currently only used on ARM and ARM64. In principle, it could be used on x86, and we wouldn't want pci_fixup_irqs() there either, because x86 does IRQ setup in the pci_enable_device() path. [bhelgaas: changelog, use #ifdef ARM, not #ifndef ARM64] Signed-off-by: NDongdong Liu <liudongdong3@huawei.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NGabriele Paoloni <gabriele.paoloni@huawei.com> Reviewed-by: NZhou Wang <wangzhou1@hisilicon.com> Acked-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
-
由 Bjorn Helgaas 提交于
There's nothing ACPI-specific about the config space accessors hisi_pcie_acpi_rd_conf() and hisi_pcie_acpi_wr_conf(), and they're used for both the ACPI and the DT driver model. Rename them to hisi_pcie_rd_conf() and hisi_pcie_wr_conf(). No functional change intended. Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Bjorn Helgaas 提交于
Make sure PCIe MPS settings are valid when we enumerate a new hierarchy. Based-on-patch-by: NJon Mason <jon.mason@broadcom.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Bjorn Helgaas 提交于
Make sure PCIe MPS settings are valid when we enumerate a new hierarchy. Based-on-patch-by: NJon Mason <jon.mason@broadcom.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Jon Mason 提交于
Make sure PCIe MPS settings are valid when we enumerate a new hierarchy. [bhelgaas: changelog] Signed-off-by: NJon Mason <jon.mason@broadcom.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NRay Jui <ray.jui@broadcom.com>
-
由 Jaehoon Chung 提交于
Remove duplicated register reads and writes. Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NPankaj Dubey <pankaj.dubey@samsung.com> Acked-by: NKrzysztof Kozlowski <krzk@kernel.org> Acked-by: NJingoo Han <jingoohan1@gmail.com>
-
由 Jaehoon Chung 提交于
Use the bitops BIT() macro to build bitmasks. Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NPankaj Dubey <pankaj.dubey@samsung.com> Acked-by: NKrzysztof Kozlowski <krzk@kernel.org> Acked-by: NJingoo Han <jingoohan1@gmail.com>
-
由 Jaehoon Chung 提交于
Remove unnecessary local variables: elbi_base, phy_base, block_base. We need one resource structure for assigning each resource. Reuse the single 'res' variable for all. Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NPankaj Dubey <pankaj.dubey@samsung.com> Acked-by: NKrzysztof Kozlowski <krzk@kernel.org> Acked-by: NJingoo Han <jingoohan1@gmail.com>
-
由 Jaehoon Chung 提交于
There is no reason to maintain *_blk/phy/elbi_* as register accessors. They can be replaced by one accessor to make maintenance easier. Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NPankaj Dubey <pankaj.dubey@samsung.com> Acked-by: NKrzysztof Kozlowski <krzk@kernel.org> Acked-by: NJingoo Han <jingoohan1@gmail.com>
-
由 Lucas Stach 提交于
The current default of 20ms cause some devices, which are slow to initialize, to not show up during the bus scanning. Change this to the PCIe spec mandated 100ms and document this in the DT binding. From PCIe base spec rev 3.0, chapter "6.6.1. Conventional Reset": To allow components to perform internal initialization, system software must wait a specified minimum period following the end of a Conventional Reset of one or more devices before it is permitted to issue Configuration Requests to those devices. With a Downstream Port that does not support Link speeds greater than 5.0 GT/s, software must wait a minimum of 100 ms before sending a Configuration Request to the device immediately below that Port. Signed-off-by: NLucas Stach <l.stach@pengutronix.de> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NJason Cooper <jason@lakedaemon.net>
-
- 07 2月, 2017 1 次提交
-
-
由 Dongdong Liu 提交于
The PCIe controller in HiSilicon Hip06/Hip07 SoCs is not completely ECAM-compliant. It is non-ECAM only for the RC bus config space; for any other bus underneath the root bus it does support ECAM access. Add DT support for the almost-ECAM Hip06/Hip07 controllers. [bhelgaas: drop dev->of_node test, driver name "hisi-pcie-almost-ecam"] Signed-off-by: NDongdong Liu <liudongdong3@huawei.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NGabriele Paoloni <gabriele.paoloni@huawei.com> Reviewed-by: NZhou Wang <wangzhou1@hisilicon.com>
-
- 04 2月, 2017 1 次提交
-
-
由 Shailendra Verma 提交于
The only way to call hisi_pcie_probe() is to match an entry in hisi_pcie_of_match[], so match cannot be NULL. Use of_device_get_match_data() to retrieve the soc_ops pointer. No functional change intended. [bhelgaas: use of_device_get_match_data(), changelog] Based-on-suggestion-from: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NShailendra Verma <shailendra.v@samsung.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 01 2月, 2017 3 次提交
-
-
由 Bjorn Helgaas 提交于
The only way to call iproc_pcie_pltfm_probe() is to match an entry in iproc_pcie_of_match_table[], so match cannot be NULL. Use of_device_get_match_data() to retrieve the pcie->type. No functional change intended. Based-on-suggestion-from: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 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>
-
由 Bjorn Helgaas 提交于
This is a DT-only driver, so the only way to call rcar_pcie_probe() is to match an entry in rcar_pcie_of_match[], so of_id cannot be NULL. Furthermore, of_id->data can only be NULL if an rcar_pcie_of_match[] entry has a NULL .data member. That's a driver defect, and we don't want to return -EINVAL, which is easy to ignore. We'd rather take the NULL pointer dereference so we notice the problem and fix it. Use of_device_get_match_data() to retrieve the hw_init_fn pointer. No functional change intended. Suggested-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be> Acked-by: NSimon Horman <horms+renesas@verge.net.au>
-
- 31 1月, 2017 4 次提交
-
-
由 Dan Carpenter 提交于
The "port" variable was allocated with devm_kzalloc() so if we free it with kfree() it will be freed twice. Also I changed it to propogate the error from devm_ioremap_resource() instead of returning -ENOMEM. Fixes: c5d46039 ("PCI: Add MCFG quirks for X-Gene host controller") Also-posted-by: NShawn Lin <shawn.lin@rock-chips.com> Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NTanmay Inamdar <tinamdar@apm.com>
-
由 Lucas Stach 提交于
This causes CPU hangs when the system is reset by the watchdog, as the GPRs aren't cleared, but the clocks are back to disabled state. If the bootloader uses PCIe, it must take care to bring it down into a safe state, before passing control to the Linux kernel. This is the only way to get a properly operating system at all times and circumstances. Signed-off-by: NLucas Stach <l.stach@pengutronix.de> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Arnd Bergmann 提交于
When CONFIG_PM_SLEEP is disabled, we get harmless build warnings: host/pcie-rockchip.c:1267:12: error: 'rockchip_pcie_resume_noirq' defined but not used [-Werror=unused-function] host/pcie-rockchip.c:1240:12: error: 'rockchip_pcie_suspend_noirq' defined but not used [-Werror=unused-function] Marking both functions as __maybe_unused avoids the warning without the need for #ifdef around them. Fixes: 013dd3d5 ("PCI: rockchip: Add system PM support") Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NShawn Lin <shawn.lin@rock-chips.com>
-
由 Shawn Lin 提交于
Use readl_poll_timeout() instead of open-coding it. Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 30 1月, 2017 1 次提交
-
-
由 Jason Gunthorpe 提交于
The PCI core will write to the bridge window config multiple times while they are enabled. This can lead to mbus failures like this: mvebu_mbus: cannot add window '4:e8', conflicts with another window mvebu-pcie mbus:pex@e0000000: Could not create MBus window at [mem 0xe0000000-0xe00fffff]: -22 For me this is happening during a hotplug cycle. The PCI core is not changing the values, just writing them twice while active. The patch addresses the general case of any change to an active window, but not atomically. The code is slightly refactored so io and mem can share more of the window logic. Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NJason Cooper <jason@lakedaemon.net>
-
- 29 1月, 2017 1 次提交
-
-
由 Jaehoon Chung 提交于
Rename the simple pointer name as "ep" instead of "exynos_pcie". After applying this patch, it can save the 10 characthers within one line. Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NPankaj Dubey <pankaj.dubey@samsung.com> Acked-by: NKrzysztof Kozlowski <krzk@kernel.org> Acked-by: NJingoo Han <jingoohan1@gmail.com>
-