From: Felix Fietkau Date: Wed, 28 Aug 2013 08:41:42 +0000 (+0200) Subject: MIPS: ath79: Fix ar933x watchdog clock X-Git-Tag: upstream/snapshot3+hdmi~4311^2~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a1191927ace7e6f827132aa9e062779eb3f11fa5;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git MIPS: ath79: Fix ar933x watchdog clock The watchdog device on the AR933x is connected to the AHB clock, however the current code uses the reference clock. Due to the wrong rate, the watchdog driver can't calculate correct register values for a given timeout value and the watchdog unexpectedly restarts the system. The code uses the wrong value since the initial commit 04225e1d227c8e68d685936ecf42ac175fec0e54 (MIPS: ath79: add AR933X specific clock init) The patch fixes the code to use the correct clock rate to avoid the problem. Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau Signed-off-by: Gabor Juhos Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/5777/ Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/ath79/clock.c b/arch/mips/ath79/clock.c index 765ef30..733017b 100644 --- a/arch/mips/ath79/clock.c +++ b/arch/mips/ath79/clock.c @@ -164,7 +164,7 @@ static void __init ar933x_clocks_init(void) ath79_ahb_clk.rate = freq / t; } - ath79_wdt_clk.rate = ath79_ref_clk.rate; + ath79_wdt_clk.rate = ath79_ahb_clk.rate; ath79_uart_clk.rate = ath79_ref_clk.rate; }