diff options
Diffstat (limited to 'drivers/serial/sunsab.c')
-rw-r--r-- | drivers/serial/sunsab.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c index 0dbd4df44c05..cfe20f730436 100644 --- a/drivers/serial/sunsab.c +++ b/drivers/serial/sunsab.c | |||
@@ -886,6 +886,15 @@ static int sunsab_console_setup(struct console *con, char *options) | |||
886 | unsigned long flags; | 886 | unsigned long flags; |
887 | unsigned int baud, quot; | 887 | unsigned int baud, quot; |
888 | 888 | ||
889 | /* | ||
890 | * The console framework calls us for each and every port | ||
891 | * registered. Defer the console setup until the requested | ||
892 | * port has been properly discovered. A bit of a hack, | ||
893 | * though... | ||
894 | */ | ||
895 | if (up->port.type != PORT_SUNSAB) | ||
896 | return -1; | ||
897 | |||
889 | printk("Console: ttyS%d (SAB82532)\n", | 898 | printk("Console: ttyS%d (SAB82532)\n", |
890 | (sunsab_reg.minor - 64) + con->index); | 899 | (sunsab_reg.minor - 64) + con->index); |
891 | 900 | ||
@@ -1047,12 +1056,13 @@ static int __devinit sab_probe(struct of_device *op, const struct of_device_id * | |||
1047 | up = &sunsab_ports[inst * 2]; | 1056 | up = &sunsab_ports[inst * 2]; |
1048 | 1057 | ||
1049 | err = sunsab_init_one(&up[0], op, | 1058 | err = sunsab_init_one(&up[0], op, |
1050 | sizeof(union sab82532_async_regs), | 1059 | 0, |
1051 | (inst * 2) + 0); | 1060 | (inst * 2) + 0); |
1052 | if (err) | 1061 | if (err) |
1053 | return err; | 1062 | return err; |
1054 | 1063 | ||
1055 | err = sunsab_init_one(&up[0], op, 0, | 1064 | err = sunsab_init_one(&up[1], op, |
1065 | sizeof(union sab82532_async_regs), | ||
1056 | (inst * 2) + 1); | 1066 | (inst * 2) + 1); |
1057 | if (err) { | 1067 | if (err) { |
1058 | of_iounmap(up[0].port.membase, | 1068 | of_iounmap(up[0].port.membase, |
@@ -1117,7 +1127,7 @@ static int __init sunsab_init(void) | |||
1117 | int err; | 1127 | int err; |
1118 | 1128 | ||
1119 | num_channels = 0; | 1129 | num_channels = 0; |
1120 | for_each_node_by_name(dp, "su") | 1130 | for_each_node_by_name(dp, "se") |
1121 | num_channels += 2; | 1131 | num_channels += 2; |
1122 | for_each_node_by_name(dp, "serial") { | 1132 | for_each_node_by_name(dp, "serial") { |
1123 | if (of_device_is_compatible(dp, "sab82532")) | 1133 | if (of_device_is_compatible(dp, "sab82532")) |