linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/13] PCI: dwc: Various fixes and cleanups
@ 2022-05-17 12:50 Serge Semin
  2022-05-17 12:50 ` [PATCH v3 01/13] PCI: dwc: Stop link in the host init error and de-initialization Serge Semin
                   ` (12 more replies)
  0 siblings, 13 replies; 20+ messages in thread
From: Serge Semin @ 2022-05-17 12:50 UTC (permalink / raw)
  To: Jingoo Han, Gustavo Pimentel, Bjorn Helgaas, Lorenzo Pieralisi
  Cc: Serge Semin, Serge Semin, Manivannan Sadhasivam, Alexey Malahov,
	Pavel Parkhomenko, Rob Herring, Krzysztof Wilczyński,
	Frank Li, linux-pci, linux-kernel

This patchset is a second one in the series created in the framework of
my Baikal-T1 PCIe/eDMA-related work:

[1: In-progress v3] clk: Baikal-T1 DDR/PCIe resets and some xGMAC fixes
Link: https://lore.kernel.org/linux-pci/20220503205722.24755-1-Sergey.Semin@baikalelectronics.ru/
[2: In-progress v2] PCI: dwc: Various fixes and cleanups
Link: https://lore.kernel.org/linux-pci/20220324012524.16784-1-Sergey.Semin@baikalelectronics.ru/
[3: In-progress v1] PCI: dwc: Add dma-ranges/YAML-schema/Baikal-T1 support
Link: https://lore.kernel.org/linux-pci/20220324013734.18234-1-Sergey.Semin@baikalelectronics.ru/
[4: In-progress v1] dmaengine: dw-edma: Add RP/EP local DMA controllers support
Link: https://lore.kernel.org/linux-pci/20220324014836.19149-1-Sergey.Semin@baikalelectronics.ru/

Note it is very recommended to merge the patchsets in the same order as
they are placed in the list above in order to prevent possible merge
conflicts. Nothing prevents them from being reviewed synchronously though.
Any tests are very welcome!

As it can be easily inferred from the patchset title, this series is about
the DW PCIe Root Port/End-point driver fixes and the code cleanups, where
fixes come before the cleanup patches. The patchset starts with adding the
stop_link() platform-specific method invocation in case of the PCIe host
probe procedure errors. It has been missing in the cleanup-on-error path
of the DW PCIe Host initialization method. After that there is a patch
which fixes the host own cfg-space accessors for the case of the
platform-specific DBI implementation. Third the unrolled CSRs layout is
added to the iATU disable procedure. Fourth the disable iATU procedure is
fixed to be called only for the internal ATU as being specific for the
internal ATU implementation. Last but no least the outbound iATU extended
region setup procedure is fixed to have the INCREASE_REGION_SIZE flag set
based on the limit-address - not the region size one.

Afterwards there is a series of cleanups. It concerns the changes like
adding braces to the multi-line if-else constructions, trailing new-lines
to the print format-string, dropping unnecessary version checking, and
various code simplifications and optimizations.

New features like adding two-level DT bindings abstraction, adding better
structured IP-core version interface, adding iATU regions size detection
and the PCIe regions verification procedure, adding dma-ranges support,
introducing a set of generic platform clocks and resets and finally adding
Baikal-T1 PCIe interface support will be submitted in the next part of the
series.

Link: https://lore.kernel.org/linux-pci/20220324012524.16784-1-Sergey.Semin@baikalelectronics.ru/
Changelog v2:
- Fix the end address of the example in the patch log with
  the INCREASE_REGION_SIZE flag usage fixup. It should be
  0x1000FFFF and not 0x0000FFFF (@Manivannan).
- Add the cleanup-on-error path to the dw_pcie_ep_init() function.
  (@Manivannan)

Link: https://lore.kernel.org/linux-pci/20220503212300.30105-1-Sergey.Semin@baikalelectronics.ru/
Changelog v3:
- Convert region variable type to u32 in order to fix the implicit type
  conversion peculiarity. (@kbot)
