- 10 4月, 2015 3 次提交
-
-
由 Bjorn Helgaas 提交于
devm_ioremap_resource() validates the resource it receives, so if we check for devm_ioremap_resource() failure, we need not check for failure of the preceding platform_get_resource(). Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Bjorn Helgaas 提交于
Check for failure from platform_get_resource() (this check actually happens inside devm_ioremap_resource()) before dereferencing the pointer returned from platform_get_resource(). Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Jisheng Zhang 提交于
Check for failure of devm_ioremap_resource(). devm_ioremap_resource() validates the resource it receives, so if we check for devm_ioremap_resource() failure, we need not check for failure of the preceding platform_get_resource(). [bhelgaas: changelog] Signed-off-by: NJisheng Zhang <jszhang@marvell.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 09 4月, 2015 2 次提交
-
-
由 Jaehoon Chung 提交于
Use a semicolon, not a comma, to terminate a statement. Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Ray Jui 提交于
Add support for the Broadcom iProc PCIe controller. pcie-iproc.c is the common core driver, and a front-end bus interface needs to be added to support different bus interfaces. pcie-iproc-platform.c contains the support for the platform bus interface. Signed-off-by: NRay Jui <rjui@broadcom.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NScott Branden <sbranden@broadcom.com> Acked-by: NArnd Bergmann <arnd@arndb.de>
-
- 21 3月, 2015 1 次提交
-
-
由 Thomas Petazzoni 提交于
Add suspend/resume support for the mvebu PCIe host driver. Without this commit, the system will panic at resume time when PCIe devices are connected. Note that we have to use the ->suspend_noirq() and ->resume_noirq() hooks, because at resume time, the PCI fixups are done at ->resume_noirq() time, so the PCIe controller has to be ready at this point. Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NJason Cooper <jason@lakedaemon.net>
-
- 19 3月, 2015 1 次提交
-
-
由 Yijing Wang 提交于
Previously, pci_scan_root_bus() created a root PCI bus, enumerated the devices on it, and called pci_bus_add_devices(), which made the devices available for drivers to claim them. Most callers assigned resources to devices after pci_scan_root_bus() returns, which may be after drivers have claimed the devices. This is incorrect; the PCI core should not change device resources while a driver is managing the device. Remove pci_bus_add_devices() from pci_scan_root_bus() and do it after any resource assignment in the callers. Note that ARM's pci_common_init_dev() already called pci_bus_add_devices() after pci_scan_root_bus(), so we only need to remove the first call: pci_common_init_dev pcibios_init_hw pci_scan_root_bus pci_bus_add_devices # first call pci_bus_assign_resources pci_bus_add_devices # second call [bhelgaas: changelog, drop "root_bus" var in alpha common_init_pci(), return failure earlier in mn10300, add "return" in x86 pcibios_scan_root(), return early if xtensa platform_pcibios_fixup() fails] Signed-off-by: NYijing Wang <wangyijing@huawei.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> CC: Richard Henderson <rth@twiddle.net> CC: Ivan Kokshaysky <ink@jurassic.park.msu.ru> CC: Matt Turner <mattst88@gmail.com> CC: David Howells <dhowells@redhat.com> CC: Tony Luck <tony.luck@intel.com> CC: Michal Simek <monstr@monstr.eu> CC: Ralf Baechle <ralf@linux-mips.org> CC: Koichi Yasutake <yasutake.koichi@jp.panasonic.com> CC: Sebastian Ott <sebott@linux.vnet.ibm.com> CC: "David S. Miller" <davem@davemloft.net> CC: Chris Metcalf <cmetcalf@ezchip.com> CC: Chris Zankel <chris@zankel.net> CC: Max Filippov <jcmvbkbc@gmail.com> CC: Thomas Gleixner <tglx@linutronix.de>
-
- 07 3月, 2015 1 次提交
-
-
由 Matwey V. Kornilov 提交于
Struct spear13xx_pcie_driver was in initdata, but we passed a pointer to it to platform_driver_register(), which can use the pointer at arbitrary times in the future, even after the initdata is freed. That leads to crashes. Move spear13xx_pcie_driver and things referenced by it (spear13xx_pcie_probe() and dw_pcie_host_init()) out of initdata. [bhelgaas: changelog] Fixes: 6675ef21 ("PCI: spear: Fix Section mismatch compilation warning for probe()") Signed-off-by: NMatwey V. Kornilov <matwey@sai.msu.ru> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NViresh Kumar <viresh.kumar@linaro.org> CC: stable@vger.kernel.org # v3.17+
-
- 06 3月, 2015 1 次提交
-
-
由 Feng Kan 提交于
In xgene_pcie_map_bus(), we neglected to add in the register offset when calculating the config space address. This means all config accesses operated on the first four bytes of config space. Add the register offset to the config space base address. Also correct the xgene_pcie_map_bus() prototype to fix a compiler warning. [bhelgaas: changelog] Fixes: 350f8be5 ("PCI: xgene: Convert to use generic config accessors") Posting: http://lkml.kernel.org/r/1424214840-26498-1-git-send-email-fkan@apm.comSigned-off-by: NFeng Kan <fkan@apm.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NTanmay Inamdar <tinamdar@apm.com> Acked-by: NRob Herring <robh@kernel.org>
-
- 28 2月, 2015 1 次提交
-
-
由 Joachim Nilsson 提交于
In Linux 4.0-rc1 ARM Versatile PCI build fails to build due to what appears to be an API update. This patch is a very simple correction, merely posted as a heads-up to the maintainers. Hopefully a better fix can be forwarded to Linus. [ arnd: the patch actually looks correct, so let's take this version ] Signed-off-by: NJoachim Nilsson <troglobit@gmail.com> Signed-off-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Acked-by: NBjorn Helgaas <bhelgaas@google.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 24 2月, 2015 4 次提交
-
-
由 Nobuhiro Iwamatsu 提交于
The lower 16 bits of the address, which is managed by mem_res, need to be zero. Check the address to verify this. Signed-off-by: NNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NSimon Horman <horms+renesas@verge.net.au>
-
由 Nobuhiro Iwamatsu 提交于
PCIEPARL and PCIEPARH are macros that calculate register addresses. However, the register names are incorrect. Change them to PCIEPALR and PCIEPAUR. Signed-off-by: NNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NPhil Edworthy <phil.edworthy@renesas.com> Acked-by: NSimon Horman <horms+renesas@verge.net.au>
-
由 Nobuhiro Iwamatsu 提交于
The lower 7 bits of PCIEPARL are reserved. When we write to this register, these bits must be 0. Signed-off-by: NNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NPhil Edworthy <phil.edworthy@renesas.com> Acked-by: NSimon Horman <horms+renesas@verge.net.au>
-
由 Nobuhiro Iwamatsu 提交于
The MSI enable is bit 31, not bit 28. Set the correct bit to initialize MSI. Per Phil, "this is odd as MSI works before and after your patch. Since bit 31 just represents the value of MSICAP0[16].MSIE, I think this may just be used for endpoints. However, you are correct that the bit used was wrong." Signed-off-by: NNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NPhil Edworthy <phil.edworthy@renesas.com> Acked-by: NSimon Horman <horms+renesas@verge.net.au>
-
- 05 2月, 2015 1 次提交
-
-
由 Jiang Liu 提交于
Use common resource list management data structure and interfaces instead of private implementation. Signed-off-by: NJiang Liu <jiang.liu@linux.intel.com> Acked-by: NWill Deacon <will.deacon@arm.com> Acked-by: NBjorn Helgaas <bhelgaas@google.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 03 2月, 2015 1 次提交
-
-
由 Michael Turquette 提交于
The X-Gene PCIe driver consumes clocks and does not provide them. Replace usage of clk-private.h with clk.h. Cc: Tanmay Inamdar <tinamdar@apm.com> Signed-off-by: NMichael Turquette <mturquette@linaro.org>
-
- 31 1月, 2015 5 次提交
-
-
由 Rob Herring 提交于
Convert the Xilinx host PCI driver to use the generic config access functions. Signed-off-by: NRob Herring <robh@kernel.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> CC: Michal Simek <michal.simek@xilinx.com> CC: "Sören Brinkmann" <soren.brinkmann@xilinx.com> CC: linux-arm-kernel@lists.infradead.org
-
由 Rob Herring 提交于
Convert the xgene host PCI driver to use the generic config access functions. Signed-off-by: NRob Herring <robh@kernel.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> CC: Tanmay Inamdar <tinamdar@apm.com> CC: linux-arm-kernel@lists.infradead.org
-
由 Rob Herring 提交于
Convert the Tegra host PCI driver to use the generic config access functions. Tested-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NRob Herring <robh@kernel.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NThierry Reding <treding@nvidia.com> CC: Stephen Warren <swarren@wwwdotorg.org> CC: Alexandre Courbot <gnurou@gmail.com> CC: linux-tegra@vger.kernel.org
-
由 Rob Herring 提交于
Convert the rcar-gen2 host PCI driver to use the generic config access functions. This changes the I/O accessors from io(read|write)X to readX/writeX variants which are equivalent on ARM. Signed-off-by: NRob Herring <robh@kernel.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NGeert Uytterhoeven <geert+renesas@glider.be> CC: Simon Horman <horms@verge.net.au> CC: linux-sh@vger.kernel.org
-
由 Rob Herring 提交于
Convert the generic host PCI driver to use the generic config access functions. Signed-off-by: NRob Herring <robh@kernel.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NWill Deacon <will.deacon@arm.com> CC: linux-arm-kernel@lists.infradead.org
-
- 29 1月, 2015 1 次提交
-
-
由 Rob Herring 提交于
This converts the Versatile PCI host code to a platform driver using the commom DT parsing and setup. The driver uses only an empty ARM pci_sys_data struct and does not use pci_common_init_dev init function. The old host code will be removed in a subsequent commit when Versatile is completely converted to DT. I've tested this on QEMU with the sym53c8xx driver in both i/o and memory mapped modes. Signed-off-by: NRob Herring <robh@kernel.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> CC: Russell King <linux@arm.linux.org.uk> CC: Peter Maydell <peter.maydell@linaro.org>
-
- 28 1月, 2015 1 次提交
-
-
由 Lucas Stach 提交于
The DesignWare PCIe MSI hardware does not support MSI-X IRQs. Setting those up failed as a side effect of a bug which was fixed by 91f8ae82 ("PCI: designware: Setup and clear exactly one MSI at a time"). Now that this bug is fixed, MSI-X IRQs need to be rejected explicitly; otherwise devices trying to use them may end up with incorrectly working interrupts. Fixes: 91f8ae82 ("PCI: designware: Setup and clear exactly one MSI at a time") Signed-off-by: NLucas Stach <l.stach@pengutronix.de> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NJingoo Han <jg1.han@samsung.com> CC: stable@vger.kernel.org # v3.18+
-
- 24 1月, 2015 2 次提交
-
-
由 Stephen Boyd 提交于
This driver should be including clk.h as it's a clock consumer, not a clock provider that needs to register clocks early. Signed-off-by: NStephen Boyd <sboyd@codeaurora.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NTanmay Inamdar <tinamdar@apm.com>
-
由 Arnd Bergmann 提交于
The xilinx PCIe driver prints a register value whose type is propagated to the type returned by the GENMASK() macro. Unfortunately, that type has recently changed as the result of a bug fix, so now we get a warning about the type: drivers/pci/host/pcie-xilinx.c: In function 'xilinx_pcie_clear_err_interrupts': drivers/pci/host/pcie-xilinx.c:154:3: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Wformat=] Change the code so we always print the number as an 'unsigned long' type to avoid the warning. The original code was fine on 32-bit architectures but not on 64-bit. Now it works as expected on both. Fixes: 00b4d9a1 ("bitops: Fix shift overflow in GENMASK macros") Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NMaxime Coquelin <maxime.coquelin@st.com>
-
- 10 1月, 2015 1 次提交
-
-
由 Julia Lawall 提交于
Replace a misspelled function name by %s and then __func__. The function name contains pcie, not pci as in the string. This was done using Coccinelle, including the use of Levenshtein distance, as proposed by Rasmus Villemoes. Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NMurali Karicheri <m-karicheri2@ti.com>
-
- 28 12月, 2014 1 次提交
-
-
由 Lorenzo Pieralisi 提交于
Most if not all ARM PCI host controller device drivers either ignore the domain field in the pci_sys_data structure or just increment it every time a host controller is probed, using it as a domain counter. Therefore, instead of relying on pci_sys_data to stash the domain number in a standard location, ARM pcibios code can be moved to the newly introduced generic PCI domains code, implemented in commits: 41e5c0f8 ("of/pci: Add pci_get_new_domain_nr() and of_get_pci_domain_nr()") 670ba0c8 ("PCI: Add generic domain handling") ARM code is made to select PCI_DOMAINS_GENERIC by default, which builds core PCI code that assigns the domain number through the generic function: void pci_bus_assign_domain_nr(...) that relies on a DT property to define the domain number or falls back to a counter according to a predefined logic; its usage replaces the current domain assignment code in PCI host controllers present in the kernel. Tested-by: NLucas Stach <l.stach@pengutronix.de> Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NYijing Wang <wangyijing@huawei.com> Reviewed-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> # mvebu Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk> Acked-by: NLucas Stach <l.stach@pengutronix.de> Acked-by: NJingoo Han <jg1.han@samsung.com> Acked-by: NPhil Edworthy <phil.edworthy@renesas.com> Acked-by: NArnd Bergmann <arnd@arndb.de> CC: Mohit Kumar <mohit.kumar@st.com>
-
- 27 12月, 2014 5 次提交
-
-
由 Lucas Stach 提交于
The bridge setup is already done by generic code while scanning the buses. Do not duplicate (or potentially alter) this setup as a fixup. Tested-by: NAlexandre Courbot <acourbot@nvidia.com> Tested-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NLucas Stach <l.stach@pengutronix.de> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NThierry Reding <treding@nvidia.com> Acked-by: NThierry Reding <treding@nvidia.com>
-
由 Lucas Stach 提交于
The bridge setup is already done by generic code while scanning the buses. Do not duplicate (or potentially alter) this setup as a fixup. Tested-by: NAlexandre Courbot <acourbot@nvidia.com> Reviewed-by: NThierry Reding <treding@nvidia.com> Tested-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NLucas Stach <l.stach@pengutronix.de> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NThierry Reding <treding@nvidia.com>
-
由 Julia Lawall 提交于
No need to set .owner here. The core will do it. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Dmitry Torokhov 提交于
Return value of irq_of_parse_and_map() is unsigned int, with 0 indicating failure, so testing for negative result never works. Signed-off-by: NDmitry Torokhov <dtor@chromium.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NPhil Edworthy <phil.edworthy@renesas.com>
-
由 Dmitry Torokhov 提交于
Return value of irq_of_parse_and_map() is unsigned int, with 0 indicating failure, so testing for negative result never works. Signed-off-by: NDmitry Torokhov <dtor@chromium.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-By: NMurali Karicheri <m-karicheri2@ti.com>
-
- 02 12月, 2014 1 次提交
-
-
由 Thierry Reding 提交于
Commit 0b0b0893 ("of/pci: Fix the conversion of IO ranges into IO resources") changed how I/O resources are parsed from DT. Rather than containing the physical address of the I/O region, the addresses will now be in I/O address space. On Tegra the union of all ranges is used to expose a top-level memory- mapped resource for the PCI host bridge. This helps to make /proc/iomem more readable. Combining both of the above, the union would now include the I/O space region. This causes a regression on Tegra20, where the physical base address of the PCIe controller (and therefore of the union) is located at physical address 0x80000000. Since I/O space starts at 0, the union will now include all of system RAM which starts at 0x00000000. This commit fixes this by keeping two copies of the I/O range: one that represents the range in the CPU's physical address space, the other for the range in the I/O address space. This allows the translation setup within the driver to reuse the physical addresses. The code registering the I/O region with the PCI core uses both ranges to establish the mapping. Fixes: 0b0b0893 ("of/pci: Fix the conversion of IO ranges into IO resources") Reported-by: NMarc Zyngier <marc.zyngier@arm.com> Tested-by: NMarc Zyngier <marc.zyngier@arm.com> Suggested-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NArnd Bergmann <arnd@arndb.de>
-
- 23 11月, 2014 2 次提交
-
-
由 Thomas Gleixner 提交于
The PCI/MSI irq chip callbacks mask/unmask_msi_irq have been renamed to pci_msi_mask/unmask_irq to mark them PCI specific. Rename all usage sites. The conversion helper functions are kept around to avoid conflicts in next and will be removed after merging into mainline. Coccinelle assisted conversion. No functional change. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Chris Metcalf <cmetcalf@tilera.com> Cc: x86@kernel.org Cc: Jiang Liu <jiang.liu@linux.intel.com> Cc: Jason Cooper <jason@lakedaemon.net> Cc: Murali Karicheri <m-karicheri2@ti.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Mohit Kumar <mohit.kumar@st.com> Cc: Simon Horman <horms@verge.net.au> Cc: Michal Simek <michal.simek@xilinx.com> Cc: Yijing Wang <wangyijing@huawei.com>
-
由 Jiang Liu 提交于
Rename write_msi_msg() to pci_write_msi_msg() to mark it as PCI specific. Signed-off-by: NJiang Liu <jiang.liu@linux.intel.com> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Grant Likely <grant.likely@linaro.org> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: Yingjoe Chen <yingjoe.chen@mediatek.com> Cc: Yijing Wang <wangyijing@huawei.com> Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
-
- 22 11月, 2014 5 次提交
-
-
由 Yijing Wang 提交于
Save MSI controller in pci_sys_data instead of assigning MSI controller pointer to every PCI bus in .add_bus(). [bhelgaas: use xilinx_pcie_msi_chip, not xilinx_pcie_msi_controller] Signed-off-by: NYijing Wang <wangyijing@huawei.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Yijing Wang 提交于
Save MSI controller in pci_sys_data instead of assigning MSI controller pointer to every PCI bus in .add_bus(). Signed-off-by: NYijing Wang <wangyijing@huawei.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Yijing Wang 提交于
Save MSI controller in pci_sys_data instead of assigning MSI controller pointer to every PCI bus in .add_bus(). [bhelgaas: use struct rcar_msi.chip, not ctrl] Signed-off-by: NYijing Wang <wangyijing@huawei.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Yijing Wang 提交于
Save MSI controller in pci_sys_data instead of assigning MSI controller pointer to every PCI bus in .add_bus(). [bhelgaas: use dw_pcie_msi_chip, not dw_pcie_msi_controller] Signed-off-by: NYijing Wang <wangyijing@huawei.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Yijing Wang 提交于
Save MSI controller in pci_sys_data instead of assigning MSI controller pointer to every PCI bus in .add_bus(). [bhelgaas: use struct tegra_msi.chip, not ctrl] Signed-off-by: NYijing Wang <wangyijing@huawei.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-