cpufreq: rockchip: limit frequency when reboot
authorFinley Xiao <finley.xiao@rock-chips.com>
Tue, 16 May 2017 09:00:04 +0000 (17:00 +0800)
committerFinley Xiao <finley.xiao@rock-chips.com>
Thu, 18 May 2017 01:22:27 +0000 (09:22 +0800)
commit43310d2ddec79da73c313937e304b1e784c184a2
tree48c6a636b9ce9f1d520ef2a30dbb605f3920f21e
parentcdcf4ffeabb8a372ed40e9303d9f6b0229706f0f
cpufreq: rockchip: limit frequency when reboot

If i2c driver adds a shutdown callback function, the callback will be
executed before cpu's shutdown callback when reboot system, it will
fail to scale voltage like the following.
rk3x-i2c ff650000.i2c: Access denied - device already shutdown
rk3x-i2c ff650000.i2c: Access denied - device already shutdown
rk3x-i2c ff650000.i2c: Access denied - device already shutdown
rk3x-i2c ff650000.i2c: Access denied - device already shutdown
cpu cpu4: _set_opp_voltage: failed to set voltage
(950000 950000 1350000 mV):-5

So add a reboot notifier to limit frequency before i2c's shutdown callback,
and the cpu's shutdown callback will do nothing.

Change-Id: Ic5bb21b511c6f799dc62fd9db237d90522b7d4ee
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
drivers/cpufreq/rockchip-cpufreq.c