Skip to content

Commit

Permalink
ARM: at91: drop at91_set_serial_console
Browse files Browse the repository at this point in the history
at91_set_serial_console is used to define the default console of linux.
This is already manage by the cmdline. And if the boot loader can not be
modified you can still set it by enabling the CONFIG_CMDLINE_EXTEND option.
And then the command-line arguments provided by the boot loader will be
appended to the default kernel command string.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
  • Loading branch information
Jean-Christophe PLAGNIOL-VILLARD authored and Nicolas Ferre committed Apr 17, 2012
1 parent 5f29d0a commit a27fa58
Show file tree
Hide file tree
Showing 46 changed files with 0 additions and 251 deletions.
12 changes: 0 additions & 12 deletions arch/arm/mach-at91/at91rm9200.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,18 +258,6 @@ static void __init at91rm9200_register_clocks(void)
clk_register(&pck3);
}

static struct clk_lookup console_clock_lookup;

void __init at91rm9200_set_console_clock(int id)
{
if (id >= ARRAY_SIZE(usart_clocks_lookups))
return;

console_clock_lookup.con_id = "usart";
console_clock_lookup.clk = usart_clocks_lookups[id].clk;
clkdev_add(&console_clock_lookup);
}

/* --------------------------------------------------------------------
* GPIO
* -------------------------------------------------------------------- */
Expand Down
12 changes: 0 additions & 12 deletions arch/arm/mach-at91/at91rm9200_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -1152,14 +1152,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
at91_uarts[portnr] = pdev;
}

void __init at91_set_serial_console(unsigned portnr)
{
if (portnr < ATMEL_MAX_UART) {
atmel_default_console_device = at91_uarts[portnr];
at91rm9200_set_console_clock(at91_uarts[portnr]->id);
}
}

void __init at91_add_device_serial(void)
{
int i;
Expand All @@ -1168,14 +1160,10 @@ void __init at91_add_device_serial(void)
if (at91_uarts[i])
platform_device_register(at91_uarts[i]);
}

if (!atmel_default_console_device)
printk(KERN_INFO "AT91: No default serial console defined.\n");
}
#else
void __init __deprecated at91_init_serial(struct at91_uart_config *config) {}
void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
void __init at91_set_serial_console(unsigned portnr) {}
void __init at91_add_device_serial(void) {}
#endif

Expand Down
12 changes: 0 additions & 12 deletions arch/arm/mach-at91/at91sam9260.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,18 +268,6 @@ static void __init at91sam9260_register_clocks(void)
clk_register(&pck1);
}

static struct clk_lookup console_clock_lookup;

void __init at91sam9260_set_console_clock(int id)
{
if (id >= ARRAY_SIZE(usart_clocks_lookups))
return;

console_clock_lookup.con_id = "usart";
console_clock_lookup.clk = usart_clocks_lookups[id].clk;
clkdev_add(&console_clock_lookup);
}

/* --------------------------------------------------------------------
* GPIO
* -------------------------------------------------------------------- */
Expand Down
12 changes: 0 additions & 12 deletions arch/arm/mach-at91/at91sam9260_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -1229,14 +1229,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
at91_uarts[portnr] = pdev;
}

void __init at91_set_serial_console(unsigned portnr)
{
if (portnr < ATMEL_MAX_UART) {
atmel_default_console_device = at91_uarts[portnr];
at91sam9260_set_console_clock(at91_uarts[portnr]->id);
}
}

void __init at91_add_device_serial(void)
{
int i;
Expand All @@ -1245,13 +1237,9 @@ void __init at91_add_device_serial(void)
if (at91_uarts[i])
platform_device_register(at91_uarts[i]);
}

if (!atmel_default_console_device)
printk(KERN_INFO "AT91: No default serial console defined.\n");
}
#else
void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
void __init at91_set_serial_console(unsigned portnr) {}
void __init at91_add_device_serial(void) {}
#endif

Expand Down
12 changes: 0 additions & 12 deletions arch/arm/mach-at91/at91sam9261.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,18 +239,6 @@ static void __init at91sam9261_register_clocks(void)
clk_register(&hck1);
}

static struct clk_lookup console_clock_lookup;

void __init at91sam9261_set_console_clock(int id)
{
if (id >= ARRAY_SIZE(usart_clocks_lookups))
return;

console_clock_lookup.con_id = "usart";
console_clock_lookup.clk = usart_clocks_lookups[id].clk;
clkdev_add(&console_clock_lookup);
}

