diff mbox

[U-Boot,SPEAr,Fixes,11/11] spear3xx: FIX: Enable access to memory for spear310 and spear320

Message ID c068a18afb68123b769ebd96ea22f304d9ad7cb3.1351877185.git.vipin.kumar@st.com
State Deferred
Delegated to: Vipin Kumar
Headers show

Commit Message

Vipin Kumar Nov. 2, 2012, 5:39 p.m. UTC
The memory access to RAS is necessary for the operation of the peripherals
instantiated inside RAS. Enable this clock to make macb work

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
---
 arch/arm/cpu/arm926ejs/spear/cpu.c     | 5 +++++
 arch/arm/include/asm/arch-spear/misc.h | 3 +++
 2 files changed, 8 insertions(+)
diff mbox

Patch

diff --git a/arch/arm/cpu/arm926ejs/spear/cpu.c b/arch/arm/cpu/arm926ejs/spear/cpu.c
index 59655f5..8d3472b 100644
--- a/arch/arm/cpu/arm926ejs/spear/cpu.c
+++ b/arch/arm/cpu/arm926ejs/spear/cpu.c
@@ -94,6 +94,11 @@  int arch_cpu_init(void)
 
 	writel(periph1_clken, &misc_p->periph1_clken);
 
+#if defined(CONFIG_SOC_SPEAR310) || defined(CONFIG_SOC_SPEAR320)
+	writel(readl(&misc_p->amem_cfg_ctrl) | MISC_AMEM_CLKENB,
+			&misc_p->amem_cfg_ctrl);
+#endif
+
 	/* Early driver initializations */
 #if defined(CONFIG_ST_SMI)
 	smi_init();
diff --git a/arch/arm/include/asm/arch-spear/misc.h b/arch/arm/include/asm/arch-spear/misc.h
index bb97650..266897e 100644
--- a/arch/arm/include/asm/arch-spear/misc.h
+++ b/arch/arm/include/asm/arch-spear/misc.h
@@ -157,6 +157,9 @@  struct misc_regs {
 #define MISC_PRISOCID_SHFT		16
 #define MISC_SECSOCID_SHFT		8
 
+/* amem_cfg_ctrl */
+#define MISC_AMEM_CLKENB		0x00000001
+
 /* synth_clk */
 #define MISC_SYNTH23			0x00020003