From: Andy Gross <andy.gross@linaro.org>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: linux-arm-msm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Bjorn Andersson <bjorn.andersson@linaro.org>,
devicetree@vger.kernel.org, jilai wang <jilaiw@codeaurora.org>
Subject: Re: [Patch v5 2/8] firmware: qcom: scm: Convert SCM to platform driver
Date: Thu, 2 Jun 2016 22:45:35 -0500 [thread overview]
Message-ID: <20160603034535.GA13357@hector.attlocal.net> (raw)
In-Reply-To: <20160602221424.GM28218@codeaurora.org>
On Thu, Jun 02, 2016 at 03:14:24PM -0700, Stephen Boyd wrote:
> On 05/12, Andy Gross wrote:
> > This patch converts the Qualcomm SCM firmware driver into a platform
> > driver.
>
> And introduces clk enable/disable + rate setting logic because
> the firmware uses crypto clks during some scm calls.
I'll make the commit message more descriptive of the change.
> >
> > +
> > +static struct platform_driver qcom_scm_driver = {
> > + .driver = {
> > + .name = "qcom_scm",
> > + .of_match_table = qcom_scm_dt_match,
> > + },
> > + .probe = qcom_scm_probe,
> > +};
> > +
> > +static int __init qcom_scm_init(void)
> > +{
> > + struct device_node *np, *parent;
> > + int ret;
> > +
> > + np = of_find_matching_node_and_match(NULL, qcom_scm_dt_match, NULL);
>
> Why can't we find a node called "firmware" in the root of the
> tree? That would be clearer what's going on here, and avoid the
> need to do the of_get_next_parent() dance, which just feels
> awkward.
Well I had reworked it previously to avoid calling of_platform_populate on
anyone with a firmware node. I guess what I can do is find the firmware node
and then only populate if I get a match starting from the firmware node itself.
That satisfies both comments.
> > +
> > + if (!np)
> > + return -ENODEV;
> > +
> > + parent = of_get_next_parent(np);
> > + ret = of_platform_populate(parent, qcom_scm_dt_match, NULL, NULL);
> > +
> > + of_node_put(parent);
> > +
> > + if (ret)
> > + return ret;
> > +
> > + return platform_driver_register(&qcom_scm_driver);
> > +}
>
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> a Linux Foundation Collaborative Project
> --
> To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-06-03 3:45 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-13 3:46 [Patch v5 0/8] Qualcomm SCM Rework Andy Gross
2016-05-13 3:46 ` [Patch v5 1/8] dt/bindings: firmware: Add Qualcomm SCM binding Andy Gross
2016-05-13 23:32 ` Bjorn Andersson
2016-05-16 16:09 ` Rob Herring
2016-06-02 22:14 ` Stephen Boyd
2016-05-13 3:46 ` [Patch v5 2/8] firmware: qcom: scm: Convert SCM to platform driver Andy Gross
2016-05-13 23:33 ` Bjorn Andersson
2016-06-02 22:14 ` Stephen Boyd
2016-06-03 3:45 ` Andy Gross [this message]
2016-05-13 3:46 ` [Patch v5 3/8] firmware: qcom: scm: Use atomic SCM for cold boot Andy Gross
2016-05-13 23:37 ` Bjorn Andersson
2016-06-02 22:15 ` Stephen Boyd
2016-05-13 3:46 ` [Patch v5 4/8] firmware: qcom: scm: Generalize shared error map Andy Gross
2016-05-13 3:46 ` [Patch v5 5/8] firmware: qcom: scm: Convert to streaming DMA APIS Andy Gross
2016-05-13 23:48 ` Bjorn Andersson
2016-05-16 5:08 ` Andy Gross
2016-05-23 19:26 ` Kevin Hilman
2016-05-23 21:02 ` Andy Gross
2016-05-25 3:37 ` Andy Gross
2016-05-25 20:50 ` Kevin Hilman
2016-05-25 21:15 ` Andy Gross
2016-06-02 23:26 ` Stephen Boyd
2016-06-03 3:57 ` Andy Gross
2016-05-13 3:46 ` [Patch v5 6/8] firmware: qcom: scm: Add support for ARM64 SoCs Andy Gross
2016-05-13 23:50 ` Bjorn Andersson
2016-06-02 22:28 ` Stephen Boyd
2016-06-03 3:48 ` Andy Gross
2016-05-13 3:47 ` [Patch v5 7/8] dts: qcom: apq8084: Add SCM firmware node Andy Gross
2016-06-02 22:28 ` Stephen Boyd
2016-05-13 3:47 ` [Patch v5 8/8] arm64: dts: msm8916: " Andy Gross
2016-06-02 22:29 ` Stephen Boyd
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=20160603034535.GA13357@hector.attlocal.net \
--to=andy.gross@linaro.org \
--cc=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=jilaiw@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sboyd@codeaurora.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
all inboxes | Powered by JetHome®