summaryrefslogtreecommitdiff
path: root/include/asm-blackfin
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2008-12-13 17:20:27 -0600
committerWolfgang Denk <wd@denx.de>2008-12-15 22:04:29 +0100
commit65e43a10631537dcb92c302d36301a12308216c3 (patch)
tree68b2712c8c277d0489768ecbff8ed031dde00a3f /include/asm-blackfin
parent45845301af3de8675c1f7bbc815c6de35452605a (diff)
downloadu-boot-imx-65e43a10631537dcb92c302d36301a12308216c3.zip
u-boot-imx-65e43a10631537dcb92c302d36301a12308216c3.tar.gz
u-boot-imx-65e43a10631537dcb92c302d36301a12308216c3.tar.bz2
Introduce virt_to_phys()
virt_to_phys() returns the physical address given a virtual. In most cases this will be just the input value as the vast majority of systems run in a 1:1 mode. However in systems that are not running this way it should report the physical address or ~0 if no mapping exists for the given virtual address. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'include/asm-blackfin')
-rw-r--r--include/asm-blackfin/io.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/asm-blackfin/io.h b/include/asm-blackfin/io.h
index da58914..6806494 100644
--- a/include/asm-blackfin/io.h
+++ b/include/asm-blackfin/io.h
@@ -64,6 +64,11 @@ 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);
+}
+
/*
* These are for ISA/PCI shared memory _only_ and should never be used
* on any other type of memory, including Zorro memory. They are meant to