From: Vaibhav Hiremath Date: Mon, 1 Apr 2013 02:22:21 +0000 (-0600) Subject: ARM: OMAP2+: am335x: Change the wdt1 func clk src to per_32k clk X-Git-Tag: v3.10-rc1~63^2~7^2~1^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=da91b89eb76d4ecddcfc7fca3b8422891eb5e62e;p=platform%2Fkernel%2Flinux-stable.git ARM: OMAP2+: am335x: Change the wdt1 func clk src to per_32k clk WDT1 module can take one of the below clocks as input functional clock - - On-Chip 32K RC Osc [default/reset] - 32K from PRCM The On-Chip 32K RC Osc clock is not an accurate clock-source as per the design/spec, so as a result, for example, timer which supposed to get expired @60Sec, but will expire somewhere ~@40Sec, which is not expected by any use-case. The solution here is to switch the input clock-source to PRCM generated 32K clock-source during boot-time itself. Signed-off-by: Vaibhav Hiremath Cc: Santosh Shilimkar Cc: Benoit Cousson Cc: Paul Walmsley --- diff --git a/arch/arm/mach-omap2/cclock33xx_data.c b/arch/arm/mach-omap2/cclock33xx_data.c index 476b820..7f091c8 100644 --- a/arch/arm/mach-omap2/cclock33xx_data.c +++ b/arch/arm/mach-omap2/cclock33xx_data.c @@ -958,6 +958,14 @@ int __init am33xx_clk_init(void) clk_set_parent(&timer3_fck, &sys_clkin_ck); clk_set_parent(&timer6_fck, &sys_clkin_ck); + /* + * The On-Chip 32K RC Osc clock is not an accurate clock-source as per + * the design/spec, so as a result, for example, timer which supposed + * to get expired @60Sec, but will expire somewhere ~@40Sec, which is + * not expected by any use-case, so change WDT1 clock source to PRCM + * 32KHz clock. + */ + clk_set_parent(&wdt1_fck, &clkdiv32k_ick); return 0; }