From: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
To: Sudeep Holla <sudeep.holla@kernel.org>
Cc: arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
kernel-team@meta.com, Cristian Marussi <cristian.marussi@arm.com>,
Breno Leitao <leitao@debian.org>
Subject: Re: [PATCH v3 3/9] firmware: arm_scmi: Convert OF-only paths to generic fwnode in SCMI core
Date: Wed, 2 Sep 2026 16:29:11 -0700 [thread overview]
Message-ID: <20260902162911.0000761f@oss.qualcomm.com> (raw)
In-Reply-To: <20260902-funky-tarsier-of-competence-0ae6ab@sudeepholla>
On Wed, 2 Sep 2026 14:39:31 +0100
Sudeep Holla <sudeep.holla@kernel.org> wrote:
> On Mon, Aug 24, 2026 at 10:39:29AM -0700, Jonathan Cameron wrote:
> > On Thu, 13 Aug 2026 12:32:58 +0100
> > Sudeep Holla <sudeep.holla@kernel.org> wrote:
> >
> > > Switch SCMI core plumbing from struct device_node * to struct
> > > fwnode_handle * so the core can describe SCMI instances and protocols using
> > > firmware nodes rather than OF nodes directly.
> > >
> > > This change:
> > > - Replaces core OF property lookups with fwnode_property_*() helpers.
> > > - Switches child enumeration to
> > > fwnode_for_each_available_child_node_scoped().
> >
> > Why the scoped version? See inline for more on this. Probably just needs
> > a comment here (or use the non _scoped variant)
> >
>
> Sure
>
> > > - Plumbs fwnode through the SCMI device creation and channel setup paths.
> > > - Updates transport ->chan_available() callbacks to take a fwnode.
> > > - Stores per-protocol child fwnodes in info->active_protocols so the core
> > > can later locate the descriptor for a given protocol ID.
> > > - Updates mailbox/optee/smc/virtio transports to accept fwnodes and map
> > > back to OF nodes where their existing parsing remains DT-specific.
> > >
> > > DT-only transports such as mailbox, OP-TEE and SMC still parse DT
> > > properties by mapping the fwnode back to an OF node. On non-DT systems
> > > these transports report no channel available.
> > >
> > > This is a mechanical step towards firmware-node neutrality and prepares the
> > > SCMI core for non-DT transports, such as an ACPI/PCC transport. DT users
> > > continue to work unchanged; no non-DT transport is enabled by this patch.
> > >
> > > Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
> >
> > A few minor things - with those cleaned up. Only the cleanup.h one really
> > matters.
> >
>
> Fixed now.
>
> > Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
> >
> > > diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
> > > index ef29fd223287..9014723e0f7f 100644
> > > --- a/drivers/firmware/arm_scmi/driver.c
> > > +++ b/drivers/firmware/arm_scmi/driver.c
> >
> > ...
> >
> > > @@ -3352,10 +3354,10 @@ static int scmi_probe(struct platform_device *pdev)
> > >
> > > scmi_enable_matching_quirks(info);
> > >
> > > - for_each_available_child_of_node(np, child) {
> > > + fwnode_for_each_available_child_node_scoped(dev_fwnode(dev), child) {
> >
> > There are no early exits yet and I can't see any added later in the series.
> > So the scoped bit is irrelevant. I don't mind the change on basis of
> > hardening or similar but it needs a comment in the patch description to
> > justify that.
> >
>
> This is mainly to release the reference taken in
> fwnode_get_next_available_child_node(). It is taken explicitly via
> fwnode_handle_get() before scmi_create_protocol_devices() as discussed
> below.
When the loop continues to normal termination the puts are all there
anyway as part of the iterators. The _scoped case just deals with
early exits via break or return.
>
> > > u32 prot_id;
> > >
> > > - if (of_property_read_u32(child, "reg", &prot_id))
> > > + if (fwnode_property_read_u32(child, "reg", &prot_id))
> > > continue;
> > >
> > > if (!FIELD_FIT(MSG_PROTOCOL_ID_MASK, prot_id)) {
next prev parent reply other threads:[~2026-09-02 23:29 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-13 11:32 [PATCH v3 0/9] firmware: arm_scmi: Refactoring and enablement of ACPI PCC transport Sudeep Holla
2026-08-13 11:32 ` [PATCH v3 1/9] firmware: arm_scmi: Set fwnode for the generated SCMI platform device Sudeep Holla
2026-08-24 16:51 ` Jonathan Cameron
2026-09-02 7:51 ` Sudeep Holla
2026-09-02 23:26 ` Jonathan Cameron
2026-09-03 9:16 ` Bartosz Golaszewski
2026-08-13 11:32 ` [PATCH v3 2/9] firmware: arm_scmi: Extend transport driver macro to support ACPI Sudeep Holla
2026-08-24 17:04 ` Jonathan Cameron
2026-09-02 7:53 ` Sudeep Holla
2026-08-13 11:32 ` [PATCH v3 3/9] firmware: arm_scmi: Convert OF-only paths to generic fwnode in SCMI core Sudeep Holla
2026-08-24 17:39 ` Jonathan Cameron
2026-09-02 13:39 ` Sudeep Holla
2026-09-02 23:29 ` Jonathan Cameron [this message]
2026-09-03 6:36 ` Sudeep Holla
2026-08-13 11:32 ` [PATCH v3 4/9] firmware: arm_scmi: Fall back to ACPI HID when "compatible" is absent Sudeep Holla
2026-08-24 17:43 ` Jonathan Cameron
2026-09-02 8:03 ` Sudeep Holla
2026-09-02 8:09 ` Sudeep Holla
2026-08-13 11:33 ` [PATCH v3 5/9] firmware: arm_scmi: Pass protocol ID to chan_available() transport callback Sudeep Holla
2026-08-24 17:45 ` Jonathan Cameron
2026-08-13 11:33 ` [PATCH v3 6/9] firmware: arm_scmi: Refactor protocol device creation logic Sudeep Holla
2026-08-24 17:49 ` Jonathan Cameron
2026-09-02 13:52 ` Sudeep Holla
2026-08-13 11:33 ` [PATCH v3 7/9] firmware: arm_scmi: Add ACPI PCC transport Sudeep Holla
2026-08-24 20:17 ` Jonathan Cameron
2026-09-03 13:43 ` Sudeep Holla
2026-08-13 11:33 ` [PATCH v3 8/9] firmware: arm_scmi: Initialise known ACPI protocol devices and channels Sudeep Holla
2026-08-24 20:21 ` Jonathan Cameron
2026-08-13 11:33 ` [PATCH v3 9/9] firmware: arm_scmi: Validate PCC shared memory signature Sudeep Holla
2026-08-24 20:24 ` Jonathan Cameron
2026-09-02 8:25 ` Sudeep Holla
2026-09-02 23:31 ` Jonathan Cameron
2026-09-03 6:39 ` Sudeep Holla
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=20260902162911.0000761f@oss.qualcomm.com \
--to=jonathan.cameron@oss.qualcomm.com \
--cc=arm-scmi@vger.kernel.org \
--cc=cristian.marussi@arm.com \
--cc=kernel-team@meta.com \
--cc=leitao@debian.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=sudeep.holla@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