[ARM] 5059/1: [AT91] Convert to new-style UART initialization
Convert the following AT91RM9200-based boards to the new-style UART initialization: - Conitec ARM&EVA - Atmel AT91RM9200-DK - Embest ATEB9200 - Atmel AT91RM9200-EK - KwikByte KB920x Signed-off-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
7b2253418c
commit
19750336d4
|
@ -40,24 +40,21 @@
|
|||
#include "generic.h"
|
||||
|
||||
|
||||
/*
|
||||
* Serial port configuration.
|
||||
* 0 .. 3 = USART0 .. USART3
|
||||
* 4 = DBGU
|
||||
*/
|
||||
static struct at91_uart_config __initdata carmeva_uart_config = {
|
||||
.console_tty = 0, /* ttyS0 */
|
||||
.nr_tty = 2,
|
||||
.tty_map = { 4, 1, -1, -1, -1 } /* ttyS0, ..., ttyS4 */
|
||||
};
|
||||
|
||||
static void __init carmeva_map_io(void)
|
||||
{
|
||||
/* Initialize processor: 20.000 MHz crystal */
|
||||
at91rm9200_initialize(20000000, AT91RM9200_BGA);
|
||||
|
||||
/* Setup the serial ports and console */
|
||||
at91_init_serial(&carmeva_uart_config);
|
||||
/* DBGU on ttyS0. (Rx & Tx only) */
|
||||
at91_register_uart(0, 0, 0);
|
||||
|
||||
/* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
|
||||
at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
|
||||
| ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
|
||||
| ATMEL_UART_RI);
|
||||
|
||||
/* set serial console to ttyS0 (ie, DBGU) */
|
||||
at91_set_serial_console(0);
|
||||
}
|
||||
|
||||
static void __init carmeva_init_irq(void)
|
||||
|
|
|
@ -45,10 +45,10 @@ static void __init csb637_map_io(void)
|
|||
/* Initialize processor: 3.6864 MHz crystal */
|
||||
at91rm9200_initialize(3686400, AT91RM9200_BGA);
|
||||
|
||||
/* DBGU on ttyS0 */
|
||||
/* DBGU on ttyS0. (Rx & Tx only) */
|
||||
at91_register_uart(0, 0, 0);
|
||||
|
||||
/* make console=ttyS0 the default */
|
||||
/* make console=ttyS0 (ie, DBGU) the default */
|
||||
at91_set_serial_console(0);
|
||||
}
|
||||
|
||||
|
|
|
@ -45,17 +45,6 @@
|
|||
#include "generic.h"
|
||||
|
||||
|
||||
/*
|
||||
* Serial port configuration.
|
||||
* 0 .. 3 = USART0 .. USART3
|
||||
* 4 = DBGU
|
||||
*/
|
||||
static struct at91_uart_config __initdata dk_uart_config = {
|
||||
.console_tty = 0, /* ttyS0 */
|
||||
.nr_tty = 2,
|
||||
.tty_map = { 4, 1, -1, -1, -1 } /* ttyS0, ..., ttyS4 */
|
||||
};
|
||||
|
||||
static void __init dk_map_io(void)
|
||||
{
|
||||
/* Initialize processor: 18.432 MHz crystal */
|
||||
|
@ -64,8 +53,16 @@ static void __init dk_map_io(void)
|
|||
/* Setup the LEDs */
|
||||
at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2);
|
||||
|
||||
/* Setup the serial ports and console */
|
||||
at91_init_serial(&dk_uart_config);
|
||||
/* DBGU on ttyS0. (Rx & Tx only) */
|
||||
at91_register_uart(0, 0, 0);
|
||||
|
||||
/* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
|
||||
at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
|
||||
| ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
|
||||
| ATMEL_UART_RI);
|
||||
|
||||
/* set serial console to ttyS0 (ie, DBGU) */
|
||||
at91_set_serial_console(0);
|
||||
}
|
||||
|
||||
static void __init dk_init_irq(void)
|
||||
|
@ -163,7 +160,7 @@ static struct at91_nand_data __initdata dk_nand_data = {
|
|||
#define DK_FLASH_SIZE 0x200000
|
||||
|
||||
static struct physmap_flash_data dk_flash_data = {
|
||||
.width = 2,
|
||||
.width = 2,
|
||||
};
|
||||
|
||||
static struct resource dk_flash_resource = {
|
||||
|
|
|
@ -40,24 +40,24 @@
|
|||
#include "generic.h"
|
||||
|
||||
|
||||
/*
|
||||
* Serial port configuration.
|
||||
* 0 .. 3 = USART0 .. USART3
|
||||
* 4 = DBGU
|
||||
*/
|
||||
static struct at91_uart_config __initdata eb9200_uart_config = {
|
||||
.console_tty = 0, /* ttyS0 */
|
||||
.nr_tty = 2,
|
||||
.tty_map = { 4, 1, -1, -1, -1 } /* ttyS0, ..., ttyS4 */
|
||||
};
|
||||
|
||||
static void __init eb9200_map_io(void)
|
||||
{
|
||||
/* Initialize processor: 18.432 MHz crystal */
|
||||
at91rm9200_initialize(18432000, AT91RM9200_BGA);
|
||||
|
||||
/* Setup the serial ports and console */
|
||||
at91_init_serial(&eb9200_uart_config);
|
||||
/* DBGU on ttyS0. (Rx & Tx only) */
|
||||
at91_register_uart(0, 0, 0);
|
||||
|
||||
/* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
|
||||
at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
|
||||
| ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
|
||||
| ATMEL_UART_RI);
|
||||
|
||||
/* USART2 on ttyS2. (Rx, Tx) - IRDA */
|
||||
at91_register_uart(AT91RM9200_ID_US2, 2, 0);
|
||||
|
||||
/* set serial console to ttyS0 (ie, DBGU) */
|
||||
at91_set_serial_console(0);
|
||||
}
|
||||
|
||||
static void __init eb9200_init_irq(void)
|
||||
|
|
|
@ -45,17 +45,6 @@
|
|||
#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, 1, -1, -1, -1 } /* ttyS0, ..., ttyS4 */
|
||||
};
|
||||
|
||||
static void __init ek_map_io(void)
|
||||
{
|
||||
/* Initialize processor: 18.432 MHz crystal */
|
||||
|
@ -64,8 +53,16 @@ static void __init ek_map_io(void)
|
|||
/* Setup the LEDs */
|
||||
at91_init_leds(AT91_PIN_PB1, AT91_PIN_PB2);
|
||||
|
||||
/* Setup the serial ports and console */
|
||||
at91_init_serial(&ek_uart_config);
|
||||
/* DBGU on ttyS0. (Rx & Tx only) */
|
||||
at91_register_uart(0, 0, 0);
|
||||
|
||||
/* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
|
||||
at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
|
||||
| ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
|
||||
| ATMEL_UART_RI);
|
||||
|
||||
/* set serial console to ttyS0 (ie, DBGU) */
|
||||
at91_set_serial_console(0);
|
||||
}
|
||||
|
||||
static void __init ek_init_irq(void)
|
||||
|
@ -122,7 +119,7 @@ static struct i2c_board_info __initdata ek_i2c_devices[] = {
|
|||
#define EK_FLASH_SIZE 0x200000
|
||||
|
||||
static struct physmap_flash_data ek_flash_data = {
|
||||
.width = 2,
|
||||
.width = 2,
|
||||
};
|
||||
|
||||
static struct resource ek_flash_resource = {
|
||||
|
|
|
@ -37,20 +37,11 @@
|
|||
#include <asm/arch/board.h>
|
||||
#include <asm/arch/gpio.h>
|
||||
|
||||
#include <asm/arch/at91rm9200_mc.h>
|
||||
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
/*
|
||||
* Serial port configuration.
|
||||
* 0 .. 3 = USART0 .. USART3
|
||||
* 4 = DBGU
|
||||
*/
|
||||
static struct at91_uart_config __initdata kb9202_uart_config = {
|
||||
.console_tty = 0, /* ttyS0 */
|
||||
.nr_tty = 3,
|
||||
.tty_map = { 4, 0, 1, -1, -1 } /* ttyS0, ..., ttyS4 */
|
||||
};
|
||||
|
||||
static void __init kb9202_map_io(void)
|
||||
{
|
||||
/* Initialize processor: 10 MHz crystal */
|
||||
|
@ -59,8 +50,20 @@ static void __init kb9202_map_io(void)
|
|||
/* Set up the LEDs */
|
||||
at91_init_leds(AT91_PIN_PC19, AT91_PIN_PC18);
|
||||
|
||||
/* Setup the serial ports and console */
|
||||
at91_init_serial(&kb9202_uart_config);
|
||||
/* DBGU on ttyS0. (Rx & Tx only) */
|
||||
at91_register_uart(0, 0, 0);
|
||||
|
||||
/* USART0 on ttyS1 (Rx & Tx only) */
|
||||
at91_register_uart(AT91RM9200_ID_US0, 1, 0);
|
||||
|
||||
/* USART1 on ttyS2 (Rx & Tx only) - IRDA (optional) */
|
||||
at91_register_uart(AT91RM9200_ID_US1, 2, 0);
|
||||
|
||||
/* USART3 on ttyS3 (Rx, Tx, CTS, RTS) - RS485 (optional) */
|
||||
at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_CTS | ATMEL_UART_RTS);
|
||||
|
||||
/* set serial console to ttyS0 (ie, DBGU) */
|
||||
at91_set_serial_console(0);
|
||||
}
|
||||
|
||||
static void __init kb9202_init_irq(void)
|
||||
|
|
Loading…
Reference in New Issue