]> www.infradead.org Git - users/willy/xarray.git/commit
can: rockchip_canfd: add TX PATH
authorMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 24 Nov 2023 20:37:36 +0000 (21:37 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 4 Sep 2024 12:41:52 +0000 (14:41 +0200)
commitb6661d73290c572645ebdf7119974927444f4a7d
tree5701657f14a087661ce6adfe7cc9e52b5611e76c
parent25e024c3491cba0e22135720c7adaf52c0f1f019
can: rockchip_canfd: add TX PATH

The IP core has a TX event FIFO. In other IP cores, this type of FIFO
usually contains the events that a CAN frame has been successfully
sent. However, the IP core on the rk3568v2 the FIFO also holds events
of unsuccessful transmission attempts.

It turned out that the best way to work around this problem is to set
the IP core to self-receive mode (RXSTX), filter out the self-received
frames and insert them into the complete TX path.

Add a pair new functions to check if 2 struct canfd_frame are equal.
The 1st checks if the header of the CAN frames are equal, the 2nd
checks if the data portion are equal:

- rkcanfd_can_frame_header_equal()
- rkcanfd_can_frame_data_equal()

Tested-by: Alibek Omarov <a1ba.omarov@gmail.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20240904-rockchip-canfd-v5-11-8ae22bcb27cc@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/rockchip/rockchip_canfd-core.c
drivers/net/can/rockchip/rockchip_canfd-rx.c
drivers/net/can/rockchip/rockchip_canfd-tx.c
drivers/net/can/rockchip/rockchip_canfd.h