/* --------------------------------------------------------------------
* GPIO
* -------------------------------------------------------------------- */
Expand Down
12 changes: 0 additions & 12 deletions arch/arm/mach-at91/at91sam9261_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -1051,14 +1051,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
at91_uarts[portnr] = pdev;
}

void __init at91_set_serial_console(unsigned portnr)
{
if (portnr < ATMEL_MAX_UART) {
atmel_default_console_device = at91_uarts[portnr];
at91sam9261_set_console_clock(at91_uarts[portnr]->id);
}
}

void __init at91_add_device_serial(void)
{
int i;
Expand All @@ -1067,13 +1059,9 @@ void __init at91_add_device_serial(void)
if (at91_uarts[i])
platform_device_register(at91_uarts[i]);
}

if (!atmel_default_console_device)
printk(KERN_INFO "AT91: No default serial console defined.\n");
}
#else
void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
void __init at91_set_serial_console(unsigned portnr) {}
void __init at91_add_device_serial(void) {}
#endif

Expand Down
12 changes: 0 additions & 12 deletions arch/arm/mach-at91/at91sam9263.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,18 +255,6 @@ static void __init at91sam9263_register_clocks(void)
clk_register(&pck3);
}

static struct clk_lookup console_clock_lookup;

void __init at91sam9263_set_console_clock(int id)
{
if (id >= ARRAY_SIZE(usart_clocks_lookups))
return;

console_clock_lookup.con_id = "usart";
console_clock_lookup.clk = usart_clocks_lookups[id].clk;
clkdev_add(&console_clock_lookup);
}

/* --------------------------------------------------------------------
* GPIO
* -------------------------------------------------------------------- */
Expand Down
12 changes: 0 additions & 12 deletions arch/arm/mach-at91/at91sam9263_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -1461,14 +1461,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
at91_uarts[portnr] = pdev;
}

void __init at91_set_serial_console(unsigned portnr)
{
if (portnr < ATMEL_MAX_UART) {
atmel_default_console_device = at91_uarts[portnr];
at91sam9263_set_console_clock(at91_uarts[portnr]->id);
}
}

void __init at91_add_device_serial(void)
{
int i;
Expand All @@ -1477,13 +1469,9 @@ void __init at91_add_device_serial(void)
if (at91_uarts[i])
platform_device_register(at91_uarts[i]);
}

if (!atmel_default_console_device)
printk(KERN_INFO "AT91: No default serial console defined.\n");
}
#else
void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
void __init at91_set_serial_console(unsigned portnr) {}
void __init at91_add_device_serial(void) {}
#endif

Expand Down
12 changes: 0 additions & 12 deletions arch/arm/mach-at91/at91sam9g45.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,18 +288,6 @@ static void __init at91sam9g45_register_clocks(void)
clk_register(&pck1);
}

static struct clk_lookup console_clock_lookup;

void __init at91sam9g45_set_console_clock(int id)
{
if (id >= ARRAY_SIZE(usart_clocks_lookups))
return;

console_clock_lookup.con_id = "usart";
console_clock_lookup.clk = usart_clocks_lookups[id].clk;
clkdev_add(&console_clock_lookup);
}

/* --------------------------------------------------------------------
* GPIO
* -------------------------------------------------------------------- */
Expand Down
12 changes: 0 additions & 12 deletions arch/arm/mach-at91/at91sam9g45_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -1741,14 +1741,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
at91_uarts[portnr] = pdev;
}

void __init at91_set_serial_console(unsigned portnr)
{
if (portnr < ATMEL_MAX_UART) {
atmel_default_console_device = at91_uarts[portnr];
at91sam9g45_set_console_clock(at91_uarts[portnr]->id);
}
}

void __init at91_add_device_serial(void)
{
int i;
Expand All @@ -1757,13 +1749,9 @@ void __init at91_add_device_serial(void)
if (at91_uarts[i])
platform_device_register(at91_uarts[i]);
}

if (!atmel_default_console_device)
printk(KERN_INFO "AT91: No default serial console defined.\n");
}
#else
void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
void __init at91_set_serial_console(unsigned portnr) {}
void __init at91_add_device_serial(void) {}
#endif

Expand Down
12 changes: 0 additions & 12 deletions arch/arm/mach-at91/at91sam9rl.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,18 +232,6 @@ static void __init at91sam9rl_register_clocks(void)
clk_register(&pck1);
}

static struct clk_lookup console_clock_lookup;

void __init at91sam9rl_set_console_clock(int id)
{
if (id >= ARRAY_SIZE(usart_clocks_lookups))
return;

console_clock_lookup.con_id = "usart";
console_clock_lookup.clk = usart_clocks_lookups[id].clk;
clkdev_add(&console_clock_lookup);
}

