Introduce map_physmem() and unmap_physmem()
authorHaavard Skinnemoen <hskinnemoen@atmel.com>
Thu, 13 Dec 2007 11:56:33 +0000 (12:56 +0100)
committerStefan Roese <sr@denx.de>
Thu, 13 Dec 2007 12:15:16 +0000 (13:15 +0100)
commit4d7d6936eb29af7cca330937808312aa5f61454d
treeb376f7dce492d171cf6740ac4ec36574e94eec1e
parentcdbaefb5f5f03e54455d0439dcf6dbd97ead1f9d
Introduce map_physmem() and unmap_physmem()

map_physmem() returns a virtual address which can be used to access a
given physical address without involving the cache. unmap_physmem()
should be called when the virtual address returned by map_physmem() is
no longer needed.

This patch adds a stub implementation which simply returns the
physical address cast to a uchar * for all architectures except AVR32,
which converts the physical address to an uncached virtual mapping.
unmap_physmem() is a no-op on all architectures, but if any
architecture needs to do such mappings through the TLB, this is the
hook where those TLB entries can be invalidated.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
include/asm-arm/io.h
include/asm-avr32/io.h
include/asm-blackfin/io.h
include/asm-i386/io.h
include/asm-m68k/io.h
include/asm-microblaze/io.h
include/asm-mips/io.h
include/asm-nios/io.h
include/asm-nios2/io.h
include/asm-ppc/io.h