wifi->esp8089:
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rockchip_wlan / esp8089 / esp_driver / slc_host_register.h
1 //Generated at 2012-10-23 20:11:08\r
2 /*\r
3  *  Copyright (c) 2011 Espressif System\r
4  *\r
5  */\r
6 \r
7 #ifndef SLC_HOST_REGISTER_H_INCLUDED\r
8 #define SLC_HOST_REGISTER_H_INCLUDED\r
9 \r
10 /* #define REG_SLC_HOST_BASE  0x00000000 */\r
11 /* skip the token1, since reading it will clean the credit */\r
12 #define REG_SLC_HOST_BASE  0x00000000\r
13 #define REG_SLC_BASE  0x00000000\r
14 \r
15 \r
16 #define SLC_HOST_PF                          (REG_SLC_HOST_BASE + 0x0)\r
17 #define SLC_HOST_TOKEN_RDATA                 (REG_SLC_HOST_BASE + 0x4)\r
18 #define SLC_HOST_RX_PF_EOF 0x0000000F\r
19 #define SLC_HOST_RX_PF_EOF_S                 28\r
20 #define SLC_HOST_TOKEN1 0x00000FFF\r
21 #define SLC_HOST_TOKEN1_S 16\r
22 #define SLC_HOST_RX_PF_VALID (BIT(15))\r
23 #define SLC_HOST_TOKEN0               0x00000FFF\r
24 #define SLC_HOST_TOKEN0_S 0\r
25 \r
26 #define SLC_HOST_TOKEN0_MASK SLC_HOST_TOKEN0\r
27 \r
28 #define SLC_HOST_INT_RAW                     (REG_SLC_HOST_BASE + 0x8)\r
29 #define SLC_HOST_EXT_BIT3_INT_RAW (BIT(22))\r
30 #define SLC_HOST_EXT_BIT2_INT_RAW (BIT(21))\r
31 #define SLC_HOST_EXT_BIT1_INT_RAW (BIT(20))\r
32 #define SLC_HOST_RXFIFO_NOT_EMPTY_INT_RAW (BIT(19))\r
33 #define SLC_HOST_RX_PF_VALID_INT_RAW (BIT(18))\r
34 #define SLC_HOST_TX_OVF_INT_RAW (BIT(17))\r
35 #define SLC_HOST_RX_UDF_INT_RAW (BIT(16))\r
36 #define SLC_HOST_TX_START_INT_RAW (BIT(15))\r
37 #define SLC_HOST_RX_START_INT_RAW (BIT(14))\r
38 #define SLC_HOST_RX_EOF_INT_RAW (BIT(13))\r
39 #define SLC_HOST_RX_SOF_INT_RAW (BIT(12))\r
40 #define SLC_HOST_TOKEN1_0TO1_INT_RAW (BIT(11))\r
41 #define SLC_HOST_TOKEN0_0TO1_INT_RAW (BIT(10))\r
42 #define SLC_HOST_TOKEN1_1TO0_INT_RAW (BIT(9))\r
43 #define SLC_HOST_TOKEN0_1TO0_INT_RAW (BIT(8))\r
44 #define SLC_HOST_TOHOST_BIT7_INT_RAW (BIT(7))\r
45 #define SLC_HOST_TOHOST_BIT6_INT_RAW (BIT(6))\r
46 #define SLC_HOST_TOHOST_BIT5_INT_RAW (BIT(5))\r
47 #define SLC_HOST_TOHOST_BIT4_INT_RAW (BIT(4))\r
48 #define SLC_HOST_TOHOST_BIT3_INT_RAW (BIT(3))\r
49 #define SLC_HOST_TOHOST_BIT2_INT_RAW (BIT(2))\r
50 #define SLC_HOST_TOHOST_BIT1_INT_RAW (BIT(1))\r
51 #define SLC_HOST_TOHOST_BIT0_INT_RAW (BIT(0))\r
52 \r
53 #define SLC_HOST_STATE_W0                    (REG_SLC_HOST_BASE + 0xC)\r
54 #define SLC_HOST_STATE3 0x000000FF\r
55 #define SLC_HOST_STATE3_S 24\r
56 #define SLC_HOST_STATE2 0x000000FF\r
57 #define SLC_HOST_STATE2_S 16\r
58 #define SLC_HOST_STATE1 0x000000FF\r
59 #define SLC_HOST_STATE1_S 8\r
60 #define SLC_HOST_STATE0 0x000000FF\r
61 #define SLC_HOST_STATE0_S 0\r
62 \r
63 #define SLC_HOST_STATE_W1                    (REG_SLC_HOST_BASE + 0x10)\r
64 #define SLC_HOST_STATE7 0x000000FF\r
65 #define SLC_HOST_STATE7_S 24\r
66 #define SLC_HOST_STATE6 0x000000FF\r
67 #define SLC_HOST_STATE6_S 16\r
68 #define SLC_HOST_STATE5 0x000000FF\r
69 #define SLC_HOST_STATE5_S 8\r
70 #define SLC_HOST_STATE4 0x000000FF\r
71 #define SLC_HOST_STATE4_S 0\r
72 \r
73 #define SLC_HOST_CONF_W0                     (REG_SLC_HOST_BASE + 0x14)\r
74 #define SLC_HOST_CONF3 0x000000FF\r
75 #define SLC_HOST_CONF3_S 24\r
76 #define SLC_HOST_CONF2 0x000000FF\r
77 #define SLC_HOST_CONF2_S 16\r
78 #define SLC_HOST_CONF1 0x000000FF\r
79 #define SLC_HOST_CONF1_S 8\r
80 #define SLC_HOST_CONF0 0x000000FF\r
81 #define SLC_HOST_CONF0_S 0\r
82 \r
83 #define SLC_HOST_CONF_W1                     (REG_SLC_HOST_BASE + 0x18)\r
84 #define SLC_HOST_CONF7 0x000000FF\r
85 #define SLC_HOST_CONF7_S 24\r
86 #define SLC_HOST_CONF6 0x000000FF\r
87 #define SLC_HOST_CONF6_S 16\r
88 #define SLC_HOST_CONF5 0x000000FF\r
89 #define SLC_HOST_CONF5_S 8\r
90 #define SLC_HOST_CONF4 0x000000FF\r
91 #define SLC_HOST_CONF4_S 0\r
92 \r
93 #define SLC_HOST_INT_ST                      (REG_SLC_HOST_BASE + 0x1C)\r
94 #define SLC_HOST_RX_ST (BIT(23))\r
95 #define SLC_HOST_EXT_BIT3_INT_ST (BIT(22))\r
96 #define SLC_HOST_EXT_BIT2_INT_ST (BIT(21))\r
97 #define SLC_HOST_EXT_BIT1_INT_ST (BIT(20))\r
98 #define SLC_HOST_RXFIFO_NOT_EMPTY_INT_ST (BIT(19))\r
99 #define SLC_HOST_RX_PF_VALID_INT_ST (BIT(18))\r
100 #define SLC_HOST_TX_OVF_INT_ST (BIT(17))\r
101 #define SLC_HOST_RX_UDF_INT_ST (BIT(16))\r
102 #define SLC_HOST_TX_START_INT_ST (BIT(15))\r
103 #define SLC_HOST_RX_START_INT_ST (BIT(14))\r
104 #define SLC_HOST_RX_EOF_INT_ST (BIT(13))\r
105 #define SLC_HOST_RX_SOF_INT_ST (BIT(12))\r
106 #define SLC_HOST_TOKEN1_0TO1_INT_ST (BIT(11))\r
107 #define SLC_HOST_TOKEN0_0TO1_INT_ST (BIT(10))\r
108 #define SLC_HOST_TOKEN1_1TO0_INT_ST (BIT(9))\r
109 #define SLC_HOST_TOKEN0_1TO0_INT_ST (BIT(8))\r
110 #define SLC_HOST_TOHOST_BIT7_INT_ST (BIT(7))\r
111 #define SLC_HOST_TOHOST_BIT6_INT_ST (BIT(6))\r
112 #define SLC_HOST_TOHOST_BIT5_INT_ST (BIT(5))\r
113 #define SLC_HOST_TOHOST_BIT4_INT_ST (BIT(4))\r
114 #define SLC_HOST_TOHOST_BIT3_INT_ST (BIT(3))\r
115 #define SLC_HOST_TOHOST_BIT2_INT_ST (BIT(2))\r
116 #define SLC_HOST_TOHOST_BIT1_INT_ST (BIT(1))\r
117 #define SLC_HOST_TOHOST_BIT0_INT_ST (BIT(0))\r
118 \r
119 #define SLC_HOST_CONF_W2                     (REG_SLC_HOST_BASE + 0x20)\r
120 #define SLC_HOST_CONF11 0x000000FF\r
121 #define SLC_HOST_CONF11_S 24\r
122 #define SLC_HOST_CONF10 0x000000FF\r
123 #define SLC_HOST_CONF10_S 16\r
124 #define SLC_HOST_CONF9 0x000000FF\r
125 #define SLC_HOST_CONF9_S 8\r
126 #define SLC_HOST_CONF8 0x000000FF\r
127 #define SLC_HOST_CONF8_S 0\r
128 \r
129 #define SLC_HOST_CONF_W3                     (REG_SLC_HOST_BASE + 0x24)\r
130 #define SLC_HOST_CONF15 0x000000FF\r
131 #define SLC_HOST_CONF15_S 24\r
132 #define SLC_HOST_CONF14 0x000000FF\r
133 #define SLC_HOST_CONF14_S 16\r
134 #define SLC_HOST_CONF13 0x000000FF\r
135 #define SLC_HOST_CONF13_S 8\r
136 #define SLC_HOST_CONF12 0x000000FF\r
137 #define SLC_HOST_CONF12_S 0\r
138 \r
139 #define SLC_HOST_GEN_TXDONE_INT  BIT(16)\r
140 #define SLC_HOST_GEN_RXDONE_INT  BIT(17)\r
141 \r
142 #define SLC_HOST_CONF_W4                     (REG_SLC_HOST_BASE + 0x28)\r
143 #define SLC_HOST_CONF19 0x000000FF\r
144 #define SLC_HOST_CONF19_S 24\r
145 #define SLC_HOST_CONF18 0x000000FF\r
146 #define SLC_HOST_CONF18_S 16\r
147 #define SLC_HOST_CONF17 0x000000FF\r
148 #define SLC_HOST_CONF17_S 8\r
149 #define SLC_HOST_CONF16 0x000000FF\r
150 #define SLC_HOST_CONF16_S 0\r
151 \r
152 #define SLC_HOST_TOKEN_WDATA                 (REG_SLC_HOST_BASE + 0x2C)\r
153 #define SLC_HOST_TOKEN1_WD 0x00000FFF\r
154 #define SLC_HOST_TOKEN1_WD_S 16\r
155 #define SLC_HOST_TOKEN0_WD 0x00000FFF\r
156 #define SLC_HOST_TOKEN0_WD_S 0\r
157 \r
158 #define SLC_HOST_INT_CLR                     (REG_SLC_HOST_BASE + 0x30)\r
159 #define SLC_HOST_TOKEN1_WR (BIT(31))\r
160 #define SLC_HOST_TOKEN0_WR (BIT(30))\r
161 #define SLC_HOST_TOKEN1_DEC (BIT(29))\r
162 #define SLC_HOST_TOKEN0_DEC (BIT(28))\r
163 #define SLC_HOST_EXT_BIT3_INT_CLR (BIT(22))\r
164 #define SLC_HOST_EXT_BIT2_INT_CLR (BIT(21))\r
165 #define SLC_HOST_EXT_BIT1_INT_CLR (BIT(20))\r
166 #define SLC_HOST_EXT_BIT0_INT_CLR (BIT(19))\r
167 #define SLC_HOST_RX_PF_VALID_INT_CLR (BIT(18))\r
168 #define SLC_HOST_TX_OVF_INT_CLR (BIT(17))\r
169 #define SLC_HOST_RX_UDF_INT_CLR (BIT(16))\r
170 #define SLC_HOST_TX_START_INT_CLR (BIT(15))\r
171 #define SLC_HOST_RX_START_INT_CLR (BIT(14))\r
172 #define SLC_HOST_RX_EOF_INT_CLR (BIT(13))\r
173 #define SLC_HOST_RX_SOF_INT_CLR (BIT(12))\r
174 #define SLC_HOST_TOKEN1_0TO1_INT_CLR (BIT(11))\r
175 #define SLC_HOST_TOKEN0_0TO1_INT_CLR (BIT(10))\r
176 #define SLC_HOST_TOKEN1_1TO0_INT_CLR (BIT(9))\r
177 #define SLC_HOST_TOKEN0_1TO0_INT_CLR (BIT(8))\r
178 #define SLC_HOST_TOHOST_BIT7_INT_CLR (BIT(7))\r
179 #define SLC_HOST_TOHOST_BIT6_INT_CLR (BIT(6))\r
180 #define SLC_HOST_TOHOST_BIT5_INT_CLR (BIT(5))\r
181 #define SLC_HOST_TOHOST_BIT4_INT_CLR (BIT(4))\r
182 #define SLC_HOST_TOHOST_BIT3_INT_CLR (BIT(3))\r
183 #define SLC_HOST_TOHOST_BIT2_INT_CLR (BIT(2))\r
184 #define SLC_HOST_TOHOST_BIT1_INT_CLR (BIT(1))\r
185 #define SLC_HOST_TOHOST_BIT0_INT_CLR (BIT(0))\r
186 \r
187 #define SLC_HOST_INT_ENA                     (REG_SLC_HOST_BASE + 0x34)\r
188 #define SLC_HOST_EXT_BIT3_INT_ENA (BIT(22))\r
189 #define SLC_HOST_EXT_BIT2_INT_ENA (BIT(21))\r
190 #define SLC_HOST_EXT_BIT1_INT_ENA (BIT(20))\r
191 #define SLC_HOST_EXT_BIT0_INT_ENA (BIT(19))\r
192 #define SLC_HOST_RX_PF_VALID_INT_ENA (BIT(18))\r
193 #define SLC_HOST_TX_OVF_INT_ENA (BIT(17))\r
194 #define SLC_HOST_RX_UDF_INT_ENA (BIT(16))\r
195 #define SLC_HOST_TX_START_INT_ENA (BIT(15))\r
196 #define SLC_HOST_RX_START_INT_ENA (BIT(14))\r
197 #define SLC_HOST_RX_EOF_INT_ENA (BIT(13))\r
198 #define SLC_HOST_RX_SOF_INT_ENA (BIT(12))\r
199 #define SLC_HOST_TOKEN1_0TO1_INT_ENA (BIT(11))\r
200 #define SLC_HOST_TOKEN0_0TO1_INT_ENA (BIT(10))\r
201 #define SLC_HOST_TOKEN1_1TO0_INT_ENA (BIT(9))\r
202 #define SLC_HOST_TOKEN0_1TO0_INT_ENA (BIT(8))\r
203 #define SLC_HOST_TOHOST_BIT7_INT_ENA (BIT(7))\r
204 #define SLC_HOST_TOHOST_BIT6_INT_ENA (BIT(6))\r
205 #define SLC_HOST_TOHOST_BIT5_INT_ENA (BIT(5))\r
206 #define SLC_HOST_TOHOST_BIT4_INT_ENA (BIT(4))\r
207 #define SLC_HOST_TOHOST_BIT3_INT_ENA (BIT(3))\r
208 #define SLC_HOST_TOHOST_BIT2_INT_ENA (BIT(2))\r
209 #define SLC_HOST_TOHOST_BIT1_INT_ENA (BIT(1))\r
210 #define SLC_HOST_TOHOST_BIT0_INT_ENA (BIT(0))\r
211 \r
212 #define SLC_HOST_CONF_W5                     (REG_SLC_HOST_BASE + 0x3C)\r
213 #define SLC_HOST_CONF23 0x000000FF\r
214 #define SLC_HOST_CONF23_S 24\r
215 #define SLC_HOST_CONF22 0x000000FF\r
216 #define SLC_HOST_CONF22_S 16\r
217 #define SLC_HOST_CONF21 0x000000FF\r
218 #define SLC_HOST_CONF21_S 8\r
219 #define SLC_HOST_CONF20 0x000000FF\r
220 #define SLC_HOST_CONF20_S 0\r
221 \r
222 #define SLC_HOST_WIN_CMD                     (REG_SLC_HOST_BASE + 0x40)\r
223 \r
224 \r
225 #define SLC_HOST_DATE                         (REG_SLC_HOST_BASE + 0x78)\r
226 #define SLC_HOST_ID                           (REG_SLC_HOST_BASE + 0x7C)\r
227 \r
228 #define SLC_ADDR_WINDOW_CLEAR_MASK   (~(0xf<<12))\r
229 #define SLC_FROM_HOST_ADDR_WINDOW  (0x1<<12)\r
230 #define SLC_TO_HOST_ADDR_WINDOW    (0x3<<12)\r
231 \r
232 #define SLC_SET_FROM_HOST_ADDR_WINDOW(v)   do { \\r
233         (v) &= 0xffff;    \\r
234         (v) &= SLC_ADDR_WINDOW_CLEAR_MASK; \\r
235         (v) |= SLC_FROM_HOST_ADDR_WINDOW; \\r
236 } while (0);\r
237 \r
238 #define SLC_SET_TO_HOST_ADDR_WINDOW(v)   do { \\r
239         (v) &= 0xffff;    \\r
240         (v) &= SLC_ADDR_WINDOW_CLEAR_MASK; \\r
241         (v) |= SLC_TO_HOST_ADDR_WINDOW; \\r
242 } while (0);\r
243 \r
244 #define SLC_INT_ENA                             (REG_SLC_BASE + 0xC)\r
245 #define SLC_RX_EOF_INT_ENA BIT(17)\r
246 #define SLC_FRHOST_BIT2_INT_ENA BIT(2)\r
247 \r
248 #define SLC_RX_LINK                             (REG_SLC_BASE + 0x24)\r
249 #define SLC_RXLINK_START BIT(29)\r
250 \r
251 #define SLC_BRIDGE_CONF                         (REG_SLC_BASE + 0x44)\r
252 #define SLC_TX_PUSH_IDLE_NUM 0xFFFF\r
253 #define SLC_TX_PUSH_IDLE_NUM_S 16\r
254 #define SLC_HDA_MAP_128K BIT(13)\r
255 #define SLC_TX_DUMMY_MODE BIT(12)\r
256 #define SLC_FIFO_MAP_ENA 0x0000000F\r
257 #define SLC_FIFO_MAP_ENA_S 8\r
258 #define SLC_TXEOF_ENA 0x0000003F\r
259 #define SLC_TXEOF_ENA_S\r
260 \r
261 \r
262 #endif // SLC_HOST_REGISTER_H_INCLUDED\r