diff mbox series

[v2,1/5] clk: renesas: r8a779a0: add CANFD module clock

Message ID 20220111162231.10390-2-uli+renesas@fpond.eu (mailing list archive)
State Superseded
Delegated to: Geert Uytterhoeven
Headers show
Series can: rcar_canfd: Add support for V3U flavor | expand

Commit Message

Ulrich Hecht Jan. 11, 2022, 4:22 p.m. UTC
Adds "canfd0" to mod clocks.

Signed-off-by: Ulrich Hecht <uli+renesas@fpond.eu>
---
 drivers/clk/renesas/r8a779a0-cpg-mssr.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Geert Uytterhoeven Jan. 12, 2022, 8:44 a.m. UTC | #1
Hi Uli,

On Tue, Jan 11, 2022 at 5:22 PM Ulrich Hecht <uli+renesas@fpond.eu> wrote:
> Adds "canfd0" to mod clocks.
>
> Signed-off-by: Ulrich Hecht <uli+renesas@fpond.eu>

Thanks for your patch!

> --- a/drivers/clk/renesas/r8a779a0-cpg-mssr.c
> +++ b/drivers/clk/renesas/r8a779a0-cpg-mssr.c
> @@ -136,6 +136,7 @@ static const struct mssr_mod_clk r8a779a0_mod_clks[] __initconst = {
>         DEF_MOD("avb3",         214,    R8A779A0_CLK_S3D2),
>         DEF_MOD("avb4",         215,    R8A779A0_CLK_S3D2),
>         DEF_MOD("avb5",         216,    R8A779A0_CLK_S3D2),
> +       DEF_MOD("canfd0",       328,    R8A779A0_CLK_CANFD),

The datasheet calls this "canfd".

>         DEF_MOD("csi40",        331,    R8A779A0_CLK_CSI0),
>         DEF_MOD("csi41",        400,    R8A779A0_CLK_CSI0),
>         DEF_MOD("csi42",        401,    R8A779A0_CLK_CSI0),

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-clk-for-v5.18 with the above fixed.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Ulrich Hecht Jan. 12, 2022, 8:55 a.m. UTC | #2
> On 01/12/2022 9:44 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> Thanks for your patch!
> 
> > --- a/drivers/clk/renesas/r8a779a0-cpg-mssr.c
> > +++ b/drivers/clk/renesas/r8a779a0-cpg-mssr.c
> > @@ -136,6 +136,7 @@ static const struct mssr_mod_clk r8a779a0_mod_clks[] __initconst = {
> >         DEF_MOD("avb3",         214,    R8A779A0_CLK_S3D2),
> >         DEF_MOD("avb4",         215,    R8A779A0_CLK_S3D2),
> >         DEF_MOD("avb5",         216,    R8A779A0_CLK_S3D2),
> > +       DEF_MOD("canfd0",       328,    R8A779A0_CLK_CANFD),
> 
> The datasheet calls this "canfd".
> 
> >         DEF_MOD("csi40",        331,    R8A779A0_CLK_CSI0),
> >         DEF_MOD("csi41",        400,    R8A779A0_CLK_CSI0),
> >         DEF_MOD("csi42",        401,    R8A779A0_CLK_CSI0),
> 
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> i.e. will queue in renesas-clk-for-v5.18 with the above fixed.

Don't do that! There already is a DIV4 clock called "canfd", and using that name twice breaks stuff. The BSP calls this clock "can-fd" for that reason.

CU
Uli
Geert Uytterhoeven Jan. 12, 2022, 10:16 a.m. UTC | #3
Hi Uli,

On Wed, Jan 12, 2022 at 9:56 AM Ulrich Hecht <uli@fpond.eu> wrote:
> > On 01/12/2022 9:44 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > --- a/drivers/clk/renesas/r8a779a0-cpg-mssr.c
> > > +++ b/drivers/clk/renesas/r8a779a0-cpg-mssr.c
> > > @@ -136,6 +136,7 @@ static const struct mssr_mod_clk r8a779a0_mod_clks[] __initconst = {
> > >         DEF_MOD("avb3",         214,    R8A779A0_CLK_S3D2),
> > >         DEF_MOD("avb4",         215,    R8A779A0_CLK_S3D2),
> > >         DEF_MOD("avb5",         216,    R8A779A0_CLK_S3D2),
> > > +       DEF_MOD("canfd0",       328,    R8A779A0_CLK_CANFD),
> >
> > The datasheet calls this "canfd".
> >
> > >         DEF_MOD("csi40",        331,    R8A779A0_CLK_CSI0),
> > >         DEF_MOD("csi41",        400,    R8A779A0_CLK_CSI0),
> > >         DEF_MOD("csi42",        401,    R8A779A0_CLK_CSI0),
> >
> > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > i.e. will queue in renesas-clk-for-v5.18 with the above fixed.
>
> Don't do that! There already is a DIV4 clock called "canfd", and using that name twice breaks stuff. The BSP calls this clock "can-fd" for that reason.

Thanks, I stand corrected.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
diff mbox series

Patch

diff --git a/drivers/clk/renesas/r8a779a0-cpg-mssr.c b/drivers/clk/renesas/r8a779a0-cpg-mssr.c
index 1c09d4ebe90f..fadd8a1718c6 100644
--- a/drivers/clk/renesas/r8a779a0-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a779a0-cpg-mssr.c
@@ -136,6 +136,7 @@  static const struct mssr_mod_clk r8a779a0_mod_clks[] __initconst = {
 	DEF_MOD("avb3",		214,	R8A779A0_CLK_S3D2),
 	DEF_MOD("avb4",		215,	R8A779A0_CLK_S3D2),
 	DEF_MOD("avb5",		216,	R8A779A0_CLK_S3D2),
+	DEF_MOD("canfd0",	328,	R8A779A0_CLK_CANFD),
 	DEF_MOD("csi40",	331,	R8A779A0_CLK_CSI0),
 	DEF_MOD("csi41",	400,	R8A779A0_CLK_CSI0),
 	DEF_MOD("csi42",	401,	R8A779A0_CLK_CSI0),