linux-mips
[Top] [All Lists]

Preliminary patch for ip32 ttyS* device

To: mips kernel list <linux-mips@linux-mips.org>
Subject: Preliminary patch for ip32 ttyS* device
From: Giuseppe Sacco <giuseppe@eppesuigoccas.homedns.org>
Date: Tue, 30 Oct 2007 21:40:15 +0100
Cc: Martin Michlmayr <tbm@cyrius.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Hi all,
this is a patch that make ttyS0 and ttyS1 work on my SGI O2. I don't know if it 
is enough good for a general use since I am also changing code 
drivers/serial/serial_core.c. Probably the best solution would be to use 
mapbase instead of membase in arch/mips/sgi-ip32/ip32-platform.c.

Any comments?

Bye,
Giuseppe

---
diff --git a/arch/mips/sgi-ip32/ip32-platform.c 
b/arch/mips/sgi-ip32/ip32-platform.c
index 7309e48..77febd6 100644
--- a/arch/mips/sgi-ip32/ip32-platform.c
+++ b/arch/mips/sgi-ip32/ip32-platform.c
@@ -42,7 +42,7 @@ static struct platform_device uart8250_device = {
 static int __init uart8250_init(void)
 {
        uart8250_data[0].membase = (void __iomem *) &mace->isa.serial1;
-       uart8250_data[1].membase = (void __iomem *) &mace->isa.serial1;
+       uart8250_data[1].membase = (void __iomem *) &mace->isa.serial2;
 
        return platform_device_register(&uart8250_device);
 }
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 3bb5d24..7caa877 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -2455,6 +2455,8 @@ int uart_match_port(struct uart_port *port1, struct 
uart_port *port2)
        case UPIO_AU:
        case UPIO_TSI:
        case UPIO_DWAPB:
+               if (port1->mapbase==0 && port2->mapbase==0)
+                       return (port1->membase == port2->membase);
                return (port1->mapbase == port2->mapbase);
        }
        return 0;

<Prev in Thread] Current Thread [Next in Thread>