Skip to content

Commit 6b782f4

Browse files
geertudavem330
authored andcommitted
Revert "ravb: add workaround for clock when resuming with WoL enabled"
This reverts commit fbf3d03. As of commit 5608691 ("clk: renesas: cpg-mssr: Restore module clocks during resume"), the workaround is no longer needed. Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Niklas Söderlund <[email protected]> Acked-by: Sergei Shtylyov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 30791ac commit 6b782f4

File tree

1 file changed

+2
-25
lines changed

1 file changed

+2
-25
lines changed

drivers/net/ethernet/renesas/ravb_main.c

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2308,32 +2308,9 @@ static int __maybe_unused ravb_resume(struct device *dev)
23082308
struct ravb_private *priv = netdev_priv(ndev);
23092309
int ret = 0;
23102310

2311-
if (priv->wol_enabled) {
2312-
/* Reduce the usecount of the clock to zero and then
2313-
* restore it to its original value. This is done to force
2314-
* the clock to be re-enabled which is a workaround
2315-
* for renesas-cpg-mssr driver which do not enable clocks
2316-
* when resuming from PSCI suspend/resume.
2317-
*
2318-
* Without this workaround the driver fails to communicate
2319-
* with the hardware if WoL was enabled when the system
2320-
* entered PSCI suspend. This is due to that if WoL is enabled
2321-
* we explicitly keep the clock from being turned off when
2322-
* suspending, but in PSCI sleep power is cut so the clock
2323-
* is disabled anyhow, the clock driver is not aware of this
2324-
* so the clock is not turned back on when resuming.
2325-
*
2326-
* TODO: once the renesas-cpg-mssr suspend/resume is working
2327-
* this clock dance should be removed.
2328-
*/
2329-
clk_disable(priv->clk);
2330-
clk_disable(priv->clk);
2331-
clk_enable(priv->clk);
2332-
clk_enable(priv->clk);
2333-
2334-
/* Set reset mode to rearm the WoL logic */
2311+
/* If WoL is enabled set reset mode to rearm the WoL logic */
2312+
if (priv->wol_enabled)
23352313
ravb_write(ndev, CCC_OPC_RESET, CCC);
2336-
}
23372314

23382315
/* All register have been reset to default values.
23392316
* Restore all registers which where setup at probe time and

0 commit comments

Comments
 (0)