Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Pull watchdog changes from Wim Van Sebroeck:
 - conversion of iTCO_wdt and orion_wdt to the generic watchdog API
 - uses module_platform_driver() for s3c2410_wdt
 - Adds support for Jetway JNF99 Motherboard
 - various fixes

* git://www.linux-watchdog.org/linux-watchdog:
  watchdog: orion_wdt: Convert driver to watchdog core
  watchdog: s3c2410_wdt: Use module_platform_driver()
  watchdog: sch311x_wdt: Fix Polarity when starting watchdog
  Watchdog: OMAP: Fix the runtime pm code to avoid module getting stuck intransition state.
  watchdog: ie6xx_wdt: section mismatch in ie6xx_wdt_probe()
  watchdog: bcm63xx_wdt: fix driver section mismatch
  watchdog: iTCO_wdt.c: convert to watchdog core
  char/ipmi: remove local ioctl defines replaced by generic ones
  watchdog: xilinx: Read clock frequency directly from DT node
  watchdog: coh901327_wdt: use clk_prepare/unprepare
  watchdog: f71808e_wdt: Add support for Jetway JNF99 motherboard
  • Loading branch information
torvalds committed Jul 24, 2012
2 parents 2b84957 + 0dd6e48 commit 3539fc5
Show file tree
Hide file tree
Showing 12 changed files with 121 additions and 374 deletions.
13 changes: 0 additions & 13 deletions drivers/char/ipmi/ipmi_watchdog.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,17 +141,6 @@

#define IPMI_WDOG_TIMER_NOT_INIT_RESP 0x80

/* These are here until the real ones get into the watchdog.h interface. */
#ifndef WDIOC_GETTIMEOUT
#define WDIOC_GETTIMEOUT _IOW(WATCHDOG_IOCTL_BASE, 20, int)
#endif
#ifndef WDIOC_SET_PRETIMEOUT
#define WDIOC_SET_PRETIMEOUT _IOW(WATCHDOG_IOCTL_BASE, 21, int)
#endif
#ifndef WDIOC_GET_PRETIMEOUT
#define WDIOC_GET_PRETIMEOUT _IOW(WATCHDOG_IOCTL_BASE, 22, int)
#endif

static DEFINE_MUTEX(ipmi_watchdog_mutex);
static bool nowayout = WATCHDOG_NOWAYOUT;

Expand Down Expand Up @@ -732,15 +721,13 @@ static int ipmi_ioctl(struct file *file,
return -EFAULT;
return 0;

case WDIOC_SET_PRETIMEOUT:
case WDIOC_SETPRETIMEOUT:
i = copy_from_user(&val, argp, sizeof(int));
if (i)
return -EFAULT;
pretimeout = val;
return ipmi_set_timeout(IPMI_SET_TIMEOUT_HB_IF_NECESSARY);

case WDIOC_GET_PRETIMEOUT:
case WDIOC_GETPRETIMEOUT:
i = copy_to_user(argp, &pretimeout, sizeof(pretimeout));
if (i)
Expand Down
2 changes: 2 additions & 0 deletions drivers/watchdog/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ config DAVINCI_WATCHDOG
config ORION_WATCHDOG
tristate "Orion watchdog"
depends on ARCH_ORION5X || ARCH_KIRKWOOD
select WATCHDOG_CORE
help
Say Y here if to include support for the watchdog timer
in the Marvell Orion5x and Kirkwood ARM SoCs.
Expand Down Expand Up @@ -578,6 +579,7 @@ config INTEL_SCU_WATCHDOG
config ITCO_WDT
tristate "Intel TCO Timer/Watchdog"
depends on (X86 || IA64) && PCI
select WATCHDOG_CORE
select LPC_ICH
---help---
Hardware driver for the intel TCO timer based watchdog devices.
Expand Down
4 changes: 2 additions & 2 deletions drivers/watchdog/bcm63xx_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ static void bcm63xx_wdt_shutdown(struct platform_device *pdev)
bcm63xx_wdt_pause();
}

static struct platform_driver bcm63xx_wdt = {
static struct platform_driver bcm63xx_wdt_driver = {
.probe = bcm63xx_wdt_probe,
.remove = __devexit_p(bcm63xx_wdt_remove),
.shutdown = bcm63xx_wdt_shutdown,
Expand All @@ -312,7 +312,7 @@ static struct platform_driver bcm63xx_wdt = {
}
};

module_platform_driver(bcm63xx_wdt);
module_platform_driver(bcm63xx_wdt_driver);

MODULE_AUTHOR("Miguel Gaio <[email protected]>");
MODULE_AUTHOR("Florian Fainelli <[email protected]>");
Expand Down
7 changes: 4 additions & 3 deletions drivers/watchdog/coh901327_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ static int __exit coh901327_remove(struct platform_device *pdev)
watchdog_unregister_device(&coh901327_wdt);
coh901327_disable();
free_irq(irq, pdev);
clk_unprepare(clk);
clk_put(clk);
iounmap(virtbase);
release_mem_region(phybase, physize);
Expand Down Expand Up @@ -300,9 +301,9 @@ static int __init coh901327_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "could not get clock\n");
goto out_no_clk;
}
ret = clk_enable(clk);
ret = clk_prepare_enable(clk);
if (ret) {
dev_err(&pdev->dev, "could not enable clock\n");
dev_err(&pdev->dev, "could not prepare and enable clock\n");
goto out_no_clk_enable;
}

Expand Down Expand Up @@ -369,7 +370,7 @@ static int __init coh901327_probe(struct platform_device *pdev)
out_no_wdog:
free_irq(irq, pdev);
out_no_irq:
clk_disable(clk);
clk_disable_unprepare(clk);
out_no_clk_enable:
clk_put(clk);
out_no_clk:
Expand Down
4 changes: 3 additions & 1 deletion drivers/watchdog/f71808e_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
#define SIO_F71858_ID 0x0507 /* Chipset ID */
#define SIO_F71862_ID 0x0601 /* Chipset ID */
#define SIO_F71869_ID 0x0814 /* Chipset ID */
#define SIO_F71869A_ID 0x1007 /* Chipset ID */
#define SIO_F71882_ID 0x0541 /* Chipset ID */
#define SIO_F71889_ID 0x0723 /* Chipset ID */

Expand Down Expand Up @@ -195,7 +196,7 @@ static inline int superio_enter(int base)
return -EBUSY;
}

/* according to the datasheet the key must be send twice! */
/* according to the datasheet the key must be sent twice! */
outb(SIO_UNLOCK_KEY, base);
outb(SIO_UNLOCK_KEY, base);

Expand Down Expand Up @@ -756,6 +757,7 @@ static int __init f71808e_find(int sioaddr)
err = f71862fg_pin_configure(0); /* validate module parameter */
break;
case SIO_F71869_ID:
case SIO_F71869A_ID:
watchdog.type = f71869;
break;
case SIO_F71882_ID:
Expand Down
Loading

0 comments on commit 3539fc5

Please sign in to comment.