aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32/boards
diff options
context:
space:
mode:
authorHaavard Skinnemoen <hskinnemoen@atmel.com>2006-10-04 10:02:10 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-04 13:25:06 -0400
commitc194588dba968510b5aa7a1818bd2c8b36a416f7 (patch)
tree4c9379f6482572340ab701c369e8b01eb2b43493 /arch/avr32/boards
parentacca9b83acfe89fbb7421d5412176dee2ad2959a (diff)
[PATCH] AVR32: Allow renumbering of serial devices
Allow the board to remap actual USART peripheral devices to serial devices by calling at32_map_usart(hw_id, serial_line). This ensures that even though ATSTK1002 uses USART1 as the first serial port, it will still have a ttyS0 device. This also adds a board-specific early setup hook and moves the at32_setup_serial_console() call there from the platform code. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/avr32/boards')
-rw-r--r--arch/avr32/boards/atstk1000/atstk1002.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c
index 49164e9aadd6..cced73c58115 100644
--- a/arch/avr32/boards/atstk1000/atstk1002.c
+++ b/arch/avr32/boards/atstk1000/atstk1002.c
@@ -10,6 +10,7 @@
10#include <linux/init.h> 10#include <linux/init.h>
11 11
12#include <asm/arch/board.h> 12#include <asm/arch/board.h>
13#include <asm/arch/init.h>
13 14
14struct eth_platform_data __initdata eth0_data = { 15struct eth_platform_data __initdata eth0_data = {
15 .valid = 1, 16 .valid = 1,
@@ -20,13 +21,22 @@ struct eth_platform_data __initdata eth0_data = {
20 21
21extern struct lcdc_platform_data atstk1000_fb0_data; 22extern struct lcdc_platform_data atstk1000_fb0_data;
22 23
24void __init setup_board(void)
25{
26 at32_map_usart(1, 0); /* /dev/ttyS0 */
27 at32_map_usart(2, 1); /* /dev/ttyS1 */
28 at32_map_usart(3, 2); /* /dev/ttyS2 */
29
30 at32_setup_serial_console(0);
31}
32
23static int __init atstk1002_init(void) 33static int __init atstk1002_init(void)
24{ 34{
25 at32_add_system_devices(); 35 at32_add_system_devices();
26 36
27 at32_add_device_usart(1); /* /dev/ttyS0 */ 37 at32_add_device_usart(0);
28 at32_add_device_usart(2); /* /dev/ttyS1 */ 38 at32_add_device_usart(1);
29 at32_add_device_usart(3); /* /dev/ttyS2 */ 39 at32_add_device_usart(2);
30 40
31 at32_add_device_eth(0, &eth0_data); 41 at32_add_device_eth(0, &eth0_data);
32 at32_add_device_spi(0); 42 at32_add_device_spi(0);