From c2c679f3bddb7c9184640f4ee9eeab798500d091 Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Mon, 23 Mar 2020 17:22:19 +0800 Subject: [PATCH] MLK-23754-16 remoteproc: imx_rproc: support get firmware name from dts Add fsl,rproc-fw-name property to support get firmware name from device tree. Reviewed-by: Richard Zhu Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index f993d3d8c727..f05d66b1a032 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -685,6 +685,7 @@ static int imx_rproc_probe(struct platform_device *pdev) const struct imx_rproc_dcfg *dcfg; struct regmap *regmap = NULL; struct reset_control *non_sclr_rst, *enable; + const char *fw_name = NULL; int ret; regmap = syscon_regmap_lookup_by_phandle(np, "syscon"); @@ -705,9 +706,11 @@ static int imx_rproc_probe(struct platform_device *pdev) if (IS_ERR(enable)) return PTR_ERR(enable); + of_property_read_string(np, "fsl,rproc-fw-name", &fw_name); + /* set some other name then imx */ rproc = rproc_alloc(dev, "imx-rproc", &imx_rproc_ops, - NULL, sizeof(*priv)); + fw_name, sizeof(*priv)); if (!rproc) return -ENOMEM;