[PATCH v6 20/22] drivers: fix debug string with fdt_addr_t input
Johan Jonker
jbx6244 at gmail.com
Fri Mar 3 01:17:02 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 fix some
debug strings with fdt_addr_t to be able to handle both sizes.
Signed-off-by: Johan Jonker <jbx6244 at gmail.com>
Reviewed-by: Simon Glass <sjg at chromium.org>
---
Changed V5:
new patch
---
arch/arm/mach-mvebu/cpu.c | 2 +-
drivers/clk/ti/clk-ctrl.c | 9 +++++----
drivers/phy/phy-stm32-usbphyc.c | 4 ++--
3 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-mvebu/cpu.c b/arch/arm/mach-mvebu/cpu.c
index 329d1369..f58689e1 100644
--- a/arch/arm/mach-mvebu/cpu.c
+++ b/arch/arm/mach-mvebu/cpu.c
@@ -631,7 +631,7 @@ int board_xhci_enable(fdt_addr_t base)
{
const struct mbus_dram_target_info *dram;
- printf("MVEBU XHCI INIT controller @ 0x%lx\n", base);
+ printf("MVEBU XHCI INIT controller @ 0x%llx\n", (fdt64_t)base);
dram = mvebu_mbus_dram_info();
xhci_mvebu_mbus_config((void __iomem *)base, dram);
diff --git a/drivers/clk/ti/clk-ctrl.c b/drivers/clk/ti/clk-ctrl.c
index 6cc02d2e..8926e57e 100644
--- a/drivers/clk/ti/clk-ctrl.c
+++ b/drivers/clk/ti/clk-ctrl.c
@@ -44,7 +44,7 @@ static int clk_ti_ctrl_disable(struct clk *clk)
offs = priv->offs[0].start + clk->id;
err = clk_ti_ctrl_check_offs(clk, offs);
if (err) {
- dev_err(clk->dev, "invalid offset: 0x%lx\n", offs);
+ dev_err(clk->dev, "invalid offset: 0x%llx\n", (fdt64_t)offs);
return err;
}
@@ -64,7 +64,7 @@ static int clk_ti_ctrl_enable(struct clk *clk)
offs = priv->offs[0].start + clk->id;
err = clk_ti_ctrl_check_offs(clk, offs);
if (err) {
- dev_err(clk->dev, "invalid offset: 0x%lx\n", offs);
+ dev_err(clk->dev, "invalid offset: 0x%llx\n", (fdt64_t)offs);
return err;
}
@@ -125,8 +125,9 @@ static int clk_ti_ctrl_of_to_plat(struct udevice *dev)
}
priv->offs[i].end = priv->offs[i].start + fdt_size;
- dev_dbg(dev, "start=0x%08lx, end=0x%08lx\n",
- priv->offs[i].start, priv->offs[i].end);
+ dev_dbg(dev, "start=0x%016llx, end=0x%016llx\n",
+ (fdt64_t)priv->offs[i].start,
+ (fdt64_t)priv->offs[i].end);
}
return 0;
diff --git a/drivers/phy/phy-stm32-usbphyc.c b/drivers/phy/phy-stm32-usbphyc.c
index dcf2194e..15bd60ca 100644
--- a/drivers/phy/phy-stm32-usbphyc.c
+++ b/drivers/phy/phy-stm32-usbphyc.c
@@ -583,8 +583,8 @@ static int stm32_usbphyc_probe(struct udevice *dev)
phy_id = ofnode_read_u32_default(node, "reg", FDT_ADDR_T_NONE);
if (phy_id >= MAX_PHYS) {
- dev_err(dev, "invalid reg value %lx for %s\n",
- phy_id, ofnode_get_name(node));
+ dev_err(dev, "invalid reg value %llx for %s\n",
+ (fdt64_t)phy_id, ofnode_get_name(node));
return -ENOENT;
}
--
2.20.1
More information about the U-Boot
mailing list