diff options
author | Eugene Konev <ejka@imfi.kspu.ru> | 2007-03-25 05:42:16 +0000 |
---|---|---|
committer | Eugene Konev <ejka@imfi.kspu.ru> | 2007-03-25 05:42:16 +0000 |
commit | d81c7f76b91ad14244f1e036f29c806d85db5809 (patch) | |
tree | 6615342c2c9af5a280d19ee6482b379de367b8ef /target/linux/ar7-2.6/files/drivers/char/watchdog/ar7_wdt.c | |
parent | 8c2cf394a32d42ff64605fdfb3168ce745f94b44 (diff) | |
download | upstream-d81c7f76b91ad14244f1e036f29c806d85db5809.tar.gz upstream-d81c7f76b91ad14244f1e036f29c806d85db5809.tar.bz2 upstream-d81c7f76b91ad14244f1e036f29c806d85db5809.zip |
ar7: clocks setup (prerequisite for dsl/usb) and misc cleanups.
SVN-Revision: 6693
Diffstat (limited to 'target/linux/ar7-2.6/files/drivers/char/watchdog/ar7_wdt.c')
-rw-r--r-- | target/linux/ar7-2.6/files/drivers/char/watchdog/ar7_wdt.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/target/linux/ar7-2.6/files/drivers/char/watchdog/ar7_wdt.c b/target/linux/ar7-2.6/files/drivers/char/watchdog/ar7_wdt.c index 00919e76e7..59ac693d43 100644 --- a/target/linux/ar7-2.6/files/drivers/char/watchdog/ar7_wdt.c +++ b/target/linux/ar7-2.6/files/drivers/char/watchdog/ar7_wdt.c @@ -70,9 +70,6 @@ typedef struct { static struct semaphore open_semaphore; static unsigned expect_close; -/* XXX correct? assumed to be sysfreq/2. get this dynamically ... */ -#define vbus_freq (ar7_bus_freq() / 2) - /* XXX currently fixed, allows max margin ~68.72 secs */ #define prescale_value 0xFFFF @@ -143,14 +140,14 @@ static void ar7_wdt_update_margin(int new_margin) { u32 change; - change = new_margin * (vbus_freq / prescale_value); + change = new_margin * (ar7_vbus_freq() / prescale_value); if (change < 1) change = 1; if (change > 0xFFFF) change = 0xFFFF; ar7_wdt_change(change); - margin = change * prescale_value / vbus_freq; + margin = change * prescale_value / ar7_vbus_freq(); printk(KERN_INFO DRVNAME ": timer margin %d seconds (prescale %d, change %d, freq %d)\n", - margin, prescale_value, change, vbus_freq); + margin, prescale_value, change, ar7_vbus_freq()); } static void ar7_wdt_enable_wdt(void) |