Re: [PATCH] of: support passing console options with stdout-path

From: Leif Lindholm
Date: Tue Nov 25 2014 - 09:35:19 EST


On Tue, Nov 25, 2014 at 12:07:29PM +0000, Ian Campbell wrote:
> My concern is that this is Linux specific, other OSes may have different
> ideas about how stdout options should be formatted within this property.
> (At least I don't know of any standardisation of the 115200n8 thing --
> I'd love to be corrected!)
>
> If I were a firmware author I'd be wary of specifying a stdout-path with
> a Linux specific suffix.

> Search ePAPR for baud it seems that the generic serial binding includes
> a current-speed property in 6.2.1.2. It then goes on a bit ambiguously
> to talk about the NS16550 in 6.2.2 but I think 6.2.1.2 was intended to
> be generic. No mention of stop-bits/parity etc though, they are assumed
> to be set already I think
>
> One thought I had was to define a dt-stdout "pseudo-console" so that
> console=dt-stdout,115200n8 or something could be used.

I'll wait for others to comment on the above.

> Anyway I applied your patch to v3.18-rc5 and ran it on a Mustang and it
> didn't work for some reason. I'm using:
>
> fdt set /chosen stdout-path "/soc/serial@1c020000:115200"
> setenv bootargs "earlycon=uart8250,mmio32,0x1c020000 root=/dev/sda3 rw debug"
>
> So I get earlycon but then no proper console. Removing earlycon just
> makes that stop working.

Right, so having debugged this a bit offline, I'm amazed I booted
anything at all, given how badly I broke path scanning...
Please ignore previous version - a fixed one follows:

/
Leif