RE: [PATCH] can: rcar_canfd: Change the initializing flow for clocks and resets

From: Biju Das

Date: Mon Jun 29 2026 - 11:05:03 EST


Hi Geert,

> -----Original Message-----
> From: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> Sent: 29 June 2026 15:44
> Subject: Re: [PATCH] can: rcar_canfd: Change the initializing flow for clocks and resets
>
> On Thu, 25 Jun 2026 at 15:52, Biju <biju.das.au@xxxxxxxxx> wrote:
> > From: Tu Nguyen <tu.nguyen.xg@xxxxxxxxxxx>
> >
> > Testing CANFD on RZ/G3E shows that many registers do not reset to
> > their initial values with the current flow of deasserting resets first
> > and then enabling clocks.
> >
> > Based on the HW manual, clocks should be supplied first and the resets
> > deasserted afterward.
> >
> > section 7.4.3 Procedure for Activating Modules: RZ/G2L section
> > 4.4.9.3 Procedure for Starting up Units: RZ/G3E
> >
> > So, update the order of the initializing flow for resets and clocks to
> > match the hardware manual, resetting all CANFD registers to their
> > initial values. Also update rcar_canfd_global_deinit() to assert
> > resets before disabling clocks, so the teardown path mirrors the new
> > init ordering.
> >
> > Fixes: 76e9353a80e9 ("can: rcar_canfd: Add support for RZ/G2L family")
> > Signed-off-by: Tu Nguyen <tu.nguyen.xg@xxxxxxxxxxx>
> > Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
>
> As CAN-FD on R-Car does not have rst[pc]_n, this patch has no impact on R-Car, and I don't have to
> provide my Tested-by :-)

Yes, I agree.

Cheers,
Biju