linux/drivers/clk/rockchip
Douglas Anderson 60aadea57e clk: rockchip: Set "ignore unused" for PMU M0 clocks on rk3399
The PMU Cortex M0 on rk3399 is intended to be used for things like
DDRFreq transitions, suspend/resume, and other things that are the
purview of ARM Trusted Firmware and not the kernel.  As such, the
kernel shouldn't be messing with the clocks.  Add CLK_IGNORE_UNUSED to
these clocks.

Without this change, the following was observed on a Chromebook with a
rk3399 (using not-yet-upstream ARM Trusted Firmware code and
not-yet-upstream kernel code based on kernel-4.4):

1. We init the clock framework.

2. We start up "DDRFreq", which causes ATF to occasionally fire up the
   M0 for transitions.  Each time ATF fires up the M0 it will turn on
   these clocks and each time it is done it will turn them off.

3. We finally get to the the part of the kernel that calls
   clk_disable_unused() and we disables the clocks.

You can see the race above.  Basically everything is fine as long as
ARM Trusted Firmware isn't starting up the M0 at exactly the same time
that the kernel is disabling unused clocks.  ...but if the race
happens then we go boom.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-03-06 04:45:45 +01:00
..
clk-cpu.c clk: rockchip: validity should be checked prior to cpu clock rate change 2016-11-14 12:20:53 +01:00
clk-ddr.c clk: rockchip: don't return NULL when failing to register ddrclk branch 2016-10-16 02:39:58 +02:00
clk-inverter.c clk: rockchip: don't return NULL when registering inverter fails 2016-02-15 23:35:20 +01:00
clk-mmc-phase.c clk: rockchip: Revert "clk: rockchip: reset init state before mmc card initialization" 2016-05-30 09:40:23 +02:00
clk-muxgrf.c clk: rockchip: add a clock-type for muxes based in the grf 2017-01-02 14:24:57 +01:00
clk-pll.c clk: rockchip: add new pll-type for rk3328 2017-01-02 14:24:57 +01:00
clk-rk1108.c clk: rockchip: add clock controller for rk1108 2016-11-16 12:37:37 +01:00
clk-rk3036.c clk: rockchip: release io resource when failing to init clk 2016-03-27 13:03:35 +02:00
clk-rk3188.c clk: rockchip: use clock ids for memory controller parts on rk3066/rk3188 2017-01-13 17:32:55 +01:00
clk-rk3228.c clk: rockchip: export rk3228 MAC clocks 2016-07-01 01:50:11 +02:00
clk-rk3288.c clk: rockchip: rk3288: make all niu clocks critical 2017-01-23 00:58:45 +01:00
clk-rk3328.c clk: rockchip: add clock controller for rk3328 2017-01-05 13:36:07 +01:00
clk-rk3368.c clk: rockchip: release io resource when failing to init clk 2016-03-27 13:03:35 +02:00
clk-rk3399.c clk: rockchip: Set "ignore unused" for PMU M0 clocks on rk3399 2017-03-06 04:45:45 +01:00
clk-rockchip.c clk: rockchip: handle of_iomap failures in legacy clock driver 2016-08-23 18:00:25 +02:00
clk.c clk: rockchip: Remove useless init of "grf" to -EPROBE_DEFER 2017-01-06 18:08:16 +01:00
clk.h clk: rockchip: add clock controller for rk3328 2017-01-05 13:36:07 +01:00
Makefile clk: rockchip: add clock controller for rk3328 2017-01-05 13:36:07 +01:00
softrst.c clk: rockchip: Make reset_control_ops const 2016-03-29 16:29:46 -07:00