Commit b5ec9208 authored by Gerhard Bertelsmann's avatar Gerhard Bertelsmann Committed by Thadeu Lima de Souza Cascardo

can: sun4i: fix loopback mode

BugLink: http://bugs.launchpad.net/bugs/1731882

commit 3a379f5b upstream.

Fix loopback mode by setting the right flag and remove presume mode.
Signed-off-by: default avatarGerhard Bertelsmann <info@gerhard-bertelsmann.de>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Signed-off-by: default avatarThadeu Lima de Souza Cascardo <cascardo@canonical.com>
parent 985bd4f5
...@@ -342,7 +342,7 @@ static int sun4i_can_start(struct net_device *dev) ...@@ -342,7 +342,7 @@ static int sun4i_can_start(struct net_device *dev)
/* enter the selected mode */ /* enter the selected mode */
mod_reg_val = readl(priv->base + SUN4I_REG_MSEL_ADDR); mod_reg_val = readl(priv->base + SUN4I_REG_MSEL_ADDR);
if (priv->can.ctrlmode & CAN_CTRLMODE_PRESUME_ACK) if (priv->can.ctrlmode & CAN_CTRLMODE_LOOPBACK)
mod_reg_val |= SUN4I_MSEL_LOOPBACK_MODE; mod_reg_val |= SUN4I_MSEL_LOOPBACK_MODE;
else if (priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY) else if (priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY)
mod_reg_val |= SUN4I_MSEL_LISTEN_ONLY_MODE; mod_reg_val |= SUN4I_MSEL_LISTEN_ONLY_MODE;
...@@ -811,7 +811,6 @@ static int sun4ican_probe(struct platform_device *pdev) ...@@ -811,7 +811,6 @@ static int sun4ican_probe(struct platform_device *pdev)
priv->can.ctrlmode_supported = CAN_CTRLMODE_BERR_REPORTING | priv->can.ctrlmode_supported = CAN_CTRLMODE_BERR_REPORTING |
CAN_CTRLMODE_LISTENONLY | CAN_CTRLMODE_LISTENONLY |
CAN_CTRLMODE_LOOPBACK | CAN_CTRLMODE_LOOPBACK |
CAN_CTRLMODE_PRESUME_ACK |
CAN_CTRLMODE_3_SAMPLES; CAN_CTRLMODE_3_SAMPLES;
priv->base = addr; priv->base = addr;
priv->clk = clk; priv->clk = clk;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment