Skip to content

Commit b2b76e9

Browse files
cris-masudeep-holla
authored andcommitted
firmware: arm_scmi: Fix raw coexistence mode behaviour on failure path
When SCMI raw coexistence mode is enabled make the core stack probe successfully even when the initial base protocol exchanges with the platform/server failed. This behaviour enables the system to boot with a broken regular SCMI stack but with a fully functional and accessible SCMI raw debugfs interface that can be used to further debug the issue. Signed-off-by: Cristian Marussi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sudeep Holla <[email protected]>
1 parent 418a406 commit b2b76e9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/firmware/arm_scmi/driver.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2657,6 +2657,7 @@ static int scmi_probe(struct platform_device *pdev)
26572657
struct scmi_handle *handle;
26582658
const struct scmi_desc *desc;
26592659
struct scmi_info *info;
2660+
bool coex = IS_ENABLED(CONFIG_ARM_SCMI_RAW_MODE_SUPPORT_COEX);
26602661
struct device *dev = &pdev->dev;
26612662
struct device_node *child, *np = dev->of_node;
26622663

@@ -2731,9 +2732,6 @@ static int scmi_probe(struct platform_device *pdev)
27312732
dev_warn(dev, "Failed to setup SCMI debugfs.\n");
27322733

27332734
if (IS_ENABLED(CONFIG_ARM_SCMI_RAW_MODE_SUPPORT)) {
2734-
bool coex =
2735-
IS_ENABLED(CONFIG_ARM_SCMI_RAW_MODE_SUPPORT_COEX);
2736-
27372735
ret = scmi_debugfs_raw_mode_setup(info);
27382736
if (!coex) {
27392737
if (ret)
@@ -2764,6 +2762,8 @@ static int scmi_probe(struct platform_device *pdev)
27642762
ret = scmi_protocol_acquire(handle, SCMI_PROTOCOL_BASE);
27652763
if (ret) {
27662764
dev_err(dev, "unable to communicate with SCMI\n");
2765+
if (coex)
2766+
return 0;
27672767
goto notification_exit;
27682768
}
27692769

0 commit comments

Comments
 (0)