diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2012-04-05 02:14:28 -0400 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2012-04-17 05:04:42 -0400 |
commit | 71b149b3f740501c2d59c80de5b10f5e45051099 (patch) | |
tree | 101450eaa5658b89d9d85e67fa1d7f56557457ab /arch/arm/mach-at91 | |
parent | a27fa58117ae1161adefedde449e5a71b3c593a4 (diff) |
ARM: at91: do not pin mux the UARTs in init_early
There is no need to pinmux the UART so early in the kernel.
Move it to the board init.
This will also allow to finally move the gpio driver to platform device/driver.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'arch/arm/mach-at91')
34 files changed, 333 insertions, 380 deletions
diff --git a/arch/arm/mach-at91/board-1arm.c b/arch/arm/mach-at91/board-1arm.c index f43ad9130ef7..271f994314a4 100644 --- a/arch/arm/mach-at91/board-1arm.c +++ b/arch/arm/mach-at91/board-1arm.c | |||
@@ -47,17 +47,6 @@ static void __init onearm_init_early(void) | |||
47 | 47 | ||
48 | /* Initialize processor: 18.432 MHz crystal */ | 48 | /* Initialize processor: 18.432 MHz crystal */ |
49 | at91_initialize(18432000); | 49 | at91_initialize(18432000); |
50 | |||
51 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
52 | at91_register_uart(0, 0, 0); | ||
53 | |||
54 | /* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */ | ||
55 | at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
56 | |||
57 | /* USART1 on ttyS2 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
58 | at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
59 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
60 | | ATMEL_UART_RI); | ||
61 | } | 50 | } |
62 | 51 | ||
63 | static struct macb_platform_data __initdata onearm_eth_data = { | 52 | static struct macb_platform_data __initdata onearm_eth_data = { |
@@ -79,6 +68,16 @@ static struct at91_udc_data __initdata onearm_udc_data = { | |||
79 | static void __init onearm_board_init(void) | 68 | static void __init onearm_board_init(void) |
80 | { | 69 | { |
81 | /* Serial */ | 70 | /* Serial */ |
71 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
72 | at91_register_uart(0, 0, 0); | ||
73 | |||
74 | /* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */ | ||
75 | at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
76 | |||
77 | /* USART1 on ttyS2 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
78 | at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
79 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
80 | | ATMEL_UART_RI); | ||
82 | at91_add_device_serial(); | 81 | at91_add_device_serial(); |
83 | /* Ethernet */ | 82 | /* Ethernet */ |
84 | at91_add_device_eth(&onearm_eth_data); | 83 | at91_add_device_eth(&onearm_eth_data); |
diff --git a/arch/arm/mach-at91/board-afeb-9260v1.c b/arch/arm/mach-at91/board-afeb-9260v1.c index 7c7c682b8684..b7d8aa7b81e6 100644 --- a/arch/arm/mach-at91/board-afeb-9260v1.c +++ b/arch/arm/mach-at91/board-afeb-9260v1.c | |||
@@ -52,19 +52,6 @@ static void __init afeb9260_init_early(void) | |||
52 | { | 52 | { |
53 | /* Initialize processor: 18.432 MHz crystal */ | 53 | /* Initialize processor: 18.432 MHz crystal */ |
54 | at91_initialize(18432000); | 54 | at91_initialize(18432000); |
55 | |||
56 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
57 | at91_register_uart(0, 0, 0); | ||
58 | |||
59 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
60 | at91_register_uart(AT91SAM9260_ID_US0, 1, | ||
61 | ATMEL_UART_CTS | ATMEL_UART_RTS | ||
62 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ||
63 | | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
64 | |||
65 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
66 | at91_register_uart(AT91SAM9260_ID_US1, 2, | ||
67 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
68 | } | 55 | } |
69 | 56 | ||
70 | /* | 57 | /* |
@@ -180,6 +167,18 @@ static struct at91_cf_data afeb9260_cf_data = { | |||
180 | static void __init afeb9260_board_init(void) | 167 | static void __init afeb9260_board_init(void) |
181 | { | 168 | { |
182 | /* Serial */ | 169 | /* Serial */ |
170 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
171 | at91_register_uart(0, 0, 0); | ||
172 | |||
173 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
174 | at91_register_uart(AT91SAM9260_ID_US0, 1, | ||
175 | ATMEL_UART_CTS | ATMEL_UART_RTS | ||
176 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ||
177 | | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
178 | |||
179 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
180 | at91_register_uart(AT91SAM9260_ID_US1, 2, | ||
181 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
183 | at91_add_device_serial(); | 182 | at91_add_device_serial(); |
184 | /* USB Host */ | 183 | /* USB Host */ |
185 | at91_add_device_usbh(&afeb9260_usbh_data); | 184 | at91_add_device_usbh(&afeb9260_usbh_data); |
diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c index 871717dc39e5..29d3ef0a50fb 100644 --- a/arch/arm/mach-at91/board-cam60.c +++ b/arch/arm/mach-at91/board-cam60.c | |||
@@ -49,9 +49,6 @@ static void __init cam60_init_early(void) | |||
49 | { | 49 | { |
50 | /* Initialize processor: 10 MHz crystal */ | 50 | /* Initialize processor: 10 MHz crystal */ |
51 | at91_initialize(10000000); | 51 | at91_initialize(10000000); |
52 | |||
53 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
54 | at91_register_uart(0, 0, 0); | ||
55 | } | 52 | } |
56 | 53 | ||
57 | /* | 54 | /* |
@@ -172,6 +169,8 @@ static void __init cam60_add_device_nand(void) | |||
172 | static void __init cam60_board_init(void) | 169 | static void __init cam60_board_init(void) |
173 | { | 170 | { |
174 | /* Serial */ | 171 | /* Serial */ |
172 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
173 | at91_register_uart(0, 0, 0); | ||
175 | at91_add_device_serial(); | 174 | at91_add_device_serial(); |
176 | /* SPI */ | 175 | /* SPI */ |
177 | at91_add_device_spi(cam60_spi_devices, ARRAY_SIZE(cam60_spi_devices)); | 176 | at91_add_device_spi(cam60_spi_devices, ARRAY_SIZE(cam60_spi_devices)); |
diff --git a/arch/arm/mach-at91/board-carmeva.c b/arch/arm/mach-at91/board-carmeva.c index 168b3fad8634..44328a6d4609 100644 --- a/arch/arm/mach-at91/board-carmeva.c +++ b/arch/arm/mach-at91/board-carmeva.c | |||
@@ -44,14 +44,6 @@ static void __init carmeva_init_early(void) | |||
44 | { | 44 | { |
45 | /* Initialize processor: 20.000 MHz crystal */ | 45 | /* Initialize processor: 20.000 MHz crystal */ |
46 | at91_initialize(20000000); | 46 | at91_initialize(20000000); |
47 | |||
48 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
49 | at91_register_uart(0, 0, 0); | ||
50 | |||
51 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
52 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
53 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
54 | | ATMEL_UART_RI); | ||
55 | } | 47 | } |
56 | 48 | ||
57 | static struct macb_platform_data __initdata carmeva_eth_data = { | 49 | static struct macb_platform_data __initdata carmeva_eth_data = { |
@@ -136,6 +128,13 @@ static struct gpio_led carmeva_leds[] = { | |||
136 | static void __init carmeva_board_init(void) | 128 | static void __init carmeva_board_init(void) |
137 | { | 129 | { |
138 | /* Serial */ | 130 | /* Serial */ |
131 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
132 | at91_register_uart(0, 0, 0); | ||
133 | |||
134 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
135 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
136 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
137 | | ATMEL_UART_RI); | ||
139 | at91_add_device_serial(); | 138 | at91_add_device_serial(); |
140 | /* Ethernet */ | 139 | /* Ethernet */ |
141 | at91_add_device_eth(&carmeva_eth_data); | 140 | at91_add_device_eth(&carmeva_eth_data); |
diff --git a/arch/arm/mach-at91/board-cpu9krea.c b/arch/arm/mach-at91/board-cpu9krea.c index 4073e3033191..69951ec7dbf3 100644 --- a/arch/arm/mach-at91/board-cpu9krea.c +++ b/arch/arm/mach-at91/board-cpu9krea.c | |||
@@ -52,31 +52,6 @@ static void __init cpu9krea_init_early(void) | |||
52 | { | 52 | { |
53 | /* Initialize processor: 18.432 MHz crystal */ | 53 | /* Initialize processor: 18.432 MHz crystal */ |
54 | at91_initialize(18432000); | 54 | at91_initialize(18432000); |
55 | |||
56 | /* DGBU on ttyS0. (Rx & Tx only) */ | ||
57 | at91_register_uart(0, 0, 0); | ||
58 | |||
59 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
60 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | | ||
61 | ATMEL_UART_RTS | ATMEL_UART_DTR | ATMEL_UART_DSR | | ||
62 | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
63 | |||
64 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
65 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | | ||
66 | ATMEL_UART_RTS); | ||
67 | |||
68 | /* USART2 on ttyS3. (Rx, Tx, RTS, CTS) */ | ||
69 | at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | | ||
70 | ATMEL_UART_RTS); | ||
71 | |||
72 | /* USART3 on ttyS4. (Rx, Tx) */ | ||
73 | at91_register_uart(AT91SAM9260_ID_US3, 4, 0); | ||
74 | |||
75 | /* USART4 on ttyS5. (Rx, Tx) */ | ||
76 | at91_register_uart(AT91SAM9260_ID_US4, 5, 0); | ||
77 | |||
78 | /* USART5 on ttyS6. (Rx, Tx) */ | ||
79 | at91_register_uart(AT91SAM9260_ID_US5, 6, 0); | ||
80 | } | 55 | } |
81 | 56 | ||
82 | /* | 57 | /* |
@@ -349,6 +324,30 @@ static void __init cpu9krea_board_init(void) | |||
349 | /* NOR */ | 324 | /* NOR */ |
350 | cpu9krea_add_device_nor(); | 325 | cpu9krea_add_device_nor(); |
351 | /* Serial */ | 326 | /* Serial */ |
327 | /* DGBU on ttyS0. (Rx & Tx only) */ | ||
328 | at91_register_uart(0, 0, 0); | ||
329 | |||
330 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
331 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | | ||
332 | ATMEL_UART_RTS | ATMEL_UART_DTR | ATMEL_UART_DSR | | ||
333 | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
334 | |||
335 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
336 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | | ||
337 | ATMEL_UART_RTS); | ||
338 | |||
339 | /* USART2 on ttyS3. (Rx, Tx, RTS, CTS) */ | ||
340 | at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | | ||
341 | ATMEL_UART_RTS); | ||
342 | |||
343 | /* USART3 on ttyS4. (Rx, Tx) */ | ||
344 | at91_register_uart(AT91SAM9260_ID_US3, 4, 0); | ||
345 | |||
346 | /* USART4 on ttyS5. (Rx, Tx) */ | ||
347 | at91_register_uart(AT91SAM9260_ID_US4, 5, 0); | ||
348 | |||
349 | /* USART5 on ttyS6. (Rx, Tx) */ | ||
350 | at91_register_uart(AT91SAM9260_ID_US5, 6, 0); | ||
352 | at91_add_device_serial(); | 351 | at91_add_device_serial(); |
353 | /* USB Host */ | 352 | /* USB Host */ |
354 | at91_add_device_usbh(&cpu9krea_usbh_data); | 353 | at91_add_device_usbh(&cpu9krea_usbh_data); |
diff --git a/arch/arm/mach-at91/board-cpuat91.c b/arch/arm/mach-at91/board-cpuat91.c index 76c62ed41832..895cf2dba612 100644 --- a/arch/arm/mach-at91/board-cpuat91.c +++ b/arch/arm/mach-at91/board-cpuat91.c | |||
@@ -59,25 +59,6 @@ static void __init cpuat91_init_early(void) | |||
59 | 59 | ||
60 | /* Initialize processor: 18.432 MHz crystal */ | 60 | /* Initialize processor: 18.432 MHz crystal */ |
61 | at91_initialize(18432000); | 61 | at91_initialize(18432000); |
62 | |||
63 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
64 | at91_register_uart(0, 0, 0); | ||
65 | |||
66 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */ | ||
67 | at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | | ||
68 | ATMEL_UART_RTS); | ||
69 | |||
70 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
71 | at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | | ||
72 | ATMEL_UART_RTS | ATMEL_UART_DTR | ATMEL_UART_DSR | | ||
73 | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
74 | |||
75 | /* USART2 on ttyS3 (Rx, Tx) */ | ||
76 | at91_register_uart(AT91RM9200_ID_US2, 3, 0); | ||
77 | |||
78 | /* USART3 on ttyS4 (Rx, Tx, CTS, RTS) */ | ||
79 | at91_register_uart(AT91RM9200_ID_US3, 4, ATMEL_UART_CTS | | ||
80 | ATMEL_UART_RTS); | ||
81 | } | 62 | } |
82 | 63 | ||
83 | static struct macb_platform_data __initdata cpuat91_eth_data = { | 64 | static struct macb_platform_data __initdata cpuat91_eth_data = { |
@@ -158,6 +139,24 @@ static struct platform_device *platform_devices[] __initdata = { | |||
158 | static void __init cpuat91_board_init(void) | 139 | static void __init cpuat91_board_init(void) |
159 | { | 140 | { |
160 | /* Serial */ | 141 | /* Serial */ |
142 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
143 | at91_register_uart(0, 0, 0); | ||
144 | |||
145 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */ | ||
146 | at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | | ||
147 | ATMEL_UART_RTS); | ||
148 | |||
149 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
150 | at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | | ||
151 | ATMEL_UART_RTS | ATMEL_UART_DTR | ATMEL_UART_DSR | | ||
152 | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
153 | |||
154 | /* USART2 on ttyS3 (Rx, Tx) */ | ||
155 | at91_register_uart(AT91RM9200_ID_US2, 3, 0); | ||
156 | |||
157 | /* USART3 on ttyS4 (Rx, Tx, CTS, RTS) */ | ||
158 | at91_register_uart(AT91RM9200_ID_US3, 4, ATMEL_UART_CTS | | ||
159 | ATMEL_UART_RTS); | ||
161 | at91_add_device_serial(); | 160 | at91_add_device_serial(); |
162 | /* LEDs. */ | 161 | /* LEDs. */ |
163 | at91_gpio_leds(cpuat91_leds, ARRAY_SIZE(cpuat91_leds)); | 162 | at91_gpio_leds(cpuat91_leds, ARRAY_SIZE(cpuat91_leds)); |
diff --git a/arch/arm/mach-at91/board-csb337.c b/arch/arm/mach-at91/board-csb337.c index d984435f51e8..ad7f9f028976 100644 --- a/arch/arm/mach-at91/board-csb337.c +++ b/arch/arm/mach-at91/board-csb337.c | |||
@@ -50,9 +50,6 @@ static void __init csb337_init_early(void) | |||
50 | 50 | ||
51 | /* Setup the LEDs */ | 51 | /* Setup the LEDs */ |
52 | at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1); | 52 | at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1); |
53 | |||
54 | /* DBGU on ttyS0 */ | ||
55 | at91_register_uart(0, 0, 0); | ||
56 | } | 53 | } |
57 | 54 | ||
58 | static struct macb_platform_data __initdata csb337_eth_data = { | 55 | static struct macb_platform_data __initdata csb337_eth_data = { |
@@ -226,6 +223,8 @@ static struct gpio_led csb_leds[] = { | |||
226 | static void __init csb337_board_init(void) | 223 | static void __init csb337_board_init(void) |
227 | { | 224 | { |
228 | /* Serial */ | 225 | /* Serial */ |
226 | /* DBGU on ttyS0 */ | ||
227 | at91_register_uart(0, 0, 0); | ||
229 | at91_add_device_serial(); | 228 | at91_add_device_serial(); |
230 | /* Ethernet */ | 229 | /* Ethernet */ |
231 | at91_add_device_eth(&csb337_eth_data); | 230 | at91_add_device_eth(&csb337_eth_data); |
diff --git a/arch/arm/mach-at91/board-csb637.c b/arch/arm/mach-at91/board-csb637.c index 0c9935d29fbd..7c8b05a57d7f 100644 --- a/arch/arm/mach-at91/board-csb637.c +++ b/arch/arm/mach-at91/board-csb637.c | |||
@@ -44,9 +44,6 @@ static void __init csb637_init_early(void) | |||
44 | { | 44 | { |
45 | /* Initialize processor: 3.6864 MHz crystal */ | 45 | /* Initialize processor: 3.6864 MHz crystal */ |
46 | at91_initialize(3686400); | 46 | at91_initialize(3686400); |
47 | |||
48 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
49 | at91_register_uart(0, 0, 0); | ||
50 | } | 47 | } |
51 | 48 | ||
52 | static struct macb_platform_data __initdata csb637_eth_data = { | 49 | static struct macb_platform_data __initdata csb637_eth_data = { |
@@ -115,6 +112,8 @@ static void __init csb637_board_init(void) | |||
115 | /* LED(s) */ | 112 | /* LED(s) */ |
116 | at91_gpio_leds(csb_leds, ARRAY_SIZE(csb_leds)); | 113 | at91_gpio_leds(csb_leds, ARRAY_SIZE(csb_leds)); |
117 | /* Serial */ | 114 | /* Serial */ |
115 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
116 | at91_register_uart(0, 0, 0); | ||
118 | at91_add_device_serial(); | 117 | at91_add_device_serial(); |
119 | /* Ethernet */ | 118 | /* Ethernet */ |
120 | at91_add_device_eth(&csb637_eth_data); | 119 | at91_add_device_eth(&csb637_eth_data); |
diff --git a/arch/arm/mach-at91/board-eb9200.c b/arch/arm/mach-at91/board-eb9200.c index a189b9f6d9f4..bd1017297989 100644 --- a/arch/arm/mach-at91/board-eb9200.c +++ b/arch/arm/mach-at91/board-eb9200.c | |||
@@ -44,17 +44,6 @@ static void __init eb9200_init_early(void) | |||
44 | { | 44 | { |
45 | /* Initialize processor: 18.432 MHz crystal */ | 45 | /* Initialize processor: 18.432 MHz crystal */ |
46 | at91_initialize(18432000); | 46 | at91_initialize(18432000); |
47 | |||
48 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
49 | at91_register_uart(0, 0, 0); | ||
50 | |||
51 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
52 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
53 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
54 | | ATMEL_UART_RI); | ||
55 | |||
56 | /* USART2 on ttyS2. (Rx, Tx) - IRDA */ | ||
57 | at91_register_uart(AT91RM9200_ID_US2, 2, 0); | ||
58 | } | 47 | } |
59 | 48 | ||
60 | static struct macb_platform_data __initdata eb9200_eth_data = { | 49 | static struct macb_platform_data __initdata eb9200_eth_data = { |
@@ -98,6 +87,16 @@ static struct i2c_board_info __initdata eb9200_i2c_devices[] = { | |||
98 | static void __init eb9200_board_init(void) | 87 | static void __init eb9200_board_init(void) |
99 | { | 88 | { |
100 | /* Serial */ | 89 | /* Serial */ |
90 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
91 | at91_register_uart(0, 0, 0); | ||
92 | |||
93 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
94 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
95 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
96 | | ATMEL_UART_RI); | ||
97 | |||
98 | /* USART2 on ttyS2. (Rx, Tx) - IRDA */ | ||
99 | at91_register_uart(AT91RM9200_ID_US2, 2, 0); | ||
101 | at91_add_device_serial(); | 100 | at91_add_device_serial(); |
102 | /* Ethernet */ | 101 | /* Ethernet */ |
103 | at91_add_device_eth(&eb9200_eth_data); | 102 | at91_add_device_eth(&eb9200_eth_data); |
diff --git a/arch/arm/mach-at91/board-ecbat91.c b/arch/arm/mach-at91/board-ecbat91.c index 307c5304f6eb..2510825f02d6 100644 --- a/arch/arm/mach-at91/board-ecbat91.c +++ b/arch/arm/mach-at91/board-ecbat91.c | |||
@@ -53,12 +53,6 @@ static void __init ecb_at91init_early(void) | |||
53 | 53 | ||
54 | /* Setup the LEDs */ | 54 | /* Setup the LEDs */ |
55 | at91_init_leds(AT91_PIN_PC7, AT91_PIN_PC7); | 55 | at91_init_leds(AT91_PIN_PC7, AT91_PIN_PC7); |
56 | |||
57 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
58 | at91_register_uart(0, 0, 0); | ||
59 | |||
60 | /* USART0 on ttyS1. (Rx & Tx only) */ | ||
61 | at91_register_uart(AT91RM9200_ID_US0, 1, 0); | ||
62 | } | 56 | } |
63 | 57 | ||
64 | static struct macb_platform_data __initdata ecb_at91eth_data = { | 58 | static struct macb_platform_data __initdata ecb_at91eth_data = { |
@@ -149,6 +143,11 @@ static struct spi_board_info __initdata ecb_at91spi_devices[] = { | |||
149 | static void __init ecb_at91board_init(void) | 143 | static void __init ecb_at91board_init(void) |
150 | { | 144 | { |
151 | /* Serial */ | 145 | /* Serial */ |
146 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
147 | at91_register_uart(0, 0, 0); | ||
148 | |||
149 | /* USART0 on ttyS1. (Rx & Tx only) */ | ||
150 | at91_register_uart(AT91RM9200_ID_US0, 1, 0); | ||
152 | at91_add_device_serial(); | 151 | at91_add_device_serial(); |
153 | 152 | ||
154 | /* Ethernet */ | 153 | /* Ethernet */ |
diff --git a/arch/arm/mach-at91/board-eco920.c b/arch/arm/mach-at91/board-eco920.c index 7df6a9b1405e..bebeae875bd3 100644 --- a/arch/arm/mach-at91/board-eco920.c +++ b/arch/arm/mach-at91/board-eco920.c | |||
@@ -40,9 +40,6 @@ static void __init eco920_init_early(void) | |||
40 | 40 | ||
41 | /* Setup the LEDs */ | 41 | /* Setup the LEDs */ |
42 | at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1); | 42 | at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1); |
43 | |||
44 | /* DBGU on ttyS0. (Rx & Tx only */ | ||
45 | at91_register_uart(0, 0, 0); | ||
46 | } | 43 | } |
47 | 44 | ||
48 | static struct macb_platform_data __initdata eco920_eth_data = { | 45 | static struct macb_platform_data __initdata eco920_eth_data = { |
@@ -100,6 +97,8 @@ static struct spi_board_info eco920_spi_devices[] = { | |||
100 | 97 | ||
101 | static void __init eco920_board_init(void) | 98 | static void __init eco920_board_init(void) |
102 | { | 99 | { |
100 | /* DBGU on ttyS0. (Rx & Tx only */ | ||
101 | at91_register_uart(0, 0, 0); | ||
103 | at91_add_device_serial(); | 102 | at91_add_device_serial(); |
104 | at91_add_device_eth(&eco920_eth_data); | 103 | at91_add_device_eth(&eco920_eth_data); |
105 | at91_add_device_usbh(&eco920_usbh_data); | 104 | at91_add_device_usbh(&eco920_usbh_data); |
diff --git a/arch/arm/mach-at91/board-flexibity.c b/arch/arm/mach-at91/board-flexibity.c index 6dcc962fcaa1..47658f78105d 100644 --- a/arch/arm/mach-at91/board-flexibity.c +++ b/arch/arm/mach-at91/board-flexibity.c | |||
@@ -41,9 +41,6 @@ static void __init flexibity_init_early(void) | |||
41 | { | 41 | { |
42 | /* Initialize processor: 18.432 MHz crystal */ | 42 | /* Initialize processor: 18.432 MHz crystal */ |
43 | at91_initialize(18432000); | 43 | at91_initialize(18432000); |
44 | |||
45 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
46 | at91_register_uart(0, 0, 0); | ||
47 | } | 44 | } |
48 | 45 | ||
49 | /* USB Host port */ | 46 | /* USB Host port */ |
@@ -140,6 +137,8 @@ static struct gpio_led flexibity_leds[] = { | |||
140 | static void __init flexibity_board_init(void) | 137 | static void __init flexibity_board_init(void) |
141 | { | 138 | { |
142 | /* Serial */ | 139 | /* Serial */ |
140 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
141 | at91_register_uart(0, 0, 0); | ||
143 | at91_add_device_serial(); | 142 | at91_add_device_serial(); |
144 | /* USB Host */ | 143 | /* USB Host */ |
145 | at91_add_device_usbh(&flexibity_usbh_data); | 144 | at91_add_device_usbh(&flexibity_usbh_data); |
diff --git a/arch/arm/mach-at91/board-foxg20.c b/arch/arm/mach-at91/board-foxg20.c index bb0780764b3a..33411e6ecb1f 100644 --- a/arch/arm/mach-at91/board-foxg20.c +++ b/arch/arm/mach-at91/board-foxg20.c | |||
@@ -61,41 +61,6 @@ static void __init foxg20_init_early(void) | |||
61 | { | 61 | { |
62 | /* Initialize processor: 18.432 MHz crystal */ | 62 | /* Initialize processor: 18.432 MHz crystal */ |
63 | at91_initialize(18432000); | 63 | at91_initialize(18432000); |
64 | |||
65 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
66 | at91_register_uart(0, 0, 0); | ||
67 | |||
68 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
69 | at91_register_uart(AT91SAM9260_ID_US0, 1, | ||
70 | ATMEL_UART_CTS | ||
71 | | ATMEL_UART_RTS | ||
72 | | ATMEL_UART_DTR | ||
73 | | ATMEL_UART_DSR | ||
74 | | ATMEL_UART_DCD | ||
75 | | ATMEL_UART_RI); | ||
76 | |||
77 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
78 | at91_register_uart(AT91SAM9260_ID_US1, 2, | ||
79 | ATMEL_UART_CTS | ||
80 | | ATMEL_UART_RTS); | ||
81 | |||
82 | /* USART2 on ttyS3. (Rx & Tx only) */ | ||
83 | at91_register_uart(AT91SAM9260_ID_US2, 3, 0); | ||
84 | |||
85 | /* USART3 on ttyS4. (Rx, Tx, RTS, CTS) */ | ||
86 | at91_register_uart(AT91SAM9260_ID_US3, 4, | ||
87 | ATMEL_UART_CTS | ||
88 | | ATMEL_UART_RTS); | ||
89 | |||
90 | /* USART4 on ttyS5. (Rx & Tx only) */ | ||
91 | at91_register_uart(AT91SAM9260_ID_US4, 5, 0); | ||
92 | |||
93 | /* USART5 on ttyS6. (Rx & Tx only) */ | ||
94 | at91_register_uart(AT91SAM9260_ID_US5, 6, 0); | ||
95 | |||
96 | /* Set the internal pull-up resistor on DRXD */ | ||
97 | at91_set_A_periph(AT91_PIN_PB14, 1); | ||
98 | |||
99 | } | 64 | } |
100 | 65 | ||
101 | /* | 66 | /* |
@@ -238,6 +203,39 @@ static struct i2c_board_info __initdata foxg20_i2c_devices[] = { | |||
238 | static void __init foxg20_board_init(void) | 203 | static void __init foxg20_board_init(void) |
239 | { | 204 | { |
240 | /* Serial */ | 205 | /* Serial */ |
206 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
207 | at91_register_uart(0, 0, 0); | ||
208 | |||
209 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
210 | at91_register_uart(AT91SAM9260_ID_US0, 1, | ||
211 | ATMEL_UART_CTS | ||
212 | | ATMEL_UART_RTS | ||
213 | | ATMEL_UART_DTR | ||
214 | | ATMEL_UART_DSR | ||
215 | | ATMEL_UART_DCD | ||
216 | | ATMEL_UART_RI); | ||
217 | |||
218 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
219 | at91_register_uart(AT91SAM9260_ID_US1, 2, | ||
220 | ATMEL_UART_CTS | ||
221 | | ATMEL_UART_RTS); | ||
222 | |||
223 | /* USART2 on ttyS3. (Rx & Tx only) */ | ||
224 | at91_register_uart(AT91SAM9260_ID_US2, 3, 0); | ||
225 | |||
226 | /* USART3 on ttyS4. (Rx, Tx, RTS, CTS) */ | ||
227 | at91_register_uart(AT91SAM9260_ID_US3, 4, | ||
228 | ATMEL_UART_CTS | ||
229 | | ATMEL_UART_RTS); | ||
230 | |||
231 | /* USART4 on ttyS5. (Rx & Tx only) */ | ||
232 | at91_register_uart(AT91SAM9260_ID_US4, 5, 0); | ||
233 | |||
234 | /* USART5 on ttyS6. (Rx & Tx only) */ | ||
235 | at91_register_uart(AT91SAM9260_ID_US5, 6, 0); | ||
236 | |||
237 | /* Set the internal pull-up resistor on DRXD */ | ||
238 | at91_set_A_periph(AT91_PIN_PB14, 1); | ||
241 | at91_add_device_serial(); | 239 | at91_add_device_serial(); |
242 | /* USB Host */ | 240 | /* USB Host */ |
243 | at91_add_device_usbh(&foxg20_usbh_data); | 241 | at91_add_device_usbh(&foxg20_usbh_data); |
diff --git a/arch/arm/mach-at91/board-gsia18s.c b/arch/arm/mach-at91/board-gsia18s.c index 230e71969fb7..3e0dfa643a86 100644 --- a/arch/arm/mach-at91/board-gsia18s.c +++ b/arch/arm/mach-at91/board-gsia18s.c | |||
@@ -41,38 +41,6 @@ | |||
41 | static void __init gsia18s_init_early(void) | 41 | static void __init gsia18s_init_early(void) |
42 | { | 42 | { |
43 | stamp9g20_init_early(); | 43 | stamp9g20_init_early(); |
44 | |||
45 | /* | ||
46 | * USART0 on ttyS1 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI). | ||
47 | * Used for Internal Analog Modem. | ||
48 | */ | ||
49 | at91_register_uart(AT91SAM9260_ID_US0, 1, | ||
50 | ATMEL_UART_CTS | ATMEL_UART_RTS | | ||
51 | ATMEL_UART_DTR | ATMEL_UART_DSR | | ||
52 | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
53 | /* | ||
54 | * USART1 on ttyS2 (Rx, Tx, CTS, RTS). | ||
55 | * Used for GPS or WiFi or Data stream. | ||
56 | */ | ||
57 | at91_register_uart(AT91SAM9260_ID_US1, 2, | ||
58 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
59 | /* | ||
60 | * USART2 on ttyS3 (Rx, Tx, CTS, RTS). | ||
61 | * Used for External Modem. | ||
62 | */ | ||
63 | at91_register_uart(AT91SAM9260_ID_US2, 3, | ||
64 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
65 | /* | ||
66 | * USART3 on ttyS4 (Rx, Tx, RTS). | ||
67 | * Used for RS-485. | ||
68 | */ | ||
69 | at91_register_uart(AT91SAM9260_ID_US3, 4, ATMEL_UART_RTS); | ||
70 | |||
71 | /* | ||
72 | * USART4 on ttyS5 (Rx, Tx). | ||
73 | * Used for TRX433 Radio Module. | ||
74 | */ | ||
75 | at91_register_uart(AT91SAM9260_ID_US4, 5, 0); | ||
76 | } | 44 | } |
77 | 45 | ||
78 | /* | 46 | /* |
@@ -558,6 +526,37 @@ static int __init gsia18s_power_off_init(void) | |||
558 | 526 | ||
559 | static void __init gsia18s_board_init(void) | 527 | static void __init gsia18s_board_init(void) |
560 | { | 528 | { |
529 | /* | ||
530 | * USART0 on ttyS1 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI). | ||
531 | * Used for Internal Analog Modem. | ||
532 | */ | ||
533 | at91_register_uart(AT91SAM9260_ID_US0, 1, | ||
534 | ATMEL_UART_CTS | ATMEL_UART_RTS | | ||
535 | ATMEL_UART_DTR | ATMEL_UART_DSR | | ||
536 | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
537 | /* | ||
538 | * USART1 on ttyS2 (Rx, Tx, CTS, RTS). | ||
539 | * Used for GPS or WiFi or Data stream. | ||
540 | */ | ||
541 | at91_register_uart(AT91SAM9260_ID_US1, 2, | ||
542 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
543 | /* | ||
544 | * USART2 on ttyS3 (Rx, Tx, CTS, RTS). | ||
545 | * Used for External Modem. | ||
546 | */ | ||
547 | at91_register_uart(AT91SAM9260_ID_US2, 3, | ||
548 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
549 | /* | ||
550 | * USART3 on ttyS4 (Rx, Tx, RTS). | ||
551 | * Used for RS-485. | ||
552 | */ | ||
553 | at91_register_uart(AT91SAM9260_ID_US3, 4, ATMEL_UART_RTS); | ||
554 | |||
555 | /* | ||
556 | * USART4 on ttyS5 (Rx, Tx). | ||
557 | * Used for TRX433 Radio Module. | ||
558 | */ | ||
559 | at91_register_uart(AT91SAM9260_ID_US4, 5, 0); | ||
561 | stamp9g20_board_init(); | 560 | stamp9g20_board_init(); |
562 | at91_add_device_usbh(&usbh_data); | 561 | at91_add_device_usbh(&usbh_data); |
563 | at91_add_device_udc(&udc_data); | 562 | at91_add_device_udc(&udc_data); |
diff --git a/arch/arm/mach-at91/board-kafa.c b/arch/arm/mach-at91/board-kafa.c index 3e858edfcd2b..f46b3eb73457 100644 --- a/arch/arm/mach-at91/board-kafa.c +++ b/arch/arm/mach-at91/board-kafa.c | |||
@@ -50,12 +50,6 @@ static void __init kafa_init_early(void) | |||
50 | 50 | ||
51 | /* Set up the LEDs */ | 51 | /* Set up the LEDs */ |
52 | at91_init_leds(AT91_PIN_PB4, AT91_PIN_PB4); | 52 | at91_init_leds(AT91_PIN_PB4, AT91_PIN_PB4); |
53 | |||
54 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
55 | at91_register_uart(0, 0, 0); | ||
56 | |||
57 | /* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */ | ||
58 | at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
59 | } | 53 | } |
60 | 54 | ||
61 | static struct macb_platform_data __initdata kafa_eth_data = { | 55 | static struct macb_platform_data __initdata kafa_eth_data = { |
@@ -77,6 +71,11 @@ static struct at91_udc_data __initdata kafa_udc_data = { | |||
77 | static void __init kafa_board_init(void) | 71 | static void __init kafa_board_init(void) |
78 | { | 72 | { |
79 | /* Serial */ | 73 | /* Serial */ |
74 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
75 | at91_register_uart(0, 0, 0); | ||
76 | |||
77 | /* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */ | ||
78 | at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
80 | at91_add_device_serial(); | 79 | at91_add_device_serial(); |
81 | /* Ethernet */ | 80 | /* Ethernet */ |
82 | at91_add_device_eth(&kafa_eth_data); | 81 | at91_add_device_eth(&kafa_eth_data); |
diff --git a/arch/arm/mach-at91/board-kb9202.c b/arch/arm/mach-at91/board-kb9202.c index ccbc8bea5614..e71b9e15c999 100644 --- a/arch/arm/mach-at91/board-kb9202.c +++ b/arch/arm/mach-at91/board-kb9202.c | |||
@@ -53,18 +53,6 @@ static void __init kb9202_init_early(void) | |||
53 | 53 | ||
54 | /* Set up the LEDs */ | 54 | /* Set up the LEDs */ |
55 | at91_init_leds(AT91_PIN_PC19, AT91_PIN_PC18); | 55 | at91_init_leds(AT91_PIN_PC19, AT91_PIN_PC18); |
56 | |||
57 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
58 | at91_register_uart(0, 0, 0); | ||
59 | |||
60 | /* USART0 on ttyS1 (Rx & Tx only) */ | ||
61 | at91_register_uart(AT91RM9200_ID_US0, 1, 0); | ||
62 | |||
63 | /* USART1 on ttyS2 (Rx & Tx only) - IRDA (optional) */ | ||
64 | at91_register_uart(AT91RM9200_ID_US1, 2, 0); | ||
65 | |||
66 | /* USART3 on ttyS3 (Rx, Tx, CTS, RTS) - RS485 (optional) */ | ||
67 | at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
68 | } | 56 | } |
69 | 57 | ||
70 | static struct macb_platform_data __initdata kb9202_eth_data = { | 58 | static struct macb_platform_data __initdata kb9202_eth_data = { |
@@ -113,6 +101,17 @@ static struct atmel_nand_data __initdata kb9202_nand_data = { | |||
113 | static void __init kb9202_board_init(void) | 101 | static void __init kb9202_board_init(void) |
114 | { | 102 | { |
115 | /* Serial */ | 103 | /* Serial */ |
104 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
105 | at91_register_uart(0, 0, 0); | ||
106 | |||
107 | /* USART0 on ttyS1 (Rx & Tx only) */ | ||
108 | at91_register_uart(AT91RM9200_ID_US0, 1, 0); | ||
109 | |||
110 | /* USART1 on ttyS2 (Rx & Tx only) - IRDA (optional) */ | ||
111 | at91_register_uart(AT91RM9200_ID_US1, 2, 0); | ||
112 | |||
113 | /* USART3 on ttyS3 (Rx, Tx, CTS, RTS) - RS485 (optional) */ | ||
114 | at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
116 | at91_add_device_serial(); | 115 | at91_add_device_serial(); |
117 | /* Ethernet */ | 116 | /* Ethernet */ |
118 | at91_add_device_eth(&kb9202_eth_data); | 117 | at91_add_device_eth(&kb9202_eth_data); |
diff --git a/arch/arm/mach-at91/board-neocore926.c b/arch/arm/mach-at91/board-neocore926.c index c456fdc7cf21..d2f4cc161766 100644 --- a/arch/arm/mach-at91/board-neocore926.c +++ b/arch/arm/mach-at91/board-neocore926.c | |||
@@ -55,12 +55,6 @@ static void __init neocore926_init_early(void) | |||
55 | { | 55 | { |
56 | /* Initialize processor: 20 MHz crystal */ | 56 | /* Initialize processor: 20 MHz crystal */ |
57 | at91_initialize(20000000); | 57 | at91_initialize(20000000); |
58 | |||
59 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
60 | at91_register_uart(0, 0, 0); | ||
61 | |||
62 | /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */ | ||
63 | at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
64 | } | 58 | } |
65 | 59 | ||
66 | /* | 60 | /* |
@@ -338,6 +332,11 @@ static struct ac97c_platform_data neocore926_ac97_data = { | |||
338 | static void __init neocore926_board_init(void) | 332 | static void __init neocore926_board_init(void) |
339 | { | 333 | { |
340 | /* Serial */ | 334 | /* Serial */ |
335 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
336 | at91_register_uart(0, 0, 0); | ||
337 | |||
338 | /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */ | ||
339 | at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
341 | at91_add_device_serial(); | 340 | at91_add_device_serial(); |
342 | 341 | ||
343 | /* USB Host */ | 342 | /* USB Host */ |
diff --git a/arch/arm/mach-at91/board-pcontrol-g20.c b/arch/arm/mach-at91/board-pcontrol-g20.c index b4a12fc184c8..7fe638342421 100644 --- a/arch/arm/mach-at91/board-pcontrol-g20.c +++ b/arch/arm/mach-at91/board-pcontrol-g20.c | |||
@@ -40,17 +40,6 @@ | |||
40 | static void __init pcontrol_g20_init_early(void) | 40 | static void __init pcontrol_g20_init_early(void) |
41 | { | 41 | { |
42 | stamp9g20_init_early(); | 42 | stamp9g20_init_early(); |
43 | |||
44 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) piggyback A2 */ | ||
45 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ||
46 | | ATMEL_UART_RTS); | ||
47 | |||
48 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) isolated RS485 X5 */ | ||
49 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ||
50 | | ATMEL_UART_RTS); | ||
51 | |||
52 | /* USART2 on ttyS3. (Rx, Tx) 9bit-Bus Multidrop-mode X4 */ | ||
53 | at91_register_uart(AT91SAM9260_ID_US4, 3, 0); | ||
54 | } | 43 | } |
55 | 44 | ||
56 | static struct sam9_smc_config __initdata pcontrol_smc_config[2] = { { | 45 | static struct sam9_smc_config __initdata pcontrol_smc_config[2] = { { |
@@ -199,6 +188,16 @@ static struct spi_board_info pcontrol_g20_spi_devices[] = { | |||
199 | 188 | ||
200 | static void __init pcontrol_g20_board_init(void) | 189 | static void __init pcontrol_g20_board_init(void) |
201 | { | 190 | { |
191 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) piggyback A2 */ | ||
192 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ||
193 | | ATMEL_UART_RTS); | ||
194 | |||
195 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) isolated RS485 X5 */ | ||
196 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ||
197 | | ATMEL_UART_RTS); | ||
198 | |||
199 | /* USART2 on ttyS3. (Rx, Tx) 9bit-Bus Multidrop-mode X4 */ | ||
200 | at91_register_uart(AT91SAM9260_ID_US4, 3, 0); | ||
202 | stamp9g20_board_init(); | 201 | stamp9g20_board_init(); |
203 | at91_add_device_usbh(&usbh_data); | 202 | at91_add_device_usbh(&usbh_data); |
204 | at91_add_device_eth(&macb_data); | 203 | at91_add_device_eth(&macb_data); |
diff --git a/arch/arm/mach-at91/board-picotux200.c b/arch/arm/mach-at91/board-picotux200.c index 4ca56cda355e..b45c0a5d5ca7 100644 --- a/arch/arm/mach-at91/board-picotux200.c +++ b/arch/arm/mach-at91/board-picotux200.c | |||
@@ -48,14 +48,6 @@ static void __init picotux200_init_early(void) | |||
48 | { | 48 | { |
49 | /* Initialize processor: 18.432 MHz crystal */ | 49 | /* Initialize processor: 18.432 MHz crystal */ |
50 | at91_initialize(18432000); | 50 | at91_initialize(18432000); |
51 | |||
52 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
53 | at91_register_uart(0, 0, 0); | ||
54 | |||
55 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
56 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
57 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
58 | | ATMEL_UART_RI); | ||
59 | } | 51 | } |
60 | 52 | ||
61 | static struct macb_platform_data __initdata picotux200_eth_data = { | 53 | static struct macb_platform_data __initdata picotux200_eth_data = { |
@@ -103,6 +95,13 @@ static struct platform_device picotux200_flash = { | |||
103 | static void __init picotux200_board_init(void) | 95 | static void __init picotux200_board_init(void) |
104 | { | 96 | { |
105 | /* Serial */ | 97 | /* Serial */ |
98 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
99 | at91_register_uart(0, 0, 0); | ||
100 | |||
101 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
102 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
103 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
104 | | ATMEL_UART_RI); | ||
106 | at91_add_device_serial(); | 105 | at91_add_device_serial(); |
107 | /* Ethernet */ | 106 | /* Ethernet */ |
108 | at91_add_device_eth(&picotux200_eth_data); | 107 | at91_add_device_eth(&picotux200_eth_data); |
diff --git a/arch/arm/mach-at91/board-qil-a9260.c b/arch/arm/mach-at91/board-qil-a9260.c index 189d3fe8a956..0c61bf0d272c 100644 --- a/arch/arm/mach-at91/board-qil-a9260.c +++ b/arch/arm/mach-at91/board-qil-a9260.c | |||
@@ -52,20 +52,6 @@ static void __init ek_init_early(void) | |||
52 | { | 52 | { |
53 | /* Initialize processor: 12.000 MHz crystal */ | 53 | /* Initialize processor: 12.000 MHz crystal */ |
54 | at91_initialize(12000000); | 54 | at91_initialize(12000000); |
55 | |||
56 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
57 | at91_register_uart(0, 0, 0); | ||
58 | |||
59 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
60 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
61 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
62 | | ATMEL_UART_RI); | ||
63 | |||
64 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */ | ||
65 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
66 | |||
67 | /* USART2 on ttyS3. (Rx, Tx, CTS, RTS) */ | ||
68 | at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
69 | } | 55 | } |
70 | 56 | ||
71 | /* | 57 | /* |
@@ -231,6 +217,19 @@ static struct gpio_led ek_leds[] = { | |||
231 | static void __init ek_board_init(void) | 217 | static void __init ek_board_init(void) |
232 | { | 218 | { |
233 | /* Serial */ | 219 | /* Serial */ |
220 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
221 | at91_register_uart(0, 0, 0); | ||
222 | |||
223 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
224 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
225 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
226 | | ATMEL_UART_RI); | ||
227 | |||
228 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */ | ||
229 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
230 | |||
231 | /* USART2 on ttyS3. (Rx, Tx, CTS, RTS) */ | ||
232 | at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
234 | at91_add_device_serial(); | 233 | at91_add_device_serial(); |
235 | /* USB Host */ | 234 | /* USB Host */ |
236 | at91_add_device_usbh(&ek_usbh_data); | 235 | at91_add_device_usbh(&ek_usbh_data); |
diff --git a/arch/arm/mach-at91/board-rm9200dk.c b/arch/arm/mach-at91/board-rm9200dk.c index d5ce630571f3..4a0b09741254 100644 --- a/arch/arm/mach-at91/board-rm9200dk.c +++ b/arch/arm/mach-at91/board-rm9200dk.c | |||
@@ -53,14 +53,6 @@ static void __init dk_init_early(void) | |||
53 | 53 | ||
54 | /* Setup the LEDs */ | 54 | /* Setup the LEDs */ |
55 | at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2); | 55 | at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2); |
56 | |||
57 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
58 | at91_register_uart(0, 0, 0); | ||
59 | |||
60 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
61 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
62 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
63 | | ATMEL_UART_RI); | ||
64 | } | 56 | } |
65 | 57 | ||
66 | static struct macb_platform_data __initdata dk_eth_data = { | 58 | static struct macb_platform_data __initdata dk_eth_data = { |
@@ -188,6 +180,13 @@ static struct gpio_led dk_leds[] = { | |||
188 | static void __init dk_board_init(void) | 180 | static void __init dk_board_init(void) |
189 | { | 181 | { |
190 | /* Serial */ | 182 | /* Serial */ |
183 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
184 | at91_register_uart(0, 0, 0); | ||
185 | |||
186 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
187 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
188 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
189 | | ATMEL_UART_RI); | ||
191 | at91_add_device_serial(); | 190 | at91_add_device_serial(); |
192 | /* Ethernet */ | 191 | /* Ethernet */ |
193 | at91_add_device_eth(&dk_eth_data); | 192 | at91_add_device_eth(&dk_eth_data); |
diff --git a/arch/arm/mach-at91/board-rm9200ek.c b/arch/arm/mach-at91/board-rm9200ek.c index 32d35cb158fa..b68726140b6a 100644 --- a/arch/arm/mach-at91/board-rm9200ek.c +++ b/arch/arm/mach-at91/board-rm9200ek.c | |||
@@ -53,14 +53,6 @@ static void __init ek_init_early(void) | |||
53 | 53 | ||
54 | /* Setup the LEDs */ | 54 | /* Setup the LEDs */ |
55 | at91_init_leds(AT91_PIN_PB1, AT91_PIN_PB2); | 55 | at91_init_leds(AT91_PIN_PB1, AT91_PIN_PB2); |
56 | |||
57 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
58 | at91_register_uart(0, 0, 0); | ||
59 | |||
60 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
61 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
62 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
63 | | ATMEL_UART_RI); | ||
64 | } | 56 | } |
65 | 57 | ||
66 | static struct macb_platform_data __initdata ek_eth_data = { | 58 | static struct macb_platform_data __initdata ek_eth_data = { |
@@ -159,6 +151,13 @@ static struct gpio_led ek_leds[] = { | |||
159 | static void __init ek_board_init(void) | 151 | static void __init ek_board_init(void) |
160 | { | 152 | { |
161 | /* Serial */ | 153 | /* Serial */ |
154 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
155 | at91_register_uart(0, 0, 0); | ||
156 | |||
157 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
158 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
159 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
160 | | ATMEL_UART_RI); | ||
162 | at91_add_device_serial(); | 161 | at91_add_device_serial(); |
163 | /* Ethernet */ | 162 | /* Ethernet */ |
164 | at91_add_device_eth(&ek_eth_data); | 163 | at91_add_device_eth(&ek_eth_data); |
diff --git a/arch/arm/mach-at91/board-rsi-ews.c b/arch/arm/mach-at91/board-rsi-ews.c index 2c84463a1c1a..10d8730aaa7e 100644 --- a/arch/arm/mach-at91/board-rsi-ews.c +++ b/arch/arm/mach-at91/board-rsi-ews.c | |||
@@ -38,20 +38,6 @@ static void __init rsi_ews_init_early(void) | |||
38 | 38 | ||
39 | /* Setup the LEDs */ | 39 | /* Setup the LEDs */ |
40 | at91_init_leds(AT91_PIN_PB6, AT91_PIN_PB9); | 40 | at91_init_leds(AT91_PIN_PB6, AT91_PIN_PB9); |
41 | |||
42 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
43 | /* This one is for debugging */ | ||
44 | at91_register_uart(0, 0, 0); | ||
45 | |||
46 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
47 | /* Dialin/-out modem interface */ | ||
48 | at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
49 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
50 | | ATMEL_UART_RI); | ||
51 | |||
52 | /* USART3 on ttyS4. (Rx, Tx, RTS) */ | ||
53 | /* RS485 communication */ | ||
54 | at91_register_uart(AT91RM9200_ID_US3, 4, ATMEL_UART_RTS); | ||
55 | } | 41 | } |
56 | 42 | ||
57 | /* | 43 | /* |
@@ -202,6 +188,19 @@ static struct platform_device rsiews_nor_flash = { | |||
202 | static void __init rsi_ews_board_init(void) | 188 | static void __init rsi_ews_board_init(void) |
203 | { | 189 | { |
204 | /* Serial */ | 190 | /* Serial */ |
191 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
192 | /* This one is for debugging */ | ||
193 | at91_register_uart(0, 0, 0); | ||
194 | |||
195 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
196 | /* Dialin/-out modem interface */ | ||
197 | at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
198 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
199 | | ATMEL_UART_RI); | ||
200 | |||
201 | /* USART3 on ttyS4. (Rx, Tx, RTS) */ | ||
202 | /* RS485 communication */ | ||
203 | at91_register_uart(AT91RM9200_ID_US3, 4, ATMEL_UART_RTS); | ||
205 | at91_add_device_serial(); | 204 | at91_add_device_serial(); |
206 | at91_set_gpio_output(AT91_PIN_PA21, 0); | 205 | at91_set_gpio_output(AT91_PIN_PA21, 0); |
207 | /* Ethernet */ | 206 | /* Ethernet */ |
diff --git a/arch/arm/mach-at91/board-sam9-l9260.c b/arch/arm/mach-at91/board-sam9-l9260.c index dee44cbf765b..5343dab295d4 100644 --- a/arch/arm/mach-at91/board-sam9-l9260.c +++ b/arch/arm/mach-at91/board-sam9-l9260.c | |||
@@ -51,17 +51,6 @@ static void __init ek_init_early(void) | |||
51 | 51 | ||
52 | /* Setup the LEDs */ | 52 | /* Setup the LEDs */ |
53 | at91_init_leds(AT91_PIN_PA9, AT91_PIN_PA6); | 53 | at91_init_leds(AT91_PIN_PA9, AT91_PIN_PA6); |
54 | |||
55 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
56 | at91_register_uart(0, 0, 0); | ||
57 | |||
58 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
59 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
60 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
61 | | ATMEL_UART_RI); | ||
62 | |||
63 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */ | ||
64 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
65 | } | 54 | } |
66 | 55 | ||
67 | /* | 56 | /* |
@@ -182,6 +171,16 @@ static struct at91_mmc_data __initdata ek_mmc_data = { | |||
182 | static void __init ek_board_init(void) | 171 | static void __init ek_board_init(void) |
183 | { | 172 | { |
184 | /* Serial */ | 173 | /* Serial */ |
174 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
175 | at91_register_uart(0, 0, 0); | ||
176 | |||
177 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
178 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
179 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
180 | | ATMEL_UART_RI); | ||
181 | |||
182 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */ | ||
183 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
185 | at91_add_device_serial(); | 184 | at91_add_device_serial(); |
186 | /* USB Host */ | 185 | /* USB Host */ |
187 | at91_add_device_usbh(&ek_usbh_data); | 186 | at91_add_device_usbh(&ek_usbh_data); |
diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c index 6da17b5e1e2f..7b3c3913551a 100644 --- a/arch/arm/mach-at91/board-sam9260ek.c +++ b/arch/arm/mach-at91/board-sam9260ek.c | |||
@@ -54,17 +54,6 @@ static void __init ek_init_early(void) | |||
54 | { | 54 | { |
55 | /* Initialize processor: 18.432 MHz crystal */ | 55 | /* Initialize processor: 18.432 MHz crystal */ |
56 | at91_initialize(18432000); | 56 | at91_initialize(18432000); |
57 | |||
58 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
59 | at91_register_uart(0, 0, 0); | ||
60 | |||
61 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
62 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
63 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
64 | | ATMEL_UART_RI); | ||
65 | |||
66 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
67 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
68 | } | 57 | } |
69 | 58 | ||
70 | /* | 59 | /* |
@@ -317,6 +306,16 @@ static void __init ek_add_device_buttons(void) {} | |||
317 | static void __init ek_board_init(void) | 306 | static void __init ek_board_init(void) |
318 | { | 307 | { |
319 | /* Serial */ | 308 | /* Serial */ |
309 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
310 | at91_register_uart(0, 0, 0); | ||
311 | |||
312 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
313 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
314 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
315 | | ATMEL_UART_RI); | ||
316 | |||
317 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
318 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
320 | at91_add_device_serial(); | 319 | at91_add_device_serial(); |
321 | /* USB Host */ | 320 | /* USB Host */ |
322 | at91_add_device_usbh(&ek_usbh_data); | 321 | at91_add_device_usbh(&ek_usbh_data); |
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c index e91c4afb669a..4406f6b53275 100644 --- a/arch/arm/mach-at91/board-sam9261ek.c +++ b/arch/arm/mach-at91/board-sam9261ek.c | |||
@@ -61,9 +61,6 @@ static void __init ek_init_early(void) | |||
61 | 61 | ||
62 | /* Setup the LEDs */ | 62 | /* Setup the LEDs */ |
63 | at91_init_leds(AT91_PIN_PA13, AT91_PIN_PA14); | 63 | at91_init_leds(AT91_PIN_PA13, AT91_PIN_PA14); |
64 | |||
65 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
66 | at91_register_uart(0, 0, 0); | ||
67 | } | 64 | } |
68 | 65 | ||
69 | /* | 66 | /* |
@@ -574,6 +571,8 @@ static struct gpio_led ek_leds[] = { | |||
574 | static void __init ek_board_init(void) | 571 | static void __init ek_board_init(void) |
575 | { | 572 | { |
576 | /* Serial */ | 573 | /* Serial */ |
574 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
575 | at91_register_uart(0, 0, 0); | ||
577 | at91_add_device_serial(); | 576 | at91_add_device_serial(); |
578 | /* USB Host */ | 577 | /* USB Host */ |
579 | at91_add_device_usbh(&ek_usbh_data); | 578 | at91_add_device_usbh(&ek_usbh_data); |
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c index 44248735335e..983cb98d2465 100644 --- a/arch/arm/mach-at91/board-sam9263ek.c +++ b/arch/arm/mach-at91/board-sam9263ek.c | |||
@@ -57,12 +57,6 @@ static void __init ek_init_early(void) | |||
57 | { | 57 | { |
58 | /* Initialize processor: 16.367 MHz crystal */ | 58 | /* Initialize processor: 16.367 MHz crystal */ |
59 | at91_initialize(16367660); | 59 | at91_initialize(16367660); |
60 | |||
61 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
62 | at91_register_uart(0, 0, 0); | ||
63 | |||
64 | /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */ | ||
65 | at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
66 | } | 60 | } |
67 | 61 | ||
68 | /* | 62 | /* |
@@ -409,6 +403,11 @@ static struct at91_can_data ek_can_data = { | |||
409 | static void __init ek_board_init(void) | 403 | static void __init ek_board_init(void) |
410 | { | 404 | { |
411 | /* Serial */ | 405 | /* Serial */ |
406 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
407 | at91_register_uart(0, 0, 0); | ||
408 | |||
409 | /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */ | ||
410 | at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
412 | at91_add_device_serial(); | 411 | at91_add_device_serial(); |
413 | /* USB Host */ | 412 | /* USB Host */ |
414 | at91_add_device_usbh(&ek_usbh_data); | 413 | at91_add_device_usbh(&ek_usbh_data); |
diff --git a/arch/arm/mach-at91/board-sam9g20ek.c b/arch/arm/mach-at91/board-sam9g20ek.c index 05f846784ce4..3d615532ae5c 100644 --- a/arch/arm/mach-at91/board-sam9g20ek.c +++ b/arch/arm/mach-at91/board-sam9g20ek.c | |||
@@ -65,17 +65,6 @@ static void __init ek_init_early(void) | |||
65 | { | 65 | { |
66 | /* Initialize processor: 18.432 MHz crystal */ | 66 | /* Initialize processor: 18.432 MHz crystal */ |
67 | at91_initialize(18432000); | 67 | at91_initialize(18432000); |
68 | |||
69 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
70 | at91_register_uart(0, 0, 0); | ||
71 | |||
72 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
73 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
74 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
75 | | ATMEL_UART_RI); | ||
76 | |||
77 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
78 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
79 | } | 68 | } |
80 | 69 | ||
81 | /* | 70 | /* |
@@ -369,6 +358,16 @@ static struct i2c_board_info __initdata ek_i2c_devices[] = { | |||
369 | static void __init ek_board_init(void) | 358 | static void __init ek_board_init(void) |
370 | { | 359 | { |
371 | /* Serial */ | 360 | /* Serial */ |
361 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
362 | at91_register_uart(0, 0, 0); | ||
363 | |||
364 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
365 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
366 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
367 | | ATMEL_UART_RI); | ||
368 | |||
369 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
370 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
372 | at91_add_device_serial(); | 371 | at91_add_device_serial(); |
373 | /* USB Host */ | 372 | /* USB Host */ |
374 | at91_add_device_usbh(&ek_usbh_data); | 373 | at91_add_device_usbh(&ek_usbh_data); |
diff --git a/arch/arm/mach-at91/board-sam9m10g45ek.c b/arch/arm/mach-at91/board-sam9m10g45ek.c index be2ca19fe5ad..9a87f0b072f8 100644 --- a/arch/arm/mach-at91/board-sam9m10g45ek.c +++ b/arch/arm/mach-at91/board-sam9m10g45ek.c | |||
@@ -53,13 +53,6 @@ static void __init ek_init_early(void) | |||
53 | { | 53 | { |
54 | /* Initialize processor: 12.000 MHz crystal */ | 54 | /* Initialize processor: 12.000 MHz crystal */ |
55 | at91_initialize(12000000); | 55 | at91_initialize(12000000); |
56 | |||
57 | /* DGBU on ttyS0. (Rx & Tx only) */ | ||
58 | at91_register_uart(0, 0, 0); | ||
59 | |||
60 | /* USART0 not connected on the -EK board */ | ||
61 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
62 | at91_register_uart(AT91SAM9G45_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
63 | } | 56 | } |
64 | 57 | ||
65 | /* | 58 | /* |
@@ -454,6 +447,12 @@ static struct platform_device *devices[] __initdata = { | |||
454 | static void __init ek_board_init(void) | 447 | static void __init ek_board_init(void) |
455 | { | 448 | { |
456 | /* Serial */ | 449 | /* Serial */ |
450 | /* DGBU on ttyS0. (Rx & Tx only) */ | ||
451 | at91_register_uart(0, 0, 0); | ||
452 | |||
453 | /* USART0 not connected on the -EK board */ | ||
454 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
455 | at91_register_uart(AT91SAM9G45_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
457 | at91_add_device_serial(); | 456 | at91_add_device_serial(); |
458 | /* USB HS Host */ | 457 | /* USB HS Host */ |
459 | at91_add_device_usbh_ohci(&ek_usbh_hs_data); | 458 | at91_add_device_usbh_ohci(&ek_usbh_hs_data); |
diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c index 23f383a9e0e2..be3239f13daa 100644 --- a/arch/arm/mach-at91/board-sam9rlek.c +++ b/arch/arm/mach-at91/board-sam9rlek.c | |||
@@ -42,12 +42,6 @@ static void __init ek_init_early(void) | |||
42 | { | 42 | { |
43 | /* Initialize processor: 12.000 MHz crystal */ | 43 | /* Initialize processor: 12.000 MHz crystal */ |
44 | at91_initialize(12000000); | 44 | at91_initialize(12000000); |
45 | |||
46 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
47 | at91_register_uart(0, 0, 0); | ||
48 | |||
49 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */ | ||
50 | at91_register_uart(AT91SAM9RL_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
51 | } | 45 | } |
52 | 46 | ||
53 | /* | 47 | /* |
@@ -293,6 +287,11 @@ static void __init ek_add_device_buttons(void) {} | |||
293 | static void __init ek_board_init(void) | 287 | static void __init ek_board_init(void) |
294 | { | 288 | { |
295 | /* Serial */ | 289 | /* Serial */ |
290 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
291 | at91_register_uart(0, 0, 0); | ||
292 | |||
293 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */ | ||
294 | at91_register_uart(AT91SAM9RL_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
296 | at91_add_device_serial(); | 295 | at91_add_device_serial(); |
297 | /* USB HS */ | 296 | /* USB HS */ |
298 | at91_add_device_usba(&ek_usba_udc_data); | 297 | at91_add_device_usba(&ek_usba_udc_data); |
diff --git a/arch/arm/mach-at91/board-snapper9260.c b/arch/arm/mach-at91/board-snapper9260.c index 1a6774a40c9b..9d446f1bb45f 100644 --- a/arch/arm/mach-at91/board-snapper9260.c +++ b/arch/arm/mach-at91/board-snapper9260.c | |||
@@ -43,15 +43,6 @@ | |||
43 | static void __init snapper9260_init_early(void) | 43 | static void __init snapper9260_init_early(void) |
44 | { | 44 | { |
45 | at91_initialize(18432000); | 45 | at91_initialize(18432000); |
46 | |||
47 | /* Debug on ttyS0 */ | ||
48 | at91_register_uart(0, 0, 0); | ||
49 | |||
50 | at91_register_uart(AT91SAM9260_ID_US0, 1, | ||
51 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
52 | at91_register_uart(AT91SAM9260_ID_US1, 2, | ||
53 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
54 | at91_register_uart(AT91SAM9260_ID_US2, 3, 0); | ||
55 | } | 46 | } |
56 | 47 | ||
57 | static struct at91_usbh_data __initdata snapper9260_usbh_data = { | 48 | static struct at91_usbh_data __initdata snapper9260_usbh_data = { |
@@ -167,6 +158,14 @@ static void __init snapper9260_board_init(void) | |||
167 | snapper9260_i2c_isl1208.irq = gpio_to_irq(AT91_PIN_PA31); | 158 | snapper9260_i2c_isl1208.irq = gpio_to_irq(AT91_PIN_PA31); |
168 | i2c_register_board_info(0, &snapper9260_i2c_isl1208, 1); | 159 | i2c_register_board_info(0, &snapper9260_i2c_isl1208, 1); |
169 | 160 | ||
161 | /* Debug on ttyS0 */ | ||
162 | at91_register_uart(0, 0, 0); | ||
163 | |||
164 | at91_register_uart(AT91SAM9260_ID_US0, 1, | ||
165 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
166 | at91_register_uart(AT91SAM9260_ID_US1, 2, | ||
167 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
168 | at91_register_uart(AT91SAM9260_ID_US2, 3, 0); | ||
170 | at91_add_device_serial(); | 169 | at91_add_device_serial(); |
171 | at91_add_device_usbh(&snapper9260_usbh_data); | 170 | at91_add_device_usbh(&snapper9260_usbh_data); |
172 | at91_add_device_udc(&snapper9260_udc_data); | 171 | at91_add_device_udc(&snapper9260_udc_data); |
diff --git a/arch/arm/mach-at91/board-stamp9g20.c b/arch/arm/mach-at91/board-stamp9g20.c index 38a7ca5a5a60..ee86f9d7ee72 100644 --- a/arch/arm/mach-at91/board-stamp9g20.c +++ b/arch/arm/mach-at91/board-stamp9g20.c | |||
@@ -36,41 +36,6 @@ void __init stamp9g20_init_early(void) | |||
36 | { | 36 | { |
37 | /* Initialize processor: 18.432 MHz crystal */ | 37 | /* Initialize processor: 18.432 MHz crystal */ |
38 | at91_initialize(18432000); | 38 | at91_initialize(18432000); |
39 | |||
40 | /* DGBU on ttyS0. (Rx & Tx only) */ | ||
41 | at91_register_uart(0, 0, 0); | ||
42 | } | ||
43 | |||
44 | static void __init stamp9g20evb_init_early(void) | ||
45 | { | ||
46 | stamp9g20_init_early(); | ||
47 | |||
48 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
49 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
50 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ||
51 | | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
52 | } | ||
53 | |||
54 | static void __init portuxg20_init_early(void) | ||
55 | { | ||
56 | stamp9g20_init_early(); | ||
57 | |||
58 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
59 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
60 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ||
61 | | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
62 | |||
63 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */ | ||
64 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
65 | |||
66 | /* USART2 on ttyS3. (Rx, Tx, CTS, RTS) */ | ||
67 | at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
68 | |||
69 | /* USART4 on ttyS5. (Rx, Tx only) */ | ||
70 | at91_register_uart(AT91SAM9260_ID_US4, 5, 0); | ||
71 | |||
72 | /* USART5 on ttyS6. (Rx, Tx only) */ | ||
73 | at91_register_uart(AT91SAM9260_ID_US5, 6, 0); | ||
74 | } | 39 | } |
75 | 40 | ||
76 | /* | 41 | /* |
@@ -251,6 +216,8 @@ void add_w1(void) | |||
251 | void __init stamp9g20_board_init(void) | 216 | void __init stamp9g20_board_init(void) |
252 | { | 217 | { |
253 | /* Serial */ | 218 | /* Serial */ |
219 | /* DGBU on ttyS0. (Rx & Tx only) */ | ||
220 | at91_register_uart(0, 0, 0); | ||
254 | at91_add_device_serial(); | 221 | at91_add_device_serial(); |
255 | /* NAND */ | 222 | /* NAND */ |
256 | add_device_nand(); | 223 | add_device_nand(); |
@@ -266,6 +233,22 @@ void __init stamp9g20_board_init(void) | |||
266 | 233 | ||
267 | static void __init portuxg20_board_init(void) | 234 | static void __init portuxg20_board_init(void) |
268 | { | 235 | { |
236 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
237 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
238 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ||
239 | | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
240 | |||
241 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */ | ||
242 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
243 | |||
244 | /* USART2 on ttyS3. (Rx, Tx, CTS, RTS) */ | ||
245 | at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
246 | |||
247 | /* USART4 on ttyS5. (Rx, Tx only) */ | ||
248 | at91_register_uart(AT91SAM9260_ID_US4, 5, 0); | ||
249 | |||
250 | /* USART5 on ttyS6. (Rx, Tx only) */ | ||
251 | at91_register_uart(AT91SAM9260_ID_US5, 6, 0); | ||
269 | stamp9g20_board_init(); | 252 | stamp9g20_board_init(); |
270 | /* USB Host */ | 253 | /* USB Host */ |
271 | at91_add_device_usbh(&usbh_data); | 254 | at91_add_device_usbh(&usbh_data); |
@@ -283,6 +266,10 @@ static void __init portuxg20_board_init(void) | |||
283 | 266 | ||
284 | static void __init stamp9g20evb_board_init(void) | 267 | static void __init stamp9g20evb_board_init(void) |
285 | { | 268 | { |
269 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
270 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
271 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ||
272 | | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
286 | stamp9g20_board_init(); | 273 | stamp9g20_board_init(); |
287 | /* USB Host */ | 274 | /* USB Host */ |
288 | at91_add_device_usbh(&usbh_data); | 275 | at91_add_device_usbh(&usbh_data); |
@@ -300,7 +287,7 @@ MACHINE_START(PORTUXG20, "taskit PortuxG20") | |||
300 | /* Maintainer: taskit GmbH */ | 287 | /* Maintainer: taskit GmbH */ |
301 | .timer = &at91sam926x_timer, | 288 | .timer = &at91sam926x_timer, |
302 | .map_io = at91_map_io, | 289 | .map_io = at91_map_io, |
303 | .init_early = portuxg20_init_early, | 290 | .init_early = stamp9g20_init_early, |
304 | .init_irq = at91_init_irq_default, | 291 | .init_irq = at91_init_irq_default, |
305 | .init_machine = portuxg20_board_init, | 292 | .init_machine = portuxg20_board_init, |
306 | MACHINE_END | 293 | MACHINE_END |
@@ -309,7 +296,7 @@ MACHINE_START(STAMP9G20, "taskit Stamp9G20") | |||
309 | /* Maintainer: taskit GmbH */ | 296 | /* Maintainer: taskit GmbH */ |
310 | .timer = &at91sam926x_timer, | 297 | .timer = &at91sam926x_timer, |
311 | .map_io = at91_map_io, | 298 | .map_io = at91_map_io, |
312 | .init_early = stamp9g20evb_init_early, | 299 | .init_early = stamp9g20_init_early, |
313 | .init_irq = at91_init_irq_default, | 300 | .init_irq = at91_init_irq_default, |
314 | .init_machine = stamp9g20evb_board_init, | 301 | .init_machine = stamp9g20evb_board_init, |
315 | MACHINE_END | 302 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-usb-a926x.c b/arch/arm/mach-at91/board-usb-a926x.c index ee482ebd07a9..332ecd40bd02 100644 --- a/arch/arm/mach-at91/board-usb-a926x.c +++ b/arch/arm/mach-at91/board-usb-a926x.c | |||
@@ -53,9 +53,6 @@ static void __init ek_init_early(void) | |||
53 | { | 53 | { |
54 | /* Initialize processor: 12.00 MHz crystal */ | 54 | /* Initialize processor: 12.00 MHz crystal */ |
55 | at91_initialize(12000000); | 55 | at91_initialize(12000000); |
56 | |||
57 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
58 | at91_register_uart(0, 0, 0); | ||
59 | } | 56 | } |
60 | 57 | ||
61 | /* | 58 | /* |
@@ -322,6 +319,8 @@ static void __init ek_add_device_leds(void) | |||
322 | static void __init ek_board_init(void) | 319 | static void __init ek_board_init(void) |
323 | { | 320 | { |
324 | /* Serial */ | 321 | /* Serial */ |
322 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
323 | at91_register_uart(0, 0, 0); | ||
325 | at91_add_device_serial(); | 324 | at91_add_device_serial(); |
326 | /* USB Host */ | 325 | /* USB Host */ |
327 | at91_add_device_usbh(&ek_usbh_data); | 326 | at91_add_device_usbh(&ek_usbh_data); |
diff --git a/arch/arm/mach-at91/board-yl-9200.c b/arch/arm/mach-at91/board-yl-9200.c index e94a04eae5e6..db8d25c16794 100644 --- a/arch/arm/mach-at91/board-yl-9200.c +++ b/arch/arm/mach-at91/board-yl-9200.c | |||
@@ -61,20 +61,6 @@ static void __init yl9200_init_early(void) | |||
61 | 61 | ||
62 | /* Setup the LEDs D2=PB17 (timer), D3=PB16 (cpu) */ | 62 | /* Setup the LEDs D2=PB17 (timer), D3=PB16 (cpu) */ |
63 | at91_init_leds(AT91_PIN_PB16, AT91_PIN_PB17); | 63 | at91_init_leds(AT91_PIN_PB16, AT91_PIN_PB17); |
64 | |||
65 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
66 | at91_register_uart(0, 0, 0); | ||
67 | |||
68 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
69 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
70 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
71 | | ATMEL_UART_RI); | ||
72 | |||
73 | /* USART0 on ttyS2. (Rx & Tx only to JP3) */ | ||
74 | at91_register_uart(AT91RM9200_ID_US0, 2, 0); | ||
75 | |||
76 | /* USART3 on ttyS3. (Rx, Tx, RTS - RS485 interface) */ | ||
77 | at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_RTS); | ||
78 | } | 64 | } |
79 | 65 | ||
80 | /* | 66 | /* |
@@ -558,6 +544,19 @@ void __init yl9200_add_device_video(void) {} | |||
558 | static void __init yl9200_board_init(void) | 544 | static void __init yl9200_board_init(void) |
559 | { | 545 | { |
560 | /* Serial */ | 546 | /* Serial */ |
547 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
548 | at91_register_uart(0, 0, 0); | ||
549 | |||
550 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
551 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
552 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
553 | | ATMEL_UART_RI); | ||
554 | |||
555 | /* USART0 on ttyS2. (Rx & Tx only to JP3) */ | ||
556 | at91_register_uart(AT91RM9200_ID_US0, 2, 0); | ||
557 | |||
558 | /* USART3 on ttyS3. (Rx, Tx, RTS - RS485 interface) */ | ||
559 | at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_RTS); | ||
561 | at91_add_device_serial(); | 560 | at91_add_device_serial(); |
562 | /* Ethernet */ | 561 | /* Ethernet */ |
563 | at91_add_device_eth(&yl9200_eth_data); | 562 | at91_add_device_eth(&yl9200_eth_data); |