> Subject: Re: [U-Boot] [PATCH 16/17] imx: add dtsi for i.MX8MN > > On 12/3/2019 5:07 PM, Peng Fan wrote: > > > > > >> -----Original Message----- > >> From: Troy Kisky <troy.ki...@boundarydevices.com> > >> Sent: 2019年12月4日 6:54 > >> To: Peng Fan <peng....@nxp.com>; Stefano Babic <sba...@denx.de>; > >> u-boot@lists.denx.de > >> Subject: re: [U-Boot] [PATCH 16/17] imx: add dtsi for i.MX8MN > >> > >> |+ gpio1: gpio@30200000 { > >> |+ compatible = "fsl,imx8mn-gpio", > >> |"fsl,imx35-gpio"; > >> |+ reg = <0x30200000 0x10000>; > >> > >> Should these be 64 bit addresses ? > > > > This is imported from Linux Kernel. > > No. address-size, cell-size is 1. > > > > Regards, > > Peng. > > > >> > >> tkisky@OS2:~/u-boot$ make imx8mn_ddr4_evk_defconfig # # > configuration > >> written to .config # tkisky@OS2:~/u-boot$ grep PHYS_64BIT .config > >> CONFIG_PHYS_64BIT=y > >> > >> > >> Thanks > >> Troy > > So, is this code buggy ?
Yes, please use devfdt_get_addr_size_index Regards, Peng. > > /lib/fdtdec.c > _________________ > fdt_addr_t fdtdec_get_addr_size(const void *blob, int node, > const char *prop_name, fdt_size_t *sizep) { > int ns = sizep ? (sizeof(fdt_size_t) / sizeof(fdt32_t)) : 0; > > return fdtdec_get_addr_size_fixed(blob, node, prop_name, 0, > sizeof(fdt_addr_t) / sizeof(fdt32_t), > ns, sizep, false); > } > _________________ > > > It is using "sizeof(fdt_addr_t) / sizeof(fdt32_t)" instead of "address-cells" > > > Thanks > Troy