Skip to content
Browse files

ARM: herring: watchdog: Increase timeout and use realtime workqueue

The old code created a realtime workqueue, but did not use it. This
could cause a reboot if the default workqueue was blocked for more
than one second. Also, the old timeout was short enough to often
trigger a watchdog reset when duming the kernel log in the fiq
debugger.

Change-Id: I556e6bb85dd9a166cab98270a4f1ba23a9f4069c
Signed-off-by: Arve Hjønnevåg <arve@android.com>
  • Loading branch information...
1 parent 8d9ff17 commit 119403ddb1ba291fcdcd4a5eaf4e1cf1e6e24e95 Arve Hjønnevåg committed Nov 23, 2010
Showing with 5 additions and 5 deletions.
  1. +5 −5 arch/arm/mach-s5pv210/herring-watchdog.c
View
10 arch/arm/mach-s5pv210/herring-watchdog.c
@@ -28,19 +28,19 @@
#include <linux/io.h>
/* reset timeout in PCLK/256/128 (~2048:1s) */
-static unsigned watchdog_reset = (5 * 2048);
+static unsigned watchdog_reset = (30 * 2048);
/* pet timeout in jiffies */
-static unsigned watchdog_pet = (4 * HZ);
+static unsigned watchdog_pet = (10 * HZ);
-struct workqueue_struct *watchdog_wq;
+static struct workqueue_struct *watchdog_wq;
static void watchdog_workfunc(struct work_struct *work);
static DECLARE_DELAYED_WORK(watchdog_work, watchdog_workfunc);
static void watchdog_workfunc(struct work_struct *work)
{
writel(watchdog_reset, S3C2410_WTCNT);
- schedule_delayed_work(&watchdog_work, watchdog_pet);
+ queue_delayed_work(watchdog_wq, &watchdog_work, watchdog_pet);
}
static void watchdog_start(void)
@@ -61,7 +61,7 @@ static void watchdog_start(void)
writel(val, S3C2410_WTCON);
/* make sure we're ready to pet the dog */
- schedule_delayed_work(&watchdog_work, watchdog_pet);
+ queue_delayed_work(watchdog_wq, &watchdog_work, watchdog_pet);
}
static void watchdog_stop(void)

0 comments on commit 119403d

Please sign in to comment.
Something went wrong with that request. Please try again.