]> www.infradead.org Git - users/jedix/linux-maple.git/commit
firmware: arm_scmi: Give SMC transport precedence over mailbox
authorFlorian Fainelli <florian.fainelli@broadcom.com>
Mon, 7 Oct 2024 23:54:13 +0000 (16:54 -0700)
committerSudeep Holla <sudeep.holla@arm.com>
Fri, 11 Oct 2024 15:52:42 +0000 (16:52 +0100)
commitdb8f0b8088865150e4c9a8b8ffc9abdfd58bc4f7
tree6a797a950396a205462a112f12c3e19731c77e36
parent39b13dce1a91cdfc3bec9238f9e89094551bd428
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 b53515fa177c ("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: b53515fa177c ("firmware: arm_scmi: Make MBOX transport a standalone driver")
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Message-Id: <20241007235413.507860-1-florian.fainelli@broadcom.com>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_scmi/transports/Makefile