Skip to contentSkip to conversation

ARM: shmobile: r8a7740: Multiplatform support

PATCH Superseded Magnus Damm 2 participants 2 messages Aug 8, 2014 – Aug 11, 2014

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Magnus Damm

author maintainer
#0 lore raw

PATCH 1/1 ARM: shmobile: r8a7740: Multiplatform support

From: Magnus Damm <[email protected]>

Enable r8a7740 Multiplatform support for the generic r8a7740 machine vector. No board support is enabled, and the board code for Armadillo 800 EVA DT Reference is left by itself.

Once the r8a7740 CCF DTS bits are merged together with SCIF and CMT clock changes and a CMT DT update it will be possible to boot an Armadillo 800 EVA board using the generic r8a7740 machine vector.

---

Built on top of renesas-devel-v3.16-20140808 and
"[PATCH] ARM: shmobile: Partial build of pm-rmobile.c for multiplatform"

 arch/arm/mach-shmobile/Kconfig         |    6 ++++++
 arch/arm/mach-shmobile/pm-r8a7740.c    |    5 ++---
 arch/arm/mach-shmobile/r8a7740.h       |    4 ++--
 arch/arm/mach-shmobile/setup-r8a7740.c |    8 +++++++-
 4 files changed, 17 insertions(+), 6 deletions(-)
arch/arm/mach-shmobile/Kconfig +6 -0
@@ -26,6 +26,12 @@ config ARCH_R7S72100
 	bool "RZ/A1H (R7S72100)"
 	select SYS_SUPPORTS_SH_MTU2
 
+config ARCH_R8A7740
+	bool "R-Mobile A1 (R8A77400)"
+	select RENESAS_INTC_IRQPIN
+	select SYS_SUPPORTS_SH_CMT
+	select SYS_SUPPORTS_SH_TMU
+
 config ARCH_R8A7779
 	bool "R-Car H1 (R8A77790)"
 	select RENESAS_INTC_IRQPIN
arch/arm/mach-shmobile/pm-r8a7740.c +2 -3
@@ -13,7 +13,7 @@
 #include "common.h"
 #include "pm-rmobile.h"
 
