Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 168978
b: refs/heads/master
c: 457931d
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Nov 24, 2009
1 parent 144ed3e commit 2436948
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4e3533d05b6e5e66d1cda27f6671251c99c62894
refs/heads/master: 457931de3b0925dc2eb941bc7d611a509be36dff
18 changes: 10 additions & 8 deletions trunk/drivers/serial/suncore.c
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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,-";
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/serial/suncore.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ extern void sunserial_unregister_minors(struct uart_driver *, int);

extern int sunserial_console_match(struct console *, struct device_node *,
struct uart_driver *, int, bool);
extern void sunserial_console_termios(struct console *);
extern void sunserial_console_termios(struct console *,
struct device_node *);

#endif /* !(_SERIAL_SUN_H) */
2 changes: 1 addition & 1 deletion trunk/drivers/serial/sunhv.c
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ static int __devinit hv_probe(struct of_device *op, const struct of_device_id *m
goto out_free_con_read_page;

sunserial_console_match(&sunhv_console, op->node,
&sunhv_reg, port->line);
&sunhv_reg, port->line, false);

err = uart_add_one_port(&sunhv_reg, port);
if (err)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/serial/sunsab.c
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ static int sunsab_console_setup(struct console *con, char *options)
printk("Console: ttyS%d (SAB82532)\n",
(sunsab_reg.minor - 64) + con->index);

sunserial_console_termios(con);
sunserial_console_termios(con, to_of_device(up->port.dev)->node);

switch (con->cflag & CBAUD) {
case B150: baud = 150; break;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/serial/sunzilog.c
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@ static int __init sunzilog_console_setup(struct console *con, char *options)
(sunzilog_reg.minor - 64) + con->index, con->index);

/* Get firmware console settings. */
sunserial_console_termios(con);
sunserial_console_termios(con, to_of_device(up->port.dev)->node);

/* Firmware console speed is limited to 150-->38400 baud so
* this hackish cflag thing is OK.
Expand Down

0 comments on commit 2436948

Please sign in to comment.