Skip to contentSkip to conversation

Preliminary patch for ip32 ttyS* device

MIPS Giuseppe Sacco 1 participant 2 messages Dec 5, 2007 – Dec 7, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,
serial device on SGI O2 (mips64) is broken since 2.6.23. I proposed this patch on October on the linux-mips lists, and I tried to get a better patch. I would like to know if you think the change to drivers/serial/serial_core.c are correct or not.

Basically the problem is that we can setup membase but we cannot setup mapbase, so our 8250 uart seems to be unused by uart_match_port().

Any comments?

Thanks,
Giuseppe

---

(quoted diff) +0 -0

b/arch/mips/sgi-ip32/ip32-platform.c
index 7309e48..77febd6 100644

arch/mips/sgi-ip32/ip32-platform.c +1 -1
@@ -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);
 }
drivers/serial/serial_core.c +0 -0
index 3bb5d24..7caa877 100644
@@ -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;
#1 lore raw

Hi all,
I don't even know if anyone is reading this mailing list :-( but I really need a reply on this subject.
Is there any comment on this patch?

Thanks again,
Giuseppe

Il giorno mer, 05/12/2007 alle 14.20 +0100, Giuseppe Sacco ha scritto:

Quoted 43 lines

Hi all,
serial device on SGI O2 (mips64) is broken since 2.6.23. I proposed this patch on October on the linux-mips lists, and I tried to get a better patch. I would like to know if you think the change to drivers/serial/serial_core.c are correct or not.

Basically the problem is that we can setup membase but we cannot setup mapbase, so our 8250 uart seems to be unused by uart_match_port().

Any comments?

Thanks,
Giuseppe

---

arch/mips/sgi-ip32/ip32-platform.c +1 -1
index 7309e48..77febd6 100644
@@ -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);
 }
drivers/serial/serial_core.c +2 -0
index 3bb5d24..7caa877 100644
@@ -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;