serial: ns16550: Correct the base address type
PATCH 1/1 serial: ns16550: Correct the base address type
Currently ns16550_serial_assign_base() treats the argument 'base' with type ulong. This is incorrect because the base address was obtained from device tree with type fdt_addr_t that can represent a physical address larger than 32-bit in a 32-bit system.
---
drivers/serial/ns16550.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/serial/ns16550.c +1 -1
@@ -482,7 +482,7 @@ static int ns16550_serial_getinfo(struct udevice *dev,return 0 ; } -static int ns16550_serial_assign_base (struct ns16550_plat *plat,ulong base) +static int ns16550_serial_assign_base (struct ns16550_plat *plat,fdt_addr_t base) {if (base ==FDT_ADDR_T_NONE )return -EINVAL ;
Signature · 1 line
2.7.4
PATCH 1/1 serial: ns16550: Correct the base address type
Quoted 6 lines · Bin Meng
Currently
ns16550_serial_assign_base()treats the argument 'base' with typeulong. This is incorrect because the base address was obtained from device tree with typefdt_addr_tthat can represent a physical address larger than 32-bit in a 32-bit system.
Quoted 6 lines
Fixes 9e6ce62190b7 ("serial: ns16550: Fix ordering of getting base address")Signed-off-by Bin Meng <[email protected]>---
drivers/serial/ns16550.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
PATCH 1/1 serial: ns16550: Correct the base address type
Quoted 6 lines · Bin Meng
Currently
ns16550_serial_assign_base()treats the argument 'base' with typeulong. This is incorrect because the base address was obtained from device tree with typefdt_addr_tthat can represent a physical address larger than 32-bit in a 32-bit system.
Quoted 6 lines
Fixes 9e6ce62190b7 ("serial: ns16550: Fix ordering of getting base address")Signed-off-by Bin Meng <[email protected]>---
drivers/serial/ns16550.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to u-boot-dm, thanks!
PATCH 1/1 serial: ns16550: Correct the base address type
Hi Simon,
Quoted 12 lines · Simon Glass
Quoted 10 lines · Bin Meng
Currently
ns16550_serial_assign_base()treats the argument 'base' with typeulong. This is incorrect because the base address was obtained from device tree with typefdt_addr_tthat can represent a physical address larger than 32-bit in a 32-bit system.Fixes 9e6ce62190b7 ("serial: ns16550: Fix ordering of getting base address")Signed-off-by Bin Meng <[email protected]>---
Quoted 6 lines
Quoted 2 lines
drivers/serial/ns16550.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Reviewed-by Simon Glass <[email protected]>Applied to u-boot-dm, thanks!
It looks like this is still not in u-boot/master yet?
Regards,
Bin
PATCH 1/1 serial: ns16550: Correct the base address type
Hi Bin,
Quoted 16 lines · Bin Meng
Hi Simon,
Quoted 12 lines · Simon Glass
Quoted 10 lines · Bin Meng
Currently
ns16550_serial_assign_base()treats the argument 'base' with typeulong. This is incorrect because the base address was obtained from device tree with typefdt_addr_tthat can represent a physical address larger than 32-bit in a 32-bit system.Fixes 9e6ce62190b7 ("serial: ns16550: Fix ordering of getting base address")Signed-off-by Bin Meng <[email protected]>---
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
drivers/serial/ns16550.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Reviewed-by Simon Glass <[email protected]>Applied to u-boot-dm, thanks!
It looks like this is still not in u-boot/master yet?
Yes we hit a snag as Tom wants the of-platdata stuff in -next instead. I'll make a note to mess around with dm/master a bit and send a pull request with just a few fixes, including this one.
Regards,
Simon