1. 19 11月, 2020 4 次提交
    • R
      PCI: dwc: Remove unnecessary wrappers around dw_pcie_host_init() · 60f5b73f
      Rob Herring 提交于
      Many calls to dw_pcie_host_init() are in a wrapper function with
      nothing else now. Let's remove the pointless extra layer.
      
      Link: https://lore.kernel.org/r/20201105211159.1814485-14-robh@kernel.orgTested-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Richard Zhu <hongxing.zhu@nxp.com>
      Cc: Lucas Stach <l.stach@pengutronix.de>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
      Cc: Fabio Estevam <festevam@gmail.com>
      Cc: NXP Linux Team <linux-imx@nxp.com>
      Cc: Murali Karicheri <m-karicheri2@ti.com>
      Cc: Minghuan Lian <minghuan.Lian@nxp.com>
      Cc: Mingkai Hu <mingkai.hu@nxp.com>
      Cc: Roy Zang <roy.zang@nxp.com>
      Cc: Yue Wang <yue.wang@Amlogic.com>
      Cc: Kevin Hilman <khilman@baylibre.com>
      Cc: Neil Armstrong <narmstrong@baylibre.com>
      Cc: Jerome Brunet <jbrunet@baylibre.com>
      Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
      Cc: Jonathan Chocron <jonnyc@amazon.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: Xiaowei Song <songxiaowei@hisilicon.com>
      Cc: Binghui Wang <wangbinghui@hisilicon.com>
      Cc: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-amlogic@lists.infradead.org
      Cc: linux-arm-kernel@axis.com
      60f5b73f
    • R
      PCI: dwc: Move dw_pcie_setup_rc() to DWC common code · b9ac0f9d
      Rob Herring 提交于
      All RC complex drivers must call dw_pcie_setup_rc(). The ordering of the
      call shouldn't be too important other than being after any RC resets.
      
      There's a few calls of dw_pcie_setup_rc() left as drivers implementing
      suspend/resume need it.
      
      Link: https://lore.kernel.org/r/20201105211159.1814485-13-robh@kernel.orgTested-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Acked-by: NJingoo Han <jingoohan1@gmail.com>
      Cc: Kishon Vijay Abraham I <kishon@ti.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Kukjin Kim <kgene@kernel.org>
      Cc: Krzysztof Kozlowski <krzk@kernel.org>
      Cc: Richard Zhu <hongxing.zhu@nxp.com>
      Cc: Lucas Stach <l.stach@pengutronix.de>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
      Cc: Fabio Estevam <festevam@gmail.com>
      Cc: NXP Linux Team <linux-imx@nxp.com>
      Cc: Murali Karicheri <m-karicheri2@ti.com>
      Cc: Minghuan Lian <minghuan.Lian@nxp.com>
      Cc: Mingkai Hu <mingkai.hu@nxp.com>
      Cc: Roy Zang <roy.zang@nxp.com>
      Cc: Yue Wang <yue.wang@Amlogic.com>
      Cc: Kevin Hilman <khilman@baylibre.com>
      Cc: Neil Armstrong <narmstrong@baylibre.com>
      Cc: Jerome Brunet <jbrunet@baylibre.com>
      Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
      Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
      Cc: Xiaowei Song <songxiaowei@hisilicon.com>
      Cc: Binghui Wang <wangbinghui@hisilicon.com>
      Cc: Andy Gross <agross@kernel.org>
      Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
      Cc: Stanimir Varbanov <svarbanov@mm-sol.com>
      Cc: Pratyush Anand <pratyush.anand@gmail.com>
      Cc: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: linux-omap@vger.kernel.org
      Cc: linux-samsung-soc@vger.kernel.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-amlogic@lists.infradead.org
      Cc: linux-arm-kernel@axis.com
      Cc: linux-arm-msm@vger.kernel.org
      b9ac0f9d
    • R
      PCI: dwc: Rework MSI initialization · f78f0263
      Rob Herring 提交于
      There are 3 possible MSI implementations for the DWC host. The first is
      using the built-in DWC MSI controller. The 2nd is a custom MSI
      controller as part of the PCI host (keystone only). The 3rd is an
      external MSI controller (typically GICv3 ITS). Currently, the last 2
      are distinguished with a .msi_host_init() hook with the 3rd option using
      an empty function. However we can detect the 3rd case with the presence
      of 'msi-parent' or 'msi-map' properties, so let's do that instead and
      remove the empty functions.
      
      Link: https://lore.kernel.org/r/20201105211159.1814485-10-robh@kernel.orgTested-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Acked-by: NJingoo Han <jingoohan1@gmail.com>
      Cc: Murali Karicheri <m-karicheri2@ti.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Minghuan Lian <minghuan.Lian@nxp.com>
      Cc: Mingkai Hu <mingkai.hu@nxp.com>
      Cc: Roy Zang <roy.zang@nxp.com>
      Cc: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      f78f0263
    • R
      PCI: dwc: Ensure all outbound ATU windows are reset · 458ad06c
      Rob Herring 提交于
      The Layerscape driver clears the ATU registers which may have been
      configured by the bootloader. Any driver could have the same issue
      and doing it for all drivers doesn't hurt, so let's move it into the
      common DWC code.
      
      Link: https://lore.kernel.org/r/20201105211159.1814485-6-robh@kernel.orgTested-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Acked-by: NJingoo Han <jingoohan1@gmail.com>
      Cc: Minghuan Lian <minghuan.Lian@nxp.com>
      Cc: Mingkai Hu <mingkai.hu@nxp.com>
      Cc: Roy Zang <roy.zang@nxp.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Jingoo Han <jingoohan1@gmail.com>
      Cc: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      458ad06c
  2. 08 11月, 2019 1 次提交
  3. 01 4月, 2019 1 次提交
    • W
      PCI: dwc: layerscape: Fix a leaked reference by adding missing of_node_put() · b35c0e45
      Wen Yang 提交于
      The call to of_parse_phandle() returns a node pointer with refcount
      incremented thus it must be explicitly decremented after the last
      usage.
      
      Detected by coccinelle with the following warnings:
        ./drivers/pci/controller/dwc/pci-layerscape.c:204:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 198, but without a corresponding object release within this function.
      Signed-off-by: NWen Yang <wen.yang99@zte.com.cn>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Minghuan Lian <minghuan.Lian@nxp.com>
      Cc: Mingkai Hu <mingkai.hu@nxp.com>
      Cc: Roy Zang <roy.zang@nxp.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-pci@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      b35c0e45
  4. 18 12月, 2018 1 次提交
  5. 20 11月, 2018 1 次提交
  6. 08 6月, 2018 1 次提交
  7. 06 3月, 2018 1 次提交
  8. 29 1月, 2018 1 次提交
  9. 21 10月, 2017 1 次提交
  10. 13 10月, 2017 1 次提交
  11. 30 8月, 2017 10 次提交
  12. 04 8月, 2017 1 次提交
  13. 03 7月, 2017 1 次提交
  14. 28 4月, 2017 1 次提交
    • B
      PCI: Don't allow unbinding host controllers that aren't prepared · a5f40e80
      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>
      a5f40e80
  15. 25 4月, 2017 1 次提交
  16. 25 2月, 2017 1 次提交
    • G
      PCI: dwc: Fix crashes seen due to missing assignments · c0464062
      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>
      c0464062
  17. 22 2月, 2017 3 次提交
    • K
      PCI: dwc: all: Split struct pcie_port into host-only and core structures · 442ec4c0
      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>
      442ec4c0
    • K
      PCI: dwc: all: Use platform_set_drvdata() to save private data · 9bcf0a6f
      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>
      9bcf0a6f
    • K
      PCI: Move DesignWare IP support to new drivers/pci/dwc/ directory · 950bf638
      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>
      950bf638
  18. 01 2月, 2017 1 次提交
  19. 12 11月, 2016 2 次提交
  20. 17 10月, 2016 1 次提交
  21. 12 10月, 2016 5 次提交