Merge branch 'master' of git://git.denx.de/u-boot-video
[oweals/u-boot.git] / arch / arm / include / asm / io.h
index 88ecddbc41e2923321b07fd299a66c676e0ea326..75773bdbe079701026986037f3bc019c5fc45b12 100644 (file)
@@ -46,7 +46,7 @@ static inline void sync(void)
 static inline void *
 map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags)
 {
-       return (void *)paddr;
+       return (void *)((unsigned long)paddr);
 }
 
 /*
@@ -59,7 +59,7 @@ static inline void unmap_physmem(void *vaddr, unsigned long flags)
 
 static inline phys_addr_t virt_to_phys(void * vaddr)
 {
-       return (phys_addr_t)(vaddr);
+       return (phys_addr_t)((unsigned long)vaddr);
 }
 
 /*
@@ -376,7 +376,12 @@ out:
        return retval;
 }
 
-#elif !defined(readb)
+#else
+#define memset_io(a, b, c)             memset((void *)(a), (b), (c))
+#define memcpy_fromio(a, b, c)         memcpy((a), (void *)(b), (c))
+#define memcpy_toio(a, b, c)           memcpy((void *)(a), (b), (c))
+
+#if !defined(readb)
 
 #define readb(addr)                    (__readwrite_bug("readb"),0)
 #define readw(addr)                    (__readwrite_bug("readw"),0)
@@ -389,6 +394,7 @@ out:
 
 #define check_signature(io,sig,len)    (0)
 
+#endif
 #endif /* __mem_pci */
 
 /*