diff options
author | Geert Uytterhoeven | 2017-06-07 13:20:06 +0200 |
---|---|---|
committer | Geert Uytterhoeven | 2017-10-20 11:15:29 +0200 |
commit | 560869100b99a3daea329efce738a3b7ae357be8 (patch) | |
tree | 68cf1b8145d8646a1c5127d835e79e90ce9c7b77 /drivers/char | |
parent | MAINTAINERS: Add git repository to Renesas clock driver section (diff) | |
download | kernel-qcow2-linux-560869100b99a3daea329efce738a3b7ae357be8.tar.gz kernel-qcow2-linux-560869100b99a3daea329efce738a3b7ae357be8.tar.xz kernel-qcow2-linux-560869100b99a3daea329efce738a3b7ae357be8.zip |
clk: renesas: cpg-mssr: Restore module clocks during resume
During PSCI system suspend, R-Car Gen3 SoCs are powered down, and their
clock register state is lost. Note that as the boot loader skips most
initialization after system resume, clock register state differs from
the state encountered during normal system boot, too.
Hence after s2ram, some operations may fail because module clocks are
disabled, while drivers expect them to be still enabled. E.g. EtherAVB
fails when Wake-on-LAN has been enabled using "ethtool -s eth0 wol g":
ravb e6800000.ethernet eth0: failed to switch device to config mode
ravb e6800000.ethernet eth0: device will be stopped after h/w processes are done.
ravb e6800000.ethernet eth0: failed to switch device to config
PM: Device e6800000.ethernet failed to resume: error -110
In addition, some module clocks that were disabled by
clk_disable_unused() may have been re-enabled, wasting power.
To fix this, restore all bits of the SMSTPCR registers that represent
clocks under control of Linux.
Notes:
- While this fixes EtherAVB operation after resume from s2ram,
EtherAVB cannot be used as an actual wake-up source from s2ram, only
from s2idle, due to PSCI limitations,
- To avoid overhead on platforms not needing it, the suspend/resume
code has a build time dependency on sleep and PSCI support, and a
runtime dependency on PSCI.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Diffstat (limited to 'drivers/char')
0 files changed, 0 insertions, 0 deletions