[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZxJ0Zl4iv+SZNUli@hu-bjorande-lv.qualcomm.com>
Date: Fri, 18 Oct 2024 07:44:54 -0700
From: Bjorn Andersson <bjorn.andersson@....qualcomm.com>
To: Shivnandan Kumar <quic_kshivnan@...cinc.com>
Cc: Bjorn Andersson <andersson@...nel.org>,
Sibi Sankar <quic_sibis@...cinc.com>,
Jassi Brar <jassisinghbrar@...il.com>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
cros-qcom-dts-watchers@...omium.org,
Konrad Dybcio <konradybcio@...nel.org>, linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
Ramakrishna Gottimukkula <quic_rgottimu@...cinc.com>
Subject: Re: [PATCH 2/3] mailbox: qcom-cpucp-mbox: Add support for SC7280
CPUCP mailbox controller
On Thu, Oct 17, 2024 at 05:22:36PM +0530, Shivnandan Kumar wrote:
> On 10/6/2024 8:03 AM, Bjorn Andersson wrote:
> > On Tue, Sep 24, 2024 at 10:39:40AM GMT, Shivnandan Kumar wrote:
[..]
> > > static int qcom_cpucp_mbox_probe(struct platform_device *pdev)
> > > {
> > > + const struct qcom_cpucp_mbox_desc *desc;
> > > struct device *dev = &pdev->dev;
> > > struct qcom_cpucp_mbox *cpucp;
> > > struct mbox_controller *mbox;
> > > + struct resource *res;
> > > int irq, ret;
> > >
> > > + desc = device_get_match_data(&pdev->dev);
> > > + if (!desc)
> > > + return -EINVAL;
> > > +
> > > cpucp = devm_kzalloc(dev, sizeof(*cpucp), GFP_KERNEL);
> > > if (!cpucp)
> > > return -ENOMEM;
> > >
> > > - cpucp->rx_base = devm_of_iomap(dev, dev->of_node, 0, NULL);
> > > - if (IS_ERR(cpucp->rx_base))
> > > - return PTR_ERR(cpucp->rx_base);
> > > + cpucp->desc = desc;
> > > +
> > > + if (desc->v2_mbox) {
> > > + cpucp->rx_base = devm_of_iomap(dev, dev->of_node, 0, NULL);
> > > + if (IS_ERR(cpucp->rx_base))
> > > + return PTR_ERR(cpucp->rx_base);
> > > + /* Legacy mailbox quirks due to shared region with EPSS register space */
> >
> > Why can't we have the same code in both cases?
> >
>
>
> RX address space share region with EPSS. Due to which devm_of_iomap returns
> -EBUSY.
>
I assumed that was the case, and that explains why the legacy system
needs a different code path.
But, couldn't you use the same for the v2 solution, so we avoid having
two different code paths?
Regards,
Bjorn
Powered by blists - more mailing lists