Skip to content

Commit 1552de6

Browse files
kuanhsunchengmathieupoirier
authored andcommitted
remoteproc: mediatek: Allow reading firmware-name from DT
The SCP firmware blob differs between platforms and SoCs. We add support in the SCP driver for reading the path of firmware file from DT in order to allow these files to live in a generic file system (or linux-firmware). The firmware-name property is optional and the code falls back to the old filename if the property isn't present. Signed-off-by: Allen-KH Cheng <[email protected]> Reviewed-by: Rex-BC Chen <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mathieu Poirier <[email protected]>
1 parent 31976eb commit 1552de6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/remoteproc/mtk_scp.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,9 +809,13 @@ static int scp_probe(struct platform_device *pdev)
809809
struct mtk_scp *scp;
810810
struct rproc *rproc;
811811
struct resource *res;
812-
char *fw_name = "scp.img";
812+
const char *fw_name = "scp.img";
813813
int ret, i;
814814

815+
ret = rproc_of_parse_firmware(dev, 0, &fw_name);
816+
if (ret < 0 && ret != -EINVAL)
817+
return ret;
818+
815819
rproc = devm_rproc_alloc(dev, np->name, &scp_ops, fw_name, sizeof(*scp));
816820
if (!rproc)
817821
return dev_err_probe(dev, -ENOMEM, "unable to allocate remoteproc\n");

0 commit comments

Comments
 (0)