Re: [RFC PATCH v3 06/35] arch/sh/boards/of-generic.c: some cleanup.

Geert Uytterhoeven <[email protected]>
Newsgroups gmane.linux.ports.sh.devel
Message-ID <CAMuHMdWcqBKWPhZAAu_7i81f8Qgu98Y-xj078qiEQkRqCM5Hdw@mail.gmail.com>
Hi Sato-san,

On Thu, Oct 26, 2023 at 5:40 AM Yoshinori Sato
<[email protected]> wrote:
> On Thu, 19 Oct 2023 03:37:57 +0900,
> Geert Uytterhoeven wrote:
> > On Sat, Oct 14, 2023 at 4:54 PM Yoshinori Sato
> > <[email protected]> wrote:
> > > Signed-off-by: Yoshinori Sato <[email protected]>
> >
> > Thanks for your patch!
> >
> > > --- a/arch/sh/boards/of-generic.c
> > > +++ b/arch/sh/boards/of-generic.c
> > > @@ -140,25 +132,13 @@ static void __init sh_of_init_irq(void)
> > >         irqchip_init();
> > >  }
> > >
> > > -static int __init sh_of_clk_init(void)
> > > -{
> > > -#ifdef CONFIG_COMMON_CLK
> > > -       /* Disabled pending move to COMMON_CLK framework. */
> > > -       pr_info("SH generic board support: scanning for clk providers\n");
> > > -       of_clk_init(NULL);
> > > -#endif
> > > -       return 0;
> > > -}
> > > -
> >
> > Removing this breaks J2 for sure? I guess this should be merged with
> > "[RFC PATCH v3 07/35] arch/sh/kernel/time.c: support COMMON_CLK."
> > to avoid a bisection regression?
>
> J2 timer (jcore-pit) used TIMER_OF_DECLARE
> This is the correct OF implementation, so it is initialized with timer_probe.
> I would like to eliminate as many SH-specific methods as possible.

Oh right, I missed that (a) there still is a call to timer_init()
in SH's time_init(), and (b) more importantly, J-core does not have
any other clock drivers, so it does not need of_clk_init().

Still, I think it would make sense to merge the two patches.
And the call to timer_init() should be removed from the non-DT
variant of time_init(), as timer_init() handles only DT and ACPI.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.