* [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
* [PATCH] i.MX25: Define address mapping macros
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
0 siblings, 1 reply; 4+ messages in thread
From: Uwe Kleine-König @ 2010-03-25 9:36 UTC (permalink / raw)
To: linux-arm-kernel
Hello Matthias,
On Thu, Mar 25, 2010 at 09:50:57AM +0100, Matthias Kaehlcke wrote:
> Add macros for mapping physical addresses of i.MX25 registers to virtual
> addresses
Where do you need them? MX25_IO_ADDRESS isn't enough?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] i.MX25: Define address mapping macros
2010-03-25 9:36 ` Uwe Kleine-König
@ 2010-03-25 11:50 ` Matthias Kaehlcke
2010-03-25 18:01 ` Baruch Siach
0 siblings, 1 reply; 4+ messages in thread
From: Matthias Kaehlcke @ 2010-03-25 11:50 UTC (permalink / raw)
To: linux-arm-kernel
Hi Uwe,
El Thu, Mar 25, 2010 at 10:36:17AM +0100 Uwe Kleine-K?nig ha dit:
> Hello Matthias,
>
> On Thu, Mar 25, 2010 at 09:50:57AM +0100, Matthias Kaehlcke wrote:
> > Add macros for mapping physical addresses of i.MX25 registers to virtual
> > addresses
> Where do you need them? MX25_IO_ADDRESS isn't enough?
MX25_AIPS1_IO_ADDRESS is used in arch/arm/plat-mxc/include/mach/debug-macro.S:
#define UART_VADDR MX25_AIPS1_IO_ADDRESS(UART1_BASE_ADDR)
i added the other two for completeness
--
Matthias Kaehlcke
Embedded Linux Developer
Barcelona
We build too many walls and not enough bridges
(Isaac Newton)
.''`.
using free software / Debian GNU/Linux | http://debian.org : :' :
`. `'`
gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4 `-
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] i.MX25: Define address mapping macros
2010-03-25 11:50 ` Matthias Kaehlcke
@ 2010-03-25 18:01 ` Baruch Siach
0 siblings, 0 replies; 4+ messages in thread
From: Baruch Siach @ 2010-03-25 18:01 UTC (permalink / raw)
To: linux-arm-kernel
Hi Matthias,
On Thu, Mar 25, 2010 at 12:50:53PM +0100, Matthias Kaehlcke wrote:
> El Thu, Mar 25, 2010 at 10:36:17AM +0100 Uwe Kleine-K?nig ha dit:
>
> > On Thu, Mar 25, 2010 at 09:50:57AM +0100, Matthias Kaehlcke wrote:
> > > Add macros for mapping physical addresses of i.MX25 registers to virtual
> > > addresses
> > Where do you need them? MX25_IO_ADDRESS isn't enough?
>
> MX25_AIPS1_IO_ADDRESS is used in arch/arm/plat-mxc/include/mach/debug-macro.S:
>
> #define UART_VADDR MX25_AIPS1_IO_ADDRESS(UART1_BASE_ADDR)
>
> i added the other two for completeness
See http://thread.gmane.org/gmane.linux.ports.arm.kernel/75691 for a different
approach, and discussion of the general problem.
baruch
--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
^ permalink raw reply [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).