[U-Boot] [PATCH] mx5/6 timer: Use defined CONFIG_SYS_MX*_CLK32

Benoît Thébaudeau benoit.thebaudeau at advansee.com
Tue Aug 14 17:01:07 CEST 2012


Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau at advansee.com>
Cc: Stefano Babic <sbabic at denx.de>
---
 .../arch/arm/cpu/armv7/imx-common/timer.c          |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git u-boot-4d3c95f.orig/arch/arm/cpu/armv7/imx-common/timer.c u-boot-4d3c95f/arch/arm/cpu/armv7/imx-common/timer.c
index 1645ff8..ad67367 100644
--- u-boot-4d3c95f.orig/arch/arm/cpu/armv7/imx-common/timer.c
+++ u-boot-4d3c95f/arch/arm/cpu/armv7/imx-common/timer.c
@@ -44,7 +44,11 @@ static struct mxc_gpt *cur_gpt = (struct mxc_gpt *)GPT1_BASE_ADDR;
 #define GPTCR_FRR		(1 << 9)	/* Freerun / restart */
 #define GPTCR_CLKSOURCE_32	(4 << 6)	/* Clock source */
 #define GPTCR_TEN		1		/* Timer enable */
-#define CLK_32KHZ		32768		/* 32Khz input */
+#if defined(CONFIG_MX51) || defined(CONFIG_MX53)
+#define CLK_32KHZ		CONFIG_SYS_MX5_CLK32
+#elif defined(CONFIG_MX6Q)
+#define CLK_32KHZ		CONFIG_SYS_MX6_CLK32
+#endif
 
 DECLARE_GLOBAL_DATA_PTR;
 


More information about the U-Boot mailing list