[U-Boot] [PATCH 25/28] SPEAr : Enabling GPT clock explicitly

Vipin KUMAR vipin.kumar at st.com
Wed Jul 14 07:10:01 CEST 2010


From: Vipin KUMAR <vipin.kumar at st.com>

uboot needs gpt for timer operations. This clock was enabled from previous level
booting software until now. This patch enables it in uboot explicitly

Signed-off-by: Vipin Kumar <vipin.kumar at st.com>
---
 arch/arm/cpu/arm926ejs/spear/cpu.c         |    6 ++++++
 arch/arm/include/asm/arch-spear/spr_misc.h |    2 ++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/spear/cpu.c b/arch/arm/cpu/arm926ejs/spear/cpu.c
index 0f66e05..4dc7d69 100644
--- a/arch/arm/cpu/arm926ejs/spear/cpu.c
+++ b/arch/arm/cpu/arm926ejs/spear/cpu.c
@@ -35,6 +35,12 @@ int arch_cpu_init(void)
 
 	periph1_clken = readl(&misc_p->periph1_clken);
 
+#if defined(CONFIG_SPEAR3XX)
+	periph1_clken |= MISC_GPT2ENB;
+#elif defined(CONFIG_SPEAR600)
+	periph1_clken |= MISC_GPT3ENB;
+#endif
+
 #if defined(CONFIG_PL011_SERIAL)
 	periph1_clken |= MISC_UART0ENB;
 #endif
diff --git a/arch/arm/include/asm/arch-spear/spr_misc.h b/arch/arm/include/asm/arch-spear/spr_misc.h
index 045d2bb..b10c726 100644
--- a/arch/arm/include/asm/arch-spear/spr_misc.h
+++ b/arch/arm/include/asm/arch-spear/spr_misc.h
@@ -128,6 +128,8 @@ struct misc_regs {
 #define MISC_USBDENB			0x01000000
 #define MISC_ETHENB			0x00800000
 #define MISC_SMIENB			0x00200000
+#define MISC_GPT3ENB			0x00010000
+#define MISC_GPT2ENB			0x00000800
 #define MISC_FSMCENB			0x00000200
 #define MISC_I2CENB			0x00000080
 #define MISC_UART0ENB			0x00000008
-- 
1.6.0.2



More information about the U-Boot mailing list