public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
* [MIPS] Preliminary patch for ip32 ttyS* device
@ 2007-12-05 13:20 Giuseppe Sacco
  2007-12-07 13:08 ` Giuseppe Sacco
  0 siblings, 1 reply; 2+ messages in thread
From: Giuseppe Sacco @ 2007-12-05 13:20 UTC (permalink / raw)
  To: linux-serial

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

---
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;


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [MIPS] Preliminary patch for ip32 ttyS* device
  2007-12-05 13:20 [MIPS] Preliminary patch for ip32 ttyS* device Giuseppe Sacco
@ 2007-12-07 13:08 ` Giuseppe Sacco
  0 siblings, 0 replies; 2+ messages in thread
From: Giuseppe Sacco @ 2007-12-07 13:08 UTC (permalink / raw)
  To: linux-serial

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:
> 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
> 
> ---
> 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;



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-12-07 14:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-05 13:20 [MIPS] Preliminary patch for ip32 ttyS* device Giuseppe Sacco
2007-12-07 13:08 ` Giuseppe Sacco

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox