struct flexcan_regs __iomem *regs = priv->base;
u32 reg;
- /* Disable all interrupts */
- flexcan_write(0, ®s->imask1);
-
/* Disable + halt module */
reg = flexcan_read(®s->mcr);
reg |= FLEXCAN_MCR_MDIS | FLEXCAN_MCR_HALT;
flexcan_write(reg, ®s->mcr);
+ /* Disable all interrupts */
+ flexcan_write(0, ®s->imask1);
+ flexcan_write(priv->reg_ctrl_default & ~FLEXCAN_CTRL_ERR_ALL,
+ ®s->ctrl);
+
if (priv->reg_xceiver)
regulator_disable(priv->reg_xceiver);
priv->can.state = CAN_STATE_STOPPED;