diff options
author | Haavard Skinnemoen <hskinnemoen@atmel.com> | 2006-10-04 16:02:08 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-04 10:25:05 -0700 |
commit | 75d35213777e2b278db57a420efbce2bdb61da93 (patch) | |
tree | 2731fc81e13bdca84e6db26a6278c3c9dedca642 /arch/arm | |
parent | 71f2e2b8783f7b270b673e31e2322572057b286a (diff) | |
download | op-kernel-dev-75d35213777e2b278db57a420efbce2bdb61da93.zip op-kernel-dev-75d35213777e2b278db57a420efbce2bdb61da93.tar.gz |
[PATCH] atmel_serial: Pass fixed register mappings through platform_data
In order to initialize the serial console early, the atmel_serial
driver had to do a hack where it compared the physical address of the
port with an address known to be permanently mapped, and used it as a
virtual address. This got around the limitation that ioremap() isn't
always available when the console is being initalized.
This patch removes that hack and replaces it with a new "regs" field
in struct atmel_uart_data that the board-specific code can initialize
to a fixed virtual mapping for platform devices where this is possible.
It also initializes the DBGU's regs field with the address the driver
used to check against.
On AVR32, the "regs" field is initialized from the physical base
address when this it can be accessed through a permanently 1:1 mapped
segment, i.e. the P4 segment.
If regs is NULL, the console initialization is delayed until the "real"
driver is up and running and ioremap() can be used.
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-at91rm9200/devices.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/mach-at91rm9200/devices.c b/arch/arm/mach-at91rm9200/devices.c index 5a3919f..0598243 100644 --- a/arch/arm/mach-at91rm9200/devices.c +++ b/arch/arm/mach-at91rm9200/devices.c @@ -561,6 +561,7 @@ static struct resource dbgu_resources[] = { static struct atmel_uart_data dbgu_data = { .use_dma_tx = 0, .use_dma_rx = 0, /* DBGU not capable of receive DMA */ + .regs = (void __iomem *)(AT91_VA_BASE_SYS + AT91_DBGU), }; static struct platform_device at91rm9200_dbgu_device = { |