diff options
author | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2007-12-27 14:58:48 +0000 |
---|---|---|
committer | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2007-12-27 14:58:48 +0000 |
commit | 23d61f22e9a68a7873626df4a01c60794f1acb7a (patch) | |
tree | 3e4370267151420e590118d11e642251d0727a65 /target/linux/adm5120/files/drivers/char/watchdog/adm5120_wdt.c | |
parent | 4bb1a03501d50b2f61888464e56ad1c030f207bf (diff) |
[adm5120] change switch register access macros
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9962 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/adm5120/files/drivers/char/watchdog/adm5120_wdt.c')
-rw-r--r-- | target/linux/adm5120/files/drivers/char/watchdog/adm5120_wdt.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/target/linux/adm5120/files/drivers/char/watchdog/adm5120_wdt.c b/target/linux/adm5120/files/drivers/char/watchdog/adm5120_wdt.c index 982fe39c4..2439fbc7f 100644 --- a/target/linux/adm5120/files/drivers/char/watchdog/adm5120_wdt.c +++ b/target/linux/adm5120/files/drivers/char/watchdog/adm5120_wdt.c @@ -1,5 +1,5 @@ /* - * ADM5120_WDT 0.01: Infineon ADM5120 SoC watchdog driver + * ADM5120_WDT 0.01: Infineon ADM5120 SoC watchdog driver * Copyright (c) Ondrej Zajicek <santiago@crfreenet.org>, 2007 * * based on @@ -47,26 +47,26 @@ MODULE_LICENSE("GPL"); static inline void wdt_set_timeout(void) { u32 val = (1 << 31) | (((timeout * 100) & 0x7FFF) << 16); - SW_WRITE_REG(WDOG0, val); + SW_WRITE_REG(SWITCH_REG_WDOG0, val); } -/* +/* It looks like WDOG0-register-write don't modify counter, but WDOG0-register-read resets counter. */ static inline void wdt_reset_counter(void) { - SW_READ_REG(WDOG0); + SW_READ_REG(SWITCH_REG_WDOG0); } static inline void wdt_disable(void) { - SW_WRITE_REG(WDOG0, 0x7FFF0000); + SW_WRITE_REG(SWITCH_REG_WDOG0, 0x7FFF0000); } - + static int wdt_open(struct inode *inode, struct file *file) { /* Allow only one person to hold it open */ |