Skip to content

Commit db8f0b8

Browse files
ffainellisudeep-holla
authored andcommitted
firmware: arm_scmi: Give SMC transport precedence over mailbox
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 b53515f ("firmware: arm_scmi: Make MBOX transport a standalone driver") 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. This is just the workaround to the issue observed which doesn't have any impact on the other platforms. Fixes: b53515f ("firmware: arm_scmi: Make MBOX transport a standalone driver") Signed-off-by: Florian Fainelli <[email protected]> Message-Id: <[email protected]> Reviewed-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
1 parent 39b13dc commit db8f0b8

File tree

1 file changed

+4
-2
lines changed
  • drivers/firmware/arm_scmi/transports

1 file changed

+4
-2
lines changed

drivers/firmware/arm_scmi/transports/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# SPDX-License-Identifier: GPL-2.0-only
2-
scmi_transport_mailbox-objs := mailbox.o
3-
obj-$(CONFIG_ARM_SCMI_TRANSPORT_MAILBOX) += scmi_transport_mailbox.o
2+
# Keep before scmi_transport_mailbox.o to allow precedence
3+
# while matching the compatible.
44
scmi_transport_smc-objs := smc.o
55
obj-$(CONFIG_ARM_SCMI_TRANSPORT_SMC) += scmi_transport_smc.o
6+
scmi_transport_mailbox-objs := mailbox.o
7+
obj-$(CONFIG_ARM_SCMI_TRANSPORT_MAILBOX) += scmi_transport_mailbox.o
68
scmi_transport_optee-objs := optee.o
79
obj-$(CONFIG_ARM_SCMI_TRANSPORT_OPTEE) += scmi_transport_optee.o
810
scmi_transport_virtio-objs := virtio.o

0 commit comments

Comments
 (0)