From 11aadac4f6adc032cfd1e41c348a7a568819ed94 Mon Sep 17 00:00:00 2001 From: Andrew Victor Date: Tue, 15 Apr 2008 21:16:38 +0100 Subject: [ARM] 4982/1: [AT91] Drop old-style UART initialization (Part 1) All the SAM9 boards supported by mainline and the AT91 patches have been converted to the new-style UART initialization. Therefore drop support for the old at91_init_serial() interface for SAM9. at91_uarts[] array can also be marked as __initdata. The warning that no serial-console is defined moved from at91_set_serial_console() to at91_add_device_serial() since the whole point is the board-specific file is not calling at91_set_serial_console(). Signed-off-by: Andrew Victor Signed-off-by: Russell King --- arch/arm/mach-at91/at91sam9rl_devices.c | 56 +++------------------------------ 1 file changed, 4 insertions(+), 52 deletions(-) (limited to 'arch/arm/mach-at91/at91sam9rl_devices.c') diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c index 892262a71d01..dbb9a5fc2090 100644 --- a/arch/arm/mach-at91/at91sam9rl_devices.c +++ b/arch/arm/mach-at91/at91sam9rl_devices.c @@ -593,9 +593,6 @@ static inline void configure_ssc1_pins(unsigned pins) } /* - * Return the device node so that board init code can use it as the - * parent for the device node reflecting how it's used on this board. - * * SSC controllers are accessed through library code, instead of any * kind of all-singing/all-dancing driver. For example one could be * used by a particular I2S audio codec's driver, while another one @@ -856,54 +853,9 @@ static inline void configure_usart3_pins(unsigned pins) at91_set_B_periph(AT91_PIN_PD3, 0); /* CTS3 */ } -static struct platform_device *at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */ +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 __deprecated at91_init_serial(struct at91_uart_config *config) -{ - int i; - - /* Fill in list of supported UARTs */ - for (i = 0; i < config->nr_tty; i++) { - switch (config->tty_map[i]) { - case 0: - configure_usart0_pins(ATMEL_UART_CTS | ATMEL_UART_RTS); - at91_uarts[i] = &at91sam9rl_uart0_device; - at91_clock_associate("usart0_clk", &at91sam9rl_uart0_device.dev, "usart"); - break; - case 1: - configure_usart1_pins(0); - at91_uarts[i] = &at91sam9rl_uart1_device; - at91_clock_associate("usart1_clk", &at91sam9rl_uart1_device.dev, "usart"); - break; - case 2: - configure_usart2_pins(0); - at91_uarts[i] = &at91sam9rl_uart2_device; - at91_clock_associate("usart2_clk", &at91sam9rl_uart2_device.dev, "usart"); - break; - case 3: - configure_usart3_pins(0); - at91_uarts[i] = &at91sam9rl_uart3_device; - at91_clock_associate("usart3_clk", &at91sam9rl_uart3_device.dev, "usart"); - break; - case 4: - configure_dbgu_pins(); - at91_uarts[i] = &at91sam9rl_dbgu_device; - at91_clock_associate("mck", &at91sam9rl_dbgu_device.dev, "usart"); - break; - default: - continue; - } - at91_uarts[i]->id = i; /* update ID number to mapped ID */ - } - - /* Set serial console device */ - if (config->console_tty < ATMEL_MAX_UART) - atmel_default_console_device = at91_uarts[config->console_tty]; - if (!atmel_default_console_device) - printk(KERN_INFO "AT91: No default serial console defined.\n"); -} - void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) { struct platform_device *pdev; @@ -947,8 +899,6 @@ void __init at91_set_serial_console(unsigned portnr) { if (portnr < ATMEL_MAX_UART) atmel_default_console_device = at91_uarts[portnr]; - if (!atmel_default_console_device) - printk(KERN_INFO "AT91: No default serial console defined.\n"); } void __init at91_add_device_serial(void) @@ -959,9 +909,11 @@ 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) {} -- cgit v1.2.3