]> git.ipfire.org Git - people/ms/u-boot.git/commit - drivers/clk/rockchip/clk_rk3368.c
rockchip: clk: rk3368: do not change CPLL/GPLL before returning to BROM
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Thu, 22 Jun 2017 21:53:44 +0000 (23:53 +0200)
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Sun, 13 Aug 2017 15:12:32 +0000 (17:12 +0200)
commit4bebf94e8544399d040e0dc46d7ec72d64853237
tree0685aeabf6c3c141279b3f96e32c46c45ab55904
parentbee61801264988d4250e8536bf62336621d2e9fb
rockchip: clk: rk3368: do not change CPLL/GPLL before returning to BROM

The RK3368 has a somewhat temperamental BootROM (which I learned the
hard way) when it comes to reconfiguring the CPLL and GPLL (in fact,
experiments show that changing the GPLL broke things for me, while
changing the CPLL seems to be more benign).  These should not be
modified by the SPL stage, if we intend to return to the BootROM for
chain booting the next stage.

This commit changes the clock initialisation to not change CPLL/GPLL
before returning to the BootROM (i.e. in TPL).  As it's safe to change
these settings if we no longer intend to return to U-Boot, we'll run
the full PLL setup a little later (i.e. in SPL).

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/clk/rockchip/clk_rk3368.c