diff options
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/Kconfig | 8 | ||||
-rw-r--r-- | drivers/watchdog/at91sam9_wdt.c | 2 | ||||
-rw-r--r-- | drivers/watchdog/booke_wdt.c | 5 | ||||
-rw-r--r-- | drivers/watchdog/sa1100_wdt.c | 1 |
4 files changed, 10 insertions, 6 deletions
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 1a22fe782a27..4fd3fa5546b1 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig | |||
@@ -67,11 +67,11 @@ config AT91RM9200_WATCHDOG | |||
67 | system when the timeout is reached. | 67 | system when the timeout is reached. |
68 | 68 | ||
69 | config AT91SAM9X_WATCHDOG | 69 | config AT91SAM9X_WATCHDOG |
70 | tristate "AT91SAM9X watchdog" | 70 | tristate "AT91SAM9X / AT91CAP9 watchdog" |
71 | depends on WATCHDOG && (ARCH_AT91SAM9260 || ARCH_AT91SAM9261) | 71 | depends on ARCH_AT91 && !ARCH_AT91RM9200 |
72 | help | 72 | help |
73 | Watchdog timer embedded into AT91SAM9X chips. This will reboot your | 73 | Watchdog timer embedded into AT91SAM9X and AT91CAP9 chips. This will |
74 | system when the timeout is reached. | 74 | reboot your system when the timeout is reached. |
75 | 75 | ||
76 | config 21285_WATCHDOG | 76 | config 21285_WATCHDOG |
77 | tristate "DC21285 watchdog" | 77 | tristate "DC21285 watchdog" |
diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c index b4babfc31586..b1da287f90ec 100644 --- a/drivers/watchdog/at91sam9_wdt.c +++ b/drivers/watchdog/at91sam9_wdt.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <linux/bitops.h> | 30 | #include <linux/bitops.h> |
31 | #include <linux/uaccess.h> | 31 | #include <linux/uaccess.h> |
32 | 32 | ||
33 | #include <asm/arch/at91_wdt.h> | 33 | #include <mach/at91_wdt.h> |
34 | 34 | ||
35 | #define DRV_NAME "AT91SAM9 Watchdog" | 35 | #define DRV_NAME "AT91SAM9 Watchdog" |
36 | 36 | ||
diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c index c3b78a76f173..225398fd5049 100644 --- a/drivers/watchdog/booke_wdt.c +++ b/drivers/watchdog/booke_wdt.c | |||
@@ -42,8 +42,10 @@ u32 booke_wdt_period = WDT_PERIOD_DEFAULT; | |||
42 | 42 | ||
43 | #ifdef CONFIG_FSL_BOOKE | 43 | #ifdef CONFIG_FSL_BOOKE |
44 | #define WDTP(x) ((((63-x)&0x3)<<30)|(((63-x)&0x3c)<<15)) | 44 | #define WDTP(x) ((((63-x)&0x3)<<30)|(((63-x)&0x3c)<<15)) |
45 | #define WDTP_MASK (WDTP(0)) | ||
45 | #else | 46 | #else |
46 | #define WDTP(x) (TCR_WP(x)) | 47 | #define WDTP(x) (TCR_WP(x)) |
48 | #define WDTP_MASK (TCR_WP_MASK) | ||
47 | #endif | 49 | #endif |
48 | 50 | ||
49 | static DEFINE_SPINLOCK(booke_wdt_lock); | 51 | static DEFINE_SPINLOCK(booke_wdt_lock); |
@@ -65,6 +67,7 @@ static void __booke_wdt_enable(void *data) | |||
65 | /* clear status before enabling watchdog */ | 67 | /* clear status before enabling watchdog */ |
66 | __booke_wdt_ping(NULL); | 68 | __booke_wdt_ping(NULL); |
67 | val = mfspr(SPRN_TCR); | 69 | val = mfspr(SPRN_TCR); |
70 | val &= ~WDTP_MASK; | ||
68 | val |= (TCR_WIE|TCR_WRC(WRC_CHIP)|WDTP(booke_wdt_period)); | 71 | val |= (TCR_WIE|TCR_WRC(WRC_CHIP)|WDTP(booke_wdt_period)); |
69 | 72 | ||
70 | mtspr(SPRN_TCR, val); | 73 | mtspr(SPRN_TCR, val); |
@@ -114,7 +117,7 @@ static long booke_wdt_ioctl(struct file *file, | |||
114 | case WDIOC_SETTIMEOUT: | 117 | case WDIOC_SETTIMEOUT: |
115 | if (get_user(booke_wdt_period, p)) | 118 | if (get_user(booke_wdt_period, p)) |
116 | return -EFAULT; | 119 | return -EFAULT; |
117 | mtspr(SPRN_TCR, (mfspr(SPRN_TCR) & ~WDTP(0)) | | 120 | mtspr(SPRN_TCR, (mfspr(SPRN_TCR) & ~WDTP_MASK) | |
118 | WDTP(booke_wdt_period)); | 121 | WDTP(booke_wdt_period)); |
119 | return 0; | 122 | return 0; |
120 | case WDIOC_GETTIMEOUT: | 123 | case WDIOC_GETTIMEOUT: |
diff --git a/drivers/watchdog/sa1100_wdt.c b/drivers/watchdog/sa1100_wdt.c index ed01e4c2beff..d6fbb4657210 100644 --- a/drivers/watchdog/sa1100_wdt.c +++ b/drivers/watchdog/sa1100_wdt.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/bitops.h> | 28 | #include <linux/bitops.h> |
29 | #include <linux/uaccess.h> | 29 | #include <linux/uaccess.h> |
30 | #include <linux/timex.h> | ||
30 | 31 | ||
31 | #ifdef CONFIG_ARCH_PXA | 32 | #ifdef CONFIG_ARCH_PXA |
32 | #include <mach/pxa-regs.h> | 33 | #include <mach/pxa-regs.h> |