- Rebase onto v5.18-rc6.

Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
Cc: Pavel Parkhomenko <Pavel.Parkhomenko@baikalelectronics.ru>
Cc: Rob Herring <robh@kernel.org>
Cc: "Krzysztof Wilczyński" <kw@linux.com>
Cc: Frank Li <Frank.Li@nxp.com>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: linux-pci@vger.kernel.org
Cc: linux-kernel@vger.kernel.org

Serge Semin (13):
  PCI: dwc: Stop link in the host init error and de-initialization
  PCI: dwc: Don't use generic IO-ops for DBI-space access
  PCI: dwc: Add unroll iATU space support to the regions disable method
  PCI: dwc: Disable outbound windows for controllers with iATU
  PCI: dwc: Set INCREASE_REGION_SIZE flag based on limit address
  PCI: dwc: Add braces to the multi-line if-else statements
  PCI: dwc: Add trailing new-line literals to the log messages
  PCI: dwc: Discard IP-core version checking on unrolled iATU detection
  PCI: dwc: Convert Link-up status method to using dw_pcie_readl_dbi()
  PCI: dwc: Deallocate EPC memory on EP init error
  PCI: dwc-plat: Simplify the probe method return value handling
  PCI: dwc-plat: Discard unused regmap pointer
  PCI: dwc-plat: Drop dw_plat_pcie_of_match forward declaration

 .../pci/controller/dwc/pcie-designware-ep.c   | 22 +++++--
 .../pci/controller/dwc/pcie-designware-host.c | 66 +++++++++++++++----
 .../pci/controller/dwc/pcie-designware-plat.c | 13 ++--
 drivers/pci/controller/dwc/pcie-designware.c  | 50 +++++++++-----
 4 files changed, 110 insertions(+), 41 deletions(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2022-05-31 18:47 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-17 12:50 [PATCH v3 00/13] PCI: dwc: Various fixes and cleanups Serge Semin
2022-05-17 12:50 ` [PATCH v3 01/13] PCI: dwc: Stop link in the host init error and de-initialization Serge Semin
2022-05-26 21:30   ` Rob Herring
2022-05-17 12:50 ` [PATCH v3 02/13] PCI: dwc: Don't use generic IO-ops for DBI-space access Serge Semin
2022-05-26 21:29   ` Rob Herring
2022-05-27 16:05     ` Serge Semin
2022-05-27 17:39       ` Serge Semin
2022-05-31 16:09         ` Rob Herring
2022-05-31 18:46           ` Serge Semin
2022-05-17 12:50 ` [PATCH v3 03/13] PCI: dwc: Add unroll iATU space support to the regions disable method Serge Semin
2022-05-17 12:50 ` [PATCH v3 04/13] PCI: dwc: Disable outbound windows for controllers with iATU Serge Semin
2022-05-17 12:50 ` [PATCH v3 05/13] PCI: dwc: Set INCREASE_REGION_SIZE flag based on limit address Serge Semin
2022-05-17 12:50 ` [PATCH v3 06/13] PCI: dwc: Add braces to the multi-line if-else statements Serge Semin
2022-05-17 12:50 ` [PATCH v3 07/13] PCI: dwc: Add trailing new-line literals to the log messages Serge Semin
2022-05-17 12:50 ` [PATCH v3 08/13] PCI: dwc: Discard IP-core version checking on unrolled iATU detection Serge Semin
2022-05-17 12:50 ` [PATCH v3 09/13] PCI: dwc: Convert Link-up status method to using dw_pcie_readl_dbi() Serge Semin
2022-05-17 12:50 ` [PATCH v3 10/13] PCI: dwc: Deallocate EPC memory on EP init error Serge Semin
2022-05-17 12:50 ` [PATCH v3 11/13] PCI: dwc-plat: Simplify the probe method return value handling Serge Semin
2022-05-17 12:50 ` [PATCH v3 12/13] PCI: dwc-plat: Discard unused regmap pointer Serge Semin
2022-05-17 12:50 ` [PATCH v3 13/13] PCI: dwc-plat: Drop dw_plat_pcie_of_match forward declaration Serge Semin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).