[U-Boot] [PATCH] ns16550: allow UART address to be set dynamically
Simon Glass
sjg at chromium.org
Tue Dec 18 20:15:03 CET 2012
Hi Stephen,
On Tue, Dec 18, 2012 at 8:37 AM, Stephen Warren <swarren at wwwdotorg.org>wrote:
> On 12/17/2012 11:39 PM, Wolfgang Denk wrote:
> > Dear Stephen,
> >
> > In message <50CFA394.40901 at wwwdotorg.org> you wrote:
> >>
> >>> Yes, there are. But your console port cannot be compred against
> >>> dynamically populated and scannable bus interfaces like USB or PCI,
> >>> and I think you are aware of that.
> >>
> >> I honestly don't know why you couldn't have a PCI-based console UART.
> >
> > This is actually another question.
> >
> > You cannot compare a statically configured UART port (where all
> > configuration information you need is the index into the table of
> > possible UARTs)
>
> That's not the only piece of information that is required. At least on
> Tegra (and I imagine on most SoCs with a pinmux) you need to fully
> describe the UART-related pinmux programming, so that the UART signals
> actually get routed out of the SoC.
>
Is that information in the ODM data also? I thought ODM data was just a
32-bit word with a UART number in it. It seemed equivalent to the console
alias to me.
>
> > to a dynamic bus scan where you cannot know in advance
> > whether you detect any devices at all, or how many, or which types.
>
> A board could have a PCI UART soldered onto the board, and hence be
> physically static and known ahead of time, yet still require (at least
> part of) the PCI bus to be correctly probed and programmed.
> > It seems Simon, Tom and me mostly agree on what to do.
>
> To be honest, that's not remotely the impression I get.
>
>
Well anyway, to your problem, we did in fact have the Chromium tree working
with an FDT. This is available very early (before console_init_f()) so it
was no trouble to get the information from there. Two of the devices we
booting on had different console UARTs, and we just changed the alias
property to deal with that: serial = "/serial at xxx", or serial = "/serial at yyy".
We didn't use ODM data to select the console (perhaps because we didn't
know about this feature).
I believe with Tegra the ODM data is more useful, so there is an overlap
between some of the fields in ODM data (and perhaps BCT) and FDT. That's
why I suggested something like a setting in the FDT to say that the console
UART number comes from ODM data. I'm not sure how to specify that with an
alias.
Regards,
Simon
More information about the U-Boot
mailing list