Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 209318
b: refs/heads/master
c: e802e32
h: refs/heads/master
v: v3
  • Loading branch information
dann frazier authored and Wim Van Sebroeck committed Aug 13, 2010
1 parent d128400 commit 26fb52b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6b7f3d5321fef4c050073ae08ed9db6c83bb85f1
refs/heads/master: e802e32d2b42ce1384baf4e150f444477729aad2
5 changes: 3 additions & 2 deletions trunk/drivers/watchdog/hpwdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <asm/cacheflush.h>

#define HPWDT_VERSION "1.1.1"
#define SECS_TO_TICKS(secs) ((secs) * 1000 / 128)
#define DEFAULT_MARGIN 30

static unsigned int soft_margin = DEFAULT_MARGIN; /* in seconds */
Expand Down Expand Up @@ -410,7 +411,7 @@ static int __devinit detect_cru_service(void)
*/
static void hpwdt_start(void)
{
reload = (soft_margin * 1000) / 128;
reload = SECS_TO_TICKS(soft_margin);
iowrite16(reload, hpwdt_timer_reg);
iowrite16(0x85, hpwdt_timer_con);
}
Expand Down Expand Up @@ -443,7 +444,7 @@ static int hpwdt_change_timer(int new_margin)
printk(KERN_DEBUG
"hpwdt: New timer passed in is %d seconds.\n",
new_margin);
reload = (soft_margin * 1000) / 128;
reload = SECS_TO_TICKS(soft_margin);

return 0;
}
Expand Down

0 comments on commit 26fb52b

Please sign in to comment.