[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220704074611.957191-1-yoshihiro.shimoda.uh@renesas.com>
Date: Mon, 4 Jul 2022 16:46:11 +0900
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>
To: wg@...ndegger.com, mkl@...gutronix.de
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, linux-can@...r.kernel.org,
netdev@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
Duy Nguyen <duy.nguyen.rh@...esas.com>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>
Subject: [PATCH] can: rcar_canfd: Fix data transmission failed on R-Car V3U
From: Duy Nguyen <duy.nguyen.rh@...esas.com>
On R-Car V3U, this driver should use suitable register offset instead of
other SoCs' one. Otherwise, data transmission failed on R-Car V3U.
Fixes: 45721c406dcf ("can: rcar_canfd: Add support for r8a779a0 SoC")
Signed-off-by: Duy Nguyen <duy.nguyen.rh@...esas.com>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>
---
drivers/net/can/rcar/rcar_canfd.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/can/rcar/rcar_canfd.c b/drivers/net/can/rcar/rcar_canfd.c
index 40a11445d021..ba42cef10a53 100644
--- a/drivers/net/can/rcar/rcar_canfd.c
+++ b/drivers/net/can/rcar/rcar_canfd.c
@@ -1332,7 +1332,10 @@ static void rcar_canfd_set_bittiming(struct net_device *dev)
cfg = (RCANFD_DCFG_DTSEG1(gpriv, tseg1) | RCANFD_DCFG_DBRP(brp) |
RCANFD_DCFG_DSJW(sjw) | RCANFD_DCFG_DTSEG2(gpriv, tseg2));
- rcar_canfd_write(priv->base, RCANFD_F_DCFG(ch), cfg);
+ if (is_v3u(gpriv))
+ rcar_canfd_write(priv->base, RCANFD_V3U_DCFG(ch), cfg);
+ else
+ rcar_canfd_write(priv->base, RCANFD_F_DCFG(ch), cfg);
netdev_dbg(priv->ndev, "drate: brp %u, sjw %u, tseg1 %u, tseg2 %u\n",
brp, sjw, tseg1, tseg2);
} else {
--
2.25.1
Powered by blists - more mailing lists