diff options
author | rick <rick@andestech.com> | 2017-08-29 10:12:02 +0800 |
---|---|---|
committer | Andes <uboot@andestech.com> | 2017-09-21 10:30:22 +0800 |
commit | e336b73d8ae06dbcc532d1833d7a5567babecca8 (patch) | |
tree | 321b204124ad50381608dd5acc6ca8b1aa4b7892 /arch/nds32/include/asm | |
parent | ce4e2370f70f4bbd79e553dca73ec4439bfd567e (diff) | |
download | u-boot-e336b73d8ae06dbcc532d1833d7a5567babecca8.tar.gz |
nds32: ftmac100 support cache enable.
Enable cache and ftmac100 performance can be improved.
Signed-off-by: rick <rick@andestech.com>
Diffstat (limited to 'arch/nds32/include/asm')
-rw-r--r-- | arch/nds32/include/asm/io.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/nds32/include/asm/io.h b/arch/nds32/include/asm/io.h index b2c4d0ef8c..e8ee961526 100644 --- a/arch/nds32/include/asm/io.h +++ b/arch/nds32/include/asm/io.h @@ -48,6 +48,27 @@ static inline void sync(void) #define MAP_WRBACK (0) #define MAP_WRTHROUGH (0) +#ifdef CONFIG_ARCH_MAP_SYSMEM +static inline void *map_sysmem(phys_addr_t paddr, unsigned long len) +{ + if(paddr <PHYS_SDRAM_0_SIZE + PHYS_SDRAM_1_SIZE) + paddr = paddr | 0x40000000; + return (void *)(uintptr_t)paddr; +} + +static inline void *unmap_sysmem(const void *vaddr) +{ + phys_addr_t paddr = (phys_addr_t)vaddr; + paddr = paddr & ~0x40000000; + return (void *)(uintptr_t)paddr; +} + +static inline phys_addr_t map_to_sysmem(const void *ptr) +{ + return (phys_addr_t)(uintptr_t)ptr; +} +#endif + static inline void * map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags) { |