From: Krzysztof Kozlowski <krzk@kernel.org>
To: Sai Krishna Musham <sai.krishna.musham@amd.com>,
bhelgaas@google.com, lpieralisi@kernel.org, kw@linux.com,
manivannan.sadhasivam@linaro.org, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org, cassel@kernel.org
Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, michal.simek@amd.com,
bharat.kumar.gogada@amd.com, thippeswamy.havalige@amd.com
Subject: Re: [PATCH v4 2/2] PCI: xilinx-cpm: Add support for PCIe RP PERST# signal
Date: Tue, 18 Mar 2025 10:54:53 +0100 [thread overview]
Message-ID: <6cbec220-5ecc-4471-b819-031673d667df@kernel.org> (raw)
In-Reply-To: <20250318092648.2298280-3-sai.krishna.musham@amd.com>
On 18/03/2025 10:26, Sai Krishna Musham wrote:
> const struct xilinx_cpm_variant *variant = port->variant;
> + struct device *dev = port->dev;
> + struct gpio_desc *reset_gpio;
> +
> + /* Request the GPIO for PCIe reset signal */
> + reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
> + if (IS_ERR(reset_gpio)) {
> + dev_err(dev, "Failed to request reset GPIO\n");
Isn't this probe path? If not, then why? How are you going to handle
deferrer probe?
> + return;> + }
> +
> + /* Assert the reset signal */
> + gpiod_set_value(reset_gpio, 1);
It was already asserted.
>
> - if (variant->version == CPM5NC_HOST)
> + /* Assert the PCIe IP reset */
> + writel_relaxed(0x1, port->crx_base + variant->cpm_pcie_rst);
> +
> + /* Controller specific delay */
> + udelay(50);
> +
> + /* Deassert the PCIe IP reset */
> + writel_relaxed(0x0, port->crx_base + variant->cpm_pcie_rst);
> +
> + /* Deassert the reset signal */
> + gpiod_set_value(reset_gpio, 0);
> + mdelay(PCIE_T_RRS_READY_MS);
> +
> + if (variant->version == CPM5NC_HOST) {
> + /* Clear Firewall */
> + writel_relaxed(0x00, port->cpm5nc_base +
> + XILINX_CPM5NC_PCIE0_FW);
> + writel_relaxed(0x01, port->cpm5nc_base +
> + XILINX_CPM5NC_PCIE0_FW);
> + writel_relaxed(0x00, port->cpm5nc_base +
> + XILINX_CPM5NC_PCIE0_FW);
> return;
> + }
>
> if (cpm_pcie_link_up(port))
> dev_info(port->dev, "PCIe Link is UP\n");
> @@ -551,6 +598,19 @@ static int xilinx_cpm_pcie_parse_dt(struct xilinx_cpm_pcie *port,
> port->reg_base = port->cfg->win;
> }
>
> + port->crx_base = devm_platform_ioremap_resource_byname(pdev,
> + "cpm_crx");
And here is the actual ABI break.
> + if (IS_ERR(port->crx_base))
> + return PTR_ERR(port->crx_base);
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-03-18 9:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-18 9:26 [PATCH v4 0/2] Add support for PCIe RP PERST# Sai Krishna Musham
2025-03-18 9:26 ` [PATCH v4 1/2] dt-bindings: PCI: xilinx-cpm: Add reset-gpios " Sai Krishna Musham
2025-03-18 9:52 ` Krzysztof Kozlowski
2025-03-21 9:42 ` Musham, Sai Krishna
2025-03-24 7:19 ` Krzysztof Kozlowski
2025-03-26 2:23 ` Musham, Sai Krishna
2025-03-18 9:26 ` [PATCH v4 2/2] PCI: xilinx-cpm: Add support for PCIe RP PERST# signal Sai Krishna Musham
2025-03-18 9:54 ` Krzysztof Kozlowski [this message]
2025-03-21 12:52 ` Manivannan Sadhasivam
2025-03-24 9:29 ` Musham, Sai Krishna
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=6cbec220-5ecc-4471-b819-031673d667df@kernel.org \
--to=krzk@kernel.org \
--cc=bharat.kumar.gogada@amd.com \
--cc=bhelgaas@google.com \
--cc=cassel@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=michal.simek@amd.com \
--cc=robh@kernel.org \
--cc=sai.krishna.musham@amd.com \
--cc=thippeswamy.havalige@amd.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