public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Sam Song <samlinuxkernel@yahoo.com>
Cc: david-b@pacbell.net, linux-kernel@vger.kernel.org
Subject: Re: [patch 2.6.13-git] 8250 tweaks
Date: Wed, 13 Jul 2005 13:48:38 +0100	[thread overview]
Message-ID: <20050713134837.B6791@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20050713105127.59527.qmail@web32003.mail.mud.yahoo.com>; from samlinuxkernel@yahoo.com on Wed, Jul 13, 2005 at 03:51:26AM -0700

On Wed, Jul 13, 2005 at 03:51:26AM -0700, Sam Song wrote:
> Russell King <rmk+lkml@arm.linux.org.uk> wrote:
> > However, if you merely lifted the later 8250.c and
> > put it into a previous kernel (which looks like the 
> > case), there's other changes in addition which are 
> > required.
> 
> Good catch. I tried 2.6.13-rc1 and the newest version
> 2.6.13-rc3 on the same target[MPC8241]. The whining 
> remained the same. 

v. whining

    1. To utter a plaintive, high-pitched, protracted sound, as in pain,
       fear, supplication, or complaint.
    2. To complain or protest in a childish fashion.
    3. To produce a sustained noise of relatively high pitch: jet engines
       whining.

The kernel isn't doing any of those.

Anyway, you're going to have to help me out a lot - I don't know a
thing about PPC, so I don't know what a MPC8241 is.  I don't know
your kernel configuration (could you send it please?) so I don't
know which files are trying to be built.

Also, having the contents of /sys/devices/platform or
/sys/bus/platform/* would be useful.

For some reason, it appears that the serial driver is being asked to
register two serial ports at MMIO address 0, from one platform device,
which it apparantly detects as being present.  I suspect these are
coming from some table included via asm-ppc/serial.h, but where that
is I've no idea.

It's then asked to add two more ports from the serial8250.0 device,
which doesn't exist.  These come from a platform device in arch/ppc.
Again, where these come from I don't know.

So.  The serial driver is being asked to create _four_ ports.  It's
created two, but can't create the other two, failing with error -22.
22 is EINVAL, which means there was something wrong with what was
requested.  That generally points to uartclk being zero, which would
be a bug in the PPC architecture code.  You can confirm this by
applying this patch:

diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -2333,6 +2333,7 @@ static int __devinit serial8250_probe(st
 			dev_err(dev, "unable to register port at index %d "
 				"(IO%lx MEM%lx IRQ%d): %d\n", i,
 				p->iobase, p->mapbase, p->irq, ret);
+			printk(KERN_ERR "uartclk was %d\n", port.uartclk);
 		}
 	}
 	return 0;

(For those cogito fanatics, the above simple patch took 1min 22sec for
cg-diff to spit out!)

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core

  reply	other threads:[~2005-07-13 12:49 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-12  2:22 [patch 2.6.13-git] 8250 tweaks David Brownell
2005-07-12  7:19 ` Russell King
2005-07-12  9:14   ` Russell King
2005-07-12 10:25   ` david-b
2005-07-12 11:08     ` Russell King
2005-07-12 11:32       ` david-b
2005-07-12 12:01         ` Russell King
2005-07-12 13:30           ` david-b
2005-07-12 14:00             ` Russell King
2005-07-13  4:55           ` Sam Song
2005-07-13  6:12             ` Russell King
2005-07-13 10:51               ` Sam Song
2005-07-13 12:48                 ` Russell King [this message]
2005-07-14  7:12                   ` Sam Song
2005-07-14 10:42                     ` Russell King
2005-07-15  5:11                       ` Sam Song
2005-07-16  8:43                         ` Russell King
2005-07-16 10:12                           ` Sam Song
2005-07-16 10:15                             ` Russell King
2005-07-16 12:31                               ` Sam Song

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=20050713134837.B6791@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=david-b@pacbell.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=samlinuxkernel@yahoo.com \
    /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