1. 23 11月, 2022 1 次提交
    • S
      PCI: dwc: Introduce dma-ranges property support for RC-host · 8522e17d
      Serge Semin 提交于
      In accordance with the generic PCIe Root Port DT-bindings the "dma-ranges"
      property has the same format as the "ranges" property. The only difference
      is in their semantics. The "dma-ranges" property describes the PCIe-to-CPU
      memory mapping in opposite to the CPU-to-PCIe mapping of the "ranges"
      property. Even though the DW PCIe controllers are normally equipped with
      the internal Address Translation Unit which inbound and outbound tables
      can be used to implement both properties semantics, it was surprising for
      me to discover that the host-related part of the DW PCIe driver currently
      supports the "ranges" property only while the "dma-ranges" windows are
      just ignored. Having the "dma-ranges" supported in the driver would be
      very handy for the platforms, that don't tolerate the 1:1 CPU-PCIe memory
      mapping and require a customized PCIe memory layout. So let's fix that by
      introducing the "dma-ranges" property support.
      
      First of all we suggest to rename the dw_pcie_prog_inbound_atu() method to
      dw_pcie_prog_ep_inbound_atu() and create a new version of the
      dw_pcie_prog_inbound_atu() function. Thus we'll have two methods for the
      RC and EP controllers respectively in the same way as it has been
      developed for the outbound ATU setup methods.
      
      Secondly aside with the memory window index and type the new
      dw_pcie_prog_inbound_atu() function will accept CPU address, PCIe address
      and size as its arguments. These parameters define the PCIe and CPU memory
      ranges which will be used to setup the respective inbound ATU mapping. The
      passed parameters need to be verified against the ATU ranges constraints
      in the same way as it is done for the outbound ranges.
      
      Finally the DMA-ranges detected for the PCIe controller need to be
      converted to the inbound ATU entries during the host controller
      initialization procedure. It will be done in the framework of the
      dw_pcie_iatu_setup() method. Note before setting the inbound ranges up we
      need to disable all the inbound ATU entries in order to prevent unexpected
      PCIe TLPs translations defined by some third party software like
      bootloaders.
      
      Link: https://lore.kernel.org/r/20221113191301.5526-16-Sergey.Semin@baikalelectronics.ruSigned-off-by: NSerge Semin <Sergey.Semin@baikalelectronics.ru>
      Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org>
      Reviewed-by: NRob Herring <robh@kernel.org>
      Reviewed-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
      8522e17d
  2. 10 11月, 2022 1 次提交
  3. 27 10月, 2022 1 次提交
  4. 02 8月, 2022 9 次提交
  5. 06 7月, 2022 8 次提交
  6. 02 12月, 2021 1 次提交
  7. 30 9月, 2021 1 次提交
  8. 30 4月, 2021 1 次提交
  9. 25 2月, 2021 4 次提交
  10. 19 11月, 2020 2 次提交
  11. 13 10月, 2020 1 次提交
  12. 28 9月, 2020 1 次提交
  13. 21 9月, 2020 1 次提交
  14. 10 9月, 2020 3 次提交
    • R
      PCI: dwc: Move N_FTS setup to common setup · aeaa0bfe
      Rob Herring 提交于
      The Designware controller has common registers to set number of fast
      training sequence ordered sets. The Artpec6, Intel, and Tegra driver
      initialize these register fields. Let's move the initialization to the
      common setup code and drivers just have to provide the value.
      
      There's a slight change in that the common clock mode N_FTS field is
      now initialized. Previously only the Intel driver set this. It's not
      clear from the code if common clock mode is used in the Artpec6 or Tegra
      driver. It depends on the DWC configuration. Given the field is not
      initialized while the others are, it seems unlikely common clock mode
      is used.
      
      Link: https://lore.kernel.org/r/20200821035420.380495-40-robh@kernel.orgSigned-off-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.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: Thierry Reding <thierry.reding@gmail.com>
      Cc: Jonathan Hunter <jonathanh@nvidia.com>
      Cc: linux-tegra@vger.kernel.org
      aeaa0bfe
    • R
      PCI: dwc: Set PORT_LINK_DLL_LINK_EN in common setup code · 441e48fd
      Rob Herring 提交于
      The Intel driver is the only one to set PORT_LINK_DLL_LINK_EN. The
      default value is set and it seems pretty certain that enabling link
      initialization is always required. Maybe it could just be dropped from
      the Intel driver, but lets move setting it into the common code to be
      sure.
      
      Link: https://lore.kernel.org/r/20200821035420.380495-36-robh@kernel.orgSigned-off-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Dilip Kota <eswara.kota@linux.intel.com>
      Cc: Jingoo Han <jingoohan1@gmail.com>
      Cc: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      441e48fd
    • R
      PCI: dwc: Centralize link gen setting · 39bc5006
      Rob Herring 提交于
      keystone would force gen2 if no DT property. Now it relies on the
      PCI_EXP_LNKCAP value.
      
      Link: https://lore.kernel.org/r/20200821035420.380495-35-robh@kernel.orgSigned-off-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Kishon Vijay Abraham I <kishon@ti.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      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: Jingoo Han <jingoohan1@gmail.com>
      Cc: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
      Cc: Stanimir Varbanov <svarbanov@mm-sol.com>
      Cc: Andy Gross <agross@kernel.org>
      Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
      Cc: Pratyush Anand <pratyush.anand@gmail.com>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Jonathan Hunter <jonathanh@nvidia.com>
      Cc: linux-omap@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-arm-msm@vger.kernel.org
      Cc: linux-tegra@vger.kernel.org
      39bc5006
  15. 08 9月, 2020 4 次提交
  16. 01 7月, 2020 1 次提交