From 216d9300e09f2b717e7bc48ad2ec9c28cf0b4f36 Mon Sep 17 00:00:00 2001 From: David Hardeman Date: Thu, 1 Sep 2005 22:34:53 +0200 Subject: [PATCH] --- yaml --- r: 8807 b: refs/heads/master c: abda5c8bd20d3bd42718b0438b8a81a73ffa4372 h: refs/heads/master i: 8805: 90ae4f1bf06e18244b98cb8be7d8eaf0ba94b747 8803: 2ed6c97fc34c1e5fe8b7d1f1da99983f1bac849f 8799: 6f940ccce34b2f1da38951744fe9535f441771b5 v: v3 --- [refs] | 2 +- trunk/drivers/char/watchdog/i6300esb.c | 40 ++++++++++++---- trunk/drivers/char/watchdog/i6300esb.h | 64 -------------------------- 3 files changed, 31 insertions(+), 75 deletions(-) delete mode 100644 trunk/drivers/char/watchdog/i6300esb.h diff --git a/[refs] b/[refs] index a2634e19a453..ad94999f5633 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bb5dc36644975ca5237a415fb63f59f9803d84fa +refs/heads/master: abda5c8bd20d3bd42718b0438b8a81a73ffa4372 diff --git a/trunk/drivers/char/watchdog/i6300esb.c b/trunk/drivers/char/watchdog/i6300esb.c index 575d6cd9e59a..93785f13242e 100644 --- a/trunk/drivers/char/watchdog/i6300esb.c +++ b/trunk/drivers/char/watchdog/i6300esb.c @@ -1,20 +1,15 @@ /* - * i6300esb 0.03: Watchdog timer driver for Intel 6300ESB chipset + * i6300esb: Watchdog timer driver for Intel 6300ESB chipset * * (c) Copyright 2004 Google Inc. + * (c) Copyright 2005 David Härdeman * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. * - * based on i810-tco.c which is - * - * (c) Copyright 2000 kernel concepts - * developed for - * Jentro AG, Haar/Munich (Germany) - * - * which is in turn based on softdog.c by Alan Cox + * based on i810-tco.c which is in turn based on softdog.c * * The timer is implemented in the following I/O controller hubs: * (See the intel documentation on http://developer.intel.com.) @@ -47,14 +42,39 @@ #include #include -#include "i6300esb.h" - /* Module and version information */ #define ESB_VERSION "0.03" #define ESB_MODULE_NAME "i6300ESB timer" #define ESB_DRIVER_NAME ESB_MODULE_NAME ", v" ESB_VERSION #define PFX ESB_MODULE_NAME ": " +/* PCI configuration registers */ +#define ESB_CONFIG_REG 0x60 /* Config register */ +#define ESB_LOCK_REG 0x68 /* WDT lock register */ + +/* Memory mapped registers */ +#define ESB_TIMER1_REG BASEADDR + 0x00 /* Timer1 value after each reset */ +#define ESB_TIMER2_REG BASEADDR + 0x04 /* Timer2 value after each reset */ +#define ESB_GINTSR_REG BASEADDR + 0x08 /* General Interrupt Status Register */ +#define ESB_RELOAD_REG BASEADDR + 0x0c /* Reload register */ + +/* Lock register bits */ +#define ESB_WDT_FUNC ( 0x01 << 2 ) /* Watchdog functionality */ +#define ESB_WDT_ENABLE ( 0x01 << 1 ) /* Enable WDT */ +#define ESB_WDT_LOCK ( 0x01 << 0 ) /* Lock (nowayout) */ + +/* Config register bits */ +#define ESB_WDT_REBOOT ( 0x01 << 5 ) /* Enable reboot on timeout */ +#define ESB_WDT_FREQ ( 0x01 << 2 ) /* Decrement frequency */ +#define ESB_WDT_INTTYPE ( 0x11 << 0 ) /* Interrupt type on timer1 timeout */ + +/* Reload register bits */ +#define ESB_WDT_RELOAD ( 0x01 << 8 ) /* prevent timeout */ + +/* Magic constants */ +#define ESB_UNLOCK1 0x80 /* Step 1 to unlock reset registers */ +#define ESB_UNLOCK2 0x86 /* Step 2 to unlock reset registers */ + /* internal variables */ static void __iomem *BASEADDR; static spinlock_t esb_lock; /* Guards the hardware */ diff --git a/trunk/drivers/char/watchdog/i6300esb.h b/trunk/drivers/char/watchdog/i6300esb.h deleted file mode 100644 index 20c923bbb1c9..000000000000 --- a/trunk/drivers/char/watchdog/i6300esb.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * i6300esb: Watchdog timer driver for Intel 6300ESB chipset - * - * (c) Copyright 2000 kernel concepts , All Rights Reserved. - * http://www.kernelconcepts.de - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * - * Neither kernel concepts nor Nils Faerber admit liability nor provide - * warranty for any of this software. This material is provided - * "AS-IS" and at no charge. - * - * (c) Copyright 2000 kernel concepts - * developed for - * Jentro AG, Haar/Munich (Germany) - * - * TCO timer driver for i8xx chipsets - * based on softdog.c by Alan Cox - * - * For history and the complete list of supported I/O Controller Hub's - * see i8xx_tco.c - */ - - -/* - * Some address definitions for the TCO - */ - -/* PCI configuration registers */ -#define ESB_CONFIG_REG 0x60 /* Config register */ -#define ESB_LOCK_REG 0x68 /* WDT lock register */ - -/* Memory mapped registers */ -#define ESB_TIMER1_REG BASEADDR + 0x00 /* Timer1 value after each reset */ -#define ESB_TIMER2_REG BASEADDR + 0x04 /* Timer2 value after each reset */ -#define ESB_GINTSR_REG BASEADDR + 0x08 /* General Interrupt Status Register */ -#define ESB_RELOAD_REG BASEADDR + 0x0c /* Reload register */ - - -/* - * Some register bits - */ - -/* Lock register bits */ -#define ESB_WDT_FUNC ( 0x01 << 2 ) /* Watchdog functionality */ -#define ESB_WDT_ENABLE ( 0x01 << 1 ) /* Enable WDT */ -#define ESB_WDT_LOCK ( 0x01 << 0 ) /* Lock (nowayout) */ - -/* Config register bits */ -#define ESB_WDT_REBOOT ( 0x01 << 5 ) /* Enable reboot on timeout */ -#define ESB_WDT_FREQ ( 0x01 << 2 ) /* Decrement frequency */ -#define ESB_WDT_INTTYPE ( 0x11 << 0 ) /* Interrupt type on timer1 timeout */ - -/* Reload register bits */ -#define ESB_WDT_RELOAD ( 0x01 << 8 ) /* prevent timeout */ - -/* - * Some magic constants - */ -#define ESB_UNLOCK1 0x80 /* Step 1 to unlock reset registers */ -#define ESB_UNLOCK2 0x86 /* Step 2 to unlock reset registers */