Atmel: move console default platform_device to serial driver
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Wed, 15 Feb 2012 16:24:07 +0000 (00:24 +0800)
committerNicolas Ferre <nicolas.ferre@atmel.com>
Thu, 23 Feb 2012 13:57:59 +0000 (14:57 +0100)
This variable spread on every SoC that is using the atmel_serial.c
driver can be included directly into the latter.

This will allow to compile multiple soc in the same kernel.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: kernel@avr32linux.org
arch/arm/mach-at91/at91rm9200_devices.c
arch/arm/mach-at91/at91sam9260_devices.c
arch/arm/mach-at91/at91sam9261_devices.c
arch/arm/mach-at91/at91sam9263_devices.c
arch/arm/mach-at91/at91sam9g45_devices.c
arch/arm/mach-at91/at91sam9rl_devices.c
arch/arm/mach-at91/at91sam9x5.c
arch/avr32/mach-at32ap/at32ap700x.c
drivers/tty/serial/atmel_serial.c

index aca272bfb4520b73f861a000a201fcf60063ab07..640520c04c46cb80f7988bdd29ff02e3df20f6b6 100644 (file)
@@ -1115,7 +1115,6 @@ static inline void configure_usart3_pins(unsigned pins)
 }
 
 static struct platform_device *__initdata at91_uarts[ATMEL_MAX_UART];  /* the UARTs to use */
-struct platform_device *atmel_default_console_device;  /* the serial console device */
 
 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
 {
index 34d2f5a58b4b6c8398065450d1c5300bc944fdff..df487ce83c5efc6537d8f218e5ba59f971ec8420 100644 (file)
@@ -1164,7 +1164,6 @@ static inline void configure_usart5_pins(void)
 }
 
 static struct platform_device *__initdata at91_uarts[ATMEL_MAX_UART];  /* the UARTs to use */
-struct platform_device *atmel_default_console_device;  /* the serial console device */
 
 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
 {
index b9c06c408aba77fbe6aa5b942b214de274fd5202..3bd10ce4854e8bdc1890c1f4de723c9ec7b9efaa 100644 (file)
@@ -1015,7 +1015,6 @@ static inline void configure_usart2_pins(unsigned pins)
 }
 
 static struct platform_device *__initdata at91_uarts[ATMEL_MAX_UART];  /* the UARTs to use */
-struct platform_device *atmel_default_console_device;  /* the serial console device */
 
 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
 {
index a8ae6f507eedee4c43396cf796fd7d08a1135f89..7792de5b83d475140564a5bab2b52beee17266db 100644 (file)
@@ -1424,7 +1424,6 @@ static inline void configure_usart2_pins(unsigned pins)
 }
 
 static struct platform_device *__initdata at91_uarts[ATMEL_MAX_UART];  /* the UARTs to use */
-struct platform_device *atmel_default_console_device;  /* the serial console device */
 
 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
 {
index 98e40418fda12ecad74f6fa9d57eba9496356017..410829532aabdb99722f0ad5155affa6d3020703 100644 (file)
@@ -1683,7 +1683,6 @@ static inline void configure_usart3_pins(unsigned pins)
 }
 
 static struct platform_device *__initdata at91_uarts[ATMEL_MAX_UART];  /* the UARTs to use */
-struct platform_device *atmel_default_console_device;  /* the serial console device */
 
 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
 {
index 342a6c51ed3bf2a15da49397a319f5a35972fa09..eda72e83037dc7dd176c859e7f4ad874a9506a75 100644 (file)
@@ -1152,7 +1152,6 @@ static inline void configure_usart3_pins(unsigned pins)
 }
 
 static struct platform_device *__initdata at91_uarts[ATMEL_MAX_UART];  /* the UARTs to use */
-struct platform_device *atmel_default_console_device;  /* the serial console device */
 
 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
 {
index 67b37a0c69c400e642e6f06076991dbdc3d49e1f..90bb7ec90c8f6cab311e0ce79ba052ce4c39f5a0 100644 (file)
@@ -320,7 +320,6 @@ void __init at91sam9x5_initialize(void)
  * -------------------------------------------------------------------- */
 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
 void __init at91_set_serial_console(unsigned portnr) {}
-struct platform_device *atmel_default_console_device = NULL;
 
 void __init at91_add_device_nand(struct atmel_nand_data *data) {}
 
index 402a7bb726696b4091e15a4e367004e634295859..889c544688ca020c4d99f1b3e5d989c8f002308d 100644 (file)
@@ -1055,8 +1055,6 @@ struct platform_device *__init at32_add_device_usart(unsigned int id)
        return at32_usarts[id];
 }
 
-struct platform_device *atmel_default_console_device;
-
 void __init at32_setup_serial_console(unsigned int usart_id)
 {
        atmel_default_console_device = at32_usarts[usart_id];
index 10605ecc99abd4a3663ef020462877356a5a9921..f9a6be7a9bed62103f24f461f593fec7a6a0a89c 100644 (file)
@@ -1526,6 +1526,8 @@ void __init atmel_register_uart_fns(struct atmel_port_fns *fns)
        atmel_pops.set_wake     = fns->set_wake;
 }
 
+struct platform_device *atmel_default_console_device;  /* the serial console device */
+
 #ifdef CONFIG_SERIAL_ATMEL_CONSOLE
 static void atmel_console_putchar(struct uart_port *port, int ch)
 {