-#ifdef CONFIG_PM
+#if defined(CONFIG_PM) && !defined(CONFIG_ARCH_MULTIPLATFORM)
 static int r8a7740_pd_a4s_suspend(void)
 {
 	/*
@@ -58,8 +58,7 @@ void __init r8a7740_init_pm_domains(void
 	rmobile_init_domains(r8a7740_pm_domains, ARRAY_SIZE(r8a7740_pm_domains));
 	pm_genpd_add_subdomain_names("A4S", "A3SP");
 }
-
-#endif /* CONFIG_PM */
+#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */
 
 #ifdef CONFIG_SUSPEND
 static int r8a7740_enter_suspend(suspend_state_t suspend_state)
arch/arm/mach-shmobile/r8a7740.h +2 -2
@@ -54,10 +54,10 @@ extern void r8a7740_clock_init(u8 md_ck)
 extern void r8a7740_pinmux_init(void);
 extern void r8a7740_pm_init(void);
 
-#ifdef CONFIG_PM
+#if defined(CONFIG_PM) && !defined(CONFIG_ARCH_MULTIPLATFORM)
 extern void __init r8a7740_init_pm_domains(void);
 #else
 static inline void r8a7740_init_pm_domains(void) {}
-#endif /* CONFIG_PM */
+#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */
 
 #endif /* __ASM_R8A7740_H__ */
arch/arm/mach-shmobile/setup-r8a7740.c +7 -1
@@ -36,6 +36,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
+#include <asm/hardware/cache-l2x0.h>
 
 #include "common.h"
 #include "dma-register.h"
@@ -827,7 +828,12 @@ void __init r8a7740_init_irq_of(void)
 
 static void __init r8a7740_generic_init(void)
 {
-	r8a7740_clock_init(0);
+	r8a7740_meram_workaround();
+
+#ifdef CONFIG_CACHE_L2X0
+	/* Shared attribute override enable, 32K*8way */
+	l2x0_init(IOMEM(0xf0002000), 0x00400000, 0xc20f0fff);
+#endif
 	r8a7740_add_standard_devices_dt();
 }
 
#1 lore raw
Quoted 10 lines · Magnus Damm

From: Magnus Damm <[email protected]>

Enable r8a7740 Multiplatform support for the generic r8a7740 machine vector. No board support is enabled, and the board code for Armadillo 800 EVA DT Reference is left by itself.

Once the r8a7740 CCF DTS bits are merged together with SCIF and CMT clock changes and a CMT DT update it will be possible to boot an Armadillo 800 EVA board using the generic r8a7740 machine vector.

As part of this change uses the same ifdef scheme as "ARM: shmobile: Partial build of pm-rmobile.c for multiplatform" I would like to wait for disucssion of that patch to conclude before taking this one.

Quoted 93 lines

---

Built on top of renesas-devel-v3.16-20140808 and
"[PATCH] ARM: shmobile: Partial build of pm-rmobile.c for multiplatform"

 arch/arm/mach-shmobile/Kconfig         |    6 ++++++
 arch/arm/mach-shmobile/pm-r8a7740.c    |    5 ++---
 arch/arm/mach-shmobile/r8a7740.h       |    4 ++--
 arch/arm/mach-shmobile/setup-r8a7740.c |    8 +++++++-
 4 files changed, 17 insertions(+), 6 deletions(-)
arch/arm/mach-shmobile/Kconfig +6 -0
@@ -26,6 +26,12 @@ config ARCH_R7S72100
 	bool "RZ/A1H (R7S72100)"
 	select SYS_SUPPORTS_SH_MTU2
 
+config ARCH_R8A7740
+	bool "R-Mobile A1 (R8A77400)"
+	select RENESAS_INTC_IRQPIN
+	select SYS_SUPPORTS_SH_CMT
+	select SYS_SUPPORTS_SH_TMU
+
 config ARCH_R8A7779
 	bool "R-Car H1 (R8A77790)"
 	select RENESAS_INTC_IRQPIN
arch/arm/mach-shmobile/pm-r8a7740.c +2 -3
@@ -13,7 +13,7 @@
 #include "common.h"
 #include "pm-rmobile.h"
 
-#ifdef CONFIG_PM
+#if defined(CONFIG_PM) && !defined(CONFIG_ARCH_MULTIPLATFORM)
 static int r8a7740_pd_a4s_suspend(void)
 {
 	/*
@@ -58,8 +58,7 @@ void __init r8a7740_init_pm_domains(void
 	rmobile_init_domains(r8a7740_pm_domains, ARRAY_SIZE(r8a7740_pm_domains));
 	pm_genpd_add_subdomain_names("A4S", "A3SP");
 }
-
-#endif /* CONFIG_PM */
+#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */
 
 #ifdef CONFIG_SUSPEND
 static int r8a7740_enter_suspend(suspend_state_t suspend_state)
arch/arm/mach-shmobile/r8a7740.h +2 -2
@@ -54,10 +54,10 @@ extern void r8a7740_clock_init(u8 md_ck)
 extern void r8a7740_pinmux_init(void);
 extern void r8a7740_pm_init(void);
 
-#ifdef CONFIG_PM
+#if defined(CONFIG_PM) && !defined(CONFIG_ARCH_MULTIPLATFORM)
 extern void __init r8a7740_init_pm_domains(void);
 #else
 static inline void r8a7740_init_pm_domains(void) {}
-#endif /* CONFIG_PM */
+#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */
 
 #endif /* __ASM_R8A7740_H__ */
arch/arm/mach-shmobile/setup-r8a7740.c +7 -2
@@ -36,6 +36,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
+#include <asm/hardware/cache-l2x0.h>
 
 #include "common.h"
 #include "dma-register.h"
@@ -827,7 +828,12 @@ void __init r8a7740_init_irq_of(void)
 
 static void __init r8a7740_generic_init(void)
 {
-	r8a7740_clock_init(0);
+	r8a7740_meram_workaround();
+
+#ifdef CONFIG_CACHE_L2X0
+	/* Shared attribute override enable, 32K*8way */
+	l2x0_init(IOMEM(0xf0002000), 0x00400000, 0xc20f0fff);
+#endif
 	r8a7740_add_standard_devices_dt();
 }
 
--

To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html