ARM: shmobile: marzen: Switch to DT_MACHINE_START
Subsystems (6)
v2 cover ARM: shmobile: marzen: Switch to DT_MACHINE_START
A short series to use DT_MACHINE_START on the marzen board.
Changes since v1
* Add "ARM: shmobile: marzen: Enable ARM_APPENDED_DTB in defconfig" patch
* Add "ARM: shmobile: r8a7779: Rely on DT for SMP CPU info" patch
* Enhance "ARM: shmobile: marzen: Switch to DT_MACHINE_START" to:
- Select USE_OF in Kconfig
- Provide dt_compat in DT_MACHINE_START
- Provide r8a7779-marzen dts
Magnus Damm (1):
ARM: shmobile: marzen: Switch to DT_MACHINE_START
Simon Horman (2):
ARM: shmobile: r8a7779: Rely on DT for SMP CPU info
ARM: shmobile: marzen: Enable ARM_APPENDED_DTB in defconfig
arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/r8a7779-marzen.dts | 27 +++++++++++++++++++++++++++ arch/arm/configs/marzen_defconfig | 1 + arch/arm/mach-shmobile/Kconfig | 1 + arch/arm/mach-shmobile/board-marzen.c | 8 +++++++- arch/arm/mach-shmobile/smp-r8a7779.c | 12 +++--------- 6 files changed, 40 insertions(+), 10 deletions(-) create mode 100644 arch/arm/boot/dts/r8a7779-marzen.dts
Signature · 1 line
1.8.2.1
PATCH v2 1/3 ARM: shmobile: marzen: Switch to DT_MACHINE_START
From: Magnus Damm <[email protected]>
Convert the marzen board to use DT_MACHINE_START. With this in place all mach-shmobile boards use DT_MACHINE_START. Also, this makes it possible for the r8a7779 SMP code to use DT for CPUs.
So appended DTB is the way forward on this board.
v2 [Simon Horman]
* Select USE_OF in Kconfig
* Provide dt_compat in DT_MACHINE_START
* Provide r8a7779-marzen dts
v1 [Magnus Damm]
--- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/r8a7779-marzen.dts | 27 +++++++++++++++++++++++++++ arch/arm/mach-shmobile/Kconfig | 1 + arch/arm/mach-shmobile/board-marzen.c | 8 +++++++- 4 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/r8a7779-marzen.dts
arch/arm/boot/dts/Makefile +1 -0
@@ -187,6 +187,7 @@ dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \ r8a7740-armadillo800eva.dtb \ r8a7778-bockw.dtb \ r8a7740-armadillo800eva-reference.dtb \ + r8a7779-marzen.dtb \ r8a7779-marzen-reference.dtb \ r8a7790-lager.dtb \ r8a7790-lager-reference.dtb \
arch/arm/boot/dts/r8a7779-marzen.dts new file +27 -0
@@ -0,0 +1,27 @@ +/* + * Device Tree Source for the Marzen board + * + * Copyright (C) 2013 Renesas Solutions Corp. + * Copyright (C) 2013 Simon Horman + * + * This file is licensed under the terms of the GNU General Public License + * version 2. This program is licensed "as is" without any warranty of any + * kind, whether express or implied. + */ + +/dts-v1/; +/include/ "r8a7779.dtsi" + +/ { + model = "marzen"; + compatible = "renesas,marzen", "renesas,r8a7779"; + + chosen { + bootargs = "console=ttySC2,115200 earlyprintk=sh-sci.2,115200 ignore_loglevel root=/dev/nfs ip=on"; + }; + + memory { + device_type = "memory"; + reg = <0x60000000 0x40000000>; + }; +};
arch/arm/mach-shmobile/Kconfig +1 -0
@@ -168,6 +168,7 @@ config MACH_MARZEN depends on ARCH_R8A7779 select ARCH_REQUIRE_GPIOLIB select REGULATOR_FIXED_VOLTAGE if REGULATOR + select USE_OF config MACH_MARZEN_REFERENCE bool "MARZEN board - Reference Device Tree Implementation"
arch/arm/mach-shmobile/board-marzen.c +7 -1
@@ -237,7 +237,12 @@ static void __init marzen_init(void)platform_add_devices (marzen_devices,ARRAY_SIZE (marzen_devices)); } -MACHINE_START (MARZEN ,"marzen" ) +static const char *marzen_boards_compat_dt[]__initdata = { +"renesas,marzen" , +NULL , +}; + +DT_MACHINE_START (MARZEN ,"marzen" ) .smp = smp_ops(r8a7779_smp_ops), .map_io = r8a7779_map_io, .init_early = r8a7779_add_early_devices,
@@ -245,5 +250,6 @@ MACHINE_START(MARZEN, "marzen") .init_irq = r8a7779_init_irq, .init_machine = marzen_init, .init_late = r8a7779_init_late, + .dt_compat = marzen_boards_compat_dt, .init_time = r8a7779_earlytimer_init,MACHINE_END
Signature · 1 line
1.8.2.1
PATCH v2 1/3 ARM: shmobile: marzen: Switch to DT_MACHINE_START
Hello.
Quoted 1 line · Simon Horman
From: Magnus Damm <[email protected]>
Don't think it makes sense to keep Magnus as an author with so many of
your added changes. But well, it's your decision...
Quoted 14 lines
Convert the marzen board to use
DT_MACHINE_START. With this in place all mach-shmobile boards useDT_MACHINE_START. Also, this makes it possible for the r8a7779 SMP code to use DT for CPUs.So appended DTB is the way forward on this board.
Signed-off-by Magnus Damm <[email protected]>Signed-off-by Simon Horman <[email protected]>v2 [Simon Horman]
* SelectUSE_OFinKconfig
* Providedt_compatinDT_MACHINE_START
* Provide r8a7779-marzen dts
Quoted 4 lines
v1 [Magnus Damm]
--- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/r8a7779-marzen.dts | 27 +++++++++++++++++++++++++++
Perhaps arch/arm/boot/dts/ changes should be put into a separate patch?
WBR, Sergei
PATCH v2 1/3 ARM: shmobile: marzen: Switch to DT_MACHINE_START
Quoted 8 lines · Sergei Shtylyov
Hello.
Quoted 1 line · Simon Horman
From: Magnus Damm <[email protected]>
Don't think it makes sense to keep Magnus as an author with so
many of your added changes. But well, it's your decision...
I am comfortable with things the way they are so long as Magnus is too.
Quoted 14 lines
Quoted 13 lines
Convert the marzen board to use
DT_MACHINE_START. With this in place all mach-shmobile boards useDT_MACHINE_START. Also, this makes it possible for the r8a7779 SMP code to use DT for CPUs.So appended DTB is the way forward on this board.
Signed-off-by Magnus Damm <[email protected]>Signed-off-by Simon Horman <[email protected]>v2 [Simon Horman]
* SelectUSE_OFinKconfig
* Providedt_compatinDT_MACHINE_START
* Provide r8a7779-marzen dts
Quoted 6 lines
Quoted 4 lines
v1 [Magnus Damm]
--- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/r8a7779-marzen.dts | 27 +++++++++++++++++++++++++++Perhaps
arch/arm/boot/dts/changes should be put into a separate patch?
That sounds reasonable.
PATCH v2 2/3 ARM: shmobile: r8a7779: Rely on DT for SMP CPU info
In reply to Simon HormanRemove r8a7779 specific ->smp_init_cpus() callback and instead of relying on shmobile_smp_init_cpus() simply use DT for CPU core information.
Based on work for the sh73a0 by Magnus Damm.
--
Run-time dependency on "ARM: shmobile: marzen: Switch to DT_MACHINE_START".
--- arch/arm/mach-shmobile/smp-r8a7779.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)
arch/arm/mach-shmobile/smp-r8a7779.c +3 -9
@@ -99,6 +99,9 @@ static int r8a7779_boot_secondary(unsigned int cpu, struct task_struct *idle)static void __init r8a7779_smp_prepare_cpus (unsigned int max_cpus) { + +/* setup r8a7779 specific SCU base */ + shmobile_scu_base =IOMEM (R8A7779_SCU_BASE );scu_enable (shmobile_scu_base);/* Map the reset vector (in headsmp-scu.S, headsmp.S) */
@@ -117,14 +120,6 @@ static void __init r8a7779_smp_prepare_cpus(unsigned int max_cpus)r8a7779_platform_cpu_kill (3 ); } -static void __init r8a7779_smp_init_cpus (void ) -{ -/* setup r8a7779 specific SCU base */ - shmobile_scu_base =IOMEM (R8A7779_SCU_BASE ); - -shmobile_smp_init_cpus (scu_get_core_count (shmobile_scu_base)); -} -#ifdef CONFIG_HOTPLUG_CPU static int r8a7779_scu_psr_core_disabled (int cpu) {
@@ -175,7 +170,6 @@ static int r8a7779_cpu_disable(unsigned int cpu)#endif /* CONFIG_HOTPLUG_CPU */ struct smp_operations r8a7779_smp_ops__initdata = { - .smp_init_cpus = r8a7779_smp_init_cpus, .smp_prepare_cpus = r8a7779_smp_prepare_cpus, .smp_boot_secondary = r8a7779_boot_secondary, #ifdef CONFIG_HOTPLUG_CPU
Signature · 1 line
1.8.2.1
PATCH v2 3/3 ARM: shmobile: marzen: Enable ARM_APPENDED_DTB in defconfig
In reply to Simon Horman"ARM: shmobile: marzen: Switch to DT_MACHINE_START" moves marzen over to use DT_MACHINE_START, however, the prevelant boot loader does not support booting with a separate dtb. Thus, it makes sense to use ARM_APPENDED_DTB by default.
This is consistent with other shmobile defconfigs.
--- arch/arm/configs/marzen_defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/configs/marzen_defconfig +1 -0
@@ -29,6 +29,7 @@ CONFIG_AEABI=y CONFIG_HIGHMEM=y CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_ARM_APPENDED_DTB=y CONFIG_CMDLINE="console=ttySC2,115200 earlyprintk=sh-sci.2,115200 ignore_loglevel root=/dev/nfs ip=on" CONFIG_CMDLINE_FORCE=y CONFIG_KEXEC=y
Signature · 1 line
1.8.2.1
PATCH v2 3/3 ARM: shmobile: marzen: Enable ARM_APPENDED_DTB in defconfig
Hello.
Quoted 2 lines · Simon Horman
"ARM: shmobile: marzen: Switch to
DT_MACHINE_START" moves marzen over to useDT_MACHINE_START, however, the prevelant boot loader
s/prevelant/prevalent/?
Quoted 6 lines
does not support booting with a separate dtb. Thus, it makes sense to use
ARM_APPENDED_DTBby default.This is consistent with other shmobile defconfigs.
Signed-off-by Simon Horman <[email protected]>
WBR, Sergei
PATCH v2 3/3 ARM: shmobile: marzen: Enable ARM_APPENDED_DTB in defconfig
Quoted 8 lines · Sergei Shtylyov
Hello.
Quoted 2 lines · Simon Horman
"ARM: shmobile: marzen: Switch to
DT_MACHINE_START" moves marzen over to useDT_MACHINE_START, however, the prevelant boot loaders/prevelant/prevalent/?
Thanks, I will fix that.
Quoted 14 lines
Quoted 6 lines
does not support booting with a separate dtb. Thus, it makes sense to use
ARM_APPENDED_DTBby default.This is consistent with other shmobile defconfigs.
Signed-off-by Simon Horman <[email protected]>WBR, Sergei
--
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