From 770471900068e506f0dde9af49aec0a18918eb2e Mon Sep 17 00:00:00 2001 From: hhb Date: Mon, 4 Nov 2013 15:52:43 +0800 Subject: [PATCH] rk watchdog: open wdt operation function --- drivers/watchdog/rk29_wdt.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/watchdog/rk29_wdt.c b/drivers/watchdog/rk29_wdt.c index ff9c51690ddc..cbafbd3b6033 100644 --- a/drivers/watchdog/rk29_wdt.c +++ b/drivers/watchdog/rk29_wdt.c @@ -137,24 +137,23 @@ static void __rk29_wdt_stop(void) wdt_writel(0x0a, RK29_WDT_CR); } -static void rk29_wdt_stop(void) +void rk29_wdt_stop(void) { __rk29_wdt_stop(); clk_disable(wdt_clock); } -/* timeout unit us */ -static int rk29_wdt_set_heartbeat(int timeout) +/* timeout unit second */ +int rk29_wdt_set_heartbeat(int timeout) { unsigned int freq = clk_get_rate(wdt_clock); - unsigned int count; + unsigned int long count; unsigned int torr = 0; unsigned int acc = 1; if (timeout < 1) return -EINVAL; -// freq /= 1000000; count = timeout * freq; count /= 0x10000; @@ -170,7 +169,7 @@ static int rk29_wdt_set_heartbeat(int timeout) return 0; } -static void rk29_wdt_start(void) +void rk29_wdt_start(void) { unsigned long wtcon; clk_enable(wdt_clock); -- 2.34.1