]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
drivers: fix debug string with fdt_addr_t input
authorJohan Jonker <jbx6244@gmail.com>
Mon, 13 Mar 2023 00:32:57 +0000 (01:32 +0100)
committerKever Yang <kever.yang@rock-chips.com>
Sat, 6 May 2023 09:28:18 +0000 (17:28 +0800)
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>
arch/arm/mach-mvebu/cpu.c
drivers/clk/ti/clk-ctrl.c
drivers/phy/phy-stm32-usbphyc.c

index 1676032682b5060d8f82c9f02ea292d3f9f34247..6deffb8183620550b553130e1f400e373ae52ff9 100644 (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);
index 6cc02d2eeaa51f2e95fefd1e52cd3f2d1fc4c04b..8926e57ebc848a8a080eb2be1a6337a8bbdf59bc 100644 (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;
index dcf2194e9a7c329570d3990dbeb580a7ae4d316c..15bd60ca8c5e180a725ae6dbfd23ef10daac01fd 100644 (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;
                }