* [PATCH 1/2] serial: 8250: reduce Alchemy serial port space size @ 2009-10-28 19:09 Manuel Lauss 2009-10-28 19:09 ` [PATCH 2/2] MIPS: Alchemy: UARTs are 16550A Manuel Lauss 0 siblings, 1 reply; 9+ messages in thread From: Manuel Lauss @ 2009-10-28 19:09 UTC (permalink / raw) To: Andrew Morton, Ralf Baechle; +Cc: Linux-MIPS, linux-serial, Manuel Lauss This patch limits 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. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> --- I'm not sure who to send this patch to; I added Ralf Baechle because he always takes my alchemy patches, 8250 is unmaintained and this patch is required for adding support for a new alchemy model (this patch gets me a working serial console on the DB1300). drivers/serial/8250.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index b1ae774..2ff81eb 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c @@ -2429,7 +2429,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; -- 1.6.5 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/2] MIPS: Alchemy: UARTs are 16550A 2009-10-28 19:09 [PATCH 1/2] serial: 8250: reduce Alchemy serial port space size Manuel Lauss @ 2009-10-28 19:09 ` Manuel Lauss 2009-10-28 19:24 ` Andrew Morton 2009-10-28 19:36 ` Sergei Shtylyov 0 siblings, 2 replies; 9+ messages in thread From: Manuel Lauss @ 2009-10-28 19:09 UTC (permalink / raw) To: Andrew Morton, Ralf Baechle; +Cc: Linux-MIPS, linux-serial, Manuel Lauss UART autodetection breaks on the Au1300 but the IP blocks are identical, at least in the datasheets. Pass uart type on to the 8250 driver via platform data, and move the MSR quirk to another place sind autoconf() is now no longer called on init. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> --- Tested on DB1200 and DB1300. The mips parts apply on top of Ralf's mips-queue tree. arch/mips/alchemy/common/platform.c | 4 +++- drivers/serial/8250.c | 13 +++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/arch/mips/alchemy/common/platform.c b/arch/mips/alchemy/common/platform.c index 195e5b3..3be14b0 100644 --- a/arch/mips/alchemy/common/platform.c +++ b/arch/mips/alchemy/common/platform.c @@ -26,7 +26,9 @@ .irq = _irq, \ .regshift = 2, \ .iotype = UPIO_AU, \ - .flags = UPF_SKIP_TEST | UPF_IOREMAP \ + .flags = UPF_SKIP_TEST | UPF_IOREMAP | \ + UPF_FIXED_TYPE, \ + .type = PORT_16550A, \ } static struct plat_serial8250_port au1x00_uart_data[] = { diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index 2ff81eb..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) { @@ -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] 9+ messages in thread
* Re: [PATCH 2/2] MIPS: Alchemy: UARTs are 16550A 2009-10-28 19:09 ` [PATCH 2/2] MIPS: Alchemy: UARTs are 16550A Manuel Lauss @ 2009-10-28 19:24 ` Andrew Morton 2009-10-28 19:27 ` Manuel Lauss 2009-10-28 19:36 ` Sergei Shtylyov 1 sibling, 1 reply; 9+ messages in thread From: Andrew Morton @ 2009-10-28 19:24 UTC (permalink / raw) To: Manuel Lauss; +Cc: Ralf Baechle, Linux-MIPS, linux-serial, Manuel Lauss On Wed, 28 Oct 2009 20:09:14 +0100 Manuel Lauss <manuel.lauss@googlemail.com> wrote: > UART autodetection breaks on the Au1300 but the IP blocks are > identical, at least in the datasheets. > > Pass uart type on to the 8250 driver via platform data, and move > the MSR quirk to another place sind autoconf() is now no longer > called on init. > > Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> > --- > Tested on DB1200 and DB1300. > The mips parts apply on top of Ralf's mips-queue tree. > > arch/mips/alchemy/common/platform.c | 4 +++- > drivers/serial/8250.c | 13 +++++++------ > 2 files changed, 10 insertions(+), 7 deletions(-) > > diff --git a/arch/mips/alchemy/common/platform.c b/arch/mips/alchemy/common/platform.c > index 195e5b3..3be14b0 100644 > --- a/arch/mips/alchemy/common/platform.c > +++ b/arch/mips/alchemy/common/platform.c > @@ -26,7 +26,9 @@ > .irq = _irq, \ > .regshift = 2, \ > .iotype = UPIO_AU, \ > - .flags = UPF_SKIP_TEST | UPF_IOREMAP \ > + .flags = UPF_SKIP_TEST | UPF_IOREMAP | \ > + UPF_FIXED_TYPE, \ > + .type = PORT_16550A, \ > } The kernel which you patched differs from current mainline here. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] MIPS: Alchemy: UARTs are 16550A 2009-10-28 19:24 ` Andrew Morton @ 2009-10-28 19:27 ` Manuel Lauss 2009-10-28 19:52 ` Andrew Morton 0 siblings, 1 reply; 9+ messages in thread From: Manuel Lauss @ 2009-10-28 19:27 UTC (permalink / raw) To: Andrew Morton; +Cc: Ralf Baechle, Linux-MIPS, linux-serial, Manuel Lauss [-- Attachment #1: Type: text/plain, Size: 1811 bytes --] On Wed, Oct 28, 2009 at 8:24 PM, Andrew Morton <akpm@linux-foundation.org>wrote: > On Wed, 28 Oct 2009 20:09:14 +0100 > Manuel Lauss <manuel.lauss@googlemail.com> wrote: > > > UART autodetection breaks on the Au1300 but the IP blocks are > > identical, at least in the datasheets. > > > > Pass uart type on to the 8250 driver via platform data, and move > > the MSR quirk to another place sind autoconf() is now no longer > > called on init. > > > > Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> > > --- > > Tested on DB1200 and DB1300. > > The mips parts apply on top of Ralf's mips-queue tree. > > > > arch/mips/alchemy/common/platform.c | 4 +++- > > drivers/serial/8250.c | 13 +++++++------ > > 2 files changed, 10 insertions(+), 7 deletions(-) > > > > diff --git a/arch/mips/alchemy/common/platform.c > b/arch/mips/alchemy/common/platform.c > > index 195e5b3..3be14b0 100644 > > --- a/arch/mips/alchemy/common/platform.c > > +++ b/arch/mips/alchemy/common/platform.c > > @@ -26,7 +26,9 @@ > > .irq = _irq, \ > > .regshift = 2, \ > > .iotype = UPIO_AU, \ > > - .flags = UPF_SKIP_TEST | UPF_IOREMAP \ > > + .flags = UPF_SKIP_TEST | UPF_IOREMAP | \ > > + UPF_FIXED_TYPE, \ > > + .type = PORT_16550A, \ > > } > > The kernel which you patched differs from current mainline here. I know, that's why I added "The mips parts apply on top of Ralf's mips-queue tree" below the patch description. If it makes it easier to apply, I could split this one in a mips and in a 8250 patch? Thank you! Manuel Lauss [-- Attachment #2: Type: text/html, Size: 2464 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] MIPS: Alchemy: UARTs are 16550A 2009-10-28 19:27 ` Manuel Lauss @ 2009-10-28 19:52 ` Andrew Morton 2009-10-28 20:11 ` Manuel Lauss 2009-10-28 22:34 ` Ralf Baechle 0 siblings, 2 replies; 9+ messages in thread From: Andrew Morton @ 2009-10-28 19:52 UTC (permalink / raw) To: Manuel Lauss; +Cc: Ralf Baechle, Linux-MIPS, linux-serial, Manuel Lauss On Wed, 28 Oct 2009 20:27:16 +0100 Manuel Lauss <manuel.lauss@googlemail.com> wrote: > On Wed, Oct 28, 2009 at 8:24 PM, Andrew Morton <akpm@linux-foundation.org>wrote: > > > On Wed, 28 Oct 2009 20:09:14 +0100 > > Manuel Lauss <manuel.lauss@googlemail.com> wrote: > > > > > UART autodetection breaks on the Au1300 but the IP blocks are > > > identical, at least in the datasheets. > > > > > > Pass uart type on to the 8250 driver via platform data, and move > > > the MSR quirk to another place sind autoconf() is now no longer > > > called on init. > > > > > > Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> > > > --- > > > Tested on DB1200 and DB1300. > > > The mips parts apply on top of Ralf's mips-queue tree. > > > > > > arch/mips/alchemy/common/platform.c | 4 +++- > > > drivers/serial/8250.c | 13 +++++++------ > > > 2 files changed, 10 insertions(+), 7 deletions(-) > > > > > > diff --git a/arch/mips/alchemy/common/platform.c > > b/arch/mips/alchemy/common/platform.c > > > index 195e5b3..3be14b0 100644 > > > --- a/arch/mips/alchemy/common/platform.c > > > +++ b/arch/mips/alchemy/common/platform.c > > > @@ -26,7 +26,9 @@ > > > .irq = _irq, \ > > > .regshift = 2, \ > > > .iotype = UPIO_AU, \ > > > - .flags = UPF_SKIP_TEST | UPF_IOREMAP \ > > > + .flags = UPF_SKIP_TEST | UPF_IOREMAP | \ > > > + UPF_FIXED_TYPE, \ > > > + .type = PORT_16550A, \ > > > } > > > > The kernel which you patched differs from current mainline here. > > > I know, that's why I added "The mips parts apply on top of Ralf's > mips-queue tree" below > the patch description. If that's the case then Ralf's mips-queue tree isn't in linux-next :( > If it makes it easier to apply, I could split this one in a mips and in a > 8250 patch? That's a hard call without knowing what's going on in mipsworld. If these patches applied to current mainline we could do it all as one patch and, with suitable acks, slap it into 2.6.32. Are these fixes also appropriate to 2.6.31.x and earlier? If so, that's another reason to prepare the patches against current mainline and just trample over the mips devel queue. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] MIPS: Alchemy: UARTs are 16550A 2009-10-28 19:52 ` Andrew Morton @ 2009-10-28 20:11 ` Manuel Lauss 2009-10-28 22:34 ` Ralf Baechle 1 sibling, 0 replies; 9+ messages in thread From: Manuel Lauss @ 2009-10-28 20:11 UTC (permalink / raw) To: Andrew Morton; +Cc: Ralf Baechle, Linux-MIPS, linux-serial, Manuel Lauss [-- Attachment #1: Type: text/plain, Size: 3135 bytes --] On Wed, Oct 28, 2009 at 8:52 PM, Andrew Morton <akpm@linux-foundation.org>wrote: > On Wed, 28 Oct 2009 20:27:16 +0100 > Manuel Lauss <manuel.lauss@googlemail.com> wrote: > > > On Wed, Oct 28, 2009 at 8:24 PM, Andrew Morton < > akpm@linux-foundation.org>wrote: > > > > > On Wed, 28 Oct 2009 20:09:14 +0100 > > > Manuel Lauss <manuel.lauss@googlemail.com> wrote: > > > > > > > UART autodetection breaks on the Au1300 but the IP blocks are > > > > identical, at least in the datasheets. > > > > > > > > Pass uart type on to the 8250 driver via platform data, and move > > > > the MSR quirk to another place sind autoconf() is now no longer > > > > called on init. > > > > > > > > Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> > > > > --- > > > > Tested on DB1200 and DB1300. > > > > The mips parts apply on top of Ralf's mips-queue tree. > > > > > > > > arch/mips/alchemy/common/platform.c | 4 +++- > > > > drivers/serial/8250.c | 13 +++++++------ > > > > 2 files changed, 10 insertions(+), 7 deletions(-) > > > > > > > > diff --git a/arch/mips/alchemy/common/platform.c > > > b/arch/mips/alchemy/common/platform.c > > > > index 195e5b3..3be14b0 100644 > > > > --- a/arch/mips/alchemy/common/platform.c > > > > +++ b/arch/mips/alchemy/common/platform.c > > > > @@ -26,7 +26,9 @@ > > > > .irq = _irq, \ > > > > .regshift = 2, \ > > > > .iotype = UPIO_AU, \ > > > > - .flags = UPF_SKIP_TEST | UPF_IOREMAP \ > > > > + .flags = UPF_SKIP_TEST | UPF_IOREMAP | \ > > > > + UPF_FIXED_TYPE, \ > > > > + .type = PORT_16550A, \ > > > > } > > > > > > The kernel which you patched differs from current mainline here. > > > > > > I know, that's why I added "The mips parts apply on top of Ralf's > > mips-queue tree" below > > the patch description. > > If that's the case then Ralf's mips-queue tree isn't in linux-next :( > > > If it makes it easier to apply, I could split this one in a mips and in a > > 8250 patch? > > That's a hard call without knowing what's going on in mipsworld. If > these patches applied to current mainline we could do it all as one > patch and, with suitable acks, slap it into 2.6.32. > The 8250.c hunks from both patches apply against current -git; only the mips hunk is against Ralfs queue tree (the mips hunk on its own would probably break something wrt. modem signals which I can't test now anyway) I'll resend with a new series: 1 patch with the mips part (to Ralf) and one with the 8250.c part (to you). > Are these fixes also appropriate to 2.6.31.x and earlier? If so, > Not really; patch #1 is necessary to get serial going on a chip not yet supported in mainline, and patch #2 works around failing uart autodetection on this new soc. > that's another reason to prepare the patches against current mainline > and just trample over the mips devel queue. > Understood. Thank you! Manuel Lauss [-- Attachment #2: Type: text/html, Size: 4584 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] MIPS: Alchemy: UARTs are 16550A 2009-10-28 19:52 ` Andrew Morton 2009-10-28 20:11 ` Manuel Lauss @ 2009-10-28 22:34 ` Ralf Baechle 1 sibling, 0 replies; 9+ messages in thread From: Ralf Baechle @ 2009-10-28 22:34 UTC (permalink / raw) To: Andrew Morton; +Cc: Manuel Lauss, Linux-MIPS, linux-serial, Manuel Lauss On Wed, Oct 28, 2009 at 12:52:03PM -0700, Andrew Morton wrote: > > I know, that's why I added "The mips parts apply on top of Ralf's > > mips-queue tree" below > > the patch description. > > If that's the case then Ralf's mips-queue tree isn't in linux-next :( I just respun my tree for linux-next, just in case. > > If it makes it easier to apply, I could split this one in a mips and in a > > 8250 patch? > > That's a hard call without knowing what's going on in mipsworld. If My tree for linux-next is at http://www.linux-mips.org/git?p=upstream-sfr.git;a=summary Ralf ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] MIPS: Alchemy: UARTs are 16550A 2009-10-28 19:09 ` [PATCH 2/2] MIPS: Alchemy: UARTs are 16550A Manuel Lauss 2009-10-28 19:24 ` Andrew Morton @ 2009-10-28 19:36 ` Sergei Shtylyov 2009-10-28 19:55 ` Manuel Lauss 1 sibling, 1 reply; 9+ messages in thread From: Sergei Shtylyov @ 2009-10-28 19:36 UTC (permalink / raw) To: Manuel Lauss Cc: Andrew Morton, Ralf Baechle, Linux-MIPS, linux-serial, Manuel Lauss Hello. Manuel Lauss wrote: > UART autodetection breaks on the Au1300 but the IP blocks are > identical, at least in the datasheets. > Pass uart type on to the 8250 driver via platform data, and move > the MSR quirk to another place sind autoconf() is now no longer s/sind autoconf/since autoconfig/ > called on init. > Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> > --- > Tested on DB1200 and DB1300. > The mips parts apply on top of Ralf's mips-queue tree. > > arch/mips/alchemy/common/platform.c | 4 +++- > drivers/serial/8250.c | 13 +++++++------ > 2 files changed, 10 insertions(+), 7 deletions(-) > > diff --git a/arch/mips/alchemy/common/platform.c b/arch/mips/alchemy/common/platform.c > index 195e5b3..3be14b0 100644 > --- a/arch/mips/alchemy/common/platform.c > +++ b/arch/mips/alchemy/common/platform.c > @@ -26,7 +26,9 @@ > .irq = _irq, \ > .regshift = 2, \ > .iotype = UPIO_AU, \ > - .flags = UPF_SKIP_TEST | UPF_IOREMAP \ > + .flags = UPF_SKIP_TEST | UPF_IOREMAP | \ > + UPF_FIXED_TYPE, \ Good to know this has been implemented. WBR, Sergei ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] MIPS: Alchemy: UARTs are 16550A 2009-10-28 19:36 ` Sergei Shtylyov @ 2009-10-28 19:55 ` Manuel Lauss 0 siblings, 0 replies; 9+ messages in thread From: Manuel Lauss @ 2009-10-28 19:55 UTC (permalink / raw) To: Sergei Shtylyov Cc: Andrew Morton, Ralf Baechle, Linux-MIPS, linux-serial, Manuel Lauss [-- Attachment #1: Type: text/plain, Size: 1609 bytes --] On Wed, Oct 28, 2009 at 8:36 PM, Sergei Shtylyov <sshtylyov@ru.mvista.com>wrote: > Hello. > > > Manuel Lauss wrote: > > UART autodetection breaks on the Au1300 but the IP blocks are >> identical, at least in the datasheets. >> > > Pass uart type on to the 8250 driver via platform data, and move >> the MSR quirk to another place sind autoconf() is now no longer >> > > s/sind autoconf/since autoconfig/ > Yeah, I suck at writing descriptions. Will fix. called on init. > Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> > --- > Tested on DB1200 and DB1300. > The mips parts apply on top of Ralf's mips-queue tree. > > arch/mips/alchemy/common/platform.c | 4 +++- > drivers/serial/8250.c | 13 +++++++------ > 2 files changed, 10 insertions(+), 7 deletions(-) > > diff --git a/arch/mips/alchemy/common/platform.c > b/arch/mips/alchemy/common/platform.c > index 195e5b3..3be14b0 100644 > --- a/arch/mips/alchemy/common/platform.c > +++ b/arch/mips/alchemy/common/platform.c > @@ -26,7 +26,9 @@ > .irq = _irq, \ > .regshift = 2, \ > .iotype = UPIO_AU, \ > - .flags = UPF_SKIP_TEST | UPF_IOREMAP \ > + .flags = UPF_SKIP_TEST | UPF_IOREMAP | \ > + UPF_FIXED_TYPE, \ > Good to know this has been implemented. > David Daney implemented this recently for his Octeon port, it's a very handy feature for sure. Thank you ! Manuel Lauss [-- Attachment #2: Type: text/html, Size: 2876 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-10-28 22:33 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-10-28 19:09 [PATCH 1/2] serial: 8250: reduce Alchemy serial port space size Manuel Lauss 2009-10-28 19:09 ` [PATCH 2/2] MIPS: Alchemy: UARTs are 16550A Manuel Lauss 2009-10-28 19:24 ` Andrew Morton 2009-10-28 19:27 ` Manuel Lauss 2009-10-28 19:52 ` Andrew Morton 2009-10-28 20:11 ` Manuel Lauss 2009-10-28 22:34 ` Ralf Baechle 2009-10-28 19:36 ` Sergei Shtylyov 2009-10-28 19:55 ` Manuel Lauss
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).