[PATCH v2 06/10] rockchip: mtd: raw: rockchip_nfc convert dev_read_addr output to phys_addr_t

Johan Jonker jbx6244 at gmail.com
Tue Feb 7 15:54:00 CET 2023


The fdt_addr_t and phys_addr_t size have been decoupled.
A 32bit CPU can expext 64-bit data from the device tree parser,
so convert dev_read_addr output to phys_addr_t in the
rockchip_nfc.c file.

Signed-off-by: Johan Jonker <jbx6244 at gmail.com>
---
 drivers/mtd/nand/raw/rockchip_nfc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/raw/rockchip_nfc.c b/drivers/mtd/nand/raw/rockchip_nfc.c
index d016d255..78e2a691 100644
--- a/drivers/mtd/nand/raw/rockchip_nfc.c
+++ b/drivers/mtd/nand/raw/rockchip_nfc.c
@@ -1180,7 +1180,7 @@ static int rk_nfc_probe(struct udevice *dev)
 	nfc->cfg = (void *)dev_get_driver_data(dev);
 	nfc->dev = dev;

-	nfc->regs = (void *)dev_read_addr(dev);
+	nfc->regs = (void *)((phys_addr_t)dev_read_addr(dev));
 	if (IS_ERR(nfc->regs)) {
 		ret = PTR_ERR(nfc->regs);
 		goto release_nfc;
--
2.20.1



More information about the U-Boot mailing list