aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHaavard Skinnemoen <hskinnemoen@atmel.com>2006-10-04 16:02:08 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-04 10:25:05 -0700
commit75d35213777e2b278db57a420efbce2bdb61da93 (patch)
tree2731fc81e13bdca84e6db26a6278c3c9dedca642 /include
parent71f2e2b8783f7b270b673e31e2322572057b286a (diff)
downloadlinux-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 'include')
-rw-r--r--include/asm-arm/arch-at91rm9200/board.h1
-rw-r--r--include/asm-avr32/arch-at32ap/board.h5
2 files changed, 6 insertions, 0 deletions
diff --git a/include/asm-arm/arch-at91rm9200/board.h b/include/asm-arm/arch-at91rm9200/board.h
index d56527055c9d6..3cc9aec80f9d5 100644
--- a/include/asm-arm/arch-at91rm9200/board.h
+++ b/include/asm-arm/arch-at91rm9200/board.h
@@ -103,6 +103,7 @@ extern void __init at91_init_serial(struct at91_uart_config *config);
struct atmel_uart_data {
short use_dma_tx; /* use transmit DMA? */
short use_dma_rx; /* use receive DMA? */
+ void __iomem *regs; /* virtual base address, if any */
};
extern void __init at91_add_device_serial(void);
diff --git a/include/asm-avr32/arch-at32ap/board.h b/include/asm-avr32/arch-at32ap/board.h
index 82e5404d2f48e..435507281f895 100644
--- a/include/asm-avr32/arch-at32ap/board.h
+++ b/include/asm-avr32/arch-at32ap/board.h
@@ -12,6 +12,11 @@ void at32_add_system_devices(void);
#define ATMEL_MAX_UART 4
extern struct platform_device *atmel_default_console_device;
+struct atmel_uart_data {
+ short use_dma_tx; /* use transmit DMA? */
+ short use_dma_rx; /* use receive DMA? */
+ void __iomem *regs; /* virtual base address, if any */
+};
struct platform_device *at32_add_device_usart(unsigned int id);
struct eth_platform_data {