From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Liang Date: Fri, 17 Jul 2020 16:50:09 +0800 Subject: [PATCH] riscv: ae350: Use fdtdec_get_addr_size_auto_noparent to parse smc reg In-Reply-To: <20200717082444.29631-1-uboot@andestech.com> References: <20200717082444.29631-1-uboot@andestech.com> Message-ID: <20200717085009.GA29416@andestech.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Jul 17, 2020 at 04:24:44PM +0800, Open Source Project uboot wrote: > From: Rick Chen > > 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 > --- > 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