ARM: shmobile: ARCH_MULTIPLATFORM for EMEV2 and KZM9D
Subsystems (6)
Magnus Damm
maintainerv2 cover ARM: shmobile: ARCH_MULTIPLATFORM for EMEV2 and KZM9D
ARM: shmobile: ARCH_MULTIPLATFORM for EMEV2 and KZM9D (v2)
[PATCH v2 01/04] ARM: shmobile: Only build clocks when COMMON_CLK=n [PATCH 02/04] ARM: shmobile: Introduce ARCH_SHMOBILE_MULTI [PATCH v2 03/04] ARM: shmobile: Add EMEV2 and KZM9D to ARCH_SHMOBILE_MULTI [PATCH 04/04] ARM: shmobile: Allow ARCH_SHMOBILE_MULTI timer configuration
This patch set extends mach-shmobile to allow a subset of SoCs and boards to be built for ARCH_MULTIPLATFORM. With this v2 series applied the EMEV2 SoC and the KZM9D board can be built in two ways - either as good old ARCH_SHMOBILE or new ARCH_SHMOBILE_MULTI. The latter requires common clock framework for proper run time operation.
The goal is to over time move all DT reference implementations from ARCH_SHMOBILE to ARCH_SHMOBILE_MULTI. Until CCF is available for a certain SoC it is to me acceptable for a DT reference board to allow build in both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI. The reason for this is to allow incremental development and easy testing during development of CCF for a certain SoC. The KZM9D board is now in this state while it is waiting for common clocks to become ready.
Until CCF is supported for EMEV2 the KZM9D board can be tested with ARCH_SMOBILE_MULTI without clocks using the following prototype:
[PATCH] ARM: shmobile: MULTIPLATFORM KZM9D with no clocks prototype hack
---
Built on top of renesas-devel-20130717
arch/arm/Makefile | 1 arch/arm/boot/dts/Makefile | 1 arch/arm/mach-shmobile/Kconfig | 52 +++++++++++++++++++++--- arch/arm/mach-shmobile/Makefile | 33 +++++++++++---- arch/arm/mach-shmobile/board-kzm9d-reference.c | 3 - arch/arm/mach-shmobile/setup-emev2.c | 3 - 6 files changed, 77 insertions(+), 16 deletions(-)
Magnus Damm
maintainerPATCH v2 1/4 ARM: shmobile: Only build clocks when COMMON_CLK=n
From: Magnus Damm <[email protected]>
Move shared clock.c file and per-SoC clock-xxx.c files to only build when CONFIG_COMMON_CLK != y.
The regular ARCH_SHMOBILE case with legacy SH clock framework will build just as before with this patch applied, however the case when COMMON_CLK=y will exclude all the clock files.
---
Changes since V1:
- wrap clock objects in ifndef, thanks Arnd and Laurent!
arch/arm/mach-shmobile/Makefile | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-)
arch/arm/mach-shmobile/Makefile +22 -9
@@ -3,17 +3,30 @@ # # Common objects -obj-y := timer.o console.o clock.o +obj-y := timer.o console.o # CPU objects -obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o clock-sh7372.o intc-sh7372.o -obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o clock-sh73a0.o intc-sh73a0.o -obj-$(CONFIG_ARCH_R8A73A4) += setup-r8a73a4.o clock-r8a73a4.o -obj-$(CONFIG_ARCH_R8A7740) += setup-r8a7740.o clock-r8a7740.o intc-r8a7740.o -obj-$(CONFIG_ARCH_R8A7778) += setup-r8a7778.o clock-r8a7778.o -obj-$(CONFIG_ARCH_R8A7779) += setup-r8a7779.o clock-r8a7779.o intc-r8a7779.o -obj-$(CONFIG_ARCH_R8A7790) += setup-r8a7790.o clock-r8a7790.o -obj-$(CONFIG_ARCH_EMEV2) += setup-emev2.o clock-emev2.o +obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o intc-sh7372.o +obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o intc-sh73a0.o +obj-$(CONFIG_ARCH_R8A73A4) += setup-r8a73a4.o +obj-$(CONFIG_ARCH_R8A7740) += setup-r8a7740.o intc-r8a7740.o +obj-$(CONFIG_ARCH_R8A7778) += setup-r8a7778.o +obj-$(CONFIG_ARCH_R8A7779) += setup-r8a7779.o intc-r8a7779.o +obj-$(CONFIG_ARCH_R8A7790) += setup-r8a7790.o +obj-$(CONFIG_ARCH_EMEV2) += setup-emev2.o + +# Clock objects +ifndef CONFIG_COMMON_CLK +obj-y += clock.o +obj-$(CONFIG_ARCH_SH7372) += clock-sh7372.o +obj-$(CONFIG_ARCH_SH73A0) += clock-sh73a0.o +obj-$(CONFIG_ARCH_R8A73A4) += clock-r8a73a4.o +obj-$(CONFIG_ARCH_R8A7740) += clock-r8a7740.o +obj-$(CONFIG_ARCH_R8A7778) += clock-r8a7778.o +obj-$(CONFIG_ARCH_R8A7779) += clock-r8a7779.o +obj-$(CONFIG_ARCH_R8A7790) += clock-r8a7790.o +obj-$(CONFIG_ARCH_EMEV2) += clock-emev2.o +endif # SMP objects smp-y := platsmp.o headsmp.o
PATCH v2 1/4 ARM: shmobile: Only build clocks when COMMON_CLK=n
Quoted 10 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Move shared
clock.cfile and per-SoCclock-xxx.cfiles to only build whenCONFIG_COMMON_CLK!= y.The regular
ARCH_SHMOBILEcase with legacy SH clock framework will build just as before with this patch applied, however the case when COMMON_CLK=y will exclude all the clock files.Signed-off-by Magnus Damm <[email protected]>
Thanks, I have queued this up for v3.12 in a new multiarch branch of the renesas tree.
Quoted 55 lines
---
Changes since V1:
- wrap clock objects in ifndef, thanks Arnd and Laurent!arch/arm/mach-shmobile/Makefile | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-)arch/arm/mach-shmobile/Makefile +22
-10@@ -3,17 +3,30 @@ # # Common objects -obj-y := timer.o console.o clock.o +obj-y := timer.o console.o # CPU objects -obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o clock-sh7372.o intc-sh7372.o -obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o clock-sh73a0.o intc-sh73a0.o -obj-$(CONFIG_ARCH_R8A73A4) += setup-r8a73a4.o clock-r8a73a4.o -obj-$(CONFIG_ARCH_R8A7740) += setup-r8a7740.o clock-r8a7740.o intc-r8a7740.o -obj-$(CONFIG_ARCH_R8A7778) += setup-r8a7778.o clock-r8a7778.o -obj-$(CONFIG_ARCH_R8A7779) += setup-r8a7779.o clock-r8a7779.o intc-r8a7779.o -obj-$(CONFIG_ARCH_R8A7790) += setup-r8a7790.o clock-r8a7790.o -obj-$(CONFIG_ARCH_EMEV2) += setup-emev2.o clock-emev2.o +obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o intc-sh7372.o +obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o intc-sh73a0.o +obj-$(CONFIG_ARCH_R8A73A4) += setup-r8a73a4.o +obj-$(CONFIG_ARCH_R8A7740) += setup-r8a7740.o intc-r8a7740.o +obj-$(CONFIG_ARCH_R8A7778) += setup-r8a7778.o +obj-$(CONFIG_ARCH_R8A7779) += setup-r8a7779.o intc-r8a7779.o +obj-$(CONFIG_ARCH_R8A7790) += setup-r8a7790.o +obj-$(CONFIG_ARCH_EMEV2) += setup-emev2.o + +# Clock objects +ifndef CONFIG_COMMON_CLK +obj-y += clock.o +obj-$(CONFIG_ARCH_SH7372) += clock-sh7372.o +obj-$(CONFIG_ARCH_SH73A0) += clock-sh73a0.o +obj-$(CONFIG_ARCH_R8A73A4) += clock-r8a73a4.o +obj-$(CONFIG_ARCH_R8A7740) += clock-r8a7740.o +obj-$(CONFIG_ARCH_R8A7778) += clock-r8a7778.o +obj-$(CONFIG_ARCH_R8A7779) += clock-r8a7779.o +obj-$(CONFIG_ARCH_R8A7790) += clock-r8a7790.o +obj-$(CONFIG_ARCH_EMEV2) += clock-emev2.o +endif # SMP objects smp-y := platsmp.o headsmp.o --To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Magnus Damm
maintainerPATCH v2 2/4 ARM: shmobile: Introduce ARCH_SHMOBILE_MULTI
In reply to Magnus DammFrom: Magnus Damm <[email protected]>
Add ARCH_SHMOBILE_MULTI to mach-shmobile that can be used to enable ARCH_MULTIPLATFORM on selected SoCs and boards.
The headers stay under arch/arm/mach-shmobile/include/mach/ for now, they can and will be migrated independently over time.
---
arch/arm/Makefile | 1 + arch/arm/mach-shmobile/Kconfig | 21 +++++++++++++++++++++ arch/arm/mach-shmobile/Makefile | 2 ++ 3 files changed, 24 insertions(+)
arch/arm/Makefile +1 -0
@@ -181,6 +181,7 @@ machine-$(CONFIG_ARCH_EXYNOS) += exynos machine-$(CONFIG_ARCH_SA1100) += sa1100 machine-$(CONFIG_ARCH_SHARK) += shark machine-$(CONFIG_ARCH_SHMOBILE) += shmobile +machine-$(CONFIG_ARCH_SHMOBILE_MULTI) += shmobile machine-$(CONFIG_ARCH_TEGRA) += tegra machine-$(CONFIG_ARCH_U300) += u300 machine-$(CONFIG_ARCH_U8500) += ux500
arch/arm/mach-shmobile/Kconfig +21 -0
@@ -1,3 +1,24 @@ +config ARCH_SHMOBILE_MULTI + bool "SH-Mobile Series" if ARCH_MULTI_V7 + depends on MMU + select CPU_V7 + select GENERIC_CLOCKEVENTS + select HAVE_ARM_SCU if SMP + select HAVE_ARM_TWD if LOCAL_TIMERS + select HAVE_SMP + select ARM_GIC + select MIGHT_HAVE_CACHE_L2X0 + select NO_IOPORT + select PINCTRL + select ARCH_REQUIRE_GPIOLIB + select CLKDEV_LOOKUP + +if ARCH_SHMOBILE_MULTI + +comment "SH-Mobile System Type" + +endif + if ARCH_SHMOBILE comment "SH-Mobile System Type"
arch/arm/mach-shmobile/Makefile +2 -0
@@ -2,6 +2,8 @@ # Makefile for the linux kernel. # +ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/mach-shmobile/include + # Common objects obj-y := timer.o console.o
PATCH v2 2/4 ARM: shmobile: Introduce ARCH_SHMOBILE_MULTI
Quoted 8 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Add
ARCH_SHMOBILE_MULTIto mach-shmobile that can be used to enableARCH_MULTIPLATFORMon selected SoCs and boards.The headers stay under
arch/arm/mach-shmobile/include/mach/for now, they can and will be migrated independently over time.
Quoted 7 lines
Signed-off-by Magnus Damm <[email protected]>---
arch/arm/Makefile | 1 + arch/arm/mach-shmobile/Kconfig | 21 +++++++++++++++++++++ arch/arm/mach-shmobile/Makefile | 2 ++ 3 files changed, 24 insertions(+)
Thanks, I have queued this up for v3.12 in a new multiarch branch of the renesas tree.
Magnus Damm
maintainerPATCH v2 3/4 ARM: shmobile: Add EMEV2 and KZM9D to ARCH_SHMOBILE_MULTI
In reply to Magnus DammFrom: Magnus Damm <[email protected]>
Enable build of EMEV2 and KZM9D DT Reference in case of ARCH_MULTIPLATFORM and ARCH_SHMOBILE_MULTI.
IS_ENABLED() is leaves the clock-emev2.c file out
in case of COMMON_CLK=y.
---
Changes since V1:
- use IS_ENABLED() instead of weak symbol, thanks Arnd!
arch/arm/boot/dts/Makefile | 1 + arch/arm/mach-shmobile/Kconfig | 15 +++++++++++++++ arch/arm/mach-shmobile/board-kzm9d-reference.c | 3 ++- arch/arm/mach-shmobile/setup-emev2.c | 3 ++- 4 files changed, 20 insertions(+), 2 deletions(-)
arch/arm/boot/dts/Makefile +1 -0
@@ -195,6 +195,7 @@ dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm r8a73a4-ape6evm.dtb \ r8a73a4-ape6evm-reference.dtb \ sh7372-mackerel.dtb +dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += emev2-kzm9d-reference.dtb dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_cyclone5.dtb \ socfpga_vt.dtb dtb-$(CONFIG_ARCH_SPEAR13XX) += spear1310-evb.dtb \
arch/arm/mach-shmobile/Kconfig +15 -0
@@ -17,6 +17,21 @@ if ARCH_SHMOBILE_MULTI comment "SH-Mobile System Type" +config ARCH_EMEV2 + bool "Emma Mobile EV2" + +comment "SH-Mobile Board Type" + +config MACH_KZM9D_REFERENCE + bool "KZM9D board - Reference Device Tree Implementation" + depends on ARCH_EMEV2 + select REGULATOR_FIXED_VOLTAGE if REGULATOR + ---help--- + Use reference implementation of KZM9D board support + which makes a greater use of device tree at the expense + of not supporting a number of devices. + + This is intended to aid developers endif if ARCH_SHMOBILE
arch/arm/mach-shmobile/board-kzm9d-reference.c +2 -1
@@ -26,7 +26,8 @@static void __init kzm9d_add_standard_devices (void ) { -emev2_clock_init (); +if (!IS_ENABLED (CONFIG_COMMON_CLK )) +emev2_clock_init ();of_platform_populate (NULL , of_default_bus_match_table,NULL ,NULL ); }
arch/arm/mach-shmobile/setup-emev2.c +2 -1
@@ -175,7 +175,8 @@ static struct resource pmu_resources[] =void __init emev2_add_standard_devices (void ) { -emev2_clock_init (); +if (!IS_ENABLED (CONFIG_COMMON_CLK )) +emev2_clock_init ();emev2_register_uart (0 );emev2_register_uart (1 );
PATCH v2 3/4 ARM: shmobile: Add EMEV2 and KZM9D to ARCH_SHMOBILE_MULTI
Quoted 11 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Enable build of EMEV2 and KZM9D DT Reference in case of
ARCH_MULTIPLATFORMandARCH_SHMOBILE_MULTI.
IS_ENABLED()is leaves theclock-emev2.cfile out
in case of COMMON_CLK=y.Signed-off-by Magnus Damm <[email protected]>---
Quoted 8 lines
Changes since V1:
- useIS_ENABLED()instead of weak symbol, thanks Arnd!arch/arm/boot/dts/Makefile | 1 + arch/arm/mach-shmobile/Kconfig | 15 +++++++++++++++ arch/arm/mach-shmobile/board-kzm9d-reference.c | 3 ++- arch/arm/mach-shmobile/setup-emev2.c | 3 ++- 4 files changed, 20 insertions(+), 2 deletions(-)
Thanks, I have queued this up for v3.12 in a new multiarch branch of the renesas tree.
Magnus Damm
maintainerPATCH v2 4/4 ARM: shmobile: Allow ARCH_SHMOBILE_MULTI timer configuration
In reply to Magnus DammFrom: Magnus Damm <[email protected]>
Move the timer configuration bits to allow use in
case of ARCH_SHMOBILE or ARCH_SHMOBILE_MULTI.
The timers all make use of the regular driver model so they are safe to enable for ARCH_MULTIPLATFORM.
---
arch/arm/mach-shmobile/Kconfig | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
arch/arm/mach-shmobile/Kconfig +11 -5
@@ -30,6 +30,8 @@ config MACH_KZM9D_REFERENCE of not supporting a number of devices. This is intended to aid developers + +comment "SH-Mobile System Configuration" endif if ARCH_SHMOBILE
@@ -243,6 +245,15 @@ config CPU_HAS_INTEVT bool default y +config SH_CLK_CPG + bool + +source "drivers/sh/Kconfig" + +endif + +if ARCH_SHMOBILE || ARCH_SHMOBILE_MULTI + menu "Timer and clock configuration" config SHMOBILE_TIMER_HZ
@@ -277,9 +288,4 @@ config EM_TIMER_STI endmenu -config SH_CLK_CPG - bool - -source "drivers/sh/Kconfig" - endif
PATCH v2 4/4 ARM: shmobile: Allow ARCH_SHMOBILE_MULTI timer configuration
Quoted 5 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Move the timer configuration bits to allow use in
case ofARCH_SHMOBILEorARCH_SHMOBILE_MULTI.
Quoted 8 lines
The timers all make use of the regular driver model so they are safe to enable for
ARCH_MULTIPLATFORM.Signed-off-by Magnus Damm <[email protected]>---
arch/arm/mach-shmobile/Kconfig | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
Thanks, I have queued this up for v3.12 in a new multiarch branch of the renesas tree.
v2 cover ARM: shmobile: ARCH_MULTIPLATFORM for EMEV2 and KZM9D
In reply to Magnus DammQuoted 21 lines · Magnus Damm
ARM: shmobile:
ARCH_MULTIPLATFORMfor EMEV2 and KZM9D (v2)[PATCH v2 01/04] ARM: shmobile: Only build clocks when COMMON_CLK=n [PATCH 02/04] ARM: shmobile: Introduce
ARCH_SHMOBILE_MULTI[PATCH v2 03/04] ARM: shmobile: Add EMEV2 and KZM9D toARCH_SHMOBILE_MULTI[PATCH 04/04] ARM: shmobile: AllowARCH_SHMOBILE_MULTItimer configurationThis patch set extends mach-shmobile to allow a subset of SoCs and boards to be built for
ARCH_MULTIPLATFORM. With this v2 series applied the EMEV2 SoC and the KZM9D board can be built in two ways - either as good oldARCH_SHMOBILEor newARCH_SHMOBILE_MULTI. The latter requires common clock framework for proper run time operation.The goal is to over time move all DT reference implementations from
ARCH_SHMOBILEtoARCH_SHMOBILE_MULTI. Until CCF is available for a certain SoC it is to me acceptable for a DT reference board to allow build in bothARCH_SHMOBILEandARCH_SHMOBILE_MULTI. The reason for this is to allow incremental development and easy testing during development of CCF for a certain SoC. The KZM9D board is now in this state while it is waiting for common clocks to become ready.
Quoted 8 lines
Until CCF is supported for EMEV2 the KZM9D board can be tested with
ARCH_SMOBILE_MULTIwithout clocks using the following prototype:
[PATCH] ARM: shmobile: MULTIPLATFORM KZM9D with no clocks prototype hackSigned-off-by Magnus Damm <[email protected]>---
Built on top of renesas-devel-20130717
Hi Magnus,
could you let me know if/when these are ready for me to queue-up?
Thanks