linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i.MX25: Define address mapping macros
@ 2010-03-25  8:50 Matthias Kaehlcke
  2010-03-25  9:36 ` Uwe Kleine-König
  0 siblings, 1 reply; 4+ messages in thread
From: Matthias Kaehlcke @ 2010-03-25  8:50 UTC (permalink / raw)
  To: linux-arm-kernel

Add macros for mapping physical addresses of i.MX25 registers to virtual
addresses

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
---
 arch/arm/plat-mxc/include/mach/mx25.h |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-mxc/include/mach/mx25.h b/arch/arm/plat-mxc/include/mach/mx25.h
index 4eb6e33..4821fcd 100644
--- a/arch/arm/plat-mxc/include/mach/mx25.h
+++ b/arch/arm/plat-mxc/include/mach/mx25.h
@@ -27,6 +27,19 @@
 	IMX_IO_ADDRESS(x, MX25_AIPS2) ?:			\
 	IMX_IO_ADDRESS(x, MX25_AVIC))
 
+/*
+ * define the address mapping macros: in physical address order
+ */
+
+#define MX25_AIPS1_IO_ADDRESS(x)  \
+	(((x) - MX25_AIPS1_BASE_ADDR) + MX25_AIPS1_BASE_ADDR_VIRT)
+
+#define MX25_AIPS2_IO_ADDRESS(x)  \
+	(((x) - MX25_AIPS2_BASE_ADDR) + MX25_AIPS2_BASE_ADDR_VIRT)
+
+#define MX25_AVIC_IO_ADDRESS(x)  \
+	(((x) - MX25_AVIC_BASE_ADDR) + MX25_AVIC_BASE_ADDR_VIRT)
+
 #define MX25_UART1_BASE_ADDR		0x43f90000
 #define MX25_UART2_BASE_ADDR		0x43f94000
 
-- 
1.6.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-03-25 18:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-25  8:50 [PATCH] i.MX25: Define address mapping macros Matthias Kaehlcke
2010-03-25  9:36 ` Uwe Kleine-König
2010-03-25 11:50   ` Matthias Kaehlcke
2010-03-25 18:01     ` Baruch Siach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).