Re: [patch 2.6.13-git] 8250 tweaks

From: Russell King (rmk+lkml_at_arm.linux.org.uk)
Date: 07/13/05

  • Next message: li nux: "Oprofile: patch for Call-graph on AMD64"
    Date:	Wed, 13 Jul 2005 13:48:38 +0100
    To: Sam Song <samlinuxkernel@yahoo.com>
    
    

    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
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: li nux: "Oprofile: patch for Call-graph on AMD64"

    Relevant Pages

    • Re: [BUG][2.6.8.1] serial driver hangs SMP kernel, but not the UP kernel
      ... > serial driver in the list, and tried to see if their solutions solved ... > a service startup script; the script uses setserial to prepare an unused ... Shouldn't 8250_pci setup the ports already for you? ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Christmas list for the kernel
      ... > An example of this is that the serial driver is hard coded to report ... It does an autodetect sequence to find the ports. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: serial8250_init and platform_device
      ... > have a platform device register in a system for 'legacy ISA' when we ... > know the system doesnt have any ports that will fit the category. ... Russell King ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] serial: Add spin_lock_init() in 8250 early_serial_setup() to init port.lock
      ... > All 8250 serial port.locks are now initialised but no ports have> been registered at this point. ... This initialisation is actually pointless here. ... Use a platform device instead. ... To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • Re: Problem with PPPD on dialup with 2.6.11-bk1 and later; 2.6.11 is OK
      ... I also found that reverting that patch made the problem go away for 2.6.11-bk1. ... The bookmarkable link for this changeset is here: ... >Some checkin since 2.6.11 has caused the serial driver to ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)