diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-09-30 13:13:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-09-30 13:13:55 -0400 |
commit | dd36d7393d6310b0c1adefb22fba79c3cf8a577c (patch) | |
tree | aedf3c14c57f3663dbe476155d24a0471f9b5f0f | |
parent | d4e842be2b697eb61c8863fe4b080bf0688198a2 (diff) | |
parent | 3cef072d3bbd4344823545e50d8cb240a6d4635d (diff) |
Merge git://www.linux-watchdog.org/linux-watchdog
Pull watchdog fixes from Wim Van Sebroeck:
"This fixes:
- module autoload for 3 OF platform drivers
- poweroff behaviour on bcm2835 watchdog device
- I2C dependencies for iTCO_wdt.c"
* git://www.linux-watchdog.org/linux-watchdog:
watchdog: iTCO: Fix dependencies on I2C
watchdog: bcm2835: Fix poweroff behaviour
watchdog: Fix module autoload for OF platform driver
-rw-r--r-- | drivers/watchdog/Kconfig | 3 | ||||
-rw-r--r-- | drivers/watchdog/bcm2835_wdt.c | 10 | ||||
-rw-r--r-- | drivers/watchdog/gef_wdt.c | 1 | ||||
-rw-r--r-- | drivers/watchdog/mena21_wdt.c | 1 | ||||
-rw-r--r-- | drivers/watchdog/moxart_wdt.c | 1 |
5 files changed, 13 insertions, 3 deletions
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index c68edc16aa54..79e1aa1b0959 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig | |||
@@ -817,8 +817,9 @@ config ITCO_WDT | |||
817 | tristate "Intel TCO Timer/Watchdog" | 817 | tristate "Intel TCO Timer/Watchdog" |
818 | depends on (X86 || IA64) && PCI | 818 | depends on (X86 || IA64) && PCI |
819 | select WATCHDOG_CORE | 819 | select WATCHDOG_CORE |
820 | depends on I2C || I2C=n | ||
820 | select LPC_ICH if !EXPERT | 821 | select LPC_ICH if !EXPERT |
821 | select I2C_I801 if !EXPERT | 822 | select I2C_I801 if !EXPERT && I2C |
822 | ---help--- | 823 | ---help--- |
823 | Hardware driver for the intel TCO timer based watchdog devices. | 824 | Hardware driver for the intel TCO timer based watchdog devices. |
824 | These drivers are included in the Intel 82801 I/O Controller | 825 | These drivers are included in the Intel 82801 I/O Controller |
diff --git a/drivers/watchdog/bcm2835_wdt.c b/drivers/watchdog/bcm2835_wdt.c index 66c3e656a616..8a5ce5b5a0b6 100644 --- a/drivers/watchdog/bcm2835_wdt.c +++ b/drivers/watchdog/bcm2835_wdt.c | |||
@@ -36,6 +36,13 @@ | |||
36 | #define PM_RSTC_WRCFG_FULL_RESET 0x00000020 | 36 | #define PM_RSTC_WRCFG_FULL_RESET 0x00000020 |
37 | #define PM_RSTC_RESET 0x00000102 | 37 | #define PM_RSTC_RESET 0x00000102 |
38 | 38 | ||
39 | /* | ||
40 | * The Raspberry Pi firmware uses the RSTS register to know which partiton | ||
41 | * to boot from. The partiton value is spread into bits 0, 2, 4, 6, 8, 10. | ||
42 | * Partiton 63 is a special partition used by the firmware to indicate halt. | ||
43 | */ | ||
44 | #define PM_RSTS_RASPBERRYPI_HALT 0x555 | ||
45 | |||
39 | #define SECS_TO_WDOG_TICKS(x) ((x) << 16) | 46 | #define SECS_TO_WDOG_TICKS(x) ((x) << 16) |
40 | #define WDOG_TICKS_TO_SECS(x) ((x) >> 16) | 47 | #define WDOG_TICKS_TO_SECS(x) ((x) >> 16) |
41 | 48 | ||
@@ -151,8 +158,7 @@ static void bcm2835_power_off(void) | |||
151 | * hard reset. | 158 | * hard reset. |
152 | */ | 159 | */ |
153 | val = readl_relaxed(wdt->base + PM_RSTS); | 160 | val = readl_relaxed(wdt->base + PM_RSTS); |
154 | val &= PM_RSTC_WRCFG_CLR; | 161 | val |= PM_PASSWORD | PM_RSTS_RASPBERRYPI_HALT; |
155 | val |= PM_PASSWORD | PM_RSTS_HADWRH_SET; | ||
156 | writel_relaxed(val, wdt->base + PM_RSTS); | 162 | writel_relaxed(val, wdt->base + PM_RSTS); |
157 | 163 | ||
158 | /* Continue with normal reset mechanism */ | 164 | /* Continue with normal reset mechanism */ |
diff --git a/drivers/watchdog/gef_wdt.c b/drivers/watchdog/gef_wdt.c index cc1bdfc2ff71..006e2348022c 100644 --- a/drivers/watchdog/gef_wdt.c +++ b/drivers/watchdog/gef_wdt.c | |||
@@ -303,6 +303,7 @@ static const struct of_device_id gef_wdt_ids[] = { | |||
303 | }, | 303 | }, |
304 | {}, | 304 | {}, |
305 | }; | 305 | }; |
306 | MODULE_DEVICE_TABLE(of, gef_wdt_ids); | ||
306 | 307 | ||
307 | static struct platform_driver gef_wdt_driver = { | 308 | static struct platform_driver gef_wdt_driver = { |
308 | .driver = { | 309 | .driver = { |
diff --git a/drivers/watchdog/mena21_wdt.c b/drivers/watchdog/mena21_wdt.c index 69013007dc47..098fa9c34d6d 100644 --- a/drivers/watchdog/mena21_wdt.c +++ b/drivers/watchdog/mena21_wdt.c | |||
@@ -253,6 +253,7 @@ static const struct of_device_id a21_wdt_ids[] = { | |||
253 | { .compatible = "men,a021-wdt" }, | 253 | { .compatible = "men,a021-wdt" }, |
254 | { }, | 254 | { }, |
255 | }; | 255 | }; |
256 | MODULE_DEVICE_TABLE(of, a21_wdt_ids); | ||
256 | 257 | ||
257 | static struct platform_driver a21_wdt_driver = { | 258 | static struct platform_driver a21_wdt_driver = { |
258 | .probe = a21_wdt_probe, | 259 | .probe = a21_wdt_probe, |
diff --git a/drivers/watchdog/moxart_wdt.c b/drivers/watchdog/moxart_wdt.c index 2789da2c0515..60b0605bd7e6 100644 --- a/drivers/watchdog/moxart_wdt.c +++ b/drivers/watchdog/moxart_wdt.c | |||
@@ -168,6 +168,7 @@ static const struct of_device_id moxart_watchdog_match[] = { | |||
168 | { .compatible = "moxa,moxart-watchdog" }, | 168 | { .compatible = "moxa,moxart-watchdog" }, |
169 | { }, | 169 | { }, |
170 | }; | 170 | }; |
171 | MODULE_DEVICE_TABLE(of, moxart_watchdog_match); | ||
171 | 172 | ||
172 | static struct platform_driver moxart_wdt_driver = { | 173 | static struct platform_driver moxart_wdt_driver = { |
173 | .probe = moxart_wdt_probe, | 174 | .probe = moxart_wdt_probe, |