Commit 25e024c3 authored by Marc Kleine-Budde's avatar Marc Kleine-Budde

can: rockchip_canfd: rkcanfd_register_done(): add warning for erratum 5

Tests on the rk3568v2 and rk3568v3 show that a reduced "baudclk" (e.g.
80MHz, compared to the standard 300MHz) significantly increases the
possibility of incorrect FIFO counters, i.e. erratum 5.

Print an info message if the clock is below the known good value of
300MHz.
Tested-by: default avatarAlibek Omarov <a1ba.omarov@gmail.com>
Acked-by: default avatarHeiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20240904-rockchip-canfd-v5-10-8ae22bcb27cc@pengutronix.deSigned-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 65713542
......@@ -738,6 +738,13 @@ static void rkcanfd_register_done(const struct rkcanfd_priv *priv)
FIELD_GET(RKCANFD_REG_RTL_VERSION_MAJOR, dev_id),
FIELD_GET(RKCANFD_REG_RTL_VERSION_MINOR, dev_id),
priv->devtype_data.quirks);
if (priv->devtype_data.quirks & RKCANFD_QUIRK_RK3568_ERRATUM_5 &&
priv->can.clock.freq < RKCANFD_ERRATUM_5_SYSCLOCK_HZ_MIN)
netdev_info(priv->ndev,
"Erratum 5: CAN clock frequency (%luMHz) lower than known good (%luMHz), expect degraded performance\n",
priv->can.clock.freq / MEGA,
RKCANFD_ERRATUM_5_SYSCLOCK_HZ_MIN / MEGA);
}
static int rkcanfd_register(struct rkcanfd_priv *priv)
......
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