rockchip: rk3399: Init clocks in U-Boot proper if SPL was not run
authorAlper Nebi Yasak <alpernebiyasak@gmail.com>
Tue, 27 Oct 2020 21:15:10 +0000 (00:15 +0300)
committerKever Yang <kever.yang@rock-chips.com>
Fri, 13 Nov 2020 10:15:08 +0000 (18:15 +0800)
commiteb89025013a6d4b1d9cf307e5a2a087196ee9f02
treee2ceb5171d81f6f2342a678d1ef30b13d9f1755d
parent832bfad7451e2e7bd23c96edff2be050905ac3f6
rockchip: rk3399: Init clocks in U-Boot proper if SPL was not run

It's possible to chainload U-Boot proper from the vendor firmware in
rk3399 chromebooks, but the way the vendor firmware sets up clocks is
somehow different than what U-Boot expects. This causes the display to
stay devoid of content even though vidconsole claims to work (with
patches in process of being upstreamed).

This is meant to be a rk3399 version of commit d3cb46aa8c41 ("rockchip:
Init clocks again when chain-loading") which can detect the discrepancy,
but this patch instead checks whether SPL (and therefore the clock init)
was run via the handoff functionality and runs the init if it was not.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang<kever.yang@rock-chips.com>
drivers/clk/rockchip/clk_rk3399.c