Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 123960
b: refs/heads/master
c: 28a6238
h: refs/heads/master
v: v3
  • Loading branch information
Eric Miao committed Dec 29, 2008
1 parent 6c33ba5 commit 51442a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 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: 6769717d5d51596618f6b143008d8ace11ec8a69
refs/heads/master: 28a623855f737a905b90a1616107ad813bfcd6e9
11 changes: 6 additions & 5 deletions trunk/drivers/watchdog/sa1100_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
#include <mach/reset.h>
#include <mach/hardware.h>

#define OSCR_FREQ CLOCK_TICK_RATE

static unsigned long oscr_freq;
static unsigned long sa1100wdt_users;
static int pre_margin;
static int boot_status;
Expand Down Expand Up @@ -123,12 +122,12 @@ static long sa1100dog_ioctl(struct file *file, unsigned int cmd,
break;
}

pre_margin = OSCR_FREQ * time;
pre_margin = oscr_freq * time;
OSMR3 = OSCR + pre_margin;
/*fall through*/

case WDIOC_GETTIMEOUT:
ret = put_user(pre_margin / OSCR_FREQ, p);
ret = put_user(pre_margin / oscr_freq, p);
break;
}
return ret;
Expand All @@ -155,14 +154,16 @@ static int __init sa1100dog_init(void)
{
int ret;

oscr_freq = get_clock_tick_rate();

/*
* Read the reset status, and save it for later. If
* we suspend, RCSR will be cleared, and the watchdog
* reset reason will be lost.
*/
boot_status = (reset_status & RESET_STATUS_WATCHDOG) ?
WDIOF_CARDRESET : 0;
pre_margin = OSCR_FREQ * margin;
pre_margin = oscr_freq * margin;

ret = misc_register(&sa1100dog_miscdev);
if (ret == 0)
Expand Down

0 comments on commit 51442a2

Please sign in to comment.