public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Leo Liang <ycliang@andestech.com>
To: u-boot@lists.denx.de
Subject: [PATCH] riscv: ae350: Use fdtdec_get_addr_size_auto_noparent to parse smc reg
Date: Fri, 17 Jul 2020 16:50:09 +0800	[thread overview]
Message-ID: <20200717085009.GA29416@andestech.com> (raw)
In-Reply-To: <20200717082444.29631-1-uboot@andestech.com>

On Fri, Jul 17, 2020 at 04:24:44PM +0800, Open Source Project uboot wrote:
> From: Rick Chen <rick@andestech.com>
> 
> Use fdtdec_get_addr_size_auto_noparent to read the "reg" property
> instead of fdtdec_get_addr. This will increase the compatibility
> of dtb parsing.
> 
> Signed-off-by: Rick Chen <rick@andestech.com>
> ---
>  board/AndesTech/ax25-ae350/ax25-ae350.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/board/AndesTech/ax25-ae350/ax25-ae350.c b/board/AndesTech/ax25-ae350/ax25-ae350.c
> index da5bc5b..231a0d5 100644
> --- a/board/AndesTech/ax25-ae350/ax25-ae350.c
> +++ b/board/AndesTech/ax25-ae350/ax25-ae350.c
> @@ -71,7 +71,8 @@ int smc_init(void)
>  	if (node < 0)
>  		return -FDT_ERR_NOTFOUND;
>  
> -	addr = fdtdec_get_addr(blob, node, "reg");
> +	addr = fdtdec_get_addr_size_auto_noparent(blob, node,
> +		"reg", 0, NULL, false);
>  
>  	if (addr == FDT_ADDR_T_NONE)
>  		return -EINVAL;
> -- 
> 2.7.4
>
Acked-by: Leo Liang <ycliang@andestech.com>

  reply	other threads:[~2020-07-17  8:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-17  8:24 [PATCH] riscv: ae350: Use fdtdec_get_addr_size_auto_noparent to parse smc reg Andes
2020-07-17  8:50 ` Leo Liang [this message]
2020-07-17  9:38 ` Bin Meng
2020-07-17 10:13   ` Leo Liang

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=20200717085009.GA29416@andestech.com \
    --to=ycliang@andestech.com \
    --cc=u-boot@lists.denx.de \
    /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