summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Pouliquen <arnaud.pouliquen@foss.st.com>2025-03-27 09:27:21 +0100
committerMathieu Poirier <mathieu.poirier@linaro.org>2025-04-07 09:43:43 -0600
commit710028a2e4d76c3bdca8167012a0395b53a7f3e3 (patch)
tree8fecfc890466ca0c00243a5142f7f36dba878e58
parent385a2de38e45d0bbb6efa64e95f03e3dff54fc95 (diff)
remoteproc: stm32_rproc: Allow to specify firmware default name
Enhance the stm32_rproc driver to allow enabling the configuration of the firmware name based on the 'firmware-name' property in the device tree, offering flexibility compared to using the remote proc device node name. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com> Link: https://lore.kernel.org/r/20250327082721.641278-3-arnaud.pouliquen@foss.st.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
-rw-r--r--drivers/remoteproc/stm32_rproc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/remoteproc/stm32_rproc.c b/drivers/remoteproc/stm32_rproc.c
index b02b36a3f515..431648607d53 100644
--- a/drivers/remoteproc/stm32_rproc.c
+++ b/drivers/remoteproc/stm32_rproc.c
@@ -835,6 +835,7 @@ static int stm32_rproc_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct stm32_rproc *ddata;
struct device_node *np = dev->of_node;
+ const char *fw_name;
struct rproc *rproc;
unsigned int state;
int ret;
@@ -843,7 +844,12 @@ static int stm32_rproc_probe(struct platform_device *pdev)
if (ret)
return ret;
- rproc = devm_rproc_alloc(dev, np->name, &st_rproc_ops, NULL, sizeof(*ddata));
+ /* Look for an optional firmware name */
+ ret = rproc_of_parse_firmware(dev, 0, &fw_name);
+ if (ret < 0 && ret != -EINVAL)
+ return ret;
+
+ rproc = devm_rproc_alloc(dev, np->name, &st_rproc_ops, fw_name, sizeof(*ddata));
if (!rproc)
return -ENOMEM;