diff options
author | David S. Miller <davem@davemloft.net> | 2009-11-24 17:09:56 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-24 17:09:56 -0500 |
commit | 457931de3b0925dc2eb941bc7d611a509be36dff (patch) | |
tree | 64e30c8b02e02b2004dcc9757545db437b2eff71 /drivers/serial/suncore.c | |
parent | 4e3533d05b6e5e66d1cda27f6671251c99c62894 (diff) |
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.c | 18 |
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, | |||
77 | } | 77 | } |
78 | EXPORT_SYMBOL(sunserial_console_match); | 78 | EXPORT_SYMBOL(sunserial_console_match); |
79 | 79 | ||
80 | void | 80 | void sunserial_console_termios(struct console *con, struct device_node *uart_dp) |
81 | sunserial_console_termios(struct console *con) | ||
82 | { | 81 | { |
83 | struct device_node *dp; | 82 | const char *mode, *s; |
84 | const char *od, *mode, *s; | ||
85 | char mode_prop[] = "ttyX-mode"; | 83 | char mode_prop[] = "ttyX-mode"; |
86 | int baud, bits, stop, cflag; | 84 | int baud, bits, stop, cflag; |
87 | char parity; | 85 | char parity; |
88 | 86 | ||
89 | dp = of_find_node_by_path("/options"); | 87 | if (!strcmp(uart_dp->name, "rsc") || |
90 | od = of_get_property(dp, "output-device", NULL); | 88 | !strcmp(uart_dp->name, "rsc-console") || |
91 | if (!strcmp(od, "rsc")) { | 89 | !strcmp(uart_dp->name, "rsc-control")) { |
92 | mode = of_get_property(of_console_device, | 90 | mode = of_get_property(uart_dp, |
93 | "ssp-console-modes", NULL); | 91 | "ssp-console-modes", NULL); |
94 | if (!mode) | 92 | if (!mode) |
95 | 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,-"; | ||
96 | } else { | 96 | } else { |
97 | struct device_node *dp; | ||
97 | char c; | 98 | char c; |
98 | 99 | ||
99 | c = 'a'; | 100 | c = 'a'; |
@@ -102,6 +103,7 @@ sunserial_console_termios(struct console *con) | |||
102 | 103 | ||
103 | mode_prop[3] = c; | 104 | mode_prop[3] = c; |
104 | 105 | ||
106 | dp = of_find_node_by_path("/options"); | ||
105 | mode = of_get_property(dp, mode_prop, NULL); | 107 | mode = of_get_property(dp, mode_prop, NULL); |
106 | if (!mode) | 108 | if (!mode) |
107 | mode = "9600,8,n,1,-"; | 109 | mode = "9600,8,n,1,-"; |