summaryrefslogtreecommitdiffstats
path: root/drivers/serial/suncore.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-11-24 23:09:56 +0100
committerDavid S. Miller <davem@davemloft.net>2009-11-24 23:09:56 +0100
commit457931de3b0925dc2eb941bc7d611a509be36dff (patch)
tree64e30c8b02e02b2004dcc9757545db437b2eff71 /drivers/serial/suncore.c
parentserial: suncore: Add 'ignore_line' argument to sunserial_console_match(). (diff)
downloadlinux-457931de3b0925dc2eb941bc7d611a509be36dff.tar.xz
linux-457931de3b0925dc2eb941bc7d611a509be36dff.zip
serial: suncore: Fix RSC/LOM handling in sunserial_console_termios().
RSC and LOM devices have fixed speed settings. We already had some code to match and handle "rsc" named devices on E250 systems, but we also have to handle 'rsc-console', 'rsc-control', and 'lom-console'. Also, in order to get this right regardless of what 'output-device' happens to be, explicitly pass the UART device node pointer to this routine. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/serial/suncore.c')
-rw-r--r--drivers/serial/suncore.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/serial/suncore.c b/drivers/serial/suncore.c
index 50d3b5e4ec73..ed7d958b0a01 100644
--- a/drivers/serial/suncore.c
+++ b/drivers/serial/suncore.c
@@ -77,23 +77,24 @@ int sunserial_console_match(struct console *con, struct device_node *dp,
}
EXPORT_SYMBOL(sunserial_console_match);
-void
-sunserial_console_termios(struct console *con)
+void sunserial_console_termios(struct console *con, struct device_node *uart_dp)
{
- struct device_node *dp;
- const char *od, *mode, *s;
+ const char *mode, *s;
char mode_prop[] = "ttyX-mode";
int baud, bits, stop, cflag;
char parity;
- dp = of_find_node_by_path("/options");
- od = of_get_property(dp, "output-device", NULL);
- if (!strcmp(od, "rsc")) {
- mode = of_get_property(of_console_device,
+ if (!strcmp(uart_dp->name, "rsc") ||
+ !strcmp(uart_dp->name, "rsc-console") ||
+ !strcmp(uart_dp->name, "rsc-control")) {
+ mode = of_get_property(uart_dp,
"ssp-console-modes", NULL);
if (!mode)
mode = "115200,8,n,1,-";
+ } else if (!strcmp(uart_dp->name, "lom-console")) {
+ mode = "9600,8,n,1,-";
} else {
+ struct device_node *dp;
char c;
c = 'a';
@@ -102,6 +103,7 @@ sunserial_console_termios(struct console *con)
mode_prop[3] = c;
+ dp = of_find_node_by_path("/options");
mode = of_get_property(dp, mode_prop, NULL);
if (!mode)
mode = "9600,8,n,1,-";