[PATCH v3 05/11] rockchip: timer: dw-apb-timer: convert dev_read_addr output to phys_addr_t

Johan Jonker jbx6244 at gmail.com
Thu Feb 16 18:59:13 CET 2023


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

Signed-off-by: Johan Jonker <jbx6244 at gmail.com>
Reviewed-by: Kever Yang <kever.yang at rock-chips.com>
---
 drivers/timer/dw-apb-timer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/timer/dw-apb-timer.c b/drivers/timer/dw-apb-timer.c
index 10f0a9f6..f55a3c54 100644
--- a/drivers/timer/dw-apb-timer.c
+++ b/drivers/timer/dw-apb-timer.c
@@ -23,7 +23,7 @@
 #define DW_APB_CTRL		0x8

 struct dw_apb_timer_priv {
-	fdt_addr_t regs;
+	phys_addr_t regs;
 	struct reset_ctl_bulk resets;
 };

@@ -92,7 +92,7 @@ static int dw_apb_timer_of_to_plat(struct udevice *dev)
 	if (CONFIG_IS_ENABLED(OF_REAL)) {
 		struct dw_apb_timer_priv *priv = dev_get_priv(dev);

-		priv->regs = dev_read_addr(dev);
+		priv->regs = (phys_addr_t)dev_read_addr(dev);
 	}

 	return 0;
--
2.20.1



More information about the U-Boot mailing list