Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ef38eaf authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [WATCHDOG] HP ProLiant WatchDog driver
  [WATCHDOG] blackfin Watchdog driver: relocate all strings used in __init functions to __initdata
  [WATCHDOG] Convert mtx1 wdt to be a platform device and use generic GPIO API
  [WATCHDOG] Add support for SB1 hardware watchdog
parents cf91b824 7f4da474
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
@@ -402,6 +402,18 @@ config IT8712F_WDT
	  To compile this driver as a module, choose M here: the
	  module will be called it8712f_wdt.

config HP_WATCHDOG
	tristate "HP Proliant iLO 2 Hardware Watchdog Timer"
	depends on X86
	help
	  A software monitoring watchdog and NMI sourcing driver. This driver
	  will detect lockups and provide stack trace. Also, when an NMI
	  occurs this driver will make the necessary BIOS calls to log
	  the cause of the NMI. This is a driver that will only load on a
	  HP ProLiant system with a minimum of iLO2 support.
	  To compile this driver as a module, choose M here: the
	  module will be called hpwdt.

config SC1200_WDT
	tristate "National Semiconductor PC87307/PC97307 (ala SC1200) Watchdog"
	depends on X86
@@ -633,6 +645,19 @@ config WDT_RM9K_GPI
	  To compile this driver as a module, choose M here: the
	  module will be called rm9k_wdt.

config SIBYTE_WDOG
	tristate "Sibyte SoC hardware watchdog"
	depends on CPU_SB1
	help
	  Watchdog driver for the built in watchdog hardware in Sibyte
	  SoC processors.  There are apparently two watchdog timers
	  on such processors; this driver supports only the first one,
	  because currently Linux only supports exporting one watchdog
	  to userspace.

	  To compile this driver as a loadable module, choose M here.
	  The module will be called sb_wdog.

config AR7_WDT
	tristate "TI AR7 Watchdog Timer"
	depends on AR7
+2 −0
Original line number Diff line number Diff line
@@ -67,6 +67,7 @@ obj-$(CONFIG_WAFER_WDT) += wafer5823wdt.o
obj-$(CONFIG_I6300ESB_WDT) += i6300esb.o
obj-$(CONFIG_ITCO_WDT) += iTCO_wdt.o iTCO_vendor_support.o
obj-$(CONFIG_IT8712F_WDT) += it8712f_wdt.o
obj-$(CONFIG_HP_WATCHDOG) += hpwdt.o
obj-$(CONFIG_SC1200_WDT) += sc1200wdt.o
obj-$(CONFIG_SCx200_WDT) += scx200_wdt.o
obj-$(CONFIG_PC87413_WDT) += pc87413_wdt.o
@@ -92,6 +93,7 @@ obj-$(CONFIG_SBC_EPX_C3_WATCHDOG) += sbc_epx_c3.o
obj-$(CONFIG_INDYDOG) += indydog.o
obj-$(CONFIG_WDT_MTX1)	+= mtx-1_wdt.o
obj-$(CONFIG_WDT_RM9K_GPI) += rm9k_wdt.o
obj-$(CONFIG_SIBYTE_WDOG) += sb_wdog.o
obj-$(CONFIG_AR7_WDT) += ar7_wdt.o
obj-$(CONFIG_TXX9_WDT) += txx9wdt.o

+4 −3
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@

#define stamp(fmt, args...) pr_debug("%s:%i: " fmt "\n", __func__, __LINE__, ## args)
#define stampit() stamp("here i am")
#define pr_init(fmt, args...) ({ static const __initdata char __fmt[] = fmt; printk(__fmt, ## args); })

