[ARM] 5390/1: AT91: Watchdog fixes
The recently merged AT91SAM9 watchdog driver uses the AT91SAM9X_WATCHDOG config variable, whereas the original version of the driver (and the platform support code) used AT91SAM9_WATCHDOG. This causes the watchdog platform_device to never be registered, and therefore the driver not to be initialized. This patch: - updates the platform support code to use AT91SAM9X_WATCHDOG. - includes <linux/io.h> to fix compile error (same fix as was applied to at91rm9200_wdt.c) - fixes comment regarding watchdog clock-rates in at91rm9200. Signed-off-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
此提交包含在:
@@ -107,10 +107,10 @@ static int at91_wdt_close(struct inode *inode, struct file *file)
|
||||
static int at91_wdt_settimeout(int new_time)
|
||||
{
|
||||
/*
|
||||
* All counting occurs at SLOW_CLOCK / 128 = 0.256 Hz
|
||||
* All counting occurs at SLOW_CLOCK / 128 = 256 Hz
|
||||
*
|
||||
* Since WDV is a 16-bit counter, the maximum period is
|
||||
* 65536 / 0.256 = 256 seconds.
|
||||
* 65536 / 256 = 256 seconds.
|
||||
*/
|
||||
if ((new_time <= 0) || (new_time > WDT_MAX_TIME))
|
||||
return -EINVAL;
|
||||
|
@@ -18,6 +18,7 @@
|
||||
#include <linux/errno.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/miscdevice.h>
|
||||
#include <linux/module.h>
|
||||
|
新增問題並參考
封鎖使用者