[PATCH can-next 04/21] can: rockchip_canfd: add driver for Rockchip CAN-FD controller
Simon Horman
horms at kernel.org
Tue Jul 30 09:34:39 PDT 2024
On Mon, Jul 29, 2024 at 03:05:35PM +0200, Marc Kleine-Budde wrote:
> Add driver for the Rockchip CAN-FD controller.
>
> The IP core on the rk3568v2 SoC has 12 documented errata. Corrections
> for these errata will be added in the upcoming patches.
>
> Since several workarounds are required for the TX path, only add the
> base driver that only implements the RX path.
>
> Although the RX path implements CAN-FD support, it's not activated in
> ctrlmode_supported, as the IP core in the rk3568v2 has problems with
> receiving or sending certain CAN-FD frames.
>
> Signed-off-by: Marc Kleine-Budde <mkl at pengutronix.de>
...
> +static void rkcanfd_get_berr_counter_raw(struct rkcanfd_priv *priv,
> + struct can_berr_counter *bec)
> +{
> + struct can_berr_counter bec_raw;
> +
> + bec->rxerr = rkcanfd_read(priv, RKCANFD_REG_RXERRORCNT);
> + bec->txerr = rkcanfd_read(priv, RKCANFD_REG_TXERRORCNT);
> + bec_raw = *bec;
nit: bec_raw is assigned but otherwise unused
although this is addressed in patch 15 of this series.
> +}
...
More information about the linux-arm-kernel
mailing list