From: Florian Fainelli <florian.fainelli@broadcom.com>
To: linux-arm-kernel@lists.infreadead.org
Cc: Florian Fainelli <florian.fainelli@broadcom.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Sudeep Holla <sudeep.holla@arm.com>,
Cristian Marussi <cristian.marussi@arm.com>,
devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND
FLATTENED DEVICE TREE BINDINGS),
linux-kernel@vger.kernel.org (open list),
arm-scmi@vger.kernel.org (open list:SYSTEM CONTROL &
POWER/MANAGEMENT INTERFACE),
linux-arm-kernel@lists.infradead.org (moderated list:SYSTEM
CONTROL & POWER/MANAGEMENT INTERFACE),
justin.chen@broadcom.com, opendmb@gmail.com,
kapil.hali@broadcom.com, bcm-kernel-feedback-list@broadcom.com,
Arnd Bergmann <arnd@arndb.de>
Subject: [PATCH v2] firmware: arm_scmi: Give SMC transport precedence over mailbox
Date: Mon, 7 Oct 2024 16:54:13 -0700 [thread overview]
Message-ID: <20241007235413.507860-1-florian.fainelli@broadcom.com> (raw)
Broadcom STB platforms have for historical reasons included both
"arm,scmi-smc" and "arm,scmi" in their SCMI Device Tree node compatible
string, in that order.
After the commit cited in the Fixes tag and with a kernel configuration
that enables both the SMC and the Mailbox transports, we would probe
the mailbox transport, but fail to complete since we would not have a
mailbox driver available. With each SCMI transport being a platform
driver with its own set of compatible strings to match, rather than an
unique platform driver entry point, we no longer match from most
specific to least specific. There is also no simple way for the mailbox
driver to return -ENODEV and let another platform driver attempt
probing. This leads to a platform with no SCMI provider, therefore all
drivers depending upon SCMI resources are put on deferred probe forever.
By keeping the SMC transport objects linked first, we can let the
platform driver match the compatible string and probe successfully with
no adverse effects on platforms using the mailbox transport.
Fixes: b53515fa177c ("firmware: arm_scmi: Make MBOX transport a standalone driver")
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
Changes in v2:
- removed downstream Change-Id
- s/SCMI/SMC in the second paragraph
- added details about what changed and how that affects the probing
drivers/firmware/arm_scmi/transports/Makefile | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/firmware/arm_scmi/transports/Makefile b/drivers/firmware/arm_scmi/transports/Makefile
index 362a406f08e6..3ba3d3bee151 100644
--- a/drivers/firmware/arm_scmi/transports/Makefile
+++ b/drivers/firmware/arm_scmi/transports/Makefile
@@ -1,8 +1,10 @@
# SPDX-License-Identifier: GPL-2.0-only
-scmi_transport_mailbox-objs := mailbox.o
-obj-$(CONFIG_ARM_SCMI_TRANSPORT_MAILBOX) += scmi_transport_mailbox.o
+# Keep before scmi_transport_mailbox.o to allow precedence
+# while matching the compatible.
scmi_transport_smc-objs := smc.o
obj-$(CONFIG_ARM_SCMI_TRANSPORT_SMC) += scmi_transport_smc.o
+scmi_transport_mailbox-objs := mailbox.o
+obj-$(CONFIG_ARM_SCMI_TRANSPORT_MAILBOX) += scmi_transport_mailbox.o
scmi_transport_optee-objs := optee.o
obj-$(CONFIG_ARM_SCMI_TRANSPORT_OPTEE) += scmi_transport_optee.o
scmi_transport_virtio-objs := virtio.o
--
2.34.1
next reply other threads:[~2024-10-08 0:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-07 23:54 Florian Fainelli [this message]
2024-10-08 2:14 ` [PATCH v2] firmware: arm_scmi: Give SMC transport precedence over mailbox Peng Fan
2024-10-08 16:17 ` Florian Fainelli
2024-10-11 13:47 ` Cristian Marussi
2024-10-15 13:16 ` 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=20241007235413.507860-1-florian.fainelli@broadcom.com \
--to=florian.fainelli@broadcom.com \
--cc=arm-scmi@vger.kernel.org \
--cc=arnd@arndb.de \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=conor+dt@kernel.org \
--cc=cristian.marussi@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=justin.chen@broadcom.com \
--cc=kapil.hali@broadcom.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-kernel@lists.infreadead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=opendmb@gmail.com \
--cc=robh@kernel.org \
--cc=sudeep.holla@arm.com \
/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