diff options
author | Andrew Victor <linux@maxim.org.za> | 2008-04-15 16:16:38 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-04-17 10:55:52 -0400 |
commit | 11aadac4f6adc032cfd1e41c348a7a568819ed94 (patch) | |
tree | d9e5523c4ea62cd82f25325a1cd387d538daf26c /arch/arm/mach-at91/at91cap9_devices.c | |
parent | 2f036ac63ebfa3fc618a1f22324ef9297c5b7d05 (diff) |
[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 <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-at91/at91cap9_devices.c')
-rw-r--r-- | arch/arm/mach-at91/at91cap9_devices.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/arm/mach-at91/at91cap9_devices.c b/arch/arm/mach-at91/at91cap9_devices.c index 2eeaf5d5bbf3..f1a80d74a4b6 100644 --- a/arch/arm/mach-at91/at91cap9_devices.c +++ b/arch/arm/mach-at91/at91cap9_devices.c | |||
@@ -16,7 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/dma-mapping.h> | 17 | #include <linux/dma-mapping.h> |
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | #include <linux/mtd/physmap.h> | 19 | #include <linux/i2c-gpio.h> |
20 | 20 | ||
21 | #include <video/atmel_lcdc.h> | 21 | #include <video/atmel_lcdc.h> |
22 | 22 | ||
@@ -349,6 +349,7 @@ void __init at91_add_device_nand(struct at91_nand_data *data) | |||
349 | void __init at91_add_device_nand(struct at91_nand_data *data) {} | 349 | void __init at91_add_device_nand(struct at91_nand_data *data) {} |
350 | #endif | 350 | #endif |
351 | 351 | ||
352 | |||
352 | /* -------------------------------------------------------------------- | 353 | /* -------------------------------------------------------------------- |
353 | * TWI (i2c) | 354 | * TWI (i2c) |
354 | * -------------------------------------------------------------------- */ | 355 | * -------------------------------------------------------------------- */ |
@@ -1041,7 +1042,7 @@ static inline void configure_usart2_pins(unsigned pins) | |||
1041 | at91_set_B_periph(AT91_PIN_PD6, 0); /* CTS2 */ | 1042 | at91_set_B_periph(AT91_PIN_PD6, 0); /* CTS2 */ |
1042 | } | 1043 | } |
1043 | 1044 | ||
1044 | static struct platform_device *at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */ | 1045 | static struct platform_device *__initdata at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */ |
1045 | struct platform_device *atmel_default_console_device; /* the serial console device */ | 1046 | struct platform_device *atmel_default_console_device; /* the serial console device */ |
1046 | 1047 | ||
1047 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | 1048 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) |
@@ -1082,8 +1083,6 @@ void __init at91_set_serial_console(unsigned portnr) | |||
1082 | { | 1083 | { |
1083 | if (portnr < ATMEL_MAX_UART) | 1084 | if (portnr < ATMEL_MAX_UART) |
1084 | atmel_default_console_device = at91_uarts[portnr]; | 1085 | atmel_default_console_device = at91_uarts[portnr]; |
1085 | if (!atmel_default_console_device) | ||
1086 | printk(KERN_INFO "AT91: No default serial console defined.\n"); | ||
1087 | } | 1086 | } |
1088 | 1087 | ||
1089 | void __init at91_add_device_serial(void) | 1088 | void __init at91_add_device_serial(void) |
@@ -1094,6 +1093,9 @@ void __init at91_add_device_serial(void) | |||
1094 | if (at91_uarts[i]) | 1093 | if (at91_uarts[i]) |
1095 | platform_device_register(at91_uarts[i]); | 1094 | platform_device_register(at91_uarts[i]); |
1096 | } | 1095 | } |
1096 | |||
1097 | if (!atmel_default_console_device) | ||
1098 | printk(KERN_INFO "AT91: No default serial console defined.\n"); | ||
1097 | } | 1099 | } |
1098 | #else | 1100 | #else |
1099 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} | 1101 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} |