From 5b4bbb3d78285ab735941365c17f1c55a228c659 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Thu, 13 Jul 2006 16:07:25 -0700 Subject: [SERIAL] sunsab: Fix significant typo in sab_probe() Instead of initializing both ports of a SAB device properly, we were setting up the first port structure twice and ending up only with the second port, oops. Signed-off-by: David S. Miller --- drivers/serial/sunsab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/serial/sunsab.c') diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c index 0dbd4df44c05..979497f108c8 100644 --- a/drivers/serial/sunsab.c +++ b/drivers/serial/sunsab.c @@ -1052,7 +1052,7 @@ static int __devinit sab_probe(struct of_device *op, const struct of_device_id * if (err) return err; - err = sunsab_init_one(&up[0], op, 0, + err = sunsab_init_one(&up[1], op, 0, (inst * 2) + 1); if (err) { of_iounmap(up[0].port.membase, -- cgit v1.2.2 From 44f2650b134b423128063ded29a11454b924390e Mon Sep 17 00:00:00 2001 From: Marc Zyngier Date: Mon, 17 Jul 2006 15:53:32 -0700 Subject: [SPARC64] Fix sunsab ports ordering Register second SAB port before the first one, as serial A is wired to it, and expected to appear as ttyS0. Signed-off-by: Marc Zyngier Signed-off-by: David S. Miller --- drivers/serial/sunsab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/serial/sunsab.c') diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c index 979497f108c8..cb55d81c27d9 100644 --- a/drivers/serial/sunsab.c +++ b/drivers/serial/sunsab.c @@ -1061,8 +1061,8 @@ static int __devinit sab_probe(struct of_device *op, const struct of_device_id * return err; } - uart_add_one_port(&sunsab_reg, &up[0].port); uart_add_one_port(&sunsab_reg, &up[1].port); + uart_add_one_port(&sunsab_reg, &up[0].port); dev_set_drvdata(&op->dev, &up[0]); -- cgit v1.2.2 From bda2f7b4801964351253706d1a87e4d2110829a5 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Mon, 17 Jul 2006 16:40:26 -0700 Subject: [SERIAL] sunsab: Get line numbers and table sizing correct. Table sizing code should look for "se" not "su" nodes. The chip at the lower address should get the first index. Signed-off-by: David S. Miller --- drivers/serial/sunsab.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'drivers/serial/sunsab.c') diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c index cb55d81c27d9..dc673e1b6fd9 100644 --- a/drivers/serial/sunsab.c +++ b/drivers/serial/sunsab.c @@ -1047,12 +1047,13 @@ static int __devinit sab_probe(struct of_device *op, const struct of_device_id * up = &sunsab_ports[inst * 2]; err = sunsab_init_one(&up[0], op, - sizeof(union sab82532_async_regs), + 0, (inst * 2) + 0); if (err) return err; - err = sunsab_init_one(&up[1], op, 0, + err = sunsab_init_one(&up[1], op, + sizeof(union sab82532_async_regs), (inst * 2) + 1); if (err) { of_iounmap(up[0].port.membase, @@ -1061,8 +1062,8 @@ static int __devinit sab_probe(struct of_device *op, const struct of_device_id * return err; } - uart_add_one_port(&sunsab_reg, &up[1].port); uart_add_one_port(&sunsab_reg, &up[0].port); + uart_add_one_port(&sunsab_reg, &up[1].port); dev_set_drvdata(&op->dev, &up[0]); @@ -1117,7 +1118,7 @@ static int __init sunsab_init(void) int err; num_channels = 0; - for_each_node_by_name(dp, "su") + for_each_node_by_name(dp, "se") num_channels += 2; for_each_node_by_name(dp, "serial") { if (of_device_is_compatible(dp, "sab82532")) -- cgit v1.2.2