/* --------------------------------------------------------------------
* GPIO
* -------------------------------------------------------------------- */
Expand Down
12 changes: 0 additions & 12 deletions arch/arm/mach-at91/at91sam9rl_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -1192,14 +1192,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
at91_uarts[portnr] = pdev;
}

void __init at91_set_serial_console(unsigned portnr)
{
if (portnr < ATMEL_MAX_UART) {
atmel_default_console_device = at91_uarts[portnr];
at91sam9rl_set_console_clock(at91_uarts[portnr]->id);
}
}

void __init at91_add_device_serial(void)
{
int i;
Expand All @@ -1208,13 +1200,9 @@ void __init at91_add_device_serial(void)
if (at91_uarts[i])
platform_device_register(at91_uarts[i]);
}

if (!atmel_default_console_device)
printk(KERN_INFO "AT91: No default serial console defined.\n");
}
#else
void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
void __init at91_set_serial_console(unsigned portnr) {}
void __init at91_add_device_serial(void) {}
#endif

Expand Down
3 changes: 0 additions & 3 deletions arch/arm/mach-at91/board-1arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ static void __init onearm_init_early(void)
at91_register_uart(AT91RM9200_ID_US1, 2, 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 struct macb_platform_data __initdata onearm_eth_data = {
Expand Down
3 changes: 0 additions & 3 deletions arch/arm/mach-at91/board-afeb-9260v1.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ static void __init afeb9260_init_early(void)
/* 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);
}

/*
Expand Down
3 changes: 0 additions & 3 deletions arch/arm/mach-at91/board-cam60.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ static void __init cam60_init_early(void)

/* DBGU on ttyS0. (Rx & Tx only) */
at91_register_uart(0, 0, 0);

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

/*
Expand Down
3 changes: 0 additions & 3 deletions arch/arm/mach-at91/board-carmeva.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ static void __init carmeva_init_early(void)
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 struct macb_platform_data __initdata carmeva_eth_data = {
Expand Down
3 changes: 0 additions & 3 deletions arch/arm/mach-at91/board-cpu9krea.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ static void __init cpu9krea_init_early(void)

/* USART5 on ttyS6. (Rx, Tx) */
at91_register_uart(AT91SAM9260_ID_US5, 6, 0);

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

/*
Expand Down
3 changes: 0 additions & 3 deletions arch/arm/mach-at91/board-cpuat91.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ static void __init cpuat91_init_early(void)
/* USART3 on ttyS4 (Rx, Tx, CTS, RTS) */
at91_register_uart(AT91RM9200_ID_US3, 4, ATMEL_UART_CTS |
ATMEL_UART_RTS);

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

static struct macb_platform_data __initdata cpuat91_eth_data = {
Expand Down
3 changes: 0 additions & 3 deletions arch/arm/mach-at91/board-csb337.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ static void __init csb337_init_early(void)

/* DBGU on ttyS0 */
at91_register_uart(0, 0, 0);

/* make console=ttyS0 the default */
at91_set_serial_console(0);
}

static struct macb_platform_data __initdata csb337_eth_data = {
Expand Down
3 changes: 0 additions & 3 deletions arch/arm/mach-at91/board-csb637.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ static void __init csb637_init_early(void)

/* DBGU on ttyS0. (Rx & Tx only) */
at91_register_uart(0, 0, 0);

/* make console=ttyS0 (ie, DBGU) the default */
at91_set_serial_console(0);
}

static struct macb_platform_data __initdata csb637_eth_data = {
Expand Down
3 changes: 0 additions & 3 deletions arch/arm/mach-at91/board-eb9200.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ static void __init eb9200_init_early(void)

/* 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 struct macb_platform_data __initdata eb9200_eth_data = {
Expand Down
3 changes: 0 additions & 3 deletions arch/arm/mach-at91/board-ecbat91.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ static void __init ecb_at91init_early(void)

/* USART0 on ttyS1. (Rx & Tx only) */
at91_register_uart(AT91RM9200_ID_US0, 1, 0);

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

static struct macb_platform_data __initdata ecb_at91eth_data = {
Expand Down
3 changes: 0 additions & 3 deletions arch/arm/mach-at91/board-eco920.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ static void __init eco920_init_early(void)

/* DBGU on ttyS0. (Rx & Tx only */
at91_register_uart(0, 0, 0);

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

static struct macb_platform_data __initdata eco920_eth_data = {
Expand Down
Loading

0 comments on commit a27fa58

Please sign in to comment.