Re: [PATCH v2 7/8] PCI: cs7542: Add CS7542 PCIe host support
From: Philipp Zabel
Date: Tue Nov 24 2026 - 05:05:23 EST
On Mo, 2026-11-23 at 23:32 +0300, Fil Dunsky via B4 Relay wrote:
> From: Fil Dunsky <filipp.dunsky@xxxxxxxxx>
>
> Add DesignWare host glue consuming separate clock, reset and PHY
> providers. Use live link status and stop previous training before
> enumeration. Finish endpoint teardown before draining the shared IRQ and
> freeing MSI domains. Dispatch enabled INTx/MSI sources through one
> application interrupt and use its MSI target window.
>
> Prevent root configuration accesses at and above 0x200, including direct
> DesignWare DBI reads, while preserving the private CSR bank and separate
> iATU callback base. Unwind power and IRQ domains on failure and removal.
>
> Read live link/LTSSM state through the application wrapper. After link
> loss, block configuration and DBI accesses until controller reset and
> reprobe.
>
> Signed-off-by: Fil Dunsky <filipp.dunsky@xxxxxxxxx>
> ---
> drivers/pci/controller/dwc/Kconfig | 12 +
> drivers/pci/controller/dwc/Makefile | 2 +
> drivers/pci/controller/dwc/pcie-cs7542.c | 551 +++++++++++++++++++++++++++++++
> 3 files changed, 565 insertions(+)
>
> diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig
> index 0a0d56fcf..2ebaa8db1 100644
> --- a/drivers/pci/controller/dwc/Kconfig
> +++ b/drivers/pci/controller/dwc/Kconfig
> @@ -577,4 +577,16 @@ config PCIE_ULTRARISC
> By default, this symbol is enabled when ARCH_ULTRARISC is active,
> requiring no further configuration on that platform.
>
> +config PCIE_CS7542
> + tristate "Cortina Systems CS7542 PCIe controller"
> + depends on OF && HAS_IOMEM && PCI_MSI && COMMON_CLK
> + select PCIE_DW_HOST
> + select GENERIC_PHY
> + select RESET_CONTROLLER
Drop RESET_CONTROLLER, this is not a reset controller driver.
The consumer API has stubs.
[...]
> diff --git a/drivers/pci/controller/dwc/pcie-cs7542.c b/drivers/pci/controller/dwc/pcie-cs7542.c
> new file mode 100644
> index 000000000..5487e667d
> --- /dev/null
> +++ b/drivers/pci/controller/dwc/pcie-cs7542.c
> @@ -0,0 +1,551 @@
[...]
> +static int cortina_pcie_probe(struct platform_device *pdev)
> +{
[...]
> + cp->reset = devm_reset_control_get_exclusive(dev, NULL);
> + if (IS_ERR(cp->reset))
> + return dev_err_probe(dev, PTR_ERR(cp->reset), "controller reset\n");
[...]
> + ret = reset_control_reset(cp->reset);
Please use assert/deassert, this is not a self-clearing reset.
See my comments on the reset controller driver.
Would a convenience function like [1] be helpful?
[1] https://lore.kernel.org/all/20261112-reset-control-pulse-v1-1-25cea105883e@xxxxxxxxxxxxxx/
regards
Philipp