imx: add dtsi for i.MX8MN
PATCH 16/17 imx: add dtsi for i.MX8MN
|+ gpio1: gpio at 30200000 {
|+ compatible = "fsl,imx8mn-gpio",
|"fsl,imx35-gpio";
|+ reg = <0x30200000 0x10000>;Should these be 64 bit addresses ?
tkisky at OS2:~/u-boot$ make imx8mn_ddr4_evk_defconfig #
# configuration written to .config # tkisky at OS2:~/u-boot$ grep PHYS_64BIT .config CONFIG_PHYS_64BIT=y
Thanks
Troy
PATCH 16/17 imx: add dtsi for i.MX8MN
Quoted 9 lines
-----Original Message-----
From: Troy Kisky <[email protected]>
Sent: 2019年12月4日 6:54
To: Peng Fan <[email protected]>; Stefano Babic <[email protected]>; u-boot at lists.denx.de
Subject: re: [U-Boot] [PATCH 16/17] imx: add dtsi for i.MX8MN
Quoted 6 lines
|+ gpio1: gpio at 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.
Quoted 8 lines
tkisky at OS2:~/u-boot$ make
imx8mn_ddr4_evk_defconfig# # configuration written to .config # tkisky at OS2:~/u-boot$ grepPHYS_64BIT.configCONFIG_PHYS_64BIT=yThanks
Troy
PATCH 16/17 imx: add dtsi for i.MX8MN
Quoted 14 lines · Peng Fan
Quoted 14 lines
-----Original Message-----
From: Troy Kisky <[email protected]>
Sent: 2019年12月4日 6:54
To: Peng Fan <[email protected]>; Stefano Babic <[email protected]>; u-boot at lists.denx.de
Subject: re: [U-Boot] [PATCH 16/17] imx: add dtsi for i.MX8MN|+ gpio1: gpio at 30200000 { |+ compatible = "fsl,imx8mn-gpio", |"fsl,imx35-gpio"; |+ reg = <0x30200000 0x10000>;
Quoted 16 lines
Quoted 1 line
Should these be 64 bit addresses ?
This is imported from Linux Kernel.
No. address-size, cell-size is 1.Regards,
Peng.Quoted 8 lines
tkisky at OS2:~/u-boot$ make
imx8mn_ddr4_evk_defconfig# # configuration written to .config # tkisky at OS2:~/u-boot$ grepPHYS_64BIT.configCONFIG_PHYS_64BIT=yThanks
Troy
So, is this code buggy ?
/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
PATCH 16/17 imx: add dtsi for i.MX8MN
Quoted 28 lines
Subject: Re: [U-Boot] [PATCH 16/17] imx: add dtsi for i.MX8MN
Quoted 14 lines · Peng Fan
Quoted 14 lines
-----Original Message-----
From: Troy Kisky <[email protected]>
Sent: 2019年12月4日 6:54
To: Peng Fan <[email protected]>; Stefano Babic <[email protected]>; u-boot at lists.denx.de
Subject: re: [U-Boot] [PATCH 16/17] imx: add dtsi for i.MX8MN|+ gpio1: gpio at 30200000 { |+ compatible = "fsl,imx8mn-gpio", |"fsl,imx35-gpio"; |+ reg = <0x30200000 0x10000>;Quoted 10 lines
Quoted 1 line
Should these be 64 bit addresses ?
This is imported from Linux Kernel.
No. address-size, cell-size is 1.Regards,
Peng.Quoted 2 lines
tkisky at OS2:~/u-boot$ make
imx8mn_ddr4_evk_defconfig# #configuration
Quoted 8 lines
Quoted 6 lines
Quoted 6 lines
written to .config # tkisky at OS2:~/u-boot$ grep
PHYS_64BIT.configCONFIG_PHYS_64BIT=yThanks
TroySo, is this code buggy ?
Yes, please use devfdt_get_addr_size_index
Regards,
Peng.
Quoted 19 lines
/lib/fdtdec.c
_________________fdt_addr_tfdtdec_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
PATCH 16/17 imx: add dtsi for i.MX8MN
Quoted 9 lines · Peng Fan
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Troy
So, is this code buggy ?
Yes, please use
devfdt_get_addr_size_indexRegards,
Peng.
Thanks, that was my problem.
BR
Troy