[PATCH] Fix 8250 probe on ppc32

Kumar Gala galak at kernel.crashing.org
Thu Nov 17 02:24:51 EST 2005


On Nov 16, 2005, at 4:25 AM, David Woodhouse wrote:

> On Wed, 2005-11-16 at 20:12 +1100, Paul Mackerras wrote:
>> Yes, it works on newworld (at least it does on my G4 powerbook).  It
>> should work on 32-bit CHRP with any luck, but for oldworld we'll have
>> to generate a COFF file.
>
> I'll try it on Pegasos some time tonight or tomorrow. AFAICT I'm going
> to need the patch which started this thread, if I want any serial  
> ports
> on my Pegasos. The newly-created asm-powerpc/serial.h file is  
> devoid of
> serial port definitions.
>
> Here it is again, with Tom's three criticisms addressed, deliberately
> ignored, and addressed. In that order.
>
> It no longer touches asm-ppc/serial.h, so doesn't break the legacy
> zImage.
>
> ---
> [PATCH] Fix 8250 probe on ppc32
>
> There are no serial ports defined in the new asm-powerpc/serial.h, and
> rightly so. The 64-bit setup code has a routine to look in the device
> tree for them and register a platform_device for any we find there;  
> this
> patch steals that routine and makes it available on 32-bit machines
> too...
>
> Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
>

[snip]

> --- linux-2.6.13/drivers/serial/Kconfig.sof	2005-10-20  
> 12:54:48.000000000 +0100
> +++ linux-2.6.13/drivers/serial/Kconfig	2005-10-20  
> 13:05:39.000000000 +0100
> @@ -77,6 +77,11 @@ config SERIAL_8250_CS
>
>  	  If unsure, say N.
>
> +config SERIAL_8250_OF
> +       bool
> +       default y
> +       depends on PPC_OF && SERIAL_8250 && PPC_MERGE
> +
>  config SERIAL_8250_ACPI
>  	bool "8250/16550 device discovery via ACPI namespace"
>  	default y if IA64

[snip]

Should this really depend on PPC_OF?  Does it require true  
OpenFirmware or just a flat dev tree to work?

I ask because I'd like to extended this in the future to handle 8250  
serial ports that aren't on a PCI or ISA bus, but on SoCs like 83xx,  
85xx, 86xx, 4xx?  These will most likely not be running with true OF  
but I've got a flat dev tree working today.

The following is what I've been toying with for an description of the  
8250 node (in .dts format):

                 serial at 4500 {
                         device_type = "serial";
                         compatible = "ns16550";
                         reg = <4500 100>;
                         clock-frequency = <0>;
                         interrupts = <1a 3>;
                         interrupt-parent = <40000>;
                 };


- kumar




More information about the Linuxppc-dev mailing list