Skip to content

Commit 4d239f4

Browse files
maheshraotmgregkh
authored andcommitted
firmware: stratix10-svc: Add of_platform_default_populate()
Add of_platform_default_populate() to stratix10-svc driver as the firmware/svc node was moved out of soc. This fixes the failed probing of child drivers of svc node. Cc: stable@vger.kernel.org Fixes: 23c3ebe ("arm64: dts: socfpga: agilex: move firmware out of soc node") Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Xu Yilun <yilun.xu@intel.com> Signed-off-by: Mahesh Rao <mahesh.rao@intel.com> Signed-off-by: Dinh Nguyen <dinguyen@kernel.org> Link: https://lore.kernel.org/r/20250326115446.36123-1-dinguyen@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent f88c0c7 commit 4d239f4

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

drivers/firmware/stratix10-svc.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,22 +1224,28 @@ static int stratix10_svc_drv_probe(struct platform_device *pdev)
12241224
if (!svc->intel_svc_fcs) {
12251225
dev_err(dev, "failed to allocate %s device\n", INTEL_FCS);
12261226
ret = -ENOMEM;
1227-
goto err_unregister_dev;
1227+
goto err_unregister_rsu_dev;
12281228
}
12291229

12301230
ret = platform_device_add(svc->intel_svc_fcs);
12311231
if (ret) {
12321232
platform_device_put(svc->intel_svc_fcs);
1233-
goto err_unregister_dev;
1233+
goto err_unregister_rsu_dev;
12341234
}
12351235

1236+
ret = of_platform_default_populate(dev_of_node(dev), NULL, dev);
1237+
if (ret)
1238+
goto err_unregister_fcs_dev;
1239+
12361240
dev_set_drvdata(dev, svc);
12371241

12381242
pr_info("Intel Service Layer Driver Initialized\n");
12391243

12401244
return 0;
12411245

1242-
err_unregister_dev:
1246+
err_unregister_fcs_dev:
1247+
platform_device_unregister(svc->intel_svc_fcs);
1248+
err_unregister_rsu_dev:
12431249
platform_device_unregister(svc->stratix10_svc_rsu);
12441250
err_free_kfifo:
12451251
kfifo_free(&controller->svc_fifo);
@@ -1253,6 +1259,8 @@ static void stratix10_svc_drv_remove(struct platform_device *pdev)
12531259
struct stratix10_svc *svc = dev_get_drvdata(&pdev->dev);
12541260
struct stratix10_svc_controller *ctrl = platform_get_drvdata(pdev);
12551261

1262+
of_platform_depopulate(ctrl->dev);
1263+
12561264
platform_device_unregister(svc->intel_svc_fcs);
12571265
platform_device_unregister(svc->stratix10_svc_rsu);
12581266

0 commit comments

Comments
 (0)