All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tzung-Bi Shih <tzungbi@google.com>
To: ohad@wizery.com, bjorn.andersson@linaro.org, robh+dt@kernel.org
Cc: linux-remoteproc@vger.kernel.org, matthias.bgg@gmail.com,
	linux-mediatek@lists.infradead.org, mathieu.poirier@linaro.org,
	devicetree@vger.kernel.org, tzungbi@google.com
Subject: [PATCH v3 1/4] remoteproc/mediatek: use devm_platform_ioremap_resource_byname
Date: Wed, 27 Jan 2021 16:31:33 +0800	[thread overview]
Message-ID: <20210127083136.3745652-2-tzungbi@google.com> (raw)
In-Reply-To: <20210127083136.3745652-1-tzungbi@google.com>

Replaces platform_get_resource_byname() and devm_ioremap_resource()
pairs to devm_platform_ioremap_resource_byname().

Note that, not every pairs are applicable to replace.  Especially when
it needs to access the resource struct from
platform_get_resource_byname().
For example:
scp->sram_size = resource_size(res);

Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
---
 drivers/remoteproc/mtk_scp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c
index eba825b46696..d83e1164f02f 100644
--- a/drivers/remoteproc/mtk_scp.c
+++ b/drivers/remoteproc/mtk_scp.c
@@ -721,8 +721,7 @@ static int scp_probe(struct platform_device *pdev)
 	for (i = 0; i < SCP_IPI_MAX; i++)
 		mutex_init(&scp->ipi_desc[i].lock);
 
-	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "cfg");
-	scp->reg_base = devm_ioremap_resource(dev, res);
+	scp->reg_base = devm_platform_ioremap_resource_byname(pdev, "cfg");
 	if (IS_ERR((__force void *)scp->reg_base)) {
 		dev_err(dev, "Failed to parse and map cfg memory\n");
 		ret = PTR_ERR((__force void *)scp->reg_base);
-- 
2.30.0.280.ga3ce27912f-goog


WARNING: multiple messages have this Message-ID (diff)
From: Tzung-Bi Shih <tzungbi@google.com>
To: ohad@wizery.com, bjorn.andersson@linaro.org, robh+dt@kernel.org
Cc: devicetree@vger.kernel.org, mathieu.poirier@linaro.org,
	linux-remoteproc@vger.kernel.org, tzungbi@google.com,
	linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com
Subject: [PATCH v3 1/4] remoteproc/mediatek: use devm_platform_ioremap_resource_byname
Date: Wed, 27 Jan 2021 16:31:33 +0800	[thread overview]
Message-ID: <20210127083136.3745652-2-tzungbi@google.com> (raw)
In-Reply-To: <20210127083136.3745652-1-tzungbi@google.com>

Replaces platform_get_resource_byname() and devm_ioremap_resource()
pairs to devm_platform_ioremap_resource_byname().

Note that, not every pairs are applicable to replace.  Especially when
it needs to access the resource struct from
platform_get_resource_byname().
For example:
scp->sram_size = resource_size(res);

Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
---
 drivers/remoteproc/mtk_scp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c
index eba825b46696..d83e1164f02f 100644
--- a/drivers/remoteproc/mtk_scp.c
+++ b/drivers/remoteproc/mtk_scp.c
@@ -721,8 +721,7 @@ static int scp_probe(struct platform_device *pdev)
 	for (i = 0; i < SCP_IPI_MAX; i++)
 		mutex_init(&scp->ipi_desc[i].lock);
 
-	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "cfg");
-	scp->reg_base = devm_ioremap_resource(dev, res);
+	scp->reg_base = devm_platform_ioremap_resource_byname(pdev, "cfg");
 	if (IS_ERR((__force void *)scp->reg_base)) {
 		dev_err(dev, "Failed to parse and map cfg memory\n");
 		ret = PTR_ERR((__force void *)scp->reg_base);
-- 
2.30.0.280.ga3ce27912f-goog


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

  reply	other threads:[~2021-01-27  8:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-27  8:31 [PATCH v3 0/4] remoteproc/mediatek: support L1TCM for MT8192 SCP Tzung-Bi Shih
2021-01-27  8:31 ` Tzung-Bi Shih
2021-01-27  8:31 ` Tzung-Bi Shih [this message]
2021-01-27  8:31   ` [PATCH v3 1/4] remoteproc/mediatek: use devm_platform_ioremap_resource_byname Tzung-Bi Shih
2021-01-27  8:31 ` [PATCH v3 2/4] remoteproc/mediatek: enable MPU for all memory regions in MT8192 SCP Tzung-Bi Shih
2021-01-27  8:31   ` Tzung-Bi Shih
2021-01-27  8:31 ` [PATCH v3 3/4] dt-bindings: remoteproc: mediatek: add L1TCM memory region Tzung-Bi Shih
2021-01-27  8:31   ` Tzung-Bi Shih
2021-01-27  8:31 ` [PATCH v3 4/4] remoteproc/mediatek: support L1TCM Tzung-Bi Shih
2021-01-27  8:31   ` Tzung-Bi Shih
2021-02-09 17:40 ` [PATCH v3 0/4] remoteproc/mediatek: support L1TCM for MT8192 SCP patchwork-bot+linux-remoteproc

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=20210127083136.3745652-2-tzungbi@google.com \
    --to=tzungbi@google.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@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.