diff options
Diffstat (limited to 'drivers/serial/suncore.c')
-rw-r--r-- | drivers/serial/suncore.c | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/drivers/serial/suncore.c b/drivers/serial/suncore.c index a2d4a19550ab..ed7d958b0a01 100644 --- a/drivers/serial/suncore.c +++ b/drivers/serial/suncore.c | |||
@@ -53,20 +53,21 @@ void sunserial_unregister_minors(struct uart_driver *drv, int count) | |||
53 | EXPORT_SYMBOL(sunserial_unregister_minors); | 53 | EXPORT_SYMBOL(sunserial_unregister_minors); |
54 | 54 | ||
55 | int sunserial_console_match(struct console *con, struct device_node *dp, | 55 | int sunserial_console_match(struct console *con, struct device_node *dp, |
56 | struct uart_driver *drv, int line) | 56 | struct uart_driver *drv, int line, bool ignore_line) |
57 | { | 57 | { |
58 | int off; | ||
59 | |||
60 | if (!con || of_console_device != dp) | 58 | if (!con || of_console_device != dp) |
61 | return 0; | 59 | return 0; |
62 | 60 | ||
63 | off = 0; | 61 | if (!ignore_line) { |
64 | if (of_console_options && | 62 | int off = 0; |
65 | *of_console_options == 'b') | ||
66 | off = 1; | ||
67 | 63 | ||
68 | if ((line & 1) != off) | 64 | if (of_console_options && |
69 | return 0; | 65 | *of_console_options == 'b') |
66 | off = 1; | ||
67 | |||
68 | if ((line & 1) != off) | ||
69 | return 0; | ||
70 | } | ||
70 | 71 | ||
71 | con->index = line; | 72 | con->index = line; |
72 | drv->cons = con; | 73 | drv->cons = con; |
@@ -76,23 +77,24 @@ int sunserial_console_match(struct console *con, struct device_node *dp, | |||
76 | } | 77 | } |
77 | EXPORT_SYMBOL(sunserial_console_match); | 78 | EXPORT_SYMBOL(sunserial_console_match); |
78 | 79 | ||
79 | void | 80 | void sunserial_console_termios(struct console *con, struct device_node *uart_dp) |
80 | sunserial_console_termios(struct console *con) | ||
81 | { | 81 | { |
82 | struct device_node *dp; | 82 | const char *mode, *s; |
83 | const char *od, *mode, *s; | ||
84 | char mode_prop[] = "ttyX-mode"; | 83 | char mode_prop[] = "ttyX-mode"; |
85 | int baud, bits, stop, cflag; | 84 | int baud, bits, stop, cflag; |
86 | char parity; | 85 | char parity; |
87 | 86 | ||
88 | dp = of_find_node_by_path("/options"); | 87 | if (!strcmp(uart_dp->name, "rsc") || |
89 | od = of_get_property(dp, "output-device", NULL); | 88 | !strcmp(uart_dp->name, "rsc-console") || |
90 | if (!strcmp(od, "rsc")) { | 89 | !strcmp(uart_dp->name, "rsc-control")) { |
91 | mode = of_get_property(of_console_device, | 90 | mode = of_get_property(uart_dp, |
92 | "ssp-console-modes", NULL); | 91 | "ssp-console-modes", NULL); |
93 | if (!mode) | 92 | if (!mode) |
94 | mode = "115200,8,n,1,-"; | 93 | mode = "115200,8,n,1,-"; |
94 | } else if (!strcmp(uart_dp->name, "lom-console")) { | ||
95 | mode = "9600,8,n,1,-"; | ||
95 | } else { | 96 | } else { |
97 | struct device_node *dp; | ||
96 | char c; | 98 | char c; |
97 | 99 | ||
98 | c = 'a'; | 100 | c = 'a'; |
@@ -101,6 +103,7 @@ sunserial_console_termios(struct console *con) | |||
101 | 103 | ||
102 | mode_prop[3] = c; | 104 | mode_prop[3] = c; |
103 | 105 | ||
106 | dp = of_find_node_by_path("/options"); | ||
104 | mode = of_get_property(dp, mode_prop, NULL); | 107 | mode = of_get_property(dp, mode_prop, NULL); |
105 | if (!mode) | 108 | if (!mode) |
106 | mode = "9600,8,n,1,-"; | 109 | mode = "9600,8,n,1,-"; |