[PATCH] PowerPC: Fix find_legacy_serial_ports on OPB.

Josh Boyer jwboyer at linux.vnet.ibm.com
Fri Oct 12 21:49:59 EST 2007


On Fri, 2007-10-12 at 12:31 +1000, David Gibson wrote:
> On Thu, Oct 11, 2007 at 01:31:53PM -0500, Josh Boyer wrote:
> > On Thu, 2007-10-11 at 21:26 +0400, Valentine Barshak wrote:
> > > Josh Boyer wrote:
> > > > On Thu, 2007-10-11 at 17:50 +0200, Arnd Bergmann wrote:
> > > >> On Thursday 11 October 2007, Valentine Barshak wrote:
> > > >>> Currently find_legacy_serial_ports() can find no serial ports on the OPB.
> > > >>> Thus no legacy boot console can be initialized. Just the early udbg console
> > > >>> works, which is initialized with udbg_init_44x_as1() on the UART's physical
> > > >>> address specified in kernel config. This happens because we look for ns16750
> > > >>> and higher serial devices only and expect opb node to have a device type
> > > >>> property. This patch makes it look for ns16550 compatible devices and use
> > > >>> of_device_is_compatible() for opb instead of checking device type.
> > > >>> Lack of legacy serial ports found causes problems for KGDB over serial.
> > > >>>
> > > >>> Signed-off-by: Valentine Barshak <vbarshak at ru.mvista.com>
> > > >> The patch would make sense if we were only dealing with flattened device
> > > >> tree systems at this point. Unfortunately, IBM is shipping hardware that
> > > >> encodes the serial port in exactly the way that find_legacy_serial_ports
> > > >> is looking for (parent->type == "opb", compatible = "ns16750" "ns16550"
> > > >> "ns16450" i8250").
> > > >>
> > > >> Changing the search for ns16750 to ns16550 should be fine, but unnecessary
> > > >> because AFAIK, all OPB serial imlpementations are actually ns16750 and
> > > >> should have that in the device tree as well.
> > > >>
> > > >> For the device type of the bus, please check for both compatible and
> > > >> type, so that it still works on machines that are missing the compatible
> > > >> property.
> > > > 
> > > > Wait, no.  We already had this discussion months ago when David was
> > > > working on the original Ebony port.  It was declared that legacy_serial
> > > > is not how serial should be done on 4xx and the serial_of driver was
> > > > supposed to be used instead.
> > > > 
> > > > Have we changed our stance on that?  If not, then perhaps KGDB should be
> > > > fixed to work with serial_of.
> > > 
> > > Actually I don't see any reason not to use legacy_serial stuff for early 
> > > console. We could split the kernel configured very early debug output, 
> > > which uses  PPC_EARLY_DEBUG_44x_PHYSLOW/PHYSHIGH (since it's really 
> > > dangerous) and early console things by using legacy serial. We could use 
> > >   early boot console without PPC_EARLY_DEBUG_44x.
> > 
> > That was exactly my thinking when this first came up.  I'd like to hear
> > David's opinion on it.
> 
> Yeah, I think I misinterpreted BenH way back when.  This looks ok, and
> means serial will be initialized earlier than of_serial, which would
> be nice.

Great.  It seems Paul pulled it into his tree already as well, which
suits me just fine.

josh




More information about the Linuxppc-dev mailing list