From: Jon Hunter <jonathanh@nvidia.com>
To: "Rob Herring (Arm)" <robh@kernel.org>,
Thierry Reding <thierry.reding@gmail.com>
Cc: linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] firmware: tegra: bpmp: Use of_reserved_mem_region_to_resource() for "memory-region"
Date: Mon, 28 Jul 2025 15:17:11 +0100 [thread overview]
Message-ID: <550bcad5-4de6-46fe-9f2d-f77ccbd582c6@nvidia.com> (raw)
In-Reply-To: <20250703183434.2073375-1-robh@kernel.org>
Hi Rob, Thierry,
On 03/07/2025 19:34, Rob Herring (Arm) wrote:
> Use the newly added of_reserved_mem_region_to_resource() function to
> handle "memory-region" properties.
>
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
> drivers/firmware/tegra/bpmp-tegra186.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/firmware/tegra/bpmp-tegra186.c b/drivers/firmware/tegra/bpmp-tegra186.c
> index 6f0d0511b486..7cfc5fdfa49d 100644
> --- a/drivers/firmware/tegra/bpmp-tegra186.c
> +++ b/drivers/firmware/tegra/bpmp-tegra186.c
> @@ -6,7 +6,7 @@
> #include <linux/genalloc.h>
> #include <linux/io.h>
> #include <linux/mailbox_client.h>
> -#include <linux/of_address.h>
> +#include <linux/of_reserved_mem.h>
> #include <linux/platform_device.h>
>
> #include <soc/tegra/bpmp.h>
> @@ -192,16 +192,11 @@ static void tegra186_bpmp_teardown_channels(struct tegra_bpmp *bpmp)
> static int tegra186_bpmp_dram_init(struct tegra_bpmp *bpmp)
> {
> struct tegra186_bpmp *priv = bpmp->priv;
> - struct device_node *np;
> struct resource res;
> size_t size;
> int err;
>
> - np = of_parse_phandle(bpmp->dev->of_node, "memory-region", 0);
> - if (!np)
> - return -ENODEV;
> -
> - err = of_address_to_resource(np, 0, &res);
> + err = of_reserved_mem_region_to_resource(bpmp->dev->of_node, 0, &res);
> if (err < 0) {
> dev_warn(bpmp->dev, "failed to parse memory region: %d\n", err);
> return err;
This change is now causing the following warning to be observed on
Tegra194 Jetson AGX Xavier platform ...
WARNING KERN tegra-bpmp bpmp: failed to parse memory region: -19
Looking at the binding only one of 'memory-region' or 'shmem' is
required and for Tegra194 we are using shmem. So I am not sure if it is
worth making this change for this driver.
Jon
--
nvpublic
next prev parent reply other threads:[~2025-07-28 14:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-03 18:34 Rob Herring (Arm)
2025-07-09 12:22 ` Thierry Reding
2025-07-28 14:17 ` Jon Hunter [this message]
2025-07-29 12:24 ` Thierry Reding
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=550bcad5-4de6-46fe-9f2d-f77ccbd582c6@nvidia.com \
--to=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=robh@kernel.org \
--cc=thierry.reding@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®