On 2015年11月16日 22:36, Thomas Chou wrote:
Add mapping between physical and virtual address. Signed-off-by: Thomas Chou <tho...@wytron.com.tw> --- arch/arc/include/asm/io.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)
Drop this patch as it is taken cared by Alexey Brodkin. - Thomas
diff --git a/arch/arc/include/asm/io.h b/arch/arc/include/asm/io.h index 24b7337..273e9f9 100644 --- a/arch/arc/include/asm/io.h +++ b/arch/arc/include/asm/io.h @@ -15,6 +15,34 @@ static inline void sync(void) /* Not yet implemented */ } +/* + * Given a physical address and a length, return a virtual address + * that can be used to access the memory range with the caching + * properties specified by "flags". + */ +#define MAP_NOCACHE (0) +#define MAP_WRCOMBINE (0) +#define MAP_WRBACK (0) +#define MAP_WRTHROUGH (0) + +static inline void *map_physmem(phys_addr_t paddr, unsigned long len, + unsigned long flags) +{ + return (void *)(uintptr_t)paddr; +} + +/* + * Take down a mapping set up by map_physmem(). + */ +static inline void unmap_physmem(void *vaddr, unsigned long flags) +{ +} + +static inline phys_addr_t virt_to_phys(void *vaddr) +{ + return (phys_addr_t)(uintptr_t)vaddr; +} + static inline u8 __raw_readb(const volatile void __iomem *addr) { u8 b;
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot