aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/watchdog/Kconfig3
-rw-r--r--drivers/watchdog/bcm2835_wdt.c10
-rw-r--r--drivers/watchdog/gef_wdt.c1
-rw-r--r--drivers/watchdog/mena21_wdt.c1
-rw-r--r--drivers/watchdog/moxart_wdt.c1
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};
306MODULE_DEVICE_TABLE(of, gef_wdt_ids);
306 307
307static struct platform_driver gef_wdt_driver = { 308static 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};
256MODULE_DEVICE_TABLE(of, a21_wdt_ids);
256 257
257static struct platform_driver a21_wdt_driver = { 258static 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};
171MODULE_DEVICE_TABLE(of, moxart_watchdog_match);
171 172
172static struct platform_driver moxart_wdt_driver = { 173static struct platform_driver moxart_wdt_driver = {
173 .probe = moxart_wdt_probe, 174 .probe = moxart_wdt_probe,