[U-Boot] [PATCH 1/1] rpi: set serial port clock to 48 MHz
Stephen Warren
swarren at wwwdotorg.org
Wed Nov 30 05:05:32 CET 2016
On 11/27/2016 11:05 PM, Mirza Krak wrote:
> From: Mirza Krak <mirza.krak at gmail.com>
>
> Recently the default UART clock rate has been changed to 48 MHz on all
> pi`s in the firmware files, which broke UART support in u-boot.
>
> Align configuration to boot firmware.
> diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
> @@ -37,7 +37,7 @@ static const struct pl01x_serial_platdata serial_platdata = {
> .base = 0x20201000,
> #endif
> .type = TYPE_PL011,
> - .clock = 3000000,
> + .clock = 48000000,
I'm not sure this is the best fix, since it will prevent the latest
U-Boot from working with the FW before the change.
Better would be:
a) Revert the change in the FW, since it violates the contract that
previously existed between FW and OS, and will likely break UART usage
on (almost?) all SW.
b) Detect the correct clock rate at run-time rather than hard-coding it.
b1) Perhaps the rate is available in the DT passed by the FW, which
following http://patchwork.ozlabs.org/patch/690769/ "rpi: save firmware
provided boot param for later use" should now be available within U-Boot
to parse.
b2) Perhaps query the rate from the FW via the mailbox API; see
https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interface
More information about the U-Boot
mailing list