From: Sudeep Holla <sudeep.holla@kernel.org>
To: arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: Sudeep Holla <sudeep.holla@kernel.org>,
Cristian Marussi <cristian.marussi@arm.com>
Subject: [PATCH v2 9/9] firmware: arm_scmi: Initialise all protocol devices and transport channels
Date: Mon, 25 May 2026 21:42:47 +0100 [thread overview]
Message-ID: <20260525-acpi_scmi_pcc-v2-9-4f38938d08d8@arm.com> (raw)
In-Reply-To: <20260525-acpi_scmi_pcc-v2-0-4f38938d08d8@arm.com>
Unlike Device Tree, the ACPI SCMI namespace device does not provide
child fwnodes to represent each protocol. Initialise protocol
channels and devices for the ACPI SCMI protocol entries known to
the core, and let the transport channel-availability checks and
SCMI protocol implementation checks decide which ones are usable
on the platform.
Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
---
drivers/firmware/arm_scmi/driver.c | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
index 47f13409dfeb..9e25346a7eae 100644
--- a/drivers/firmware/arm_scmi/driver.c
+++ b/drivers/firmware/arm_scmi/driver.c
@@ -2827,7 +2827,7 @@ scmi_txrx_setup(struct scmi_info *info, struct fwnode_handle *fwnode,
*/
static int scmi_channels_setup(struct scmi_info *info)
{
- int ret;
+ int ret, idx;
struct fwnode_handle *fwnode = dev_fwnode(info->dev);
/* Initialize a common generic channel at first */
@@ -2850,6 +2850,17 @@ static int scmi_channels_setup(struct scmi_info *info)
return ret;
}
+ if (acpi_disabled)
+ return 0;
+
+ for (idx = 1; idx < ARRAY_SIZE(scmi_dsd_info_list); idx++) {
+ int prot_id = scmi_dsd_info_list[idx].protocol_id;
+
+ ret = scmi_txrx_setup(info, fwnode, prot_id);
+ if (ret)
+ return ret;
+ }
+
return 0;
}
@@ -3215,7 +3226,7 @@ static void scmi_device_check_create(struct fwnode_handle *fwnode, int prot_id,
static int scmi_probe(struct platform_device *pdev)
{
- int ret;
+ int ret, idx;
char *err_str = "probe failure\n";
struct scmi_handle *handle;
const struct scmi_desc *desc;
@@ -3344,6 +3355,15 @@ static int scmi_probe(struct platform_device *pdev)
scmi_device_check_create(child, prot_id, info);
}
+ if (acpi_disabled)
+ return 0;
+
+ for (idx = 1; idx < ARRAY_SIZE(scmi_dsd_info_list); idx++) {
+ int prot_id = scmi_dsd_info_list[idx].protocol_id;
+
+ scmi_device_check_create(dev_fwnode(dev), prot_id, info);
+ }
+
return 0;
notification_exit:
--
2.43.0
prev parent reply other threads:[~2026-05-25 20:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-25 20:42 [PATCH v2 0/9] firmware: arm_scmi: Refactoring and enablement of ACPI PCC transport Sudeep Holla
2026-05-25 20:42 ` [PATCH v2 1/9] firmware: arm_scmi: Fix OF node reference handling Sudeep Holla
2026-05-25 20:42 ` [PATCH v2 2/9] firmware: arm_scmi: Set fwnode for the generated SCMI platform device Sudeep Holla
2026-05-25 20:42 ` [PATCH v2 3/9] firmware: arm_scmi: Extend transport driver macro to support ACPI Sudeep Holla
2026-05-25 20:42 ` [PATCH v2 4/9] firmware: arm_scmi: Convert OF-only paths to generic fwnode in SCMI core Sudeep Holla
2026-05-28 16:32 ` Adam Young
2026-05-25 20:42 ` [PATCH v2 5/9] firmware: arm_scmi: Fall back to ACPI HID when "compatible" is absent Sudeep Holla
2026-05-25 20:42 ` [PATCH v2 6/9] firmware: arm_scmi: Pass protocol ID to chan_available() transport callback Sudeep Holla
2026-05-25 20:42 ` [PATCH v2 7/9] firmware: arm_scmi: Refactor protocol device creation logic Sudeep Holla
2026-05-25 20:42 ` [PATCH v2 8/9] firmware: arm_scmi: transport: Add ACPI PCC transport Sudeep Holla
2026-05-28 17:29 ` Adam Young
2026-05-25 20:42 ` Sudeep Holla [this message]
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=20260525-acpi_scmi_pcc-v2-9-4f38938d08d8@arm.com \
--to=sudeep.holla@kernel.org \
--cc=arm-scmi@vger.kernel.org \
--cc=cristian.marussi@arm.com \
--cc=linux-arm-kernel@lists.infradead.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