From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Mrinmay Sarkar <quic_msarkar@quicinc.com>
Cc: vkoul@kernel.org, jingoohan1@gmail.com, conor+dt@kernel.org,
konrad.dybcio@linaro.org, robh+dt@kernel.org,
quic_shazhuss@quicinc.com, quic_nitegupt@quicinc.com,
quic_ramkri@quicinc.com, quic_nayiluri@quicinc.com,
dmitry.baryshkov@linaro.org, quic_krichai@quicinc.com,
quic_vbadigan@quicinc.com, quic_parass@quicinc.com,
quic_schintav@quicinc.com, quic_shijjose@quicinc.com,
"Gustavo Pimentel" <gustavo.pimentel@synopsys.com>,
"Serge Semin" <fancer.lancer@gmail.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Rob Herring" <robh@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Kishon Vijay Abraham I" <kishon@kernel.org>,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org,
mhi@lists.linux.dev
Subject: Re: [PATCH v1 5/6] PCI: qcom-ep: Provide number of read/write channel for HDMA
Date: Tue, 30 Jan 2024 14:23:01 +0530 [thread overview]
Message-ID: <20240130085301.GB83288@thinkpad> (raw)
In-Reply-To: <1705669223-5655-6-git-send-email-quic_msarkar@quicinc.com>
On Fri, Jan 19, 2024 at 06:30:21PM +0530, Mrinmay Sarkar wrote:
> There is no standard way to auto detect the number of available
> read/write channels in a platform. So adding this change to provide
> read/write channels count and also provide "EDMA_MF_HDMA_NATIVE"
> flag to support HDMA for 8775 platform.
>
> 8775 has IP version 1.34.0 so intruduce a new cfg(cfg_1_34_0) for
> this platform. Add struct qcom_pcie_ep_cfg as match data. Assign
> hdma_supported flag into struct qcom_pcie_ep_cfg and set it true
> in cfg_1_34_0.
>
> Signed-off-by: Mrinmay Sarkar <quic_msarkar@quicinc.com>
> ---
> drivers/pci/controller/dwc/pcie-qcom-ep.c | 19 ++++++++++++++++++-
> 1 file changed, 18 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pci/controller/dwc/pcie-qcom-ep.c b/drivers/pci/controller/dwc/pcie-qcom-ep.c
> index 45008e0..8d56435 100644
> --- a/drivers/pci/controller/dwc/pcie-qcom-ep.c
> +++ b/drivers/pci/controller/dwc/pcie-qcom-ep.c
> @@ -149,6 +149,10 @@ enum qcom_pcie_ep_link_status {
> QCOM_PCIE_EP_LINK_DOWN,
> };
>
Add kdoc comment please as like the below struct.
> +struct qcom_pcie_ep_cfg {
> + bool hdma_supported;
> +};
> +
> /**
> * struct qcom_pcie_ep - Qualcomm PCIe Endpoint Controller
> * @pci: Designware PCIe controller struct
> @@ -167,6 +171,7 @@ enum qcom_pcie_ep_link_status {
> * @num_clks: PCIe clocks count
> * @perst_en: Flag for PERST enable
> * @perst_sep_en: Flag for PERST separation enable
> + * @cfg: PCIe EP config struct
> * @link_status: PCIe Link status
> * @global_irq: Qualcomm PCIe specific Global IRQ
> * @perst_irq: PERST# IRQ
> @@ -194,6 +199,7 @@ struct qcom_pcie_ep {
> u32 perst_en;
> u32 perst_sep_en;
>
> + const struct qcom_pcie_ep_cfg *cfg;
> enum qcom_pcie_ep_link_status link_status;
> int global_irq;
> int perst_irq;
> @@ -511,6 +517,10 @@ static void qcom_pcie_perst_assert(struct dw_pcie *pci)
> pcie_ep->link_status = QCOM_PCIE_EP_LINK_DISABLED;
> }
>
> +static const struct qcom_pcie_ep_cfg cfg_1_34_0 = {
> + .hdma_supported = true,
> +};
> +
> /* Common DWC controller ops */
> static const struct dw_pcie_ops pci_ops = {
> .link_up = qcom_pcie_dw_link_up,
> @@ -816,6 +826,13 @@ static int qcom_pcie_ep_probe(struct platform_device *pdev)
> pcie_ep->pci.ops = &pci_ops;
> pcie_ep->pci.ep.ops = &pci_ep_ops;
> pcie_ep->pci.edma.nr_irqs = 1;
> +
> + pcie_ep->cfg = of_device_get_match_data(dev);
Why do you want to cache "cfg" since it is only used in probe()?
> + if (pcie_ep->cfg && pcie_ep->cfg->hdma_supported) {
> + pcie_ep->pci.edma.ll_wr_cnt = 1;
> + pcie_ep->pci.edma.ll_rd_cnt = 1;
Is the platform really has a single r/w channel?
- Mani
--
மணிவண்ணன் சதாசிவம்
next prev parent reply other threads:[~2024-01-30 8:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-19 13:00 [PATCH v1 0/6] Add Change to integrate HDMA with dwc ep driver Mrinmay Sarkar
2024-01-19 13:00 ` [PATCH v1 1/6] dmaengine: dw-edma: Pass 'struct dw_edma_chip' to irq_vector() Mrinmay Sarkar
2024-01-19 13:23 ` Dmitry Baryshkov
2024-02-02 10:50 ` Serge Semin
2024-01-19 13:00 ` [PATCH v1 2/6] dmaengine: dw-edma: Introduce helpers for getting the eDMA/HDMA max channel count Mrinmay Sarkar
2024-01-19 13:26 ` Dmitry Baryshkov
2024-01-30 8:48 ` Manivannan Sadhasivam
2024-02-02 10:51 ` Serge Semin
2024-01-19 13:00 ` [PATCH v1 3/6] PCI: dwc: Add HDMA support Mrinmay Sarkar
2024-02-02 21:40 ` Serge Semin
2024-02-07 17:06 ` Manivannan Sadhasivam
2024-02-09 17:10 ` Bjorn Helgaas
2024-02-11 19:37 ` Serge Semin
2024-02-13 7:53 ` Manivannan Sadhasivam
2024-01-19 13:00 ` [PATCH v1 4/6] dmaengine: dw-edma: Move HDMA_V0_MAX_NR_CH definition to edma.h Mrinmay Sarkar
2024-02-02 10:47 ` Serge Semin
2024-02-02 12:26 ` Manivannan Sadhasivam
2024-01-19 13:00 ` [PATCH v1 5/6] PCI: qcom-ep: Provide number of read/write channel for HDMA Mrinmay Sarkar
2024-01-30 8:53 ` Manivannan Sadhasivam [this message]
2024-01-30 13:18 ` Mrinmay Sarkar
2024-01-19 13:00 ` [PATCH v1 6/6] PCI: epf-mhi: Add flag to enable HDMA for SA8775P Mrinmay Sarkar
2024-01-30 8:53 ` Manivannan Sadhasivam
2024-01-30 10:00 ` [PATCH v1 0/6] Add Change to integrate HDMA with dwc ep driver Serge Semin
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=20240130085301.GB83288@thinkpad \
--to=manivannan.sadhasivam@linaro.org \
--cc=bhelgaas@google.com \
--cc=conor+dt@kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=fancer.lancer@gmail.com \
--cc=gustavo.pimentel@synopsys.com \
--cc=jingoohan1@gmail.com \
--cc=kishon@kernel.org \
--cc=konrad.dybcio@linaro.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=mhi@lists.linux.dev \
--cc=quic_krichai@quicinc.com \
--cc=quic_msarkar@quicinc.com \
--cc=quic_nayiluri@quicinc.com \
--cc=quic_nitegupt@quicinc.com \
--cc=quic_parass@quicinc.com \
--cc=quic_ramkri@quicinc.com \
--cc=quic_schintav@quicinc.com \
--cc=quic_shazhuss@quicinc.com \
--cc=quic_shijjose@quicinc.com \
--cc=quic_vbadigan@quicinc.com \
--cc=robh+dt@kernel.org \
--cc=robh@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.