1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 #define ES4H_MANUFmsb 0x00
21 #define ES4H_MANUFlsb 0x01
22 # define ES4H_MANUF_CODE 0x1049
23
24 #define ES4H_PRODUCT 0x02
25 # define ES4H_PRODUCT_CODE 0x0A
26 # define EPC_PRODUCT_CODE 0x03
27
28 #define ES4H_REVISION 0x03
29 # define ES4H_REVISION_CODE 0x01
30
31 #define ES4H_EC 0x04
32 # define ES4H_EC_RESET 0x04
33 # define ES4H_EC_ENABLE 0x01
34
35 #define ES4H_PC 0x05
36 # define ES4H_PC_RESET 0x04
37 # define ES4H_PC_INT 0x08
38
39 #define ES4H_MW 0x06
40 # define ES4H_MW_ENABLE 0x80
41 # define ES4H_MW_SELECT_MASK 0x1f
42
43 #define ES4H_IS 0x07
44 # define ES4H_IS_INTMASK 0x07
45 # define ES4H_IS_INTOFF 0x00
46 # define ES4H_IS_INT3 0x01
47 # define ES4H_IS_INT5 0x02
48 # define ES4H_IS_INT7 0x03
49 # define ES4H_IS_INT10 0x04
50 # define ES4H_IS_INT11 0x05
51 # define ES4H_IS_INT12 0x06
52 # define ES4H_IS_INT15 0x07
53 # define ES4H_IS_INTACK 0x10
54 # define ES4H_IS_INTPEND 0x10
55 # define ES4H_IS_LINEAR 0x40
56 # define ES4H_IS_AS15 0x80
57
58 #define ES4H_AS_23_16 0x08
59 #define ES4H_AS_31_24 0x09
60
61 #define ES4H_IO_MAX 0x09
62
63
64
65
66 #define SE6_RESET PLX_USEROUT
67
68
69
70
71
72
73
74
75 #define SE4_NPORTS 4
76 #define SE6_NPORTS 6
77 #define SE_NPORTS 6
78
79 #define ES4H_RAM_BASE 0x83000000
80 #define ES4H_RAM_SIZE 0x00200000
81 #define ES4H_RAM_INTBASE 0x83800000
82
83
84
85
86 #define ES4H_ETHER0_PORT 0xA2000000
87 #define ES4H_ETHER0_CMD 0xA2000100
88 #define ES4H_ETHER1_PORT 0xA2000200
89 #define ES4H_ETHER1_CMD 0xA2000300
90 #define ES4H_ETHER2_PORT 0xA2000400
91 #define ES4H_ETHER2_CMD 0xA2000500
92 #define ES4H_ETHER3_PORT 0xA2000600
93 #define ES4H_ETHER3_CMD 0xA2000700
94 #define ES4H_ETHER4_PORT 0xA2000800
95 #define ES4H_ETHER4_CMD 0xA2000900
96 #define ES4H_ETHER5_PORT 0xA2000A00
97 #define ES4H_ETHER5_CMD 0xA2000B00
98
99 #define ES4H_I8254 0xA2040000
100
101
102 #define SE4_I8254_HZ (23000000/4)
103 #define SE4_IDT_HZ (46000000)
104 #define SE6_I8254_HZ (20000000/4)
105 #define SE6_IDT_HZ (50000000)
106 #define ES4H_I8254_HZ (23000000/4)
107
108 #define ES4H_GPP 0xA2050000
109
110
111
112 # define ES4H_GPP_C0_100 0x0001
113 # define ES4H_GPP_C0_SQE 0x0002
114 # define ES4H_GPP_C1_100 0x0004
115 # define ES4H_GPP_C1_SQE 0x0008
116 # define ES4H_GPP_C2_100 0x0010
117 # define ES4H_GPP_C2_SQE 0x0020
118 # define ES4H_GPP_C3_100 0x0040
119 # define ES4H_GPP_C3_SQE 0x0080
120 # define ES4H_GPP_SQE 0x00AA
121 # define ES4H_GPP_100 0x0055
122 # define ES4H_GPP_HOSTINT 0x0100
123
124 # define SE4_GPP_EED 0x0200
125 # define SE4_GPP_EECS 0x0400
126 # define SE4_GPP_EECK 0x0800
127
128
129
130
131 # define SE6_GPP_EED 0x0001
132 # define SE6_GPP_EECS 0x0002
133 # define SE6_GPP_EECK 0x0004
134
135 #define ES4H_INTVEC 0xA2060000
136 # define ES4H_IV_DMA0 0x01
137 # define ES4H_IV_PKT0 0x02
138 # define ES4H_IV_DMA1 0x04
139 # define ES4H_IV_PKT1 0x08
140 # define ES4H_IV_DMA2 0x10
141 # define ES4H_IV_PKT2 0x20
142 # define ES4H_IV_DMA3 0x40
143 # define ES4H_IV_PKT3 0x80
144
145 #define ES4H_INTACK 0xA2060000
146 # define ES4H_INTACK_8254 0x01
147 # define ES4H_INTACK_HOST 0x02
148 # define ES4H_INTACK_PKT0 0x04
149 # define ES4H_INTACK_PKT1 0x08
150 # define ES4H_INTACK_PKT2 0x10
151 # define ES4H_INTACK_PKT3 0x20
152
153 #define SE6_PLX 0xA2070000
154
155
156 #define SE6_PCI_VENDOR_ID 0x114F
157 #define SE6_PCI_DEVICE_ID 0x0003
158 #define SE6_PCI_ID ((SE6_PCI_DEVICE_ID<<16) | SE6_PCI_VENDOR_ID)
159
160
161
162
163 #define ES4H_INT_8254 IDT_INT0
164 #define ES4H_INT_HOST IDT_INT1
165 #define ES4H_INT_ETHER0 IDT_INT2
166 #define ES4H_INT_ETHER1 IDT_INT3
167 #define ES4H_INT_ETHER2 IDT_INT4
168 #define ES4H_INT_ETHER3 IDT_INT5
169
170
171
172
173
174
175 extern ushort Gpp;
176 extern ushort EEck;
177 extern ushort EEcs;
178 extern ushort EEd;
179 extern ulong I8254_Hz;
180 extern ulong IDT_Hz;
181 extern int Nports;
182 extern int Nchan;