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