]> git.sur5r.net Git - u-boot/commitdiff
fdt: armv8: Fix build warnings on armv8
authorHaikun Wang <Haikun.Wang@freescale.com>
Fri, 26 Jun 2015 11:56:40 +0000 (19:56 +0800)
committerSimon Glass <sjg@chromium.org>
Mon, 20 Jul 2015 13:21:47 +0000 (07:21 -0600)
Fix below build warnings on armv8,
drivers/spi/fsl_dspi.c: In function ‘fsl_dspi_ofdata_to_platdata’:
drivers/spi/fsl_dspi.c:667:2:
warning: format ‘%x’ expects argument of type ‘unsigned int’,
but argument 2 has type ‘fdt_addr_t’ [-Wformat=]
debug("DSPI: regs=0x%x, max-frequency=%d, endianess=%s, num-cs=%d\n",
    ^
lib/fdtdec.c: In function ‘fdtdec_get_addr_size’:
lib/fdtdec.c:105:4:
warning: format ‘%lx’ expects argument of type ‘long unsigned int’,
but argument 3 has type ‘fdt_size_t’ [-Wformat=]
debug("addr=%08lx, size=%08lx\n",
    ^

Signed-off-by: Haikun Wang <haikun.wang@freescale.com>
Acked-by: Simon Glass <sjg@chromium.org>
drivers/spi/fsl_dspi.c
lib/fdtdec.c

index 6476f913c8d73b8892c5942fc21fc26b2c041afa..792853192ed78fc661b467d2f5c21405f97bdd47 100644 (file)
@@ -664,8 +664,8 @@ static int fsl_dspi_ofdata_to_platdata(struct udevice *bus)
        plat->speed_hz = fdtdec_get_int(blob,
                        node, "spi-max-frequency", FSL_DSPI_DEFAULT_SCK_FREQ);
 
-       debug("DSPI: regs=0x%x, max-frequency=%d, endianess=%s, num-cs=%d\n",
-             plat->regs_addr, plat->speed_hz,
+       debug("DSPI: regs=0x%llx, max-frequency=%d, endianess=%s, num-cs=%d\n",
+             (u64)plat->regs_addr, plat->speed_hz,
              plat->flags & DSPI_FLAG_REGMAP_ENDIAN_BIG ? "be" : "le",
              plat->num_chipselect);
 
index 9877849f99b490607d8ffc0d33048290f19a1058..9c6b3619da24cd9ad5c4894d848298ff380d3419 100644 (file)
@@ -102,8 +102,8 @@ fdt_addr_t fdtdec_get_addr_size(const void *blob, int node,
                        size = (fdt_size_t *)((char *)cell +
                                        sizeof(fdt_addr_t));
                        *sizep = fdt_size_to_cpu(*size);
-                       debug("addr=%08lx, size=%08x\n",
-                             (ulong)addr, *sizep);
+                       debug("addr=%08lx, size=%llx\n",
+                             (ulong)addr, (u64)*sizep);
                } else {
                        debug("%08lx\n", (ulong)addr);
                }