[U-Boot] [PATCH v7 5/9] arm: serial: Add ability to use pre-initialized UARTs

Sergei Temerkhanov s.temerkhanov at gmail.com
Sat Oct 24 00:51:53 CEST 2015


On Mon, Oct 19, 2015 at 1:14 PM, Rob Herring <robherring2 at gmail.com> wrote:
> On Wed, Oct 14, 2015 at 11:55 AM, Sergey Temerkhanov
> <s.temerkhanov at gmail.com> wrote:
>> On some systems, UART initialization is performed before running U-Boot.
>> This commit allows to skip UART re-initializaion on those systems
>>
>> Signed-off-by: Sergey Temerkhanov <s.temerkhanov at gmail.com>
>> Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla at cavium.com>
>>
>> Reviewed-by: Simon Glass <sjg at chromium.org>
>
> I'll comment on this now that I'm here, but as the rest of the thread
> said, please send to DT list.
>
>> diff --git a/doc/device-tree-bindings/serial/pl01x.txt b/doc/device-tree-bindings/serial/pl01x.txt
>> index 61c27d1..0591497 100644
>> --- a/doc/device-tree-bindings/serial/pl01x.txt
>> +++ b/doc/device-tree-bindings/serial/pl01x.txt
>> @@ -5,3 +5,6 @@ Required properties:
>>  - reg: exactly one register range with length 0x1000
>>  - clock: input clock frequency for the UART (used to calculate the baud
>>    rate divisor)
>> +
>> +Optional properties:
>> +- u-boot,skip-init: skip UART initialization at start.
>
> What are you trying to accomplish by skipping?
>
> stdout-path can take options now, so what about making it an option there:
>
> stdout-path = &serial0:no-init

It's not about a single UART but all UARTs present in the platform. Some of them
might have different reference clocks/PLL settings/whatever which can be tricky
to support with FDT editing/rebuilding/etc. Especially if those
reference clocks can be
reprogrammed between runs.

>
> I have similar concerns with this as I did with the early init flag.
> This requires the dtb and u-boot to be in sync. For example, you have
> this option in the dtb, but then you add clock initialization to your
> platform which changes the default clock frequency of the UART. Now if
> you boot with an older dtb and new u-boot, then it will break because
> the UART is at the wrong baudrate.

It's not a problem at all since the U-Boot image with an attached DTB is being
used. And that DTB comes from the U-Boot source tree.

>
> Rob


More information about the U-Boot mailing list