Message ID | 7b864c7ded52ace326c42b132708a6dc8ad9a606.1697199949.git.ysato@users.sourceforge.jp (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Device Tree support for SH7751 based board | expand |
Hi Sato-san, On Sat, Oct 14, 2023 at 4:54 PM Yoshinori Sato <ysato@users.sourceforge.jp> wrote: > Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> 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? Gr{oetje,eeting}s, Geert
On Thu, 19 Oct 2023 03:37:57 +0900, Geert Uytterhoeven wrote: > > Hi Sato-san, > > On Sat, Oct 14, 2023 at 4:54 PM Yoshinori Sato > <ysato@users.sourceforge.jp> wrote: > > Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> > > 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. > 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
Hi Sato-san, On Thu, Oct 26, 2023 at 5:40 AM Yoshinori Sato <ysato@users.sourceforge.jp> wrote: > On Thu, 19 Oct 2023 03:37:57 +0900, > Geert Uytterhoeven wrote: > > On Sat, Oct 14, 2023 at 4:54 PM Yoshinori Sato > > <ysato@users.sourceforge.jp> wrote: > > > Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> > > > > 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
diff --git a/arch/sh/boards/of-generic.c b/arch/sh/boards/of-generic.c index f7f3e618e85b..f1ca5a914c11 100644 --- a/arch/sh/boards/of-generic.c +++ b/arch/sh/boards/of-generic.c @@ -8,6 +8,7 @@ #include <linux/of.h> #include <linux/of_clk.h> #include <linux/of_fdt.h> +#include <linux/of_platform.h> #include <linux/clocksource.h> #include <linux/irqchip.h> #include <asm/machvec.h> @@ -98,16 +99,7 @@ static void sh_of_smp_probe(void) #endif -static void noop(void) -{ -} - -static int noopi(void) -{ - return 0; -} - -static void __init sh_of_mem_reserve(void) +static void __init sh_of_mem_init(void) { early_init_fdt_reserve_self(); early_init_fdt_scan_reserved_mem(); @@ -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; -} - static struct sh_machine_vector __initmv sh_of_generic_mv = { .mv_setup = sh_of_setup, .mv_name = "devicetree", /* replaced by DT root's model */ .mv_irq_demux = sh_of_irq_demux, .mv_init_irq = sh_of_init_irq, - .mv_clk_init = sh_of_clk_init, - .mv_mode_pins = noopi, - .mv_mem_init = noop, - .mv_mem_reserve = sh_of_mem_reserve, + .mv_mode_pins = generic_mode_pins, + .mv_mem_init = sh_of_mem_init, }; struct sh_clk_ops;
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> --- arch/sh/boards/of-generic.c | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-)