ARM: shmobile: sh73a0: Add Multiplatform support
Magnus Damm
maintainerPATCH v2 3/5 ARM: shmobile: sh73a0: Add Multiplatform support
From: Magnus Damm <[email protected]>
Enable sh73a0 Multiplatform support for the generic sh73a0 machine vector. No board support is enabled, and the board code for KZM9G DT Reference is left by itself.
---
arch/arm/mach-shmobile/Kconfig | 5 +++++ arch/arm/mach-shmobile/Makefile | 4 ++-- arch/arm/mach-shmobile/setup-sh73a0.c | 5 ++++- arch/arm/mach-shmobile/smp-sh73a0.c | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-)
arch/arm/mach-shmobile/Kconfig +5 -0
@@ -52,6 +52,11 @@ config ARCH_R7S72100 bool "RZ/A1H (R7S72100)" select SYS_SUPPORTS_SH_MTU2 +config ARCH_SH73A0 + bool "SH-Mobile AG5 (R8A73A00)" + select ARCH_RMOBILE + select RENESAS_INTC_IRQPIN + config ARCH_R8A7740 bool "R-Mobile A1 (R8A77400)" select ARCH_RMOBILE
arch/arm/mach-shmobile/Makefile +2 -2
@@ -7,7 +7,7 @@ obj-y := timer.o console.o # CPU objects obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o intc-sh7372.o pm-sh7372.o -obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o intc-sh73a0.o pm-sh73a0.o +obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o pm-sh73a0.o obj-$(CONFIG_ARCH_R8A73A4) += setup-r8a73a4.o obj-$(CONFIG_ARCH_R8A7740) += setup-r8a7740.o pm-r8a7740.o obj-$(CONFIG_ARCH_R8A7778) += setup-r8a7778.o
@@ -65,7 +65,7 @@ obj-$(CONFIG_MACH_BOCKW) += board-bockw. obj-$(CONFIG_MACH_BOCKW_REFERENCE) += board-bockw-reference.o obj-$(CONFIG_MACH_MARZEN) += board-marzen.o obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o -obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o +obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o intc-sh73a0.o obj-$(CONFIG_MACH_KZM9G_REFERENCE) += board-kzm9g-reference.o endif
arch/arm/mach-shmobile/setup-sh73a0.c +4 -1
@@ -764,7 +764,9 @@ void __init __weak sh73a0_register_twd(vvoid __init sh73a0_earlytimer_init (void ) {shmobile_init_delay (); +#ifndef CONFIG_COMMON_CLK sh73a0_clock_init (); +#endif shmobile_earlytimer_init ();sh73a0_register_twd (); }
@@ -780,9 +782,10 @@ void __init sh73a0_add_early_devices(voivoid __init sh73a0_add_standard_devices_dt (void ) { +#ifndef CONFIG_COMMON_CLK /* clocks are setup late during boot in the case of DT */ sh73a0_clock_init (); - +#endif of_platform_populate (NULL , of_default_bus_match_table,NULL ,NULL ); }
arch/arm/mach-shmobile/smp-sh73a0.c +1 -1
@@ -33,7 +33,7 @@#define SH73A0_SCU_BASE 0xf0000000 -#ifdef CONFIG_HAVE_ARM_TWD +#if defined(CONFIG_HAVE_ARM_TWD ) && !defined(CONFIG_ARCH_MULTIPLATFORM ) static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, SH73A0_SCU_BASE + 0x600, 29);void __init sh73a0_register_twd (void ) {
Hi Magnus,
Quoted 20 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Enable sh73a0 Multiplatform support for the generic sh73a0 machine vector. No board support is enabled, and the board code for KZM9G DT Reference is left by itself.
Signed-off-by Magnus Damm <[email protected]>arch/arm/mach-shmobile/Makefile 2014-12-16 19:12:19.000000000 +0900 renamed from arch/arm/mach-shmobile/Makefile +1
-1@@ -7,7 +7,7 @@ obj-y := timer.o console.o # CPU objects obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o intc-sh7372.o pm-sh7372.o -obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o intc-sh73a0.o pm-sh73a0.o +obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o pm-sh73a0.o obj-$(CONFIG_ARCH_R8A73A4) += setup-r8a73a4.o obj-$(CONFIG_ARCH_R8A7740) += setup-r8a7740.o pm-r8a7740.o obj-$(CONFIG_ARCH_R8A7778) += setup-r8a7778.o
arch/arm/mach-shmobile/Makefile 2014-12-16 19:12:19.000000000 +0900 obj-$(CONFIG_MACH_BOCKW) += board-bockw. · line 69
Quoted 6 lines
arch/arm/mach-shmobile/Makefile 2014-12-16 19:12:19.000000000 +0900 renamed from arch/arm/mach-shmobile/Makefile +1
-1@@ -65,7 +65,7 @@ obj-$(CONFIG_MACH_BOCKW) += board-bockw. obj-$(CONFIG_MACH_BOCKW_REFERENCE) += board-bockw-reference.o obj-$(CONFIG_MACH_MARZEN) += board-marzen.o obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o -obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o +obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o intc-sh73a0.o obj-$(CONFIG_MACH_KZM9G_REFERENCE) += board-kzm9g-reference.o
Building intc-sh73a0.o for kzm9g-legacy only, means we will no longer instantiate
the GIC from C board code on kzm9g-reference. So the issue I mentioned in the sh_tmu thread:
| On kzm9g-reference, the TWD is not instantiated, causing the same hang. | If I instantiate the TWD from C board code there, it fails with | | twd: can't register interrupt 29 (-22) | | which looks like a symptom of https://lkml.org/lkml/2014/12/2/339
is indeed caused by the GIC.
Quoted 13 lines
arch/arm/mach-shmobile/setup-sh73a0.c 2014-12-16 19:13:33.000000000 +0900 renamed from arch/arm/mach-shmobile/setup-sh73a0.c +2
-0@@ -764,7 +764,9 @@ void __init __weak sh73a0_register_twd(v void __init sh73a0_earlytimer_init(void) { shmobile_init_delay(); +#ifndef CONFIG_COMMON_CLK sh73a0_clock_init(); +#endif shmobile_earlytimer_init(); sh73a0_register_twd(); }
arch/arm/mach-shmobile/setup-sh73a0.c 2014-12-16 19:13:33.000000000 +0900 void __init sh73a0_add_early_devices(voi · line 790
Quoted 10 lines
arch/arm/mach-shmobile/setup-sh73a0.c 2014-12-16 19:13:33.000000000 +0900 renamed from arch/arm/mach-shmobile/setup-sh73a0.c +2
-1@@ -780,9 +782,10 @@ void __init sh73a0_add_early_devices(voi void __init sh73a0_add_standard_devices_dt(void) { +#ifndef CONFIG_COMMON_CLK /* clocks are setup late during boot in the case of DT */ sh73a0_clock_init(); - +#endif of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); }
These changes conflict with "[PATCH v7 6/6] ARM: shmobile: sh73a0: disable legacy clock initialization", on which this series claims to depend on?
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
Magnus Damm
maintainerHi Geert,
Quoted 35 lines · Geert Uytterhoeven
Hi Magnus,
Quoted 20 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Enable sh73a0 Multiplatform support for the generic sh73a0 machine vector. No board support is enabled, and the board code for KZM9G DT Reference is left by itself.
Signed-off-by Magnus Damm <[email protected]>arch/arm/mach-shmobile/Makefile 2014-12-16 19:12:19.000000000 +0900 renamed from arch/arm/mach-shmobile/Makefile +1
-1@@ -7,7 +7,7 @@ obj-y := timer.o console.o # CPU objects obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o intc-sh7372.o pm-sh7372.o -obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o intc-sh73a0.o pm-sh73a0.o +obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o pm-sh73a0.o obj-$(CONFIG_ARCH_R8A73A4) += setup-r8a73a4.o obj-$(CONFIG_ARCH_R8A7740) += setup-r8a7740.o pm-r8a7740.o obj-$(CONFIG_ARCH_R8A7778) += setup-r8a7778.oarch/arm/mach-shmobile/Makefile 2014-12-16 19:12:19.000000000 +0900 obj-$(CONFIG_MACH_BOCKW) += board-bockw. · line 69
Quoted 6 lines
arch/arm/mach-shmobile/Makefile 2014-12-16 19:12:19.000000000 +0900 renamed from arch/arm/mach-shmobile/Makefile +1
-1@@ -65,7 +65,7 @@ obj-$(CONFIG_MACH_BOCKW) += board-bockw. obj-$(CONFIG_MACH_BOCKW_REFERENCE) += board-bockw-reference.o obj-$(CONFIG_MACH_MARZEN) += board-marzen.o obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o -obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o +obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o intc-sh73a0.o obj-$(CONFIG_MACH_KZM9G_REFERENCE) += board-kzm9g-reference.oBuilding intc-sh73a0.o for kzm9g-legacy only, means we will no longer instantiate
the GIC from C board code on kzm9g-reference. So the issue I mentioned in thesh_tmuthread:
Quoted 8 lines
| On kzm9g-reference, the TWD is not instantiated, causing the same hang. | If I instantiate the TWD from C board code there, it fails with | | twd: can't register interrupt 29 (-22) | | which looks like a symptom of https://lkml.org/lkml/2014/12/2/339is indeed caused by the GIC.
Oh, thanks for bringing this to my attention. So sh73a0 legacy DT reference needs some care too?
Quoted 14 lines
Quoted 14 lines
arch/arm/mach-shmobile/setup-sh73a0.c 2014-12-16 19:13:33.000000000 +0900 renamed from arch/arm/mach-shmobile/setup-sh73a0.c +2
-0@@ -764,7 +764,9 @@ void __init __weak sh73a0_register_twd(v void __init sh73a0_earlytimer_init(void) { shmobile_init_delay(); +#ifndef CONFIG_COMMON_CLK sh73a0_clock_init(); +#endif shmobile_earlytimer_init(); sh73a0_register_twd(); }@@ -780,9 +782,10 @@ void __init sh73a0_add_early_devices(voi
Quoted 12 lines
arch/arm/mach-shmobile/setup-sh73a0.c 2014-12-16 19:13:33.000000000 +0900 void __init sh73a0_add_early_devices(voi · line 790
Quoted 9 lines
arch/arm/mach-shmobile/setup-sh73a0.c 2014-12-16 19:13:33.000000000 +0900 renamed from arch/arm/mach-shmobile/setup-sh73a0.c +2
-1void __init sh73a0_add_standard_devices_dt(void) { +#ifndef CONFIG_COMMON_CLK /* clocks are setup late during boot in the case of DT */ sh73a0_clock_init(); - +#endif of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); }These changes conflict with "[PATCH v7 6/6] ARM: shmobile: sh73a0: disable legacy clock initialization", on which this series claims to depend on?
That's right. I have a different version of this patch that is compatible with the one above.
I was hoping on getting this series merged somewhat soonish - independently of the CCF patches - and without those #ifdef hunks the code will not compile. But the drawback is that the patch above needs to be dropped.
I'm happy to adjust, but I do think in general that merging stuff early must be better than postponing and increasing the burden...
Cheers,
/ magnus
Hi Magnus,
Quoted 30 lines · Magnus Damm
Quoted 30 lines
Quoted 11 lines
arch/arm/mach-shmobile/Makefile 2014-12-16 19:12:19.000000000 +0900 renamed from arch/arm/mach-shmobile/Makefile +1
-1@@ -7,7 +7,7 @@ obj-y := timer.o console.o # CPU objects obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o intc-sh7372.o pm-sh7372.o -obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o intc-sh73a0.o pm-sh73a0.o +obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o pm-sh73a0.o obj-$(CONFIG_ARCH_R8A73A4) += setup-r8a73a4.o obj-$(CONFIG_ARCH_R8A7740) += setup-r8a7740.o pm-r8a7740.o obj-$(CONFIG_ARCH_R8A7778) += setup-r8a7778.oarch/arm/mach-shmobile/Makefile 2014-12-16 19:12:19.000000000 +0900 obj-$(CONFIG_MACH_BOCKW) += board-bockw. · line 69
Quoted 6 lines
arch/arm/mach-shmobile/Makefile 2014-12-16 19:12:19.000000000 +0900 renamed from arch/arm/mach-shmobile/Makefile +1
-1@@ -65,7 +65,7 @@ obj-$(CONFIG_MACH_BOCKW) += board-bockw. obj-$(CONFIG_MACH_BOCKW_REFERENCE) += board-bockw-reference.o obj-$(CONFIG_MACH_MARZEN) += board-marzen.o obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o -obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o +obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o intc-sh73a0.o obj-$(CONFIG_MACH_KZM9G_REFERENCE) += board-kzm9g-reference.oBuilding intc-sh73a0.o for kzm9g-legacy only, means we will no longer instantiate
the GIC from C board code on kzm9g-reference. So the issue I mentioned in thesh_tmuthread:| On kzm9g-reference, the TWD is not instantiated, causing the same hang. | If I instantiate the TWD from C board code there, it fails with | | twd: can't register interrupt 29 (-22) | | which looks like a symptom of https://lkml.org/lkml/2014/12/2/339
Quoted 4 lines
Quoted 1 line
is indeed caused by the GIC.
Oh, thanks for bringing this to my attention. So sh73a0 legacy DT reference needs some care too?
I think it needs a call to gic_init() somewhere else.
Quoted 30 lines
Quoted 14 lines
Quoted 14 lines
arch/arm/mach-shmobile/setup-sh73a0.c 2014-12-16 19:13:33.000000000 +0900 renamed from arch/arm/mach-shmobile/setup-sh73a0.c +2
-0@@ -764,7 +764,9 @@ void __init __weak sh73a0_register_twd(v void __init sh73a0_earlytimer_init(void) { shmobile_init_delay(); +#ifndef CONFIG_COMMON_CLK sh73a0_clock_init(); +#endif shmobile_earlytimer_init(); sh73a0_register_twd(); }@@ -780,9 +782,10 @@ void __init sh73a0_add_early_devices(voiQuoted 12 lines
arch/arm/mach-shmobile/setup-sh73a0.c 2014-12-16 19:13:33.000000000 +0900 void __init sh73a0_add_early_devices(voi · line 790
Quoted 9 lines
arch/arm/mach-shmobile/setup-sh73a0.c 2014-12-16 19:13:33.000000000 +0900 renamed from arch/arm/mach-shmobile/setup-sh73a0.c +2
-1void __init sh73a0_add_standard_devices_dt(void) { +#ifndef CONFIG_COMMON_CLK /* clocks are setup late during boot in the case of DT */ sh73a0_clock_init(); - +#endif of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); }These changes conflict with "[PATCH v7 6/6] ARM: shmobile: sh73a0: disable legacy clock initialization", on which this series claims to depend on?
That's right. I have a different version of this patch that is compatible with the one above.
Quoted 7 lines
I was hoping on getting this series merged somewhat soonish - independently of the CCF patches - and without those #ifdef hunks the code will not compile. But the drawback is that the patch above needs to be dropped.
I'm happy to adjust, but I do think in general that merging stuff early must be better than postponing and increasing the burden...
I 100% agree.
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
Quoted 5 lines · Magnus Damm
arch/arm/mach-shmobile/Kconfig 2014-12-16 19:11:36.000000000 +0900 renamed from arch/arm/mach-shmobile/Kconfig +0
-0@@ -52,6 +52,11 @@ config ARCH_R7S72100 bool "RZ/A1H (R7S72100)"
arch/arm/mach-shmobile/Kconfig 2014-12-16 19:11:36.000000000 +0900 config ARCH_R7S72100 · line 62
Quoted 10 lines
arch/arm/mach-shmobile/Kconfig 2014-12-16 19:11:36.000000000 +0900 renamed from arch/arm/mach-shmobile/Kconfig +5
-0select SYS_SUPPORTS_SH_MTU2 +config ARCH_SH73A0 + bool "SH-Mobile AG5 (R8A73A00)" + select ARCH_RMOBILE + select RENESAS_INTC_IRQPIN + config ARCH_R8A7740 bool "R-Mobile A1 (R8A77400)" select ARCH_RMOBILE
Shall we keep this sorted?
That does mean the entries for the old SH73xx are at the end of the list, though.
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
Quoted 8 lines · Geert Uytterhoeven
Quoted 7 lines · Magnus Damm
arch/arm/mach-shmobile/Kconfig 2014-12-16 19:11:36.000000000 +0900 renamed from arch/arm/mach-shmobile/Kconfig +0
-0@@ -52,6 +52,11 @@ config ARCH_R7S72100 bool "RZ/A1H (R7S72100)" select SYS_SUPPORTS_SH_MTU2
Quoted 12 lines
arch/arm/mach-shmobile/Kconfig 2014-12-16 19:11:36.000000000 +0900 config ARCH_R7S72100 · line 62
Quoted 8 lines
arch/arm/mach-shmobile/Kconfig 2014-12-16 19:11:36.000000000 +0900 renamed from arch/arm/mach-shmobile/Kconfig +5
-0+config ARCH_SH73A0 + bool "SH-Mobile AG5 (R8A73A00)" + select ARCH_RMOBILE + select RENESAS_INTC_IRQPIN + config ARCH_R8A7740 bool "R-Mobile A1 (R8A77400)" select ARCH_RMOBILEShall we keep this sorted?
That does mean the entries for the old SH73xx are at the end of the list, though.
Sorting it is nice. But are other entries out of order? In either case, feel free to submit a cleanup.
Quoted 22 lines · Simon Horman
Quoted 8 lines · Geert Uytterhoeven
Quoted 7 lines · Magnus Damm
arch/arm/mach-shmobile/Kconfig 2014-12-16 19:11:36.000000000 +0900 renamed from arch/arm/mach-shmobile/Kconfig +0
-0@@ -52,6 +52,11 @@ config ARCH_R7S72100 bool "RZ/A1H (R7S72100)" select SYS_SUPPORTS_SH_MTU2Quoted 12 lines
arch/arm/mach-shmobile/Kconfig 2014-12-16 19:11:36.000000000 +0900 config ARCH_R7S72100 · line 62
Quoted 8 lines
arch/arm/mach-shmobile/Kconfig 2014-12-16 19:11:36.000000000 +0900 renamed from arch/arm/mach-shmobile/Kconfig +5
-0+config ARCH_SH73A0 + bool "SH-Mobile AG5 (R8A73A00)" + select ARCH_RMOBILE + select RENESAS_INTC_IRQPIN + config ARCH_R8A7740 bool "R-Mobile A1 (R8A77400)" select ARCH_RMOBILEShall we keep this sorted?
That does mean the entries for the old SH73xx are at the end of the list, though.
Quoted 2 lines
Sorting it is nice. But are other entries out of order? In either case, feel free to submit a cleanup.
Sorry, for some reason I thought I had queued up the above patch.
I think sorting makes sense. And it looks like the other entries are already sorted. So adjusting this patch seems like a good idea to me. But I'll let Magnus decide.