Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
torvalds committed Sep 30, 2015
2 parents d4e842b + 3cef072 commit dd36d73
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
3 changes: 2 additions & 1 deletion drivers/watchdog/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -817,8 +817,9 @@ config ITCO_WDT
tristate "Intel TCO Timer/Watchdog"
depends on (X86 || IA64) && PCI
select WATCHDOG_CORE
depends on I2C || I2C=n
select LPC_ICH if !EXPERT
select I2C_I801 if !EXPERT
select I2C_I801 if !EXPERT && I2C
---help---
Hardware driver for the intel TCO timer based watchdog devices.
These drivers are included in the Intel 82801 I/O Controller
Expand Down
10 changes: 8 additions & 2 deletions drivers/watchdog/bcm2835_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@
#define PM_RSTC_WRCFG_FULL_RESET 0x00000020
#define PM_RSTC_RESET 0x00000102

/*
* The Raspberry Pi firmware uses the RSTS register to know which partiton
* to boot from. The partiton value is spread into bits 0, 2, 4, 6, 8, 10.
* Partiton 63 is a special partition used by the firmware to indicate halt.
*/
#define PM_RSTS_RASPBERRYPI_HALT 0x555

#define SECS_TO_WDOG_TICKS(x) ((x) << 16)
#define WDOG_TICKS_TO_SECS(x) ((x) >> 16)

Expand Down Expand Up @@ -151,8 +158,7 @@ static void bcm2835_power_off(void)
* hard reset.
*/
val = readl_relaxed(wdt->base + PM_RSTS);
val &= PM_RSTC_WRCFG_CLR;
val |= PM_PASSWORD | PM_RSTS_HADWRH_SET;
val |= PM_PASSWORD | PM_RSTS_RASPBERRYPI_HALT;
writel_relaxed(val, wdt->base + PM_RSTS);

/* Continue with normal reset mechanism */
Expand Down
1 change: 1 addition & 0 deletions drivers/watchdog/gef_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ static const struct of_device_id gef_wdt_ids[] = {
},
{},
};
MODULE_DEVICE_TABLE(of, gef_wdt_ids);

static struct platform_driver gef_wdt_driver = {
.driver = {
Expand Down
1 change: 1 addition & 0 deletions drivers/watchdog/mena21_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ static const struct of_device_id a21_wdt_ids[] = {
{ .compatible = "men,a021-wdt" },
{ },
};
MODULE_DEVICE_TABLE(of, a21_wdt_ids);

static struct platform_driver a21_wdt_driver = {
.probe = a21_wdt_probe,
Expand Down
1 change: 1 addition & 0 deletions drivers/watchdog/moxart_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ static const struct of_device_id moxart_watchdog_match[] = {
{ .compatible = "moxa,moxart-watchdog" },
{ },
};
MODULE_DEVICE_TABLE(of, moxart_watchdog_match);

static struct platform_driver moxart_wdt_driver = {
.probe = moxart_wdt_probe,
Expand Down

0 comments on commit dd36d73

Please sign in to comment.