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. 14 11月, 2022 1 次提交
  3. 11 11月, 2022 1 次提交
  4. 10 11月, 2022 2 次提交
  5. 27 10月, 2022 2 次提交
  6. 06 10月, 2022 4 次提交
  7. 05 10月, 2022 3 次提交
  8. 03 10月, 2022 6 次提交
  9. 29 9月, 2022 2 次提交
  10. 30 8月, 2022 1 次提交
  11. 29 8月, 2022 1 次提交
  12. 23 8月, 2022 5 次提交
  13. 10 8月, 2022 1 次提交
  14. 02 8月, 2022 10 次提交