aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91
diff options
context:
space:
mode:
authorAndrew Victor <linux@maxim.org.za>2008-04-02 16:47:29 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-04-04 04:52:21 -0400
commita3da12229f4f9bee2ed66ac34a54a4e8b74bcbcb (patch)
tree7d0e06b560ff8b7dee204f4fb2d8c5e40cded821 /arch/arm/mach-at91
parentd7a2415f7a48ce4fc16cc769f96d0df818648837 (diff)
[ARM] 4905/1: [AT91] Atmel SAM9 boards updated to new-style UART initialization
Convert the Atmel SAM9260-EK, SAM9261-EK, SAM9263-EK and SAM9RL-EK boards to use the new-style UART initialization. Signed-off-by: Sedji Gaouaou <sedji.gaouaou@atmel.com> Signed-off-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-at91')
-rw-r--r--arch/arm/mach-at91/board-sam9260ek.c26
-rw-r--r--arch/arm/mach-at91/board-sam9261ek.c18
-rw-r--r--arch/arm/mach-at91/board-sam9263ek.c21
-rw-r--r--arch/arm/mach-at91/board-sam9rlek.c21
4 files changed, 34 insertions, 52 deletions
diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c
index 8c657a9288ee..440553632b53 100644
--- a/arch/arm/mach-at91/board-sam9260ek.c
+++ b/arch/arm/mach-at91/board-sam9260ek.c
@@ -42,24 +42,24 @@
42#include "generic.h" 42#include "generic.h"
43 43
44 44
45/*
46 * Serial port configuration.
47 * 0 .. 5 = USART0 .. USART5
48 * 6 = DBGU
49 */
50static struct at91_uart_config __initdata ek_uart_config = {
51 .console_tty = 0, /* ttyS0 */
52 .nr_tty = 3,
53 .tty_map = { 6, 0, 1, -1, -1, -1, -1 } /* ttyS0, ..., ttyS6 */
54};
55
56static void __init ek_map_io(void) 45static void __init ek_map_io(void)
57{ 46{
58 /* Initialize processor: 18.432 MHz crystal */ 47 /* Initialize processor: 18.432 MHz crystal */
59 at91sam9260_initialize(18432000); 48 at91sam9260_initialize(18432000);
60 49
61 /* Setup the serial ports and console */ 50 /* DGBU on ttyS0. (Rx & Tx only) */
62 at91_init_serial(&ek_uart_config); 51 at91_register_uart(0, 0, 0);
52
53 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
54 at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
55 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
56 | ATMEL_UART_RI);
57
58 /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
59 at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
60
61 /* set serial console to ttyS0 (ie, DBGU) */
62 at91_set_serial_console(0);
63} 63}
64 64
65static void __init ek_init_irq(void) 65static void __init ek_init_irq(void)
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
index f71ff750b3d2..3c73825b58de 100644
--- a/arch/arm/mach-at91/board-sam9261ek.c
+++ b/arch/arm/mach-at91/board-sam9261ek.c
@@ -49,17 +49,6 @@
49#include "generic.h" 49#include "generic.h"
50 50
51 51
52/*
53 * Serial port configuration.
54 * 0 .. 2 = USART0 .. USART2
55 * 3 = DBGU
56 */
57static struct at91_uart_config __initdata ek_uart_config = {
58 .console_tty = 0, /* ttyS0 */
59 .nr_tty = 1,
60 .tty_map = { 3, -1, -1, -1 } /* ttyS0, ..., ttyS3 */
61};
62
63static void __init ek_map_io(void) 52static void __init ek_map_io(void)
64{ 53{
65 /* Initialize processor: 18.432 MHz crystal */ 54 /* Initialize processor: 18.432 MHz crystal */
@@ -68,8 +57,11 @@ static void __init ek_map_io(void)
68 /* Setup the LEDs */ 57 /* Setup the LEDs */
69 at91_init_leds(AT91_PIN_PA13, AT91_PIN_PA14); 58 at91_init_leds(AT91_PIN_PA13, AT91_PIN_PA14);
70 59
71 /* Setup the serial ports and console */ 60 /* DGBU on ttyS0. (Rx & Tx only) */
72 at91_init_serial(&ek_uart_config); 61 at91_register_uart(0, 0, 0);
62
63 /* set serial console to ttyS0 (ie, DBGU) */
64 at91_set_serial_console(0);
73} 65}
74 66
75static void __init ek_init_irq(void) 67static void __init ek_init_irq(void)
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
index a65bd1654021..86a7fb17096c 100644
--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -48,24 +48,19 @@
48#include "generic.h" 48#include "generic.h"
49 49
50 50
51/*
52 * Serial port configuration.
53 * 0 .. 2 = USART0 .. USART2
54 * 3 = DBGU
55 */
56static struct at91_uart_config __initdata ek_uart_config = {
57 .console_tty = 0, /* ttyS0 */
58 .nr_tty = 2,
59 .tty_map = { 3, 0, -1, -1, } /* ttyS0, ..., ttyS3 */
60};
61
62static void __init ek_map_io(void) 51static void __init ek_map_io(void)
63{ 52{
64 /* Initialize processor: 16.367 MHz crystal */ 53 /* Initialize processor: 16.367 MHz crystal */
65 at91sam9263_initialize(16367660); 54 at91sam9263_initialize(16367660);
66 55
67 /* Setup the serial ports and console */ 56 /* DGBU on ttyS0. (Rx & Tx only) */
68 at91_init_serial(&ek_uart_config); 57 at91_register_uart(0, 0, 0);
58
59 /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */
60 at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
61
62 /* set serial console to ttyS0 (ie, DBGU) */
63 at91_set_serial_console(0);
69} 64}
70 65
71static void __init ek_init_irq(void) 66static void __init ek_init_irq(void)
diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c
index ce83b60c450d..ffc0597aee8d 100644
--- a/arch/arm/mach-at91/board-sam9rlek.c
+++ b/arch/arm/mach-at91/board-sam9rlek.c
@@ -34,24 +34,19 @@
34#include "generic.h" 34#include "generic.h"
35 35
36 36
37/*
38 * Serial port configuration.
39 * 0 .. 3 = USART0 .. USART3
40 * 4 = DBGU
41 */
42static struct at91_uart_config __initdata ek_uart_config = {
43 .console_tty = 0, /* ttyS0 */
44 .nr_tty = 2,
45 .tty_map = { 4, 0, -1, -1, -1 } /* ttyS0, ..., ttyS4 */
46};
47
48static void __init ek_map_io(void) 37static void __init ek_map_io(void)
49{ 38{
50 /* Initialize processor: 12.000 MHz crystal */ 39 /* Initialize processor: 12.000 MHz crystal */
51 at91sam9rl_initialize(12000000); 40 at91sam9rl_initialize(12000000);
52 41
53 /* Setup the serial ports and console */ 42 /* DGBU on ttyS0. (Rx & Tx only) */
54 at91_init_serial(&ek_uart_config); 43 at91_register_uart(0, 0, 0);
44
45 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */
46 at91_register_uart(AT91SAM9RL_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
47
48 /* set serial console to ttyS0 (ie, DBGU) */
49 at91_set_serial_console(0);
55} 50}
56 51
57static void __init ek_init_irq(void) 52static void __init ek_init_irq(void)