drivers: fix debug string with fdt_addr_t input

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@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Johan Jonker 2023-03-13 01:32:57 +01:00 committed by Kever Yang
parent 0d01046ea3
commit 84404d8165
3 changed files with 8 additions and 7 deletions

View file

@ -630,7 +630,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);

View file

@ -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;

View file

@ -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;
}