diff mbox

[1/6] ARM: meson: add meson8 machine definition

Message ID 1412198986-26534-2-git-send-email-b.galvani@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Beniamino Galvani Oct. 1, 2014, 9:29 p.m. UTC
This patch adds a machine definition for Amlogic Meson8 SoCs.

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
---
 arch/arm/mach-meson/Kconfig | 5 +++++
 arch/arm/mach-meson/meson.c | 8 ++++++++
 2 files changed, 13 insertions(+)

Comments

Arnd Bergmann Oct. 2, 2014, 9:24 a.m. UTC | #1
On Wednesday 01 October 2014 23:29:41 Beniamino Galvani wrote:
> 
> +static const char * const m8_common_board_compat[] = {
> +       "amlogic,meson8",
> +       NULL,
> +};
> +
>  DT_MACHINE_START(AML8726_MX, "Amlogic Meson6 platform")
>         .dt_compat      = m6_common_board_compat,
>  MACHINE_END
>  
> +DT_MACHINE_START(MESON8, "Amlogic Meson8 platform")
> +       .dt_compat      = m8_common_board_compat,
> +MACHINE_END
> 

I'd just add the meson8 string to the m6_common_board_compat list and
rename it.

	Arnd
Arnd Bergmann Oct. 2, 2014, 9:28 a.m. UTC | #2
On Wednesday 01 October 2014 23:29:41 Beniamino Galvani wrote:
>  DT_MACHINE_START(AML8726_MX, "Amlogic Meson6 platform")
>         .dt_compat      = m6_common_board_compat,
>  MACHINE_END
>  
> +DT_MACHINE_START(MESON8, "Amlogic Meson8 platform")
> +       .dt_compat      = m8_common_board_compat,
> +MACHINE_END

One more thing: since this is a cortex-a9, don't you have to enable
the l2x0 cache controller explicitly? I think you need a
".l2c_aux_mask   = ~0," entry here.

	Arnd
Beniamino Galvani Oct. 2, 2014, 5:05 p.m. UTC | #3
On Thu, Oct 02, 2014 at 11:24:54AM +0200, Arnd Bergmann wrote:
> On Wednesday 01 October 2014 23:29:41 Beniamino Galvani wrote:
> > 
> > +static const char * const m8_common_board_compat[] = {
> > +       "amlogic,meson8",
> > +       NULL,
> > +};
> > +
> >  DT_MACHINE_START(AML8726_MX, "Amlogic Meson6 platform")
> >         .dt_compat      = m6_common_board_compat,
> >  MACHINE_END
> >  
> > +DT_MACHINE_START(MESON8, "Amlogic Meson8 platform")
> > +       .dt_compat      = m8_common_board_compat,
> > +MACHINE_END
> > 
> 
> I'd just add the meson8 string to the m6_common_board_compat list and
> rename it.

From what I've seen so far the two families are very similar and share
most of the IP cores, so a unique DT machine is a good idea.

Does the MACH_MESON8 Kconfig symbol still make sense or can I drop it
and rename MACH_MESON6 to MACH_MESON?

Beniamino
Beniamino Galvani Oct. 2, 2014, 5:08 p.m. UTC | #4
On Thu, Oct 02, 2014 at 11:28:14AM +0200, Arnd Bergmann wrote:
> On Wednesday 01 October 2014 23:29:41 Beniamino Galvani wrote:
> >  DT_MACHINE_START(AML8726_MX, "Amlogic Meson6 platform")
> >         .dt_compat      = m6_common_board_compat,
> >  MACHINE_END
> >  
> > +DT_MACHINE_START(MESON8, "Amlogic Meson8 platform")
> > +       .dt_compat      = m8_common_board_compat,
> > +MACHINE_END
> 
> One more thing: since this is a cortex-a9, don't you have to enable
> the l2x0 cache controller explicitly? I think you need a
> ".l2c_aux_mask   = ~0," entry here.

Will do, thanks.

Beniamino
Carlo Caione Oct. 2, 2014, 6:29 p.m. UTC | #5
On gio, ott 02, 2014 at 07:05:19 +0200, Beniamino Galvani wrote:
> On Thu, Oct 02, 2014 at 11:24:54AM +0200, Arnd Bergmann wrote:
> > On Wednesday 01 October 2014 23:29:41 Beniamino Galvani wrote:
> > > 
> > > +static const char * const m8_common_board_compat[] = {
> > > +       "amlogic,meson8",
> > > +       NULL,
> > > +};
> > > +
> > >  DT_MACHINE_START(AML8726_MX, "Amlogic Meson6 platform")
> > >         .dt_compat      = m6_common_board_compat,
> > >  MACHINE_END
> > >  
> > > +DT_MACHINE_START(MESON8, "Amlogic Meson8 platform")
> > > +       .dt_compat      = m8_common_board_compat,
> > > +MACHINE_END
> > > 
> > 
> > I'd just add the meson8 string to the m6_common_board_compat list and
> > rename it.
> 
> From what I've seen so far the two families are very similar and share
> most of the IP cores, so a unique DT machine is a good idea.
> 
> Does the MACH_MESON8 Kconfig symbol still make sense or can I drop it
> and rename MACH_MESON6 to MACH_MESON?

I would still leave two different MACH_ for meson6 and meson8 since the
two architectures aren't _so_ similar.

thanks,
diff mbox

Patch

diff --git a/arch/arm/mach-meson/Kconfig b/arch/arm/mach-meson/Kconfig
index 2c1154e..b289e8e 100644
--- a/arch/arm/mach-meson/Kconfig
+++ b/arch/arm/mach-meson/Kconfig
@@ -10,4 +10,9 @@  config MACH_MESON6
 	default ARCH_MESON
 	select MESON6_TIMER
 
+config MACH_MESON8
+	bool "Amlogic Meson8 SoCs support"
+	default ARCH_MESON
+	select MESON6_TIMER
+
 endif
diff --git a/arch/arm/mach-meson/meson.c b/arch/arm/mach-meson/meson.c
index 5ee064f..e95d6ae 100644
--- a/arch/arm/mach-meson/meson.c
+++ b/arch/arm/mach-meson/meson.c
@@ -21,7 +21,15 @@  static const char * const m6_common_board_compat[] = {
 	NULL,
 };
 
+static const char * const m8_common_board_compat[] = {
+	"amlogic,meson8",
+	NULL,
+};
+
 DT_MACHINE_START(AML8726_MX, "Amlogic Meson6 platform")
 	.dt_compat	= m6_common_board_compat,
 MACHINE_END
 
+DT_MACHINE_START(MESON8, "Amlogic Meson8 platform")
+	.dt_compat	= m8_common_board_compat,
+MACHINE_END