Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Rolf Eike Beer <eike-kernel@sf-tec.de>
To: Helge Deller <deller@gmx.de>
Cc: linux-parisc@vger.kernel.org,
	James Bottomley <James.Bottomley@hansenpartnership.com>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Subject: Re: [PATCH] parisc: fix serial ports on C8000 workstation
Date: Sun, 09 Jun 2013 23:49:37 +0200	[thread overview]
Message-ID: <3684361.ciEK0E58Qm@donald.sf-tec.de> (raw)
In-Reply-To: <20130609210021.GA1009@p100.box>

[-- Attachment #1: Type: text/plain, Size: 1644 bytes --]

Helge Deller wrote:
> From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> 
> The C8000 workstation (64 bit kernel only) has a somewhat different
> serial port configuration that other models.
> Thonmas Bogendoerfers sent a patch to fix this in September 2010, which
> was now minimally modified by me.

Cool, that explains why it doesn't work for me. And it saves me the time to 
debug what _I_ did wrong ;)

> diff --git a/drivers/tty/serial/8250/8250_gsc.c
> b/drivers/tty/serial/8250/8250_gsc.c index 097dff9..bb91b47 100644
> --- a/drivers/tty/serial/8250/8250_gsc.c
> +++ b/drivers/tty/serial/8250/8250_gsc.c
> @@ -30,6 +30,12 @@ static int __init serial_init_chip(struct parisc_device
> *dev) unsigned long address;
>  	int err;
> 
> +#ifdef CONFIG_64BIT
> +	extern int iosapic_serial_irq(int cellnum);
> +	if (!dev->irq && (dev->id.sversion == 0xad))
> +		dev->irq = iosapic_serial_irq(dev->mod_index-1);
> +#endif
> +

Forward declaration in the middle of a function. Is this permitted? By 
standard and by coding style? Looks strange to me.

>  	if (!dev->irq) {
>  		/* We find some unattached serial ports by walking native
>  		 * busses.  These should be silently ignored.  Otherwise,
> @@ -51,7 +57,8 @@ static int __init serial_init_chip(struct parisc_device
> *dev) memset(&uart, 0, sizeof(uart));
>  	uart.port.iotype	= UPIO_MEM;
>  	/* 7.272727MHz on Lasi.  Assumed the same for Dino, Wax and Timi. */
> -	uart.port.uartclk	= 7272727;
> +	uart.port.uartclk	= (dev->id.sversion != 0xad) ?
> +					7272727 : 1843200;

If there is a nice comment explaining 72 another nice comment for the other 
number should be added.

Eike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2013-06-09 21:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-09 21:00 [PATCH] parisc: fix serial ports on C8000 workstation Helge Deller
2013-06-09 21:49 ` Rolf Eike Beer [this message]
2013-06-09 22:21   ` John David Anglin
2013-06-10  8:27   ` Aw: " Helge Deller
2013-06-10 10:00     ` Thomas Bogendoerfer
2013-06-10 10:43       ` Rolf Eike Beer

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=3684361.ciEK0E58Qm@donald.sf-tec.de \
    --to=eike-kernel@sf-tec.de \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=deller@gmx.de \
    --cc=linux-parisc@vger.kernel.org \
    --cc=tsbogend@alpha.franken.de \
    /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