aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-at91/at91cap9_devices.c10
-rw-r--r--arch/arm/mach-at91/at91rm9200_devices.c7
-rw-r--r--arch/arm/mach-at91/at91sam9260_devices.c63
-rw-r--r--arch/arm/mach-at91/at91sam9261_devices.c48
-rw-r--r--arch/arm/mach-at91/at91sam9263_devices.c51
-rw-r--r--arch/arm/mach-at91/at91sam9rl_devices.c56
6 files changed, 26 insertions, 209 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)
349void __init at91_add_device_nand(struct at91_nand_data *data) {} 349void __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
1044static struct platform_device *at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */ 1045static struct platform_device *__initdata at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */
1045struct platform_device *atmel_default_console_device; /* the serial console device */ 1046struct platform_device *atmel_default_console_device; /* the serial console device */
1046 1047
1047void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) 1048void __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
1089void __init at91_add_device_serial(void) 1088void __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
1099void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} 1101void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
index 70d3a0018530..de19bee83f75 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -1103,7 +1103,7 @@ static inline void configure_usart3_pins(unsigned pins)
1103 at91_set_B_periph(AT91_PIN_PB0, 0); /* RTS3 */ 1103 at91_set_B_periph(AT91_PIN_PB0, 0); /* RTS3 */
1104} 1104}
1105 1105
1106static struct platform_device *at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */ 1106static struct platform_device *__initdata at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */
1107struct platform_device *atmel_default_console_device; /* the serial console device */ 1107struct platform_device *atmel_default_console_device; /* the serial console device */
1108 1108
1109void __init __deprecated at91_init_serial(struct at91_uart_config *config) 1109void __init __deprecated at91_init_serial(struct at91_uart_config *config)
@@ -1194,8 +1194,6 @@ void __init at91_set_serial_console(unsigned portnr)
1194{ 1194{
1195 if (portnr < ATMEL_MAX_UART) 1195 if (portnr < ATMEL_MAX_UART)
1196 atmel_default_console_device = at91_uarts[portnr]; 1196 atmel_default_console_device = at91_uarts[portnr];
1197 if (!atmel_default_console_device)
1198 printk(KERN_INFO "AT91: No default serial console defined.\n");
1199} 1197}
1200 1198
1201void __init at91_add_device_serial(void) 1199void __init at91_add_device_serial(void)
@@ -1206,6 +1204,9 @@ void __init at91_add_device_serial(void)
1206 if (at91_uarts[i]) 1204 if (at91_uarts[i])
1207 platform_device_register(at91_uarts[i]); 1205 platform_device_register(at91_uarts[i]);
1208 } 1206 }
1207
1208 if (!atmel_default_console_device)
1209 printk(KERN_INFO "AT91: No default serial console defined.\n");
1209} 1210}
1210#else 1211#else
1211void __init __deprecated at91_init_serial(struct at91_uart_config *config) {} 1212void __init __deprecated at91_init_serial(struct at91_uart_config *config) {}
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index 20ac09c02312..393a32aefce5 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -1051,64 +1051,9 @@ static inline void configure_usart5_pins(void)
1051 at91_set_A_periph(AT91_PIN_PB13, 0); /* RXD5 */ 1051 at91_set_A_periph(AT91_PIN_PB13, 0); /* RXD5 */
1052} 1052}
1053 1053
1054static struct platform_device *at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */ 1054static struct platform_device *__initdata at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */
1055struct platform_device *atmel_default_console_device; /* the serial console device */ 1055struct platform_device *atmel_default_console_device; /* the serial console device */
1056 1056
1057void __init __deprecated at91_init_serial(struct at91_uart_config *config)
1058{
1059 int i;
1060
1061 /* Fill in list of supported UARTs */
1062 for (i = 0; i < config->nr_tty; i++) {
1063 switch (config->tty_map[i]) {
1064 case 0:
1065 configure_usart0_pins(ATMEL_UART_CTS | ATMEL_UART_RTS | ATMEL_UART_DSR | ATMEL_UART_DTR | ATMEL_UART_DCD | ATMEL_UART_RI);
1066 at91_uarts[i] = &at91sam9260_uart0_device;
1067 at91_clock_associate("usart0_clk", &at91sam9260_uart0_device.dev, "usart");
1068 break;
1069 case 1:
1070 configure_usart1_pins(ATMEL_UART_CTS | ATMEL_UART_RTS);
1071 at91_uarts[i] = &at91sam9260_uart1_device;
1072 at91_clock_associate("usart1_clk", &at91sam9260_uart1_device.dev, "usart");
1073 break;
1074 case 2:
1075 configure_usart2_pins(0);
1076 at91_uarts[i] = &at91sam9260_uart2_device;
1077 at91_clock_associate("usart2_clk", &at91sam9260_uart2_device.dev, "usart");
1078 break;
1079 case 3:
1080 configure_usart3_pins(0);
1081 at91_uarts[i] = &at91sam9260_uart3_device;
1082 at91_clock_associate("usart3_clk", &at91sam9260_uart3_device.dev, "usart");
1083 break;
1084 case 4:
1085 configure_usart4_pins();
1086 at91_uarts[i] = &at91sam9260_uart4_device;
1087 at91_clock_associate("usart4_clk", &at91sam9260_uart4_device.dev, "usart");
1088 break;
1089 case 5:
1090 configure_usart5_pins();
1091 at91_uarts[i] = &at91sam9260_uart5_device;
1092 at91_clock_associate("usart5_clk", &at91sam9260_uart5_device.dev, "usart");
1093 break;
1094 case 6:
1095 configure_dbgu_pins();
1096 at91_uarts[i] = &at91sam9260_dbgu_device;
1097 at91_clock_associate("mck", &at91sam9260_dbgu_device.dev, "usart");
1098 break;
1099 default:
1100 continue;
1101 }
1102 at91_uarts[i]->id = i; /* update ID number to mapped ID */
1103 }
1104
1105 /* Set serial console device */
1106 if (config->console_tty < ATMEL_MAX_UART)
1107 atmel_default_console_device = at91_uarts[config->console_tty];
1108 if (!atmel_default_console_device)
1109 printk(KERN_INFO "AT91: No default serial console defined.\n");
1110}
1111
1112void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) 1057void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
1113{ 1058{
1114 struct platform_device *pdev; 1059 struct platform_device *pdev;
@@ -1162,8 +1107,6 @@ void __init at91_set_serial_console(unsigned portnr)
1162{ 1107{
1163 if (portnr < ATMEL_MAX_UART) 1108 if (portnr < ATMEL_MAX_UART)
1164 atmel_default_console_device = at91_uarts[portnr]; 1109 atmel_default_console_device = at91_uarts[portnr];
1165 if (!atmel_default_console_device)
1166 printk(KERN_INFO "AT91: No default serial console defined.\n");
1167} 1110}
1168 1111
1169void __init at91_add_device_serial(void) 1112void __init at91_add_device_serial(void)
@@ -1174,9 +1117,11 @@ void __init at91_add_device_serial(void)
1174 if (at91_uarts[i]) 1117 if (at91_uarts[i])
1175 platform_device_register(at91_uarts[i]); 1118 platform_device_register(at91_uarts[i]);
1176 } 1119 }
1120
1121 if (!atmel_default_console_device)
1122 printk(KERN_INFO "AT91: No default serial console defined.\n");
1177} 1123}
1178#else 1124#else
1179void __init __deprecated at91_init_serial(struct at91_uart_config *config) {}
1180void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} 1125void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
1181void __init at91_set_serial_console(unsigned portnr) {} 1126void __init at91_set_serial_console(unsigned portnr) {}
1182void __init at91_add_device_serial(void) {} 1127void __init at91_add_device_serial(void) {}
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c
index 03cd32482eac..37cd547855b1 100644
--- a/arch/arm/mach-at91/at91sam9261_devices.c
+++ b/arch/arm/mach-at91/at91sam9261_devices.c
@@ -987,49 +987,9 @@ static inline void configure_usart2_pins(unsigned pins)
987 at91_set_B_periph(AT91_PIN_PA16, 0); /* CTS2 */ 987 at91_set_B_periph(AT91_PIN_PA16, 0); /* CTS2 */
988} 988}
989 989
990static struct platform_device *at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */ 990static struct platform_device *__initdata at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */
991struct platform_device *atmel_default_console_device; /* the serial console device */ 991struct platform_device *atmel_default_console_device; /* the serial console device */
992 992
993void __init __deprecated at91_init_serial(struct at91_uart_config *config)
994{
995 int i;
996
997 /* Fill in list of supported UARTs */
998 for (i = 0; i < config->nr_tty; i++) {
999 switch (config->tty_map[i]) {
1000 case 0:
1001 configure_usart0_pins(ATMEL_UART_CTS | ATMEL_UART_RTS);
1002 at91_uarts[i] = &at91sam9261_uart0_device;
1003 at91_clock_associate("usart0_clk", &at91sam9261_uart0_device.dev, "usart");
1004 break;
1005 case 1:
1006 configure_usart1_pins(0);
1007 at91_uarts[i] = &at91sam9261_uart1_device;
1008 at91_clock_associate("usart1_clk", &at91sam9261_uart1_device.dev, "usart");
1009 break;
1010 case 2:
1011 configure_usart2_pins(0);
1012 at91_uarts[i] = &at91sam9261_uart2_device;
1013 at91_clock_associate("usart2_clk", &at91sam9261_uart2_device.dev, "usart");
1014 break;
1015 case 3:
1016 configure_dbgu_pins();
1017 at91_uarts[i] = &at91sam9261_dbgu_device;
1018 at91_clock_associate("mck", &at91sam9261_dbgu_device.dev, "usart");
1019 break;
1020 default:
1021 continue;
1022 }
1023 at91_uarts[i]->id = i; /* update ID number to mapped ID */
1024 }
1025
1026 /* Set serial console device */
1027 if (config->console_tty < ATMEL_MAX_UART)
1028 atmel_default_console_device = at91_uarts[config->console_tty];
1029 if (!atmel_default_console_device)
1030 printk(KERN_INFO "AT91: No default serial console defined.\n");
1031}
1032
1033void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) 993void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
1034{ 994{
1035 struct platform_device *pdev; 995 struct platform_device *pdev;
@@ -1068,8 +1028,6 @@ void __init at91_set_serial_console(unsigned portnr)
1068{ 1028{
1069 if (portnr < ATMEL_MAX_UART) 1029 if (portnr < ATMEL_MAX_UART)
1070 atmel_default_console_device = at91_uarts[portnr]; 1030 atmel_default_console_device = at91_uarts[portnr];
1071 if (!atmel_default_console_device)
1072 printk(KERN_INFO "AT91: No default serial console defined.\n");
1073} 1031}
1074 1032
1075void __init at91_add_device_serial(void) 1033void __init at91_add_device_serial(void)
@@ -1080,9 +1038,11 @@ void __init at91_add_device_serial(void)
1080 if (at91_uarts[i]) 1038 if (at91_uarts[i])
1081 platform_device_register(at91_uarts[i]); 1039 platform_device_register(at91_uarts[i]);
1082 } 1040 }
1041
1042 if (!atmel_default_console_device)
1043 printk(KERN_INFO "AT91: No default serial console defined.\n");
1083} 1044}
1084#else 1045#else
1085void __init __deprecated at91_init_serial(struct at91_uart_config *config) {}
1086void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} 1046void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
1087void __init at91_set_serial_console(unsigned portnr) {} 1047void __init at91_set_serial_console(unsigned portnr) {}
1088void __init at91_add_device_serial(void) {} 1048void __init at91_add_device_serial(void) {}
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index c81842c02706..b6454c525962 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -975,9 +975,6 @@ static inline void configure_ssc1_pins(unsigned pins)
975} 975}
976 976
977/* 977/*
978 * Return the device node so that board init code can use it as the
979 * parent for the device node reflecting how it's used on this board.
980 *
981 * SSC controllers are accessed through library code, instead of any 978 * SSC controllers are accessed through library code, instead of any
982 * kind of all-singing/all-dancing driver. For example one could be 979 * kind of all-singing/all-dancing driver. For example one could be
983 * used by a particular I2S audio codec's driver, while another one 980 * used by a particular I2S audio codec's driver, while another one
@@ -1188,49 +1185,9 @@ static inline void configure_usart2_pins(unsigned pins)
1188 at91_set_B_periph(AT91_PIN_PD6, 0); /* CTS2 */ 1185 at91_set_B_periph(AT91_PIN_PD6, 0); /* CTS2 */
1189} 1186}
1190 1187
1191static struct platform_device *at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */ 1188static struct platform_device *__initdata at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */
1192struct platform_device *atmel_default_console_device; /* the serial console device */ 1189struct platform_device *atmel_default_console_device; /* the serial console device */
1193 1190
1194void __init __deprecated at91_init_serial(struct at91_uart_config *config)
1195{
1196 int i;
1197
1198 /* Fill in list of supported UARTs */
1199 for (i = 0; i < config->nr_tty; i++) {
1200 switch (config->tty_map[i]) {
1201 case 0:
1202 configure_usart0_pins(ATMEL_UART_CTS | ATMEL_UART_RTS);
1203 at91_uarts[i] = &at91sam9263_uart0_device;
1204 at91_clock_associate("usart0_clk", &at91sam9263_uart0_device.dev, "usart");
1205 break;
1206 case 1:
1207 configure_usart1_pins(ATMEL_UART_CTS | ATMEL_UART_RTS);
1208 at91_uarts[i] = &at91sam9263_uart1_device;
1209 at91_clock_associate("usart1_clk", &at91sam9263_uart1_device.dev, "usart");
1210 break;
1211 case 2:
1212 configure_usart2_pins(ATMEL_UART_CTS | ATMEL_UART_RTS);
1213 at91_uarts[i] = &at91sam9263_uart2_device;
1214 at91_clock_associate("usart2_clk", &at91sam9263_uart2_device.dev, "usart");
1215 break;
1216 case 3:
1217 configure_dbgu_pins();
1218 at91_uarts[i] = &at91sam9263_dbgu_device;
1219 at91_clock_associate("mck", &at91sam9263_dbgu_device.dev, "usart");
1220 break;
1221 default:
1222 continue;
1223 }
1224 at91_uarts[i]->id = i; /* update ID number to mapped ID */
1225 }
1226
1227 /* Set serial console device */
1228 if (config->console_tty < ATMEL_MAX_UART)
1229 atmel_default_console_device = at91_uarts[config->console_tty];
1230 if (!atmel_default_console_device)
1231 printk(KERN_INFO "AT91: No default serial console defined.\n");
1232}
1233
1234void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) 1191void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
1235{ 1192{
1236 struct platform_device *pdev; 1193 struct platform_device *pdev;
@@ -1269,8 +1226,6 @@ void __init at91_set_serial_console(unsigned portnr)
1269{ 1226{
1270 if (portnr < ATMEL_MAX_UART) 1227 if (portnr < ATMEL_MAX_UART)
1271 atmel_default_console_device = at91_uarts[portnr]; 1228 atmel_default_console_device = at91_uarts[portnr];
1272 if (!atmel_default_console_device)
1273 printk(KERN_INFO "AT91: No default serial console defined.\n");
1274} 1229}
1275 1230
1276void __init at91_add_device_serial(void) 1231void __init at91_add_device_serial(void)
@@ -1281,9 +1236,11 @@ void __init at91_add_device_serial(void)
1281 if (at91_uarts[i]) 1236 if (at91_uarts[i])
1282 platform_device_register(at91_uarts[i]); 1237 platform_device_register(at91_uarts[i]);
1283 } 1238 }
1239
1240 if (!atmel_default_console_device)
1241 printk(KERN_INFO "AT91: No default serial console defined.\n");
1284} 1242}
1285#else 1243#else
1286void __init at91_init_serial(struct at91_uart_config *config) {}
1287void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} 1244void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
1288void __init at91_set_serial_console(unsigned portnr) {} 1245void __init at91_set_serial_console(unsigned portnr) {}
1289void __init at91_add_device_serial(void) {} 1246void __init at91_add_device_serial(void) {}
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)
593} 593}
594 594
595/* 595/*
596 * Return the device node so that board init code can use it as the
597 * parent for the device node reflecting how it's used on this board.
598 *
599 * SSC controllers are accessed through library code, instead of any 596 * SSC controllers are accessed through library code, instead of any
600 * kind of all-singing/all-dancing driver. For example one could be 597 * kind of all-singing/all-dancing driver. For example one could be
601 * used by a particular I2S audio codec's driver, while another one 598 * used by a particular I2S audio codec's driver, while another one
@@ -856,54 +853,9 @@ static inline void configure_usart3_pins(unsigned pins)
856 at91_set_B_periph(AT91_PIN_PD3, 0); /* CTS3 */ 853 at91_set_B_periph(AT91_PIN_PD3, 0); /* CTS3 */
857} 854}
858 855
859static struct platform_device *at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */ 856static struct platform_device *__initdata at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */
860struct platform_device *atmel_default_console_device; /* the serial console device */ 857struct platform_device *atmel_default_console_device; /* the serial console device */
861 858
862void __init __deprecated at91_init_serial(struct at91_uart_config *config)
863{
864 int i;
865
866 /* Fill in list of supported UARTs */
867 for (i = 0; i < config->nr_tty; i++) {
868 switch (config->tty_map[i]) {
869 case 0:
870 configure_usart0_pins(ATMEL_UART_CTS | ATMEL_UART_RTS);
871 at91_uarts[i] = &at91sam9rl_uart0_device;
872 at91_clock_associate("usart0_clk", &at91sam9rl_uart0_device.dev, "usart");
873 break;
874 case 1:
875 configure_usart1_pins(0);
876 at91_uarts[i] = &at91sam9rl_uart1_device;
877 at91_clock_associate("usart1_clk", &at91sam9rl_uart1_device.dev, "usart");
878 break;
879 case 2:
880 configure_usart2_pins(0);
881 at91_uarts[i] = &at91sam9rl_uart2_device;
882 at91_clock_associate("usart2_clk", &at91sam9rl_uart2_device.dev, "usart");
883 break;
884 case 3:
885 configure_usart3_pins(0);
886 at91_uarts[i] = &at91sam9rl_uart3_device;
887 at91_clock_associate("usart3_clk", &at91sam9rl_uart3_device.dev, "usart");
888 break;
889 case 4:
890 configure_dbgu_pins();
891 at91_uarts[i] = &at91sam9rl_dbgu_device;
892 at91_clock_associate("mck", &at91sam9rl_dbgu_device.dev, "usart");
893 break;
894 default:
895 continue;
896 }
897 at91_uarts[i]->id = i; /* update ID number to mapped ID */
898 }
899
900 /* Set serial console device */
901 if (config->console_tty < ATMEL_MAX_UART)
902 atmel_default_console_device = at91_uarts[config->console_tty];
903 if (!atmel_default_console_device)
904 printk(KERN_INFO "AT91: No default serial console defined.\n");
905}
906
907void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) 859void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
908{ 860{
909 struct platform_device *pdev; 861 struct platform_device *pdev;
@@ -947,8 +899,6 @@ void __init at91_set_serial_console(unsigned portnr)
947{ 899{
948 if (portnr < ATMEL_MAX_UART) 900 if (portnr < ATMEL_MAX_UART)
949 atmel_default_console_device = at91_uarts[portnr]; 901 atmel_default_console_device = at91_uarts[portnr];
950 if (!atmel_default_console_device)
951 printk(KERN_INFO "AT91: No default serial console defined.\n");
952} 902}
953 903
954void __init at91_add_device_serial(void) 904void __init at91_add_device_serial(void)
@@ -959,9 +909,11 @@ void __init at91_add_device_serial(void)
959 if (at91_uarts[i]) 909 if (at91_uarts[i])
960 platform_device_register(at91_uarts[i]); 910 platform_device_register(at91_uarts[i]);
961 } 911 }
912
913 if (!atmel_default_console_device)
914 printk(KERN_INFO "AT91: No default serial console defined.\n");
962} 915}
963#else 916#else
964void __init __deprecated at91_init_serial(struct at91_uart_config *config) {}
965void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} 917void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
966void __init at91_set_serial_console(unsigned portnr) {} 918void __init at91_set_serial_console(unsigned portnr) {}
967void __init at91_add_device_serial(void) {} 919void __init at91_add_device_serial(void) {}