Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a7380db5 authored by Roger Quadros's avatar Roger Quadros Committed by Marc Kleine-Budde
Browse files

can: c_can_platform: fix parameters of c_can_hw_raminit_ti()



Pass the correct 'mask' and 'value' bits to c_can_hw_raminit_wait_ti(). They
seem to have been swapped in the usage instances.

Reported-by: default avatarJay Schroeder <jay.schroeder@garmin.com>
Signed-off-by: default avatarRoger Quadros <rogerq@ti.com>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 6a38792c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -97,14 +97,14 @@ static void c_can_hw_raminit_ti(const struct c_can_priv *priv, bool enable)
	ctrl |= CAN_RAMINIT_DONE_MASK(priv->instance);
	writel(ctrl, priv->raminit_ctrlreg);
	ctrl &= ~CAN_RAMINIT_DONE_MASK(priv->instance);
	c_can_hw_raminit_wait_ti(priv, ctrl, mask);
	c_can_hw_raminit_wait_ti(priv, mask, ctrl);

	if (enable) {
		/* Set start bit and wait for the done bit. */
		ctrl |= CAN_RAMINIT_START_MASK(priv->instance);
		writel(ctrl, priv->raminit_ctrlreg);
		ctrl |= CAN_RAMINIT_DONE_MASK(priv->instance);
		c_can_hw_raminit_wait_ti(priv, ctrl, mask);
		c_can_hw_raminit_wait_ti(priv, mask, ctrl);
	}
	spin_unlock(&raminit_lock);
}