All of lore.kernel.org
 help / color / mirror / Atom feed
From: allen-kh.cheng <allen-kh.cheng@mediatek.com>
To: AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	"Ohad Ben-Cohen" <ohad@wizery.com>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>
Cc: Hsin-Yi Wang <hsinyi@chromium.org>,
	<Project_Global_Chrome_Upstream_Group@mediatek.com>,
	<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-mediatek@lists.infradead.org>,
	<linux-arm-kernel@lists.infradead.org>,
	 <linux-remoteproc@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] remoteproc: mediatek: allow reading firmware-name from DT
Date: Tue, 19 Apr 2022 20:25:40 +0800	[thread overview]
Message-ID: <a1bd1703b39d46be48bfa1500f57c59f049d532a.camel@mediatek.com> (raw)
In-Reply-To: <cb56d23b-fb80-426f-cc30-50ef351b0ad6@collabora.com>

hi Angelo,

On Tue, 2022-04-19 at 13:49 +0200, AngeloGioacchino Del Regno wrote:
> Il 14/04/22 14:21, Allen-KH Cheng ha scritto:
> > 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 <allen-kh.cheng@mediatek.com>
> > Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
> > ---
> >   drivers/remoteproc/mtk_scp.c | 7 ++++++-
> >   1 file changed, 6 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/remoteproc/mtk_scp.c
> > b/drivers/remoteproc/mtk_scp.c
> > index ee6c4009586e..82813d74e829 100644
> > --- a/drivers/remoteproc/mtk_scp.c
> > +++ b/drivers/remoteproc/mtk_scp.c
> > @@ -809,9 +809,14 @@ static int scp_probe(struct platform_device
> > *pdev)
> >   	struct mtk_scp *scp;
> >   	struct rproc *rproc;
> >   	struct resource *res;
> > -	char *fw_name = "scp.img";
> > +	const char *fw_name = "scp.img";
> >   	int ret, i;
> >   
> > +	ret = of_property_read_string(pdev->dev.of_node, "firmware-
> > name",
> > +				      &fw_name);
> 
> Hello Allen,
> the remoteproc subsystem provides a helper for that, please use it:
> 
> 	ret = rproc_of_parse_firmware(&pdev->dev, 0, &fw_name);
> 
> 
> > +	if (ret < 0 && ret != -EINVAL)
> > +		return ret;
> 
> ... this check is necessary, so you can keep this one.
> 
> Thanks,
> Angelo
> 

ok, no problem.
I will update in next version.

thanks,
Allen

> 


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: allen-kh.cheng <allen-kh.cheng@mediatek.com>
To: AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	"Ohad Ben-Cohen" <ohad@wizery.com>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>
Cc: Hsin-Yi Wang <hsinyi@chromium.org>,
	<Project_Global_Chrome_Upstream_Group@mediatek.com>,
	<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-mediatek@lists.infradead.org>,
	<linux-arm-kernel@lists.infradead.org>,
	 <linux-remoteproc@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] remoteproc: mediatek: allow reading firmware-name from DT
Date: Tue, 19 Apr 2022 20:25:40 +0800	[thread overview]
Message-ID: <a1bd1703b39d46be48bfa1500f57c59f049d532a.camel@mediatek.com> (raw)
In-Reply-To: <cb56d23b-fb80-426f-cc30-50ef351b0ad6@collabora.com>

hi Angelo,

On Tue, 2022-04-19 at 13:49 +0200, AngeloGioacchino Del Regno wrote:
> Il 14/04/22 14:21, Allen-KH Cheng ha scritto:
> > 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 <allen-kh.cheng@mediatek.com>
> > Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
> > ---
> >   drivers/remoteproc/mtk_scp.c | 7 ++++++-
> >   1 file changed, 6 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/remoteproc/mtk_scp.c
> > b/drivers/remoteproc/mtk_scp.c
> > index ee6c4009586e..82813d74e829 100644
> > --- a/drivers/remoteproc/mtk_scp.c
> > +++ b/drivers/remoteproc/mtk_scp.c
> > @@ -809,9 +809,14 @@ static int scp_probe(struct platform_device
> > *pdev)
> >   	struct mtk_scp *scp;
> >   	struct rproc *rproc;
> >   	struct resource *res;
> > -	char *fw_name = "scp.img";
> > +	const char *fw_name = "scp.img";
> >   	int ret, i;
> >   
> > +	ret = of_property_read_string(pdev->dev.of_node, "firmware-
> > name",
> > +				      &fw_name);
> 
> Hello Allen,
> the remoteproc subsystem provides a helper for that, please use it:
> 
> 	ret = rproc_of_parse_firmware(&pdev->dev, 0, &fw_name);
> 
> 
> > +	if (ret < 0 && ret != -EINVAL)
> > +		return ret;
> 
> ... this check is necessary, so you can keep this one.
> 
> Thanks,
> Angelo
> 

ok, no problem.
I will update in next version.

thanks,
Allen

> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-04-19 13:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-14 12:21 [PATCH v2 0/2] remoteproc: mediatek: allow different SCP firmware names Allen-KH Cheng
2022-04-14 12:21 ` Allen-KH Cheng
2022-04-14 12:21 ` Allen-KH Cheng
2022-04-14 12:21 ` [PATCH v2 1/2] dt-bindings: remoteproc: mediatek: add firmware-name property Allen-KH Cheng
2022-04-14 12:21   ` Allen-KH Cheng
2022-04-14 12:21   ` Allen-KH Cheng
2022-04-19 11:49   ` AngeloGioacchino Del Regno
2022-04-19 11:49     ` AngeloGioacchino Del Regno
2022-04-19 11:49     ` AngeloGioacchino Del Regno
2022-04-14 12:21 ` [PATCH v2 2/2] remoteproc: mediatek: allow reading firmware-name from DT Allen-KH Cheng
2022-04-14 12:21   ` Allen-KH Cheng
2022-04-14 12:21   ` Allen-KH Cheng
2022-04-15  6:12   ` Rex-BC Chen
2022-04-15  6:12     ` Rex-BC Chen
2022-04-15  6:12     ` Rex-BC Chen
2022-04-19 11:49   ` AngeloGioacchino Del Regno
2022-04-19 11:49     ` AngeloGioacchino Del Regno
2022-04-19 11:49     ` AngeloGioacchino Del Regno
2022-04-19 12:25     ` allen-kh.cheng [this message]
2022-04-19 12:25       ` allen-kh.cheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a1bd1703b39d46be48bfa1500f57c59f049d532a.camel@mediatek.com \
    --to=allen-kh.cheng@mediatek.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hsinyi@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=matthias.bgg@gmail.com \
    --cc=ohad@wizery.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.