* [PATCH v2 0/3] ARM: shmobile: marzen: Switch to DT_MACHINE_START
@ 2013-07-25 2:13 Simon Horman
2013-07-25 2:13 ` [PATCH v2 1/3] " Simon Horman
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Simon Horman @ 2013-07-25 2:13 UTC (permalink / raw)
To: linux-arm-kernel
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
--
1.8.2.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 1/3] ARM: shmobile: marzen: Switch to DT_MACHINE_START
2013-07-25 2:13 [PATCH v2 0/3] ARM: shmobile: marzen: Switch to DT_MACHINE_START Simon Horman
@ 2013-07-25 2:13 ` Simon Horman
2013-07-25 11:14 ` Sergei Shtylyov
2013-07-25 2:13 ` [PATCH v2 2/3] ARM: shmobile: r8a7779: Rely on DT for SMP CPU info Simon Horman
2013-07-25 2:13 ` [PATCH v2 3/3] ARM: shmobile: marzen: Enable ARM_APPENDED_DTB in defconfig Simon Horman
2 siblings, 1 reply; 8+ messages in thread
From: Simon Horman @ 2013-07-25 2:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm@opensource.se>
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.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
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
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 0cfe54a..d19a5cf 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -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 \
diff --git a/arch/arm/boot/dts/r8a7779-marzen.dts b/arch/arm/boot/dts/r8a7779-marzen.dts
new file mode 100644
index 0000000..f3f7f79
--- /dev/null
+++ b/arch/arm/boot/dts/r8a7779-marzen.dts
@@ -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>;
+ };
+};
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index 6f71c94..35b11ce 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -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"
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c
index 1f57865..91f8751 100644
--- a/arch/arm/mach-shmobile/board-marzen.c
+++ b/arch/arm/mach-shmobile/board-marzen.c
@@ -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
--
1.8.2.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 2/3] ARM: shmobile: r8a7779: Rely on DT for SMP CPU info
2013-07-25 2:13 [PATCH v2 0/3] ARM: shmobile: marzen: Switch to DT_MACHINE_START Simon Horman
2013-07-25 2:13 ` [PATCH v2 1/3] " Simon Horman
@ 2013-07-25 2:13 ` Simon Horman
2013-07-25 2:13 ` [PATCH v2 3/3] ARM: shmobile: marzen: Enable ARM_APPENDED_DTB in defconfig Simon Horman
2 siblings, 0 replies; 8+ messages in thread
From: Simon Horman @ 2013-07-25 2:13 UTC (permalink / raw)
To: linux-arm-kernel
Remove 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.
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
--
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(-)
diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c b/arch/arm/mach-shmobile/smp-r8a7779.c
index 9bdf810..42170af 100644
--- a/arch/arm/mach-shmobile/smp-r8a7779.c
+++ b/arch/arm/mach-shmobile/smp-r8a7779.c
@@ -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
--
1.8.2.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 3/3] ARM: shmobile: marzen: Enable ARM_APPENDED_DTB in defconfig
2013-07-25 2:13 [PATCH v2 0/3] ARM: shmobile: marzen: Switch to DT_MACHINE_START Simon Horman
2013-07-25 2:13 ` [PATCH v2 1/3] " Simon Horman
2013-07-25 2:13 ` [PATCH v2 2/3] ARM: shmobile: r8a7779: Rely on DT for SMP CPU info Simon Horman
@ 2013-07-25 2:13 ` Simon Horman
2013-07-25 11:19 ` Sergei Shtylyov
2 siblings, 1 reply; 8+ messages in thread
From: Simon Horman @ 2013-07-25 2:13 UTC (permalink / raw)
To: linux-arm-kernel
"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.
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/configs/marzen_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/configs/marzen_defconfig b/arch/arm/configs/marzen_defconfig
index 494e70a..82e4040 100644
--- a/arch/arm/configs/marzen_defconfig
+++ b/arch/arm/configs/marzen_defconfig
@@ -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
--
1.8.2.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/3] ARM: shmobile: marzen: Switch to DT_MACHINE_START
2013-07-25 2:13 ` [PATCH v2 1/3] " Simon Horman
@ 2013-07-25 11:14 ` Sergei Shtylyov
2013-07-25 13:23 ` Simon Horman
0 siblings, 1 reply; 8+ messages in thread
From: Sergei Shtylyov @ 2013-07-25 11:14 UTC (permalink / raw)
To: linux-arm-kernel
Hello.
On 25-07-2013 6:13, Simon Horman wrote:
> From: Magnus Damm <damm@opensource.se>
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...
> 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.
> Signed-off-by: Magnus Damm <damm@opensource.se>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> 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 +++++++++++++++++++++++++++
Perhaps arch/arm/boot/dts/ changes should be put into a separate patch?
WBR, Sergei
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 3/3] ARM: shmobile: marzen: Enable ARM_APPENDED_DTB in defconfig
2013-07-25 2:13 ` [PATCH v2 3/3] ARM: shmobile: marzen: Enable ARM_APPENDED_DTB in defconfig Simon Horman
@ 2013-07-25 11:19 ` Sergei Shtylyov
2013-07-25 13:23 ` Simon Horman
0 siblings, 1 reply; 8+ messages in thread
From: Sergei Shtylyov @ 2013-07-25 11:19 UTC (permalink / raw)
To: linux-arm-kernel
Hello.
On 25-07-2013 6:13, Simon Horman wrote:
> "ARM: shmobile: marzen: Switch to DT_MACHINE_START" moves marzen
> over to use DT_MACHINE_START, however, the prevelant boot loader
s/prevelant/prevalent/?
> 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.
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
WBR, Sergei
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/3] ARM: shmobile: marzen: Switch to DT_MACHINE_START
2013-07-25 11:14 ` Sergei Shtylyov
@ 2013-07-25 13:23 ` Simon Horman
0 siblings, 0 replies; 8+ messages in thread
From: Simon Horman @ 2013-07-25 13:23 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Jul 25, 2013 at 07:14:16PM +0400, Sergei Shtylyov wrote:
> Hello.
>
> On 25-07-2013 6:13, Simon Horman wrote:
>
> >From: Magnus Damm <damm@opensource.se>
>
> 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.
> >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.
>
> >Signed-off-by: Magnus Damm <damm@opensource.se>
> >Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
>
> >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 +++++++++++++++++++++++++++
>
> Perhaps arch/arm/boot/dts/ changes should be put into a separate patch?
That sounds reasonable.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 3/3] ARM: shmobile: marzen: Enable ARM_APPENDED_DTB in defconfig
2013-07-25 11:19 ` Sergei Shtylyov
@ 2013-07-25 13:23 ` Simon Horman
0 siblings, 0 replies; 8+ messages in thread
From: Simon Horman @ 2013-07-25 13:23 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Jul 25, 2013 at 07:19:50PM +0400, Sergei Shtylyov wrote:
> Hello.
>
> On 25-07-2013 6:13, Simon Horman wrote:
>
> >"ARM: shmobile: marzen: Switch to DT_MACHINE_START" moves marzen
> >over to use DT_MACHINE_START, however, the prevelant boot loader
>
> s/prevelant/prevalent/?
Thanks, I will fix that.
> >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.
>
> >Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
>
> WBR, Sergei
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-07-25 13:23 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-25 2:13 [PATCH v2 0/3] ARM: shmobile: marzen: Switch to DT_MACHINE_START Simon Horman
2013-07-25 2:13 ` [PATCH v2 1/3] " Simon Horman
2013-07-25 11:14 ` Sergei Shtylyov
2013-07-25 13:23 ` Simon Horman
2013-07-25 2:13 ` [PATCH v2 2/3] ARM: shmobile: r8a7779: Rely on DT for SMP CPU info Simon Horman
2013-07-25 2:13 ` [PATCH v2 3/3] ARM: shmobile: marzen: Enable ARM_APPENDED_DTB in defconfig Simon Horman
2013-07-25 11:19 ` Sergei Shtylyov
2013-07-25 13:23 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).