[U-Boot-Users] [PATCH] cpu/mpc8260/: ported new fdt code from cpu/mpc83xx/

Nikita V. Youshchenko yoush at cs.msu.su
Mon Mar 17 09:14:04 CET 2008


> In message <200802251819.19633 at blacky.localdomain> you wrote:
> > --- a/cpu/mpc8260/Makefile
> > +++ b/cpu/mpc8260/Makefile
> > @@ -28,7 +28,7 @@ LIB	= $(obj)lib$(CPU).a
> >  START	= start.o kgdb.o
> >  COBJS	= traps.o serial_smc.o serial_scc.o cpu.o cpu_init.o speed.o \
> >  	  interrupts.o ether_scc.o ether_fcc.o i2c.o commproc.o \
> > -	  bedbug_603e.o pci.o spi.o
> > +	  bedbug_603e.o pci.o spi.o fdt.o
>
> Maybe we could try and keep (or rather make, s far as possible) lists
> sorted.

Shouldn't list sorting go into separate patch?

> > diff --git a/cpu/mpc8260/fdt.c b/cpu/mpc8260/fdt.c
>
> ...
>
> > +	do_fixup_by_compat_u32(blob, "fsl,cpm2-smc-uart",
> > +		"current-speed", bd->bi_baudrate, 1);
> > +	do_fixup_by_compat_u32(blob, "fsl,cpm2-scc-uart",
> > +		"current-speed", bd->bi_baudrate, 1);
>
> I think it is wrong to set both the SMC and the SCC "current-speed" to
> the console baudrate. Only one port can be the current console, and
> only for this one the value is correct.
>
> Actually I wonder how this is supposed to work at all, as there are
> two SMC and 4 SCC which all could be used as UART ports.
>
> Isn't this calling for trouble?

I don't know.
The board I currently work with has a single serial port, wired to SMC1, 
and SCCs are not used there.
I don't have access to other hardware now to test.

Looks like 'current speed' is used only by kernel serial driver, and only 
to set default speed for console. Before openning any other serial port, 
user should set up speed anyway. And if SCC is used not for serial, then 
having 'current-speed' property on it is a no-op.
So I thought the setting current-speed property for all SMCs and SCCs is 
harmless.

Btw, current 83xx code does set 'current-speed' for all SCCs, by calling 
do_fixup_by_compat_u32(..., "fsl,cpm2-scc-uart", ...). So the only thing I 
added is the same for SMCs, because board I work with has console on SMC.

Is it better to call do_fixup_by_compat_u32() only for SCCs or SMCs based 
on CONFIG_CONS_ON_SCC / CONFIG_CONS_ON_SMC ?

Or to set only for single node, where the console actually is? But then 
probably same should be done for mpc83xx and other cpus?

Nikita




More information about the U-Boot mailing list