watchdog: Convert iTCO_wdt driver to mfd model
A message that is not in the archive (sent off-list or not yet received): 55504321-bd01-4e09-af8b-dc2ec76a75dd@zimbra
PATCH v3 3/3 watchdog: Convert iTCO_wdt driver to mfd model
This patch converts the iTCO_wdt driver to use the multi-function device driver model. It uses resources discovered by the lpc_ich driver, so that it no longer does its own PCI scanning.
The driver has also been modernized to use pr_info and the like.
Signed-off-by Aaron Sierra <[email protected]>
Signed-off-by Guenter Roeck <[email protected]>
--- drivers/mfd/Kconfig | 3 +- drivers/mfd/lpc_ich.c | 193 ++++++++---- drivers/watchdog/Kconfig | 1 + drivers/watchdog/iTCO_vendor.h | 6 +- drivers/watchdog/iTCO_vendor_support.c | 43 ++-- drivers/watchdog/iTCO_wdt.c | 557 +++++++------------------------- include/linux/mfd/lpc_ich.h | 7 + 7 files changed, 287 insertions(+), 523 deletions(-)
drivers/mfd/Kconfig +2 -1
@@ -731,7 +731,8 @@ config LPC_ICH help The LPC bridge function of the Intel ICH provides support for many functional units. This driver provides needed support for - other drivers to control these functions, currently GPIO. + other drivers to control these functions, currently GPIO and + watchdog. config MFD_RDC321X tristate "Support for RDC-R321x southbridge"
drivers/mfd/lpc_ich.c +134 -59
234 lines not on this page · raw message
drivers/watchdog/Kconfig +1 -0
@@ -557,6 +557,7 @@ config INTEL_SCU_WATCHDOG config ITCO_WDT tristate "Intel TCO Timer/Watchdog" depends on (X86 || IA64) && PCI + select LPC_ICH ---help--- Hardware driver for the intel TCO timer based watchdog devices. These drivers are included in the Intel 82801 I/O Controller
drivers/watchdog/iTCO_vendor.h +3 -3
@@ -1,8 +1,8 @@/* iTCO Vendor Specific Support hooks */ #ifdef CONFIG_ITCO_VENDOR_SUPPORT -extern void iTCO_vendor_pre_start (unsigned long ,unsigned int ); -extern void iTCO_vendor_pre_stop (unsigned long ); -extern void iTCO_vendor_pre_keepalive (unsigned long ,unsigned int ); +extern void iTCO_vendor_pre_start (struct resource *,unsigned int ); +extern void iTCO_vendor_pre_stop (struct resource *); +extern void iTCO_vendor_pre_keepalive (struct resource *,unsigned int );extern void iTCO_vendor_pre_set_heartbeat (unsigned int );extern int iTCO_vendor_check_noreboot_on (void );#else
drivers/watchdog/iTCO_vendor_support.c +19 -24
120 lines not on this page · raw message
drivers/watchdog/iTCO_wdt.c +121 -436
696 lines not on this page · raw message
include/linux/mfd/lpc_ich.h +7 -0
@@ -20,12 +20,19 @@#ifndef LPC_ICH_H #define LPC_ICH_H +/* Watchdog resources */ +#define ICH_RES_IO_TCO 0 +#define ICH_RES_IO_SMI 1 +#define ICH_RES_MEM_OFF 2 +#define ICH_RES_MEM_GCS 0 +/* GPIO resources */ #define ICH_RES_GPIO 0#define ICH_RES_GPE0 1struct lpc_ich_info {char name[32 ]; +unsigned int iTCO_version;unsigned int gpio_version; };
Signature · 1 line
1.7.0.4