diff options
author | Heiko Stuebner <heiko@sntech.de> | 2015-12-18 17:51:55 +0100 |
---|---|---|
committer | Heiko Stuebner <heiko@sntech.de> | 2015-12-21 02:01:19 +0100 |
commit | dfff24bde7fb8d57482e907d5dfb0be3a9e28119 (patch) | |
tree | cc1a03e1a6db0fc471f9581a03625d1cc69cf0c8 /drivers/clk/rockchip/clk-rk3288.c | |
parent | 2abc02fc494fa4c920a08a1d0beecabafbcb2104 (diff) | |
download | linux-stable-dfff24bde7fb8d57482e907d5dfb0be3a9e28119.tar.gz linux-stable-dfff24bde7fb8d57482e907d5dfb0be3a9e28119.tar.bz2 linux-stable-dfff24bde7fb8d57482e907d5dfb0be3a9e28119.zip |
clk: rockchip: only enter pll slow-mode directly before reboots on rk3288
As commit 1d33929e2a2b ("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: 1d33929e2a2b ("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>
Diffstat (limited to 'drivers/clk/rockchip/clk-rk3288.c')
-rw-r--r-- | drivers/clk/rockchip/clk-rk3288.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clk/rockchip/clk-rk3288.c b/drivers/clk/rockchip/clk-rk3288.c index 66d954e20cbf..11b40fbc4a53 100644 --- a/drivers/clk/rockchip/clk-rk3288.c +++ b/drivers/clk/rockchip/clk-rk3288.c @@ -848,7 +848,6 @@ static void rk3288_clk_shutdown(void) static struct syscore_ops rk3288_clk_syscore_ops = { .suspend = rk3288_clk_suspend, .resume = rk3288_clk_resume, - .shutdown = rk3288_clk_shutdown, }; static void __init rk3288_clk_init(struct device_node *np) @@ -906,7 +905,8 @@ static void __init rk3288_clk_init(struct device_node *np) rk3288_cru_base + RK3288_SOFTRST_CON(0), ROCKCHIP_SOFTRST_HIWORD_MASK); - rockchip_register_restart_notifier(RK3288_GLB_SRST_FST); + rockchip_register_restart_notifier(RK3288_GLB_SRST_FST, + rk3288_clk_shutdown); register_syscore_ops(&rk3288_clk_syscore_ops); } CLK_OF_DECLARE(rk3288_cru, "rockchip,rk3288-cru", rk3288_clk_init); |