OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [drivers/] [char/] [wd501p.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
/*
2
 *      Industrial Computer Source WDT500/501 driver for Linux 1.3.x
3
 *
4
 *      (c) Copyright 1995      CymruNET Ltd
5
 *                              Innovation Centre
6
 *                              Singleton Park
7
 *                              Swansea
8
 *                              Wales
9
 *                              UK
10
 *                              SA2 8PP
11
 *
12
 *      http://www.cymru.net
13
 *
14
 *      This driver is provided under the GNU General Public License, incorporated
15
 *      herein by reference. The driver is provided without warranty or
16
 *      support.
17
 *
18
 *      Release 0.04.
19
 *
20
 */
21
 
22
#include <linux/config.h>
23
 
24
#define WDT_COUNT0              (io+0)
25
#define WDT_COUNT1              (io+1)
26
#define WDT_COUNT2              (io+2)
27
#define WDT_CR                  (io+3)
28
#define WDT_SR                  (io+4)  /* Start buzzer on PCI write */
29
#define WDT_RT                  (io+5)  /* Stop buzzer on PCI write */
30
#define WDT_BUZZER              (io+6)  /* PCI only: rd=disable, wr=enable */
31
#define WDT_DC                  (io+7)
32
 
33
/* The following are only on the PCI card, they're outside of I/O space on
34
 * the ISA card: */
35
#define WDT_CLOCK               (io+12) /* COUNT2: rd=16.67MHz, wr=2.0833MHz */
36
/* inverted opto isolated reset output: */
37
#define WDT_OPTONOTRST          (io+13) /* wr=enable, rd=disable */
38
/* opto isolated reset output: */
39
#define WDT_OPTORST             (io+14) /* wr=enable, rd=disable */
40
/* programmable outputs: */
41
#define WDT_PROGOUT             (io+15) /* wr=enable, rd=disable */
42
 
43
#define WDC_SR_WCCR             1       /* Active low */
44
#define WDC_SR_TGOOD            2
45
#define WDC_SR_ISOI0            4
46
#define WDC_SR_ISII1            8
47
#define WDC_SR_FANGOOD          16
48
#define WDC_SR_PSUOVER          32      /* Active low */
49
#define WDC_SR_PSUUNDR          64      /* Active low */
50
#define WDC_SR_IRQ              128     /* Active low */
51
 
52
#ifndef WDT_IS_PCI
53
 
54
/*
55
 *      Feature Map 1 is the active high inputs not supported on your card.
56
 *      Feature Map 2 is the active low inputs not supported on your card.
57
 */
58
 
59
#ifdef CONFIG_WDT_501           /* Full board */
60
 
61
#ifdef CONFIG_WDT501_FAN        /* Full board, Fan has no tachometer */
62
#define FEATUREMAP1             0
63
#define WDT_OPTION_MASK         (WDIOF_OVERHEAT|WDIOF_POWERUNDER|WDIOF_POWEROVER|WDIOF_EXTERN1|WDIOF_EXTERN2|WDIOF_FANFAULT)
64
#else
65
#define FEATUREMAP1             WDC_SR_FANGOOD
66
#define WDT_OPTION_MASK         (WDIOF_OVERHEAT|WDIOF_POWERUNDER|WDIOF_POWEROVER|WDIOF_EXTERN1|WDIOF_EXTERN2)
67
#endif
68
 
69
#define FEATUREMAP2             0
70
#endif
71
 
72
#ifndef CONFIG_WDT_501
73
#define CONFIG_WDT_500
74
#endif
75
 
76
#ifdef CONFIG_WDT_500           /* Minimal board */
77
#define FEATUREMAP1             (WDC_SR_TGOOD|WDC_SR_FANGOOD)
78
#define FEATUREMAP2             (WDC_SR_PSUOVER|WDC_SR_PSUUNDR)
79
#define WDT_OPTION_MASK         (WDIOF_OVERHEAT)
80
#endif
81
 
82
#else
83
 
84
#define FEATUREMAP1             (WDC_SR_TGOOD|WDC_SR_FANGOOD)
85
#define FEATUREMAP2             (WDC_SR_PSUOVER|WDC_SR_PSUUNDR)
86
#define WDT_OPTION_MASK         (WDIOF_OVERHEAT)
87
#endif
88
 
89
#ifndef FEATUREMAP1
90
#error "Config option not set"
91
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.