OSDN Git Service

clk: renesas: cpg-mssr: Fix STBCR suspend/resume handling
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 7 May 2020 07:47:13 +0000 (09:47 +0200)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 18 May 2020 09:06:33 +0000 (11:06 +0200)
commitace342097768e35fd41934285604fa97da1e235a
tree91c9fa6c3fed34fc3d5b1ef3f4d09e85f18731f5
parente2f022c10ed3b50ba1d2bb1f037b0e7a84cb1c3e
clk: renesas: cpg-mssr: Fix STBCR suspend/resume handling

On SoCs with Standby Control Registers (STBCRs) instead of Module Stop
Control Registers (MSTPCRs), the suspend handler saves the wrong
registers, and the resume handler prints the wrong register in an error
message.

Fortunately this cannot happen yet, as the suspend/resume code is used
on PSCI systems only, and systems with STBCRs (RZ/A1 and RZ/A2) do not
use PSCI.  Still, it is better to fix this, to avoid this becoming a
problem in the future.

Distinguish between STBCRs and MSTPCRs where needed.  Replace the
useless printing of the virtual register address in the resume error
message by printing the register index.

Fixes: fde35c9c7db5732c ("clk: renesas: cpg-mssr: Add R7S9210 support")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20200507074713.30113-1-geert+renesas@glider.be
drivers/clk/renesas/renesas-cpg-mssr.c