]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Fix LMB type issues
authorAndy Fleming <afleming@freescale.com>
Mon, 7 Jul 2008 19:24:39 +0000 (14:24 -0500)
committerWolfgang Denk <wd@denx.de>
Wed, 9 Jul 2008 22:39:28 +0000 (00:39 +0200)
The LMB code now uses phys_addr_t and phys_size_t.  Also, there were a couple
of casting problems in the bootm code that called the LMB functions.

Signed-off-by: Andy Fleming <afleming@freescale.com>
include/lmb.h
lib_generic/lmb.c
lib_ppc/bootm.c

index 02830756392aeb7f6998e5afee6dc12eeaa597da..14e8727f0669c5fe98a8e275191fd098986eff34 100644 (file)
@@ -43,7 +43,7 @@ extern phys_addr_t lmb_alloc_base(struct lmb *lmb, phys_size_t size, ulong align
 extern phys_addr_t __lmb_alloc_base(struct lmb *lmb, phys_size_t size, ulong align,
                              phys_addr_t max_addr);
 extern int lmb_is_reserved(struct lmb *lmb, phys_addr_t addr);
-extern long lmb_free(struct lmb *lmb, u64 base, u64 size);
+extern long lmb_free(struct lmb *lmb, phys_addr_t base, phys_size_t size);
 
 extern void lmb_dump_all(struct lmb *lmb);
 
index 93264c15ec6153debfa859c65087aef5ba8553f6..6b46fa88684640d134ad7ef94217e1c57b9abfbf 100644 (file)
@@ -181,11 +181,11 @@ long lmb_add(struct lmb *lmb, phys_addr_t base, phys_size_t size)
        return lmb_add_region(_rgn, base, size);
 }
 
-long lmb_free(struct lmb *lmb, u64 base, u64 size)
+long lmb_free(struct lmb *lmb, phys_addr_t base, phys_size_t size)
 {
        struct lmb_region *rgn = &(lmb->reserved);
-       u64 rgnbegin, rgnend;
-       u64 end = base + size;
+       phys_addr_t rgnbegin, rgnend;
+       phys_addr_t end = base + size;
        int i;
 
        rgnbegin = rgnend = 0; /* supress gcc warnings */
index b0d224e62925e91cb6123f7bd67d1983dfd2d3a9..81803ddef3dd0aca138359374bf123a4641595b9 100644 (file)
@@ -212,7 +212,8 @@ do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
                }
 
                /* Delete the old LMB reservation */
-               lmb_free(lmb, (uint64_t)(u32)of_flat_tree, fdt_totalsize(of_flat_tree));
+               lmb_free(lmb, (phys_addr_t)(u32)of_flat_tree,
+                               (phys_size_t)fdt_totalsize(of_flat_tree));
 
                /* Calculate the actual size of the fdt */
                actualsize = fdt_off_dt_strings(of_flat_tree) +