]> git.baikalelectronics.ru Git - kernel.git/commit
clk: rockchip: only enter pll slow-mode directly before reboots on rk3288
authorHeiko Stuebner <heiko@sntech.de>
Fri, 18 Dec 2015 16:51:55 +0000 (17:51 +0100)
committerHeiko Stuebner <heiko@sntech.de>
Mon, 21 Dec 2015 01:01:19 +0000 (02:01 +0100)
commit999f57f509dfb9fa18809fdddbd5f3be72c61cba
treecc1a03e1a6db0fc471f9581a03625d1cc69cf0c8
parent76c78406825e4966d00fbb748d9722dfa02be6e6
clk: rockchip: only enter pll slow-mode directly before reboots on rk3288

As commit d4dcac5651fb ("clk: rockchip: switch PLLs to slow mode before
reboot for rk3288") states, switching the PLLs to slow-mode is only
necessary when rebooting using the soft-reset done through the CRU.

The dwc2 controllers used create really big number of interrupts in
special constellations involving usb-hubs and their number is so high,
it can even overwhelm the interrupt handler if the cpu-speed os to low.

Right now the PLLs are put into slow-mode in a shutdown syscore_ops
callback which means it happens on all reboots (not only the soft-reset
ones) and even on poweroff actions.

This can result in the system not powering off and getting stuck instead,
so we should move the slow-mode change nearer to the actual reboot action.

For this we introduce the possiblity to also set a callback that gets
called from the restart-handler directly prior to restarting the system
and move the shutdown-callback to this new option.

With this the slow-mode switch is done only on the necessary reboots
and also has a smaller possibility of causing artifacts.

Fixes: d4dcac5651fb ("clk: rockchip: switch PLLs to slow mode before reboot for rk3288")
Signed-off-by: Heiko Stuebner <heiko.stuebner@collabora.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
drivers/clk/rockchip/clk-rk3036.c
drivers/clk/rockchip/clk-rk3188.c
drivers/clk/rockchip/clk-rk3228.c
drivers/clk/rockchip/clk-rk3288.c
drivers/clk/rockchip/clk-rk3368.c
drivers/clk/rockchip/clk.c
drivers/clk/rockchip/clk.h