]> asedeno.scripts.mit.edu Git - linux.git/commit
soc: renesas: rcar-sysc: Fix power domain control after system resume
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 5 Dec 2018 15:39:45 +0000 (16:39 +0100)
committerSimon Horman <horms+renesas@verge.net.au>
Thu, 6 Dec 2018 20:10:10 +0000 (12:10 -0800)
commit7fc4650cc2417d7a2907a000f6f88240baa42018
tree3ecc27df5c1cc69c3fd7679429ca7f7b2946f258
parent1585124d9563da64f481dc0e7c568c344002bc13
soc: renesas: rcar-sysc: Fix power domain control after system resume

To control power to a power domain, the System Controller (SYSC) needs
the corresponding interrupt source to be enabled, but masked, to prevent
the CPU from receiving it.

Currently this is handled in the driver's probe() routine, and set up
for every domain present, even if it will not be controlled directly by
SYSC (CPU domains are powered through the APMU on R-Car Gen2 and later).

On R-Car Gen3, PSCI powers down the SoC during system suspend, thus
losing any configured interrupt state.  Hence after system resume, power
domains not controlled through the APMU (e.g. A3IR, A3VC, A3VP) fail to
power up.

Fix this by replacing the global interrupt setup in the probe() routine
by a domain-specific interrupt setup in rcar_sysc_power(), where the
domain's power is actually controlled.  This brings the code more in
line with the flowchart in the Hardware User's Manual.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
drivers/soc/renesas/rcar-sysc.c