#define WATCHDOG_NAME "bfin-wdt"
#define PFX WATCHDOG_NAME ": "
@@ -445,19 +446,19 @@ static int __init bfin_wdt_init(void)

	ret = register_reboot_notifier(&bfin_wdt_notifier);
	if (ret) {
		printk(KERN_ERR PFX "cannot register reboot notifier (err=%d)\n", ret);
		pr_init(KERN_ERR PFX "cannot register reboot notifier (err=%d)\n", ret);
		return ret;
	}

	ret = misc_register(&bfin_wdt_miscdev);
	if (ret) {
		printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n",
		pr_init(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n",
		       WATCHDOG_MINOR, ret);
		unregister_reboot_notifier(&bfin_wdt_notifier);
		return ret;
	}

	printk(KERN_INFO PFX "initialized: timeout=%d sec (nowayout=%d)\n",
	pr_init(KERN_INFO PFX "initialized: timeout=%d sec (nowayout=%d)\n",
	       timeout, nowayout);

	return 0;
+926 −0

File added.

Preview size limit exceeded, changes collapsed.

+30 −5
Original line number Diff line number Diff line
@@ -45,10 +45,13 @@
#include <linux/completion.h>
#include <linux/jiffies.h>
#include <linux/watchdog.h>
#include <linux/platform_device.h>

#include <asm/io.h>
#include <asm/uaccess.h>

#include <asm/mach-au1x00/au1000.h>
#include <asm/gpio.h>

#define MTX1_WDT_INTERVAL	(5 * HZ)

@@ -61,6 +64,7 @@ static struct {
	volatile int queue;
	int default_ticks;
	unsigned long inuse;
	unsigned gpio;
} mtx1_wdt_device;

static void mtx1_wdt_trigger(unsigned long unused)
@@ -73,7 +77,8 @@ static void mtx1_wdt_trigger(unsigned long unused)
	 * toggle GPIO2_15
	 */
	tmp = au_readl(GPIO2_DIR);
	tmp = (tmp & ~(1<<15)) | ((~tmp) & (1<<15));
	tmp = (tmp & ~(1 << mtx1_wdt_device.gpio)) |
	      ((~tmp) & (1 << mtx1_wdt_device.gpio));
	au_writel (tmp, GPIO2_DIR);

	if (mtx1_wdt_device.queue && ticks)
@@ -93,7 +98,7 @@ static void mtx1_wdt_start(void)
{
	if (!mtx1_wdt_device.queue) {
		mtx1_wdt_device.queue = 1;
		au_writel (au_readl(GPIO2_DIR) | (u32)(1<<15), GPIO2_DIR);
		gpio_set_value(mtx1_wdt_device.gpio, 1);
		mod_timer(&mtx1_wdt_device.timer, jiffies + MTX1_WDT_INTERVAL);
	}
	mtx1_wdt_device.running++;
@@ -103,7 +108,7 @@ static int mtx1_wdt_stop(void)
{
	if (mtx1_wdt_device.queue) {
		mtx1_wdt_device.queue = 0;
		au_writel (au_readl(GPIO2_DIR) & ~((u32)(1<<15)), GPIO2_DIR);
		gpio_set_value(mtx1_wdt_device.gpio, 0);
	}

	ticks = mtx1_wdt_device.default_ticks;
@@ -197,10 +202,12 @@ static struct miscdevice mtx1_wdt_misc = {
};


static int __init mtx1_wdt_init(void)
static int mtx1_wdt_probe(struct platform_device *pdev)
{
	int ret;

	mtx1_wdt_device.gpio = pdev->resource[0].start;

	if ((ret = misc_register(&mtx1_wdt_misc)) < 0) {
		printk(KERN_ERR " mtx-1_wdt : failed to register\n");
		return ret;
@@ -222,13 +229,30 @@ static int __init mtx1_wdt_init(void)
	return 0;
}

static void __exit mtx1_wdt_exit(void)
static int mtx1_wdt_remove(struct platform_device *pdev)
{
	if (mtx1_wdt_device.queue) {
		mtx1_wdt_device.queue = 0;
		wait_for_completion(&mtx1_wdt_device.stop);
	}
	misc_deregister(&mtx1_wdt_misc);
	return 0;
}

static struct platform_driver mtx1_wdt = {
	.probe = mtx1_wdt_probe,
	.remove = mtx1_wdt_remove,
	.driver.name = "mtx1-wdt",
};

static int __init mtx1_wdt_init(void)
{
	return platform_driver_register(&mtx1_wdt);
}

static void __exit mtx1_wdt_exit(void)
{
	platform_driver_unregister(&mtx1_wdt);
}

module_init(mtx1_wdt_init);
@@ -237,3 +261,4 @@ module_exit(mtx1_wdt_exit);
MODULE_AUTHOR("Michael Stickel, Florian Fainelli");
MODULE_DESCRIPTION("Driver for the MTX-1 watchdog");
MODULE_LICENSE("GPL");
MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
Loading