Skip to content

Commit 967c5ab

Browse files
geertugregkh
authored andcommitted
can: rcar_can: rcar_can_resume(): fix s2ram with PSCI
[ Upstream commit 5c793af ] On R-Car Gen3 using PSCI, s2ram powers down the SoC. After resume, the CAN interface no longer works, until it is brought down and up again. Fix this by calling rcar_can_start() from the PM resume callback, to fully initialize the controller instead of just restarting it. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://patch.msgid.link/699b2f7fcb60b31b6f976a37f08ce99c5ffccb31.1755165227.git.geert+renesas@glider.be Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent f979a5d commit 967c5ab

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

drivers/net/can/rcar/rcar_can.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,6 @@ static int __maybe_unused rcar_can_resume(struct device *dev)
869869
{
870870
struct net_device *ndev = dev_get_drvdata(dev);
871871
struct rcar_can_priv *priv = netdev_priv(ndev);
872-
u16 ctlr;
873872
int err;
874873

875874
if (!netif_running(ndev))
@@ -881,12 +880,7 @@ static int __maybe_unused rcar_can_resume(struct device *dev)
881880
return err;
882881
}
883882

884-
ctlr = readw(&priv->regs->ctlr);
885-
ctlr &= ~RCAR_CAN_CTLR_SLPM;
886-
writew(ctlr, &priv->regs->ctlr);
887-
ctlr &= ~RCAR_CAN_CTLR_CANM;
888-
writew(ctlr, &priv->regs->ctlr);
889-
priv->can.state = CAN_STATE_ERROR_ACTIVE;
883+
rcar_can_start(ndev);
890884

891885
netif_device_attach(ndev);
892886
netif_start_queue(ndev);

0 commit comments

Comments
 (0)