Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a3da1222 authored by Andrew Victor's avatar Andrew Victor Committed by Russell King
Browse files

[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: default avatarSedji Gaouaou <sedji.gaouaou@atmel.com>
Signed-off-by: default avatarAndrew Victor <linux@maxim.org.za>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent d7a2415f
Loading
Loading
Loading
Loading
+13 −13
Original line number Original line Diff line number Diff line
@@ -42,24 +42,24 @@
#include "generic.h"
#include "generic.h"




/*
 * Serial port configuration.
 *    0 .. 5 = USART0 .. USART5
 *    6      = DBGU
 */
static struct at91_uart_config __initdata ek_uart_config = {
	.console_tty	= 0,				/* ttyS0 */
	.nr_tty		= 3,
	.tty_map	= { 6, 0, 1, -1, -1, -1, -1 }	/* ttyS0, ..., ttyS6 */
};

static void __init ek_map_io(void)
static void __init ek_map_io(void)
{
{
	/* Initialize processor: 18.432 MHz crystal */
	/* Initialize processor: 18.432 MHz crystal */
	at91sam9260_initialize(18432000);
	at91sam9260_initialize(18432000);


	/* Setup the serial ports and console */
	/* DGBU on ttyS0. (Rx & Tx only) */
	at91_init_serial(&ek_uart_config);
	at91_register_uart(0, 0, 0);

	/* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
	at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
			   | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
			   | ATMEL_UART_RI);

	/* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
	at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);

	/* set serial console to ttyS0 (ie, DBGU) */
	at91_set_serial_console(0);
}
}


static void __init ek_init_irq(void)
static void __init ek_init_irq(void)
+5 −13
Original line number Original line Diff line number Diff line
@@ -49,17 +49,6 @@
#include "generic.h"
#include "generic.h"




/*
 * Serial port configuration.
 *    0 .. 2 = USART0 .. USART2
 *    3      = DBGU
 */
static struct at91_uart_config __initdata ek_uart_config = {
	.console_tty	= 0,				/* ttyS0 */
	.nr_tty		= 1,
	.tty_map	= { 3, -1, -1, -1 }		/* ttyS0, ..., ttyS3 */
};

static void __init ek_map_io(void)
static void __init ek_map_io(void)
{
{
	/* Initialize processor: 18.432 MHz crystal */
	/* Initialize processor: 18.432 MHz crystal */
@@ -68,8 +57,11 @@ static void __init ek_map_io(void)
	/* Setup the LEDs */
	/* Setup the LEDs */
	at91_init_leds(AT91_PIN_PA13, AT91_PIN_PA14);
	at91_init_leds(AT91_PIN_PA13, AT91_PIN_PA14);


	/* Setup the serial ports and console */
	/* DGBU on ttyS0. (Rx & Tx only) */
	at91_init_serial(&ek_uart_config);
	at91_register_uart(0, 0, 0);

	/* set serial console to ttyS0 (ie, DBGU) */
	at91_set_serial_console(0);
}
}


static void __init ek_init_irq(void)
static void __init ek_init_irq(void)
+8 −13
Original line number Original line Diff line number Diff line
@@ -48,24 +48,19 @@
#include "generic.h"
#include "generic.h"




/*
 * Serial port configuration.
 *    0 .. 2 = USART0 .. USART2
 *    3      = DBGU
 */
static struct at91_uart_config __initdata ek_uart_config = {
	.console_tty	= 0,				/* ttyS0 */
	.nr_tty		= 2,
	.tty_map	= { 3, 0, -1, -1, }		/* ttyS0, ..., ttyS3 */
};

static void __init ek_map_io(void)
static void __init ek_map_io(void)
{
{
	/* Initialize processor: 16.367 MHz crystal */
	/* Initialize processor: 16.367 MHz crystal */
	at91sam9263_initialize(16367660);
	at91sam9263_initialize(16367660);


	/* Setup the serial ports and console */
	/* DGBU on ttyS0. (Rx & Tx only) */
	at91_init_serial(&ek_uart_config);
	at91_register_uart(0, 0, 0);

	/* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */
	at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);

	/* set serial console to ttyS0 (ie, DBGU) */
	at91_set_serial_console(0);
}
}


static void __init ek_init_irq(void)
static void __init ek_init_irq(void)
+8 −13
Original line number Original line Diff line number Diff line
@@ -34,24 +34,19 @@
#include "generic.h"
#include "generic.h"




/*
 * Serial port configuration.
 *    0 .. 3 = USART0 .. USART3
 *    4      = DBGU
 */
static struct at91_uart_config __initdata ek_uart_config = {
	.console_tty	= 0,				/* ttyS0 */
	.nr_tty		= 2,
	.tty_map	= { 4, 0, -1, -1, -1 }		/* ttyS0, ..., ttyS4 */
};

static void __init ek_map_io(void)
static void __init ek_map_io(void)
{
{
	/* Initialize processor: 12.000 MHz crystal */
	/* Initialize processor: 12.000 MHz crystal */
	at91sam9rl_initialize(12000000);
	at91sam9rl_initialize(12000000);


	/* Setup the serial ports and console */
	/* DGBU on ttyS0. (Rx & Tx only) */
	at91_init_serial(&ek_uart_config);
	at91_register_uart(0, 0, 0);

	/* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */
	at91_register_uart(AT91SAM9RL_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);

	/* set serial console to ttyS0 (ie, DBGU) */
	at91_set_serial_console(0);
}
}


static void __init ek_init_irq(void)
static void __init ek_init_irq(void)