Some parts can support large physical mappings; so make the
size argument to addrmap_set_entry a phys_size_t.  Also update
the 85xx tlb code to be sure the size quantity is unsigned.

Signed-off-by: Becky Bruce <[EMAIL PROTECTED]>
---
 cpu/mpc85xx/tlb.c      |    4 ++--
 include/addr_map.h     |    2 +-
 lib_generic/addr_map.c |    4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/cpu/mpc85xx/tlb.c b/cpu/mpc85xx/tlb.c
index f80d8b2..5b5f791 100644
--- a/cpu/mpc85xx/tlb.c
+++ b/cpu/mpc85xx/tlb.c
@@ -55,7 +55,7 @@ void set_tlb(u8 tlb, u32 epn, u64 rpn,
 
 #ifdef CONFIG_ADDR_MAP
        if ((tlb == 1) && (gd->flags & GD_FLG_RELOC))
-               addrmap_set_entry(epn, rpn, (1 << ((tsize * 2) + 10)), esel);
+               addrmap_set_entry(epn, rpn, (1UL << ((tsize * 2) + 10)), esel);
 #endif
 }
 
@@ -117,7 +117,7 @@ void init_addr_map(void)
 
                addrmap_set_entry(tlb_table[i].epn,
                        tlb_table[i].rpn,
-                       (1 << ((tlb_table[i].tsize * 2) + 10)),
+                       (1UL << ((tlb_table[i].tsize * 2) + 10)),
                        tlb_table[i].esel);
        }
 
diff --git a/include/addr_map.h b/include/addr_map.h
index 234487a..d55f5f6 100644
--- a/include/addr_map.h
+++ b/include/addr_map.h
@@ -24,6 +24,6 @@
 extern phys_addr_t addrmap_virt_to_phys(void *vaddr);
 extern unsigned long addrmap_phys_to_virt(phys_addr_t paddr);
 extern void addrmap_set_entry(unsigned long vaddr, phys_addr_t paddr,
-                               unsigned long size, int idx);
+                               phys_size_t size, int idx);
 
 #endif
diff --git a/lib_generic/addr_map.c b/lib_generic/addr_map.c
index b8d9c2d..ff8532c 100644
--- a/lib_generic/addr_map.c
+++ b/lib_generic/addr_map.c
@@ -21,8 +21,8 @@
 
 static struct {
        phys_addr_t paddr;
+       phys_size_t size;
        unsigned long vaddr;
-       unsigned long size;
 } address_map[CONFIG_SYS_NUM_ADDR_MAP];
 
 phys_addr_t addrmap_virt_to_phys(void * vaddr)
@@ -70,7 +70,7 @@ unsigned long addrmap_phys_to_virt(phys_addr_t paddr)
 }
 
 void addrmap_set_entry(unsigned long vaddr, phys_addr_t paddr,
-                       unsigned long size, int idx)
+                       phys_size_t size, int idx)
 {
        if (idx > CONFIG_SYS_NUM_ADDR_MAP)
                return;
-- 
1.5.6.5

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to