Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Rodolfo Giometti <giometti@linux.it>
Cc: linux-mips@linux-mips.org
Subject: Re: [PATCH] 8250_early console support for au1x00
Date: Thu, 04 May 2006 18:35:55 +0400	[thread overview]
Message-ID: <445A114B.4040404@ru.mvista.com> (raw)
In-Reply-To: <20060504134509.GE19913@gundam.enneenne.com>

Hello.

Rodolfo Giometti wrote:
> Done! :)
> 
> Here the patch (against «linux-2.6.16-stable» and tested with au1100
> based board):
> 
>    http://ftp.enneenne.com/pub/misc/au1100-patches/linux/patch-patch-au1x00-early-console

    The following 2 fragments are kind of contradictory:

 > --- a/drivers/serial/8250.c
 > +++ b/drivers/serial/8250.c
 > @@ -2322,16 +2322,18 @@ static int __init find_port(struct uart_
 >
 >  int __init serial8250_start_console(struct uart_port *port, char *options)
 >  {
 > -	int line;
 > +	int line, mmio;
 >
 >  	line = find_port(port);
 >  	if (line < 0)
 >  		return -ENODEV;
 >
 >  	add_preferred_console("ttyS", line, options);
 > +	mmio = (port->iotype == UPIO_MEM) || (port->iotype == UPIO_AU);
 >  	printk("Adding console on ttyS%d at %s 0x%lx (options '%s')\n",
 > -		line, port->iotype == UPIO_MEM ? "MMIO" : "I/O port",
 > -		port->iotype == UPIO_MEM ? (unsigned long) port->mapbase :
 > +		line,
 > +	       	mmio ? "MMIO" : "I/O port",
 > +		mmio ? (unsigned long) port->mapbase :
 >  		    (unsigned long) port->iobase, options);
 >  	if (!(serial8250_console.flags & CON_ENABLED)) {

 > --- a/drivers/serial/8250_early.c
 > +++ b/drivers/serial/8250_early.c
 > @@ -232,22 +380,23 @@ static int __init early_uart_console_swi
 >  {
 >  	struct early_uart_device *device = &early_device;
 >  	struct uart_port *port = &device->port;
 > -	int mmio, line;
 > +	int line;
 >
 >  	if (!(early_uart_console.flags & CON_ENABLED))
 >  		return 0;
 >
 >  	/* Try to start the normal driver on a matching line.  */
 > -	mmio = (port->iotype == UPIO_MEM);
 >  	line = serial8250_start_console(port, device->options);
 >  	if (line < 0)
 >  		printk("No ttyS device at %s 0x%lx for console\n",
 > -			mmio ? "MMIO" : "I/O port",
 > -			mmio ? port->mapbase :
 > +			(port->iotype == UPIO_MEM) ? "MMIO" : \
 > +			(port->iotype == UPIO_AU)  ? "AU"   : "I/O port",
 > +			(port->iotype == UPIO_MEM) || \
 > +			(port->iotype == UPIO_AU) ? port->mapbase :
 >  			    (unsigned long) port->iobase);
 >
 >  	unregister_console(&early_uart_console);
 > -	if (mmio)
 > +	if ((port->iotype == UPIO_MEM) || (port->iotype == UPIO_AU))
 >  		iounmap(port->membase);

    Why the different code here? I suggest sticking to the 8250.c variant...
And, as I said. there's not much sense in calling iomap() on Alchemy UART, 
UPIO_IOREMAP flag wasn't really needed...

> Please, note also the «know bugs» section.

    You propably meant "known bugs"? :-)

> Ciao,
> 
> Rodolfo

WBR, Sergei

  reply	other threads:[~2006-05-04 14:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-04 13:45 [PATCH] 8250_early console support for au1x00 Rodolfo Giometti
2006-05-04 14:35 ` Sergei Shtylyov [this message]
2006-05-04 15:20   ` Rodolfo Giometti
2006-05-04 15:48     ` Sergei Shtylyov
2006-05-04 16:33       ` Rodolfo Giometti
2006-05-22 20:50         ` [PATCH] 8250_early console support for au1x00 (again) Rodolfo Giometti
2006-08-28 14:51           ` Sergei Shtylyov
2006-08-30 10:53             ` Rodolfo Giometti
2006-08-30 12:41               ` Sergei Shtylyov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=445A114B.4040404@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=giometti@linux.it \
    --cc=linux-mips@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox