[U-Boot] [PATCH] tegra: Specify debugging serial port at boot.

Simon Glass sjg at chromium.org
Wed Mar 21 00:33:43 CET 2012


Hi Graeme,

On Tue, Mar 20, 2012 at 4:28 PM, Graeme Russ <graeme.russ at gmail.com> wrote:
> Hi Stephen, Simon,
>
> On Wed, Mar 21, 2012 at 8:17 AM, Stephen Warren <swarren at wwwdotorg.org> wrote:
>> On 03/20/2012 02:13 PM, Simon Glass wrote:
>>> Hi Stephen,
>>>
>>> On Tue, Mar 20, 2012 at 12:57 PM, Stephen Warren <swarren at wwwdotorg.org> wrote:
>>>> This works together with a kernel change that looks at the scratchpad
>>>> register to determine which of the many UARTs it should use for early
>>>> printing:
>>>>
>>>> http://www.spinics.net/lists/arm-kernel/msg154633.html
>>>>
>>>> Note that this configuration only affects the kernel's decompressor and
>>>> earlyprintk code. Once the kernel is initialized far enough to parse the
>>>> device tree, the console is initialized using information contained
>>>> therein.
>>>>
>>>> Base on work by Doug Anderson <dianders at chromium.org>, but significantly
>>>> rewritten.
>>>>
>>>> Signed-off-by: Stephen Warren <swarren at wwwdotorg.org>
>
>>
>>> For the pre-console panic stuff, the point is that there may well be
>>> one UART used for the console, but *we don't know which one it is!*.
>>
>> That's where we disagree.
>>
>> For each board, there is a single fixed UART that should be used for
>> both pre-console panic and the "real" console later. This is fixed by
>> the single static board design.
>
> I agree - The board designer should specify a 'default' debug port which
> is used for all character output prior to the 'configured' console port
> being initialised.

We can provide that, but if it is wrong for the board we are using,
then there will be no output. Stephen's original complaint was a brick
if there is no valid device tree. We need this to work!

>
> In the 'normal' boot case, the default console should never have any output
> sent to it (unless it also happens to be the 'configured' console port) as
> Both U-Boot and Linux will use a pre console buffer to buffer any output
> prior to the 'configured' console being available
>
> So I think there is a clear evidence that the 'Board panic no console'
> and 'Specify debugging serial port at boot' are intrinsicly related - Both
> U-Boot and Linux should be dumping their 'pre-console' messages to the
> same port and this port should be specified by the hardware designer
>
> So that being the case, there should be a single CONFIG_ option which
> both patches should be using

We cannot select the UART via CONFIG - remember that all of these
boards have the same U-Boot binary. Please read that again :-) The
device tree is the only thing that distinguishes them. All of the
CONFIG options are identical for all boards.

If I had time right now I would send out a proper serial fdt patch
series - the previous one was just a WIP. But you can see it here:

https://gerrit.chromium.org/gerrit/#change,18257

>
> Just my 2% of $1.00 ;)
>
> Regards,
>
> Graeme

Regards,
Simon


More information about the U-Boot mailing list