1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 #ifndef _LINUX_I82365_H
31 #define _LINUX_I82365_H
32
33
34
35
36 #define I365_IDENT 0x00
37 #define I365_STATUS 0x01
38 #define I365_POWER 0x02
39 #define I365_INTCTL 0x03
40 #define I365_CSC 0x04
41 #define I365_CSCINT 0x05
42 #define I365_ADDRWIN 0x06
43 #define I365_IOCTL 0x07
44 #define I365_GENCTL 0x16
45 #define I365_GBLCTL 0x1E
46
47
48 #define I365_IO(map) (0x08+((map)<<2))
49 #define I365_MEM(map) (0x10+((map)<<3))
50 #define I365_W_START 0
51 #define I365_W_STOP 2
52 #define I365_W_OFF 4
53
54
55 #define I365_CS_BVD1 0x01
56 #define I365_CS_STSCHG 0x01
57 #define I365_CS_BVD2 0x02
58 #define I365_CS_SPKR 0x02
59 #define I365_CS_DETECT 0x0C
60 #define I365_CS_WRPROT 0x10
61 #define I365_CS_READY 0x20
62 #define I365_CS_POWERON 0x40
63 #define I365_CS_GPI 0x80
64
65
66 #define I365_PWR_OFF 0x00
67 #define I365_PWR_OUT 0x80
68 #define I365_PWR_NORESET 0x40
69 #define I365_PWR_AUTO 0x20
70 #define I365_VCC_MASK 0x18
71
72
73
74 #define I365_VCC_5V 0x10
75 #define I365_VCC_3V 0x18
76 #define I365_VPP2_MASK 0x0c
77 #define I365_VPP2_5V 0x04
78 #define I365_VPP2_12V 0x08
79 #define I365_VPP1_MASK 0x03
80 #define I365_VPP1_5V 0x01
81 #define I365_VPP1_12V 0x02
82
83
84 #define I365_RING_ENA 0x80
85 #define I365_PC_RESET 0x40
86 #define I365_PC_IOCARD 0x20
87 #define I365_INTR_ENA 0x10
88 #define I365_IRQ_MASK 0x0F
89
90
91 #define I365_CSC_BVD1 0x01
92 #define I365_CSC_STSCHG 0x01
93 #define I365_CSC_BVD2 0x02
94 #define I365_CSC_READY 0x04
95 #define I365_CSC_DETECT 0x08
96 #define I365_CSC_ANY 0x0F
97 #define I365_CSC_GPI 0x10
98 #define I365_CSC_IRQ_MASK 0xF0
99
100
101 #define I365_ENA_IO(map) (0x40 << (map))
102 #define I365_ENA_MEM(map) (0x01 << (map))
103
104
105 #define I365_IOCTL_MASK(map) (0x0F << (map<<2))
106 #define I365_IOCTL_WAIT(map) (0x08 << (map<<2))
107 #define I365_IOCTL_0WS(map) (0x04 << (map<<2))
108 #define I365_IOCTL_IOCS16(map) (0x02 << (map<<2))
109 #define I365_IOCTL_16BIT(map) (0x01 << (map<<2))
110
111
112 #define I365_CTL_16DELAY 0x01
113 #define I365_CTL_RESET 0x02
114 #define I365_CTL_GPI_ENA 0x04
115 #define I365_CTL_GPI_CTL 0x08
116 #define I365_CTL_RESUME 0x10
117 #define I365_CTL_SW_IRQ 0x20
118
119
120 #define I365_GBL_PWRDOWN 0x01
121 #define I365_GBL_CSC_LEV 0x02
122 #define I365_GBL_WRBACK 0x04
123 #define I365_GBL_IRQ_0_LEV 0x08
124 #define I365_GBL_IRQ_1_LEV 0x10
125
126
127 #define I365_MEM_16BIT 0x8000
128 #define I365_MEM_0WS 0x4000
129 #define I365_MEM_WS1 0x8000
130 #define I365_MEM_WS0 0x4000
131 #define I365_MEM_WRPROT 0x8000
132 #define I365_MEM_REG 0x4000
133
134 #define I365_REG(slot, reg) (((slot) << 6) + reg)
135
136 #endif