mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eddie James <eajames@linux.ibm.com>
To: "Rob Herring (Arm)" <robh@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-fsi@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	Ninad Palsule <ninad@linux.ibm.com>
Subject: Re: [PATCH] fsi: master-ast-cf: Use of_reserved_mem_region_to_resource for "memory-region"
Date: Tue, 8 Jul 2025 10:03:03 -0500	[thread overview]
Message-ID: <6e6b8559-fc16-4894-95c8-35669def48e2@linux.ibm.com> (raw)
In-Reply-To: <20250703183439.2073555-1-robh@kernel.org>


On 7/3/25 13:34, Rob Herring (Arm) wrote:
> Use the newly added of_reserved_mem_region_to_resource() function to
> handle "memory-region" properties.


Reviewed-by: Eddie James <eajames@linux.ibm.com>

Thanks Rob.


>
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
>   drivers/fsi/fsi-master-ast-cf.c | 11 ++---------
>   1 file changed, 2 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/fsi/fsi-master-ast-cf.c b/drivers/fsi/fsi-master-ast-cf.c
> index 9f2fd444ceb6..e67d7cd30fca 100644
> --- a/drivers/fsi/fsi-master-ast-cf.c
> +++ b/drivers/fsi/fsi-master-ast-cf.c
> @@ -13,13 +13,13 @@
>   #include <linux/irqflags.h>
>   #include <linux/module.h>
>   #include <linux/of.h>
> +#include <linux/of_reserved_mem.h>
>   #include <linux/platform_device.h>
>   #include <linux/slab.h>
>   #include <linux/regmap.h>
>   #include <linux/firmware.h>
>   #include <linux/gpio/aspeed.h>
>   #include <linux/mfd/syscon.h>
> -#include <linux/of_address.h>
>   #include <linux/genalloc.h>
>   
>   #include "fsi-master.h"
> @@ -1285,14 +1285,7 @@ static int fsi_master_acf_probe(struct platform_device *pdev)
>   	master->gpio_mux = gpio;
>   
>   	/* Grab the reserved memory region (use DMA API instead ?) */
> -	np = of_parse_phandle(mnode, "memory-region", 0);
> -	if (!np) {
> -		dev_err(&pdev->dev, "Didn't find reserved memory\n");
> -		rc = -EINVAL;
> -		goto err_free;
> -	}
> -	rc = of_address_to_resource(np, 0, &res);
> -	of_node_put(np);
> +	rc = of_reserved_mem_region_to_resource(mnode, 0, &res);
>   	if (rc) {
>   		dev_err(&pdev->dev, "Couldn't address to resource for reserved memory\n");
>   		rc = -ENOMEM;

      reply	other threads:[~2025-07-08 15:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-03 18:34 Rob Herring (Arm)
2025-07-08 15:03 ` Eddie James [this message]

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=6e6b8559-fc16-4894-95c8-35669def48e2@linux.ibm.com \
    --to=eajames@linux.ibm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-fsi@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ninad@linux.ibm.com \
    --cc=robh@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 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®