From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Mayank Rana <quic_mrana@quicinc.com>
Cc: jingoohan1@gmail.com, will@kernel.org, lpieralisi@kernel.org,
kw@linux.com, robh@kernel.org, bhelgaas@google.com,
krzk@kernel.org, linux-pci@vger.kernel.org,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
quic_krichai@quicinc.com
Subject: Re: [PATCH v3 4/4] PCI: qcom: Add Qualcomm SA8255p based PCIe root complex functionality
Date: Tue, 19 Nov 2024 22:44:10 +0530 [thread overview]
Message-ID: <20241119171410.fdbjseaplah35n62@thinkpad> (raw)
In-Reply-To: <f039e0ca-7c80-4495-bc67-ddca62774447@quicinc.com>
On Fri, Nov 15, 2024 at 10:28:23AM -0800, Mayank Rana wrote:
>
>
> On 11/15/2024 3:25 AM, Manivannan Sadhasivam wrote:
> > On Wed, Nov 06, 2024 at 02:13:41PM -0800, Mayank Rana wrote:
> > > On SA8255p ride platform, PCIe root complex is firmware managed as well
> > > configured into ECAM compliant mode. This change adds functionality to
> > > enable resource management (system resource as well PCIe controller and
> > > PHY configuration) through firmware, and enumerating ECAM compliant root
> > > complex.
> > >
> > > Signed-off-by: Mayank Rana <quic_mrana@quicinc.com>
> > > ---
> > > drivers/pci/controller/dwc/Kconfig | 1 +
> > > drivers/pci/controller/dwc/pcie-qcom.c | 116 +++++++++++++++++++++++--
> > > 2 files changed, 108 insertions(+), 9 deletions(-)
> > >
> > > diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig
> > > index b6d6778b0698..0fe76bd39d69 100644
> > > --- a/drivers/pci/controller/dwc/Kconfig
> > > +++ b/drivers/pci/controller/dwc/Kconfig
> > > @@ -275,6 +275,7 @@ config PCIE_QCOM
> > > select PCIE_DW_HOST
> > > select CRC8
> > > select PCIE_QCOM_COMMON
> > > + select PCI_HOST_COMMON
> > > help
> > > Say Y here to enable PCIe controller support on Qualcomm SoCs. The
> > > PCIe controller uses the DesignWare core plus Qualcomm-specific
> > > diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
> > > index ef44a82be058..2cb74f902baf 100644
> > > --- a/drivers/pci/controller/dwc/pcie-qcom.c
> > > +++ b/drivers/pci/controller/dwc/pcie-qcom.c
> > > @@ -21,7 +21,9 @@
> > > #include <linux/limits.h>
> > > #include <linux/init.h>
> > > #include <linux/of.h>
> > > +#include <linux/of_pci.h>
> > > #include <linux/pci.h>
> > > +#include <linux/pci-ecam.h>
> > > #include <linux/pm_opp.h>
> > > #include <linux/pm_runtime.h>
> > > #include <linux/platform_device.h>
> > > @@ -254,10 +256,12 @@ struct qcom_pcie_ops {
> > > * @ops: qcom PCIe ops structure
> > > * @override_no_snoop: Override NO_SNOOP attribute in TLP to enable cache
> > > * snooping
> > > + * @firmware_managed: Set if PCIe root complex is firmware managed
> >
> > ecam_compliant?
> I assume you mean to update as Set if ECAM compliant PCIe root complex is
> firmware manage
> > > */
> > > struct qcom_pcie_cfg {
> > > const struct qcom_pcie_ops *ops;
> > > bool override_no_snoop;
> > > + bool firmware_managed;
> > > bool no_l0s;
> > > };
> > > @@ -1415,6 +1419,10 @@ static const struct qcom_pcie_cfg cfg_sc8280xp = {
> > > .no_l0s = true,
> > > };
> > > +static const struct qcom_pcie_cfg cfg_fw_managed = {
> >
> > cfg_ecam?
> Putting more emphasize on fw_managed as don't want to conflict with new work
> in progress (krishna is working on it)
> to make Qualcomm PCIe root complex as ECAM compliant (non firmware managed
> one). are you OK with using cfg_ecam_fw_managed ?
>
Ah, I completely missed that. Ignore my comments about renaming to ecam.
> > > + .firmware_managed = true,
> > > +};
> > > +
[...]
> > > + /* Parse and map our Configuration Space windows */
> > > + cfg = gen_pci_init(dev, bridge, &pci_qcom_ecam_ops);
> > > + if (IS_ERR(cfg)) {
> > > + ret = PTR_ERR(cfg);
> > > + goto err_pm_runtime_put;
> > > + }
> > > +
> > > + bridge->sysdata = cfg;
> > > + bridge->ops = (struct pci_ops *)&pci_qcom_ecam_ops.pci_ops;
> > > + bridge->msi_domain = true;
> > > +
> > > + ret = pci_host_probe(bridge);
> >
> > return pci_host_probe()...
> need to perform pm_runtime_put_sync() and pm_runtime_disable() in failure
> case.
> Hence checking error here and doing goto err_pm_runtime_put
Right. This one I overlooked.
- Mani
--
மணிவண்ணன் சதாசிவம்
next prev parent reply other threads:[~2024-11-19 17:14 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-06 22:13 [PATCH v3 0/4] Add Qualcomm SA8255p based firmware managed PCIe root complex Mayank Rana
2024-11-06 22:13 ` [PATCH v3 1/4] PCI: dwc: Export dwc MSI controller related APIs Mayank Rana
2024-11-15 9:14 ` Manivannan Sadhasivam
2024-11-15 18:15 ` Mayank Rana
2024-11-06 22:13 ` [PATCH v3 2/4] PCI: host-generic: Export gen_pci_init() API to allow ECAM creation Mayank Rana
2024-11-15 9:17 ` Manivannan Sadhasivam
2024-11-15 18:16 ` Mayank Rana
2024-11-06 22:13 ` [PATCH v3 3/4] dt-bindings: PCI: qcom,pcie-sa8255p: Document ECAM compliant PCIe root complex Mayank Rana
2024-11-07 9:35 ` Krzysztof Kozlowski
2024-11-07 17:39 ` Mayank Rana
2024-11-15 10:55 ` Manivannan Sadhasivam
2024-11-06 22:13 ` [PATCH v3 4/4] PCI: qcom: Add Qualcomm SA8255p based PCIe root complex functionality Mayank Rana
2024-11-07 8:45 ` neil.armstrong
2024-11-07 17:45 ` Mayank Rana
2024-11-08 10:22 ` neil.armstrong
2024-11-15 11:21 ` Manivannan Sadhasivam
2024-11-15 18:17 ` Mayank Rana
2024-11-09 23:45 ` kernel test robot
2024-11-15 11:25 ` Manivannan Sadhasivam
2024-11-15 18:28 ` Mayank Rana
2024-11-19 17:14 ` Manivannan Sadhasivam [this message]
2024-11-15 11:28 ` [PATCH v3 0/4] Add Qualcomm SA8255p based firmware managed PCIe root complex Manivannan Sadhasivam
2024-11-15 18:31 ` Mayank Rana
2024-11-19 17:10 ` Manivannan Sadhasivam
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=20241119171410.fdbjseaplah35n62@thinkpad \
--to=manivannan.sadhasivam@linaro.org \
--cc=bhelgaas@google.com \
--cc=jingoohan1@gmail.com \
--cc=krzk@kernel.org \
--cc=kw@linux.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=quic_krichai@quicinc.com \
--cc=quic_mrana@quicinc.com \
--cc=robh@kernel.org \
--cc=will@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