linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial 8250: fixes for Alchemy uarts.
@ 2009-10-28 20:37 Manuel Lauss
  2009-11-01  7:09 ` Ralf Baechle
  0 siblings, 1 reply; 3+ messages in thread
From: Manuel Lauss @ 2009-10-28 20:37 UTC (permalink / raw)
  To: Andrew Morton, linux-serial; +Cc: linux-kernel, linux-mips, Manuel Lauss

Limit the amount of address space claimed for Alchemy serial ports
to 0x1000.  On the Au1300, ports are only 0x1000 apart, and the
registers only extend to 0x110 at most on all supported alchemy models.

On the Au1300 the autodetect logic no longer works and this makes
it necessary to specify the port type through platform data.  Because
of this the MSR quirk needs to be moved outside the autoconfig()
function which will no longer be called when UPF_FIXED_TYPE is
specified.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
---
 drivers/serial/8250.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index b1ae774..9538e5b 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -1214,12 +1214,6 @@ static void autoconfig(struct uart_8250_port *up, unsigned int probeflags)
 	}
 #endif
 
-#ifdef CONFIG_SERIAL_8250_AU1X00
-	/* if access method is AU, it is a 16550 with a quirk */
-	if (up->port.type == PORT_16550A && up->port.iotype == UPIO_AU)
-		up->bugs |= UART_BUG_NOMSR;
-#endif
-
 	serial_outp(up, UART_LCR, save_lcr);
 
 	if (up->capabilities != uart_config[up->port.type].flags) {
@@ -2429,7 +2423,7 @@ serial8250_pm(struct uart_port *port, unsigned int state,
 static unsigned int serial8250_port_size(struct uart_8250_port *pt)
 {
 	if (pt->port.iotype == UPIO_AU)
-		return 0x100000;
+		return 0x1000;
 #ifdef CONFIG_ARCH_OMAP
 	if (is_omap_port(pt))
 		return 0x16 << pt->port.regshift;
@@ -2586,6 +2580,13 @@ static void serial8250_config_port(struct uart_port *port, int flags)
 
 	if (flags & UART_CONFIG_TYPE)
 		autoconfig(up, probeflags);
+
+#ifdef CONFIG_SERIAL_8250_AU1X00
+	/* if access method is AU, it is a 16550 with a quirk */
+	if (up->port.type == PORT_16550A && up->port.iotype == UPIO_AU)
+		up->bugs |= UART_BUG_NOMSR;
+#endif
+
 	if (up->port.type != PORT_UNKNOWN && flags & UART_CONFIG_IRQ)
 		autoconfig_irq(up);
 
-- 
1.6.5


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

* Re: [PATCH] serial 8250: fixes for Alchemy uarts.
  2009-10-28 20:37 [PATCH] serial 8250: fixes for Alchemy uarts Manuel Lauss
@ 2009-11-01  7:09 ` Ralf Baechle
  2009-11-01  7:16   ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Ralf Baechle @ 2009-11-01  7:09 UTC (permalink / raw)
  To: Manuel Lauss
  Cc: Andrew Morton, linux-serial, linux-kernel, linux-mips,
	Manuel Lauss

On Wed, Oct 28, 2009 at 09:37:28PM +0100, Manuel Lauss wrote:

> Limit the amount of address space claimed for Alchemy serial ports
> to 0x1000.  On the Au1300, ports are only 0x1000 apart, and the
> registers only extend to 0x110 at most on all supported alchemy models.
> 
> On the Au1300 the autodetect logic no longer works and this makes
> it necessary to specify the port type through platform data.  Because
> of this the MSR quirk needs to be moved outside the autoconfig()
> function which will no longer be called when UPF_FIXED_TYPE is
> specified.

Andrew,

looks sane to me.  Since this is a MIPS patch I'd like to funnel it through
the MIPS tree.  Ok?

  Ralf

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

* Re: [PATCH] serial 8250: fixes for Alchemy uarts.
  2009-11-01  7:09 ` Ralf Baechle
@ 2009-11-01  7:16   ` Andrew Morton
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2009-11-01  7:16 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Manuel Lauss, linux-serial, linux-kernel, linux-mips,
	Manuel Lauss

On Sun, 1 Nov 2009 08:09:00 +0100 Ralf Baechle <ralf@linux-mips.org> wrote:

> On Wed, Oct 28, 2009 at 09:37:28PM +0100, Manuel Lauss wrote:
> 
> > Limit the amount of address space claimed for Alchemy serial ports
> > to 0x1000.  On the Au1300, ports are only 0x1000 apart, and the
> > registers only extend to 0x110 at most on all supported alchemy models.
> > 
> > On the Au1300 the autodetect logic no longer works and this makes
> > it necessary to specify the port type through platform data.  Because
> > of this the MSR quirk needs to be moved outside the autoconfig()
> > function which will no longer be called when UPF_FIXED_TYPE is
> > specified.
> 
> Andrew,
> 
> looks sane to me.  Since this is a MIPS patch I'd like to funnel it through
> the MIPS tree.  Ok?

Sure.

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

end of thread, other threads:[~2009-11-01  7:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-28 20:37 [PATCH] serial 8250: fixes for Alchemy uarts Manuel Lauss
2009-11-01  7:09 ` Ralf Baechle
2009-11-01  7:16   ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).