aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authordann frazier <dannf@hp.com>2010-07-27 19:50:54 -0400
committerWim Van Sebroeck <wim@iguana.be>2010-08-13 16:54:31 -0400
commit923410d0bf80cb26744b366cadcd2917f4a36b25 (patch)
tree4c62ef864873fe9bb32745e62af8e701244c6b8c /drivers
parent550d299eeb39cf8e2d12700585c490696ba34be8 (diff)
watchdog: hpwdt (3/12): Group NMI sourcing specific items together
* Group together includes specific to NMI sourcing * Group defines only used by NMI sourcing together * Group declarations specific to NMI sourcing together This gives a clean seperation of watchdog specific items and NMI sourcing specific items (which is needed for making it possible to build hpwdt without the NMI functionality). Signed-off-by: dann frazier <dannf@hp.com> Acked-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/watchdog/hpwdt.c49
1 files changed, 24 insertions, 25 deletions
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index 0ad9af2e0667..f0ecb14990df 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -17,14 +17,11 @@
17#include <linux/fs.h> 17#include <linux/fs.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/io.h> 19#include <linux/io.h>
20#include <linux/nmi.h>
21#include <linux/bitops.h> 20#include <linux/bitops.h>
22#include <linux/kernel.h> 21#include <linux/kernel.h>
23#include <linux/miscdevice.h> 22#include <linux/miscdevice.h>
24#include <linux/module.h> 23#include <linux/module.h>
25#include <linux/kdebug.h>
26#include <linux/moduleparam.h> 24#include <linux/moduleparam.h>
27#include <linux/notifier.h>
28#include <linux/pci.h> 25#include <linux/pci.h>
29#include <linux/pci_ids.h> 26#include <linux/pci_ids.h>
30#include <linux/types.h> 27#include <linux/types.h>
@@ -32,14 +29,36 @@
32#include <linux/watchdog.h> 29#include <linux/watchdog.h>
33#include <linux/dmi.h> 30#include <linux/dmi.h>
34#include <linux/spinlock.h> 31#include <linux/spinlock.h>
32#include <linux/nmi.h>
33#include <linux/kdebug.h>
34#include <linux/notifier.h>
35#include <asm/cacheflush.h> 35#include <asm/cacheflush.h>
36 36
37#define HPWDT_VERSION "1.1.1"
38#define DEFAULT_MARGIN 30
39
40static unsigned int soft_margin = DEFAULT_MARGIN; /* in seconds */
41static unsigned int reload; /* the computed soft_margin */
42static int nowayout = WATCHDOG_NOWAYOUT;
43static char expect_release;
44static unsigned long hpwdt_is_open;
45
46static void __iomem *pci_mem_addr; /* the PCI-memory address */
47static unsigned long __iomem *hpwdt_timer_reg;
48static unsigned long __iomem *hpwdt_timer_con;
49
50static struct pci_device_id hpwdt_devices[] = {
51 { PCI_DEVICE(PCI_VENDOR_ID_COMPAQ, 0xB203) },
52 { PCI_DEVICE(PCI_VENDOR_ID_HP, 0x3306) },
53 {0}, /* terminate list */
54};
55MODULE_DEVICE_TABLE(pci, hpwdt_devices);
56
37#define PCI_BIOS32_SD_VALUE 0x5F32335F /* "_32_" */ 57#define PCI_BIOS32_SD_VALUE 0x5F32335F /* "_32_" */
38#define CRU_BIOS_SIGNATURE_VALUE 0x55524324 58#define CRU_BIOS_SIGNATURE_VALUE 0x55524324
39#define PCI_BIOS32_PARAGRAPH_LEN 16 59#define PCI_BIOS32_PARAGRAPH_LEN 16
40#define PCI_ROM_BASE1 0x000F0000 60#define PCI_ROM_BASE1 0x000F0000
41#define ROM_SIZE 0x10000 61#define ROM_SIZE 0x10000
42#define HPWDT_VERSION "1.1.1"
43 62
44struct bios32_service_dir { 63struct bios32_service_dir {
45 u32 signature; 64 u32 signature;
@@ -104,33 +123,13 @@ struct cmn_registers {
104 u32 reflags; 123 u32 reflags;
105} __attribute__((packed)); 124} __attribute__((packed));
106 125
107#define DEFAULT_MARGIN 30
108static unsigned int soft_margin = DEFAULT_MARGIN; /* in seconds */
109static unsigned int reload; /* the computed soft_margin */
110static int nowayout = WATCHDOG_NOWAYOUT;
111static char expect_release;
112static unsigned long hpwdt_is_open;
113static unsigned int allow_kdump;
114static unsigned int hpwdt_nmi_sourcing; 126static unsigned int hpwdt_nmi_sourcing;
127static unsigned int allow_kdump;
115static unsigned int priority; /* hpwdt at end of die_notify list */ 128static unsigned int priority; /* hpwdt at end of die_notify list */
116
117static void __iomem *pci_mem_addr; /* the PCI-memory address */
118static unsigned long __iomem *hpwdt_timer_reg;
119static unsigned long __iomem *hpwdt_timer_con;
120
121static DEFINE_SPINLOCK(rom_lock); 129static DEFINE_SPINLOCK(rom_lock);
122
123static void *cru_rom_addr; 130static void *cru_rom_addr;
124
125static struct cmn_registers cmn_regs; 131static struct cmn_registers cmn_regs;
126 132
127static struct pci_device_id hpwdt_devices[] = {
128 { PCI_DEVICE(PCI_VENDOR_ID_COMPAQ, 0xB203) },
129 { PCI_DEVICE(PCI_VENDOR_ID_HP, 0x3306) },
130 {0}, /* terminate list */
131};
132MODULE_DEVICE_TABLE(pci, hpwdt_devices);
133
134extern asmlinkage void asminline_call(struct cmn_registers *pi86Regs, 133extern asmlinkage void asminline_call(struct cmn_registers *pi86Regs,
135 unsigned long *pRomEntry); 134 unsigned long *pRomEntry);
136 135