]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM64: zynqmp: Make DDR detection code work on 32bit system
authorMichal Simek <michal.simek@xilinx.com>
Fri, 1 Apr 2016 13:55:47 +0000 (15:55 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 13 Apr 2016 16:29:05 +0000 (18:29 +0200)
Define u64 types to be usable on 32bit system because of 64bit address
and size cells and 32bit shifts in the code.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
board/xilinx/zynqmp/zynqmp.c

index 087578cb6b9c0cf823378f27b415b2b8fe54c2af..529476b0826892d6c193ff27d54d4ba1e545cb4c 100644 (file)
@@ -63,8 +63,8 @@ static phys_size_t fdt_get_reg(const void *fdt, int nodeoffset, void *buf,
        int address_cells = fdt_address_cells(fdt, parent_offset);
        int size_cells = fdt_size_cells(fdt, parent_offset);
        char *p = buf;
-       phys_addr_t val;
-       phys_size_t vals;
+       u64 val;
+       u64 vals;
 
        debug("%s: addr_cells=%x, size_cell=%x, buf=%p, cell=%p\n",
              __func__, address_cells, size_cells, buf, cell);
@@ -166,7 +166,7 @@ int dram_init(void)
 
        gd->ram_size = fdt_get_reg(blob, node, &tmp, cell, len / FDT_REG_SIZE);
 
-       debug("%s: Initial DRAM size %llx\n", __func__, gd->ram_size);
+       debug("%s: Initial DRAM size %llx\n", __func__, (u64)gd->ram_size);
 
        return 0;
 }