OSDN Git Service

can: rcar_canfd: rcar_canfd_probe: Add struct rcar_canfd_hw_info to driver data
authorBiju Das <biju.das.jz@bp.renesas.com>
Thu, 27 Oct 2022 08:21:53 +0000 (09:21 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Sat, 10 Dec 2022 12:24:39 +0000 (13:24 +0100)
commitce7c5382758b13dd4dfa2eb2f4989f9a27c58ffe
treedeb373d42fba959d69ac491d65068261465a28af
parent09451f244eabb7ba197abdd92a5ed5e0a8387200
can: rcar_canfd: rcar_canfd_probe: Add struct rcar_canfd_hw_info to driver data

The CAN FD IP found on RZ/G2L SoC has some HW features different to that
of R-Car. For example, it has multiple resets and multiple IRQs for global
and channel interrupts. Also, it does not have ECC error flag registers
and clk post divider present on R-Car. Similarly, R-Car V3U has 8 channels
whereas other SoCs has only 2 channels.

This patch adds the struct rcar_canfd_hw_info to take care of the
HW feature differences and driver data present on both IPs. It also
replaces the driver data chip type with struct rcar_canfd_hw_info by
moving chip type to it.

Whilst started using driver data instead of chip_id for detecting
R-Car V3U SoCs.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/all/20221027082158.95895-2-biju.das.jz@bp.renesas.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/rcar/rcar_canfd.c