mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: filipp.dunsky@gmail.com, Manivannan Sadhasivam <mani@kernel.org>,
	 Stephen Boyd <sboyd@kernel.org>, Vinod Koul <vkoul@kernel.org>
Cc: Jingoo Han <jingoohan1@gmail.com>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>,
	 Krzysztof Wilczynski <kwilczynski@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Brian Masney <bmasney+clk@redhat.com>,
	Jerome Brunet <jbrunet+clk@baylibre.com>,
	Neil Armstrong	 <neil.armstrong@linaro.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	 linux-clk@vger.kernel.org, linux-phy@lists.infradead.org,
	 devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 7/8] PCI: cs7542: Add CS7542 PCIe host support
Date: Tue, 24 Nov 2026 11:05:10 +0100	[thread overview]
Message-ID: <f5d30781ae9502cd76ee2b6757f96a0e5ffa8b71.camel@pengutronix.de> (raw)
In-Reply-To: <20261123-b4-cs7542-pcie-v2-7-f589a9cd0bef@gmail.com>

On Mo, 2026-11-23 at 23:32 +0300, Fil Dunsky via B4 Relay wrote:
> From: Fil Dunsky <filipp.dunsky@gmail.com>
> 
> 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@gmail.com>
> ---
>  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@pengutronix.de/


regards
Philipp

  reply	other threads:[~2026-11-24 10:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23 20:32 [PATCH v2 0/8] soc: cortina: Add CS7542 PCIe control, SerDes and " Fil Dunsky via B4 Relay
2026-11-23 20:32 ` [PATCH v2 1/8] PCI: dwc: Export the multiplexed MSI interrupt handler Fil Dunsky via B4 Relay
2026-11-23 20:32 ` [PATCH v2 2/8] dt-bindings: soc: Describe CS7542 PCIe clocks and resets Fil Dunsky via B4 Relay
2026-11-23 20:32 ` [PATCH v2 3/8] clk: cs7542: Add PCIe gates and resets to the global provider Fil Dunsky via B4 Relay
2026-11-23 20:32 ` [PATCH v2 4/8] dt-bindings: phy: Describe CS7542 PCIe SerDes Fil Dunsky via B4 Relay
2026-11-23 20:32 ` [PATCH v2 5/8] phy: Add CS7542 PCIe SerDes support Fil Dunsky via B4 Relay
2026-11-23 20:32 ` [PATCH v2 6/8] dt-bindings: PCI: Describe the CS7542 host controller Fil Dunsky via B4 Relay
2026-11-23 20:32 ` [PATCH v2 7/8] PCI: cs7542: Add CS7542 PCIe host support Fil Dunsky via B4 Relay
2026-11-24 10:05   ` Philipp Zabel [this message]
2026-11-24 10:31     ` Fil Dunsky
2026-11-23 20:32 ` [PATCH v2 8/8] MAINTAINERS: Add CS7542 PCIe support Fil Dunsky via B4 Relay
2026-11-23 22:54 ` [PATCH v2 0/8] soc: cortina: Add CS7542 PCIe control, SerDes and host support Bjorn Helgaas
2026-11-23 23:15   ` Fil Dunsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f5d30781ae9502cd76ee2b6757f96a0e5ffa8b71.camel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=bhelgaas@google.com \
    --cc=bmasney+clk@redhat.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=filipp.dunsky@gmail.com \
    --cc=jbrunet+clk@baylibre.com \
    --cc=jingoohan1@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=kwilczynski@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®