diff options
Diffstat (limited to 'arch/avr32/boards/atstk1000/atstk1002.c')
-rw-r--r-- | arch/avr32/boards/atstk1000/atstk1002.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c index 32b361f31c2c..3787d6bfe0d7 100644 --- a/arch/avr32/boards/atstk1000/atstk1002.c +++ b/arch/avr32/boards/atstk1000/atstk1002.c | |||
@@ -20,6 +20,9 @@ | |||
20 | #include <asm/arch/board.h> | 20 | #include <asm/arch/board.h> |
21 | #include <asm/arch/init.h> | 21 | #include <asm/arch/init.h> |
22 | 22 | ||
23 | |||
24 | #define SW2_DEFAULT /* MMCI and UART_A available */ | ||
25 | |||
23 | struct eth_addr { | 26 | struct eth_addr { |
24 | u8 addr[6]; | 27 | u8 addr[6]; |
25 | }; | 28 | }; |
@@ -86,9 +89,13 @@ static void __init set_hw_addr(struct platform_device *pdev) | |||
86 | 89 | ||
87 | void __init setup_board(void) | 90 | void __init setup_board(void) |
88 | { | 91 | { |
89 | at32_map_usart(1, 0); /* /dev/ttyS0 */ | 92 | #ifdef SW2_DEFAULT |
90 | at32_map_usart(2, 1); /* /dev/ttyS1 */ | 93 | at32_map_usart(1, 0); /* USART 1/A: /dev/ttyS0, DB9 */ |
91 | at32_map_usart(3, 2); /* /dev/ttyS2 */ | 94 | #else |
95 | at32_map_usart(0, 1); /* USART 0/B: /dev/ttyS1, IRDA */ | ||
96 | #endif | ||
97 | /* USART 2/unused: expansion connector */ | ||
98 | at32_map_usart(3, 2); /* USART 3/C: /dev/ttyS2, DB9 */ | ||
92 | 99 | ||
93 | at32_setup_serial_console(0); | 100 | at32_setup_serial_console(0); |
94 | } | 101 | } |
@@ -97,8 +104,11 @@ static int __init atstk1002_init(void) | |||
97 | { | 104 | { |
98 | at32_add_system_devices(); | 105 | at32_add_system_devices(); |
99 | 106 | ||
107 | #ifdef SW2_DEFAULT | ||
100 | at32_add_device_usart(0); | 108 | at32_add_device_usart(0); |
109 | #else | ||
101 | at32_add_device_usart(1); | 110 | at32_add_device_usart(1); |
111 | #endif | ||
102 | at32_add_device_usart(2); | 112 | at32_add_device_usart(2); |
103 | 113 | ||
104 | set_hw_addr(at32_add_device_eth(0, ð_data[0])); | 114 | set_hw_addr(at32_add_device_eth(0, ð_data[0])); |