]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: uniphier: fix warnings reported by aarch64 compiler
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 26 Feb 2016 09:59:45 +0000 (18:59 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 29 Feb 2016 15:33:29 +0000 (00:33 +0900)
The UniPhier SoC family has not supported ARMv8 yet, but these would
cause warnings if they were compiled with a 64bit compiler.  Before
adding the ARMv8 support really, fix them now.

Because UniPhier SoCs do not support Large Physical Address Extension,
casting "phys_addr_t" into "unsigned long" would carry the address
as is.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
arch/arm/mach-uniphier/dram_init.c
arch/arm/mach-uniphier/micro-support-card.c
arch/arm/mach-uniphier/sg-regs.h

index 32cc448aeb5b3b71b2f40c696dbaa0b84ed1db7c..cffdfc9841c57b62caeb4e200e2c331a8241c646 100644 (file)
@@ -32,7 +32,7 @@ int dram_init(void)
 
        gd->ram_size = fdt32_to_cpu(*(val + 1));
 
-       debug("DRAM size = %08lx\n", gd->ram_size);
+       debug("DRAM size = %08lx\n", (unsigned long)gd->ram_size);
 
        return 0;
 }
@@ -54,6 +54,7 @@ void dram_init_banksize(void)
                gd->bd->bi_dram[i].size = fdt32_to_cpu(*val++);
 
                debug("DRAM bank %d: start = %08lx, size = %08lx\n",
-                     i, gd->bd->bi_dram[i].start, gd->bd->bi_dram[i].size);
+                     i, (unsigned long)gd->bd->bi_dram[i].start,
+                     (unsigned long)gd->bd->bi_dram[i].size);
        }
 }
index f777ac1ffe41fa4e2e74b42c44b708d6f99f36e8..f7a37e3e4c649a64c87c3b32f33c0c49c3e29102 100644 (file)
@@ -142,7 +142,8 @@ static void detect_num_flash_banks(void)
                                                                memory_bank;
 
                        debug("flash bank found: base = 0x%lx, size = 0x%lx\n",
-                             memory_bank->base, memory_bank->size);
+                             (unsigned long)memory_bank->base,
+                             (unsigned long)memory_bank->size);
                        cfi_flash_num_flash_banks++;
                }
        }
index 678d437fc97fb232ff33f1294cabe92bbe02958c..3a535c70b2d9534f2e2cfbe4a64e81951dcb1071 100644 (file)
@@ -105,7 +105,7 @@ static inline void sg_set_pinsel(unsigned pin, unsigned muxval,
                                 unsigned mux_bits, unsigned reg_stride)
 {
        unsigned shift = pin * mux_bits % 32;
-       unsigned reg = SG_PINCTRL_BASE + pin * mux_bits / 32 * reg_stride;
+       unsigned long reg = SG_PINCTRL_BASE + pin * mux_bits / 32 * reg_stride;
        u32 mask = (1U << mux_bits) - 1;
        u32 tmp;