From: Frank Li <Frank.li@nxp.com>
To: zhangsenchuan@eswincomputing.com
Cc: bhelgaas@google.com, mani@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, lpieralisi@kernel.org,
kwilczynski@kernel.org, robh@kernel.org, p.zabel@pengutronix.de,
jingoohan1@gmail.com, gustavo.pimentel@synopsys.com,
linux-pci@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, christian.bruel@foss.st.com,
mayank.rana@oss.qualcomm.com, shradha.t@samsung.com,
krishna.chundru@oss.qualcomm.com, thippeswamy.havalige@amd.com,
inochiama@gmail.com, ningyu@eswincomputing.com,
linmin@eswincomputing.com, pinkesh.vaghela@einfochips.com,
ouyanghui@eswincomputing.com
Subject: Re: [PATCH v5 2/2] PCI: eic7700: Add Eswin PCIe host controller driver
Date: Mon, 10 Nov 2025 14:46:30 -0500 [thread overview]
Message-ID: <aRJBFoRC5rm+5rHa@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20251110090953.1429-1-zhangsenchuan@eswincomputing.com>
On Mon, Nov 10, 2025 at 05:09:53PM +0800, zhangsenchuan@eswincomputing.com wrote:
> From: Senchuan Zhang <zhangsenchuan@eswincomputing.com>
>
> Add driver for the Eswin EIC7700 PCIe host controller, which is based on
> the DesignWare PCIe core, IP revision 6.00a. The PCIe Gen.3 controller
> supports a data rate of 8 GT/s and 4 channels, support INTx and MSI
> interrupts.
>
> Signed-off-by: Yu Ning <ningyu@eswincomputing.com>
> Signed-off-by: Yanghui Ou <ouyanghui@eswincomputing.com>
> Signed-off-by: Senchuan Zhang <zhangsenchuan@eswincomputing.com>
> ---
> drivers/pci/controller/dwc/Kconfig | 11 +
> drivers/pci/controller/dwc/Makefile | 1 +
> drivers/pci/controller/dwc/pcie-eic7700.c | 420 ++++++++++++++++++++++
> 3 files changed, 432 insertions(+)
> create mode 100644 drivers/pci/controller/dwc/pcie-eic7700.c
>
> diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig
> index 349d4657393c..66568efb324f 100644
> --- a/drivers/pci/controller/dwc/Kconfig
> +++ b/drivers/pci/controller/dwc/Kconfig
> @@ -93,6 +93,17 @@ config PCIE_BT1
> Enables support for the PCIe controller in the Baikal-T1 SoC to work
> in host mode. It's based on the Synopsys DWC PCIe v4.60a IP-core.
>
...
> +
> +static void eic7700_pcie_pme_turn_off(struct dw_pcie_rp *pp)
> +{
> + struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
> +
> + /*
> + * Hardware doesn't support enter the D3code and L2/L3 states, send
> + * PME_Turn_Off message, which will then cause Vmain to be removed and
> + * controller stop working.
> + */
> + dev_info(pci->dev, "Can't send PME_Turn_Off message\n");
> +}
Define a quirk to let dw_pcie_suspend_noirq() skip call pme_turn_off()
instead do nothing here. So other driver can reuse this quirk if meet the
similar situation.
And use quirk to know hardware limistion easily.
Do you know why controller stop working if vmain be removed. Suppose resume
will reinit host controller at resume.
Frank
> +
> +static const struct dw_pcie_host_ops eic7700_pcie_host_ops = {
> + .init = eic7700_pcie_host_init,
> + .deinit = eic7700_pcie_host_deinit,
> + .pme_turn_off = eic7700_pcie_pme_turn_off,
> +};
> +
...
> 2.25.1
>
next prev parent reply other threads:[~2025-11-10 19:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-10 9:07 [PATCH v5 0/2] Add driver support for Eswin EIC7700 SoC PCIe controller zhangsenchuan
2025-11-10 9:08 ` [PATCH v5 1/2] dt-bindings: PCI: eic7700: Add Eswin PCIe host controller zhangsenchuan
2025-11-12 13:28 ` Rob Herring (Arm)
2025-11-10 9:09 ` [PATCH v5 2/2] PCI: eic7700: Add Eswin PCIe host controller driver zhangsenchuan
2025-11-10 19:46 ` Frank Li [this message]
2025-11-11 3:49 ` zhangsenchuan
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=aRJBFoRC5rm+5rHa@lizhi-Precision-Tower-5810 \
--to=frank.li@nxp.com \
--cc=bhelgaas@google.com \
--cc=christian.bruel@foss.st.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gustavo.pimentel@synopsys.com \
--cc=inochiama@gmail.com \
--cc=jingoohan1@gmail.com \
--cc=krishna.chundru@oss.qualcomm.com \
--cc=krzk+dt@kernel.org \
--cc=kwilczynski@kernel.org \
--cc=linmin@eswincomputing.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=mayank.rana@oss.qualcomm.com \
--cc=ningyu@eswincomputing.com \
--cc=ouyanghui@eswincomputing.com \
--cc=p.zabel@pengutronix.de \
--cc=pinkesh.vaghela@einfochips.com \
--cc=robh@kernel.org \
--cc=shradha.t@samsung.com \
--cc=thippeswamy.havalige@amd.com \
--cc=zhangsenchuan@eswincomputing.com \
/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