diff options
Diffstat (limited to 'drivers/serial/bfin_5xx.c')
-rw-r--r-- | drivers/serial/bfin_5xx.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c index 59a221f9ee9c..88449d36a3f7 100644 --- a/drivers/serial/bfin_5xx.c +++ b/drivers/serial/bfin_5xx.c | |||
@@ -986,7 +986,7 @@ static void __init bfin_serial_init_ports(void) | |||
986 | 986 | ||
987 | } | 987 | } |
988 | 988 | ||
989 | #ifdef CONFIG_SERIAL_BFIN_CONSOLE | 989 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) |
990 | /* | 990 | /* |
991 | * If the port was already initialised (eg, by a boot loader), | 991 | * If the port was already initialised (eg, by a boot loader), |
992 | * try to determine the current setup. | 992 | * try to determine the current setup. |
@@ -1030,24 +1030,20 @@ bfin_serial_console_get_options(struct bfin_serial_port *uart, int *baud, | |||
1030 | } | 1030 | } |
1031 | pr_debug("%s:baud = %d, parity = %c, bits= %d\n", __func__, *baud, *parity, *bits); | 1031 | pr_debug("%s:baud = %d, parity = %c, bits= %d\n", __func__, *baud, *parity, *bits); |
1032 | } | 1032 | } |
1033 | #endif | ||
1034 | 1033 | ||
1035 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
1036 | static struct uart_driver bfin_serial_reg; | 1034 | static struct uart_driver bfin_serial_reg; |
1037 | 1035 | ||
1038 | static int __init | 1036 | static int __init |
1039 | bfin_serial_console_setup(struct console *co, char *options) | 1037 | bfin_serial_console_setup(struct console *co, char *options) |
1040 | { | 1038 | { |
1041 | struct bfin_serial_port *uart; | 1039 | struct bfin_serial_port *uart; |
1042 | # ifdef CONFIG_SERIAL_BFIN_CONSOLE | ||
1043 | int baud = 57600; | 1040 | int baud = 57600; |
1044 | int bits = 8; | 1041 | int bits = 8; |
1045 | int parity = 'n'; | 1042 | int parity = 'n'; |
1046 | # ifdef CONFIG_SERIAL_BFIN_CTSRTS | 1043 | # ifdef CONFIG_SERIAL_BFIN_CTSRTS |
1047 | int flow = 'r'; | 1044 | int flow = 'r'; |
1048 | # else | 1045 | # else |
1049 | int flow = 'n'; | 1046 | int flow = 'n'; |
1050 | # endif | ||
1051 | # endif | 1047 | # endif |
1052 | 1048 | ||
1053 | /* | 1049 | /* |
@@ -1059,16 +1055,12 @@ bfin_serial_console_setup(struct console *co, char *options) | |||
1059 | co->index = 0; | 1055 | co->index = 0; |
1060 | uart = &bfin_serial_ports[co->index]; | 1056 | uart = &bfin_serial_ports[co->index]; |
1061 | 1057 | ||
1062 | # ifdef CONFIG_SERIAL_BFIN_CONSOLE | ||
1063 | if (options) | 1058 | if (options) |
1064 | uart_parse_options(options, &baud, &parity, &bits, &flow); | 1059 | uart_parse_options(options, &baud, &parity, &bits, &flow); |
1065 | else | 1060 | else |
1066 | bfin_serial_console_get_options(uart, &baud, &parity, &bits); | 1061 | bfin_serial_console_get_options(uart, &baud, &parity, &bits); |
1067 | 1062 | ||
1068 | return uart_set_options(&uart->port, co, baud, parity, bits, flow); | 1063 | return uart_set_options(&uart->port, co, baud, parity, bits, flow); |
1069 | # else | ||
1070 | return 0; | ||
1071 | # endif | ||
1072 | } | 1064 | } |
1073 | #endif /* defined (CONFIG_SERIAL_BFIN_CONSOLE) || | 1065 | #endif /* defined (CONFIG_SERIAL_BFIN_CONSOLE) || |
1074 | defined (CONFIG_EARLY_PRINTK) */ | 1066 | defined (CONFIG_EARLY_PRINTK) */ |
@@ -1177,7 +1169,7 @@ struct console __init *bfin_earlyserial_init(unsigned int port, | |||
1177 | return &bfin_early_serial_console; | 1169 | return &bfin_early_serial_console; |
1178 | } | 1170 | } |
1179 | 1171 | ||
1180 | #endif /* CONFIG_SERIAL_BFIN_CONSOLE */ | 1172 | #endif /* CONFIG_EARLY_PRINTK */ |
1181 | 1173 | ||
1182 | static struct uart_driver bfin_serial_reg = { | 1174 | static struct uart_driver bfin_serial_reg = { |
1183 | .owner = THIS_MODULE, | 1175 | .owner = THIS_MODULE, |