diff options
author | Francois Romieu <romieu@fr.zoreil.com> | 2008-06-01 16:37:49 -0400 |
---|---|---|
committer | Francois Romieu <romieu@fr.zoreil.com> | 2008-08-17 09:53:05 -0400 |
commit | f162a5d1b326d54b0be7e3100f69763d8a707721 (patch) | |
tree | 4681ce103eea5bb253c84f2ca3bc5cc70a005023 /drivers/net/r8169.c | |
parent | 9c14ceafa5ca7f57225a43fb0785c56ddc7f1823 (diff) |
r8169: add 8168/8101 registers description
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
Diffstat (limited to 'drivers/net/r8169.c')
-rw-r--r-- | drivers/net/r8169.c | 47 |
1 files changed, 43 insertions, 4 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index ae149a930620..600540e3670f 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -197,9 +197,6 @@ enum rtl_registers { | |||
197 | Config5 = 0x56, | 197 | Config5 = 0x56, |
198 | MultiIntr = 0x5c, | 198 | MultiIntr = 0x5c, |
199 | PHYAR = 0x60, | 199 | PHYAR = 0x60, |
200 | TBICSR = 0x64, | ||
201 | TBI_ANAR = 0x68, | ||
202 | TBI_LPAR = 0x6a, | ||
203 | PHYstatus = 0x6c, | 200 | PHYstatus = 0x6c, |
204 | RxMaxSize = 0xda, | 201 | RxMaxSize = 0xda, |
205 | CPlusCmd = 0xe0, | 202 | CPlusCmd = 0xe0, |
@@ -213,6 +210,32 @@ enum rtl_registers { | |||
213 | FuncForceEvent = 0xfc, | 210 | FuncForceEvent = 0xfc, |
214 | }; | 211 | }; |
215 | 212 | ||
213 | enum rtl8110_registers { | ||
214 | TBICSR = 0x64, | ||
215 | TBI_ANAR = 0x68, | ||
216 | TBI_LPAR = 0x6a, | ||
217 | }; | ||
218 | |||
219 | enum rtl8168_8101_registers { | ||
220 | CSIDR = 0x64, | ||
221 | CSIAR = 0x68, | ||
222 | #define CSIAR_FLAG 0x80000000 | ||
223 | #define CSIAR_WRITE_CMD 0x80000000 | ||
224 | #define CSIAR_BYTE_ENABLE 0x0f | ||
225 | #define CSIAR_BYTE_ENABLE_SHIFT 12 | ||
226 | #define CSIAR_ADDR_MASK 0x0fff | ||
227 | |||
228 | EPHYAR = 0x80, | ||
229 | #define EPHYAR_FLAG 0x80000000 | ||
230 | #define EPHYAR_WRITE_CMD 0x80000000 | ||
231 | #define EPHYAR_REG_MASK 0x1f | ||
232 | #define EPHYAR_REG_SHIFT 16 | ||
233 | #define EPHYAR_DATA_MASK 0xffff | ||
234 | DBG_REG = 0xd1, | ||
235 | #define FIX_NAK_1 (1 << 4) | ||
236 | #define FIX_NAK_2 (1 << 3) | ||
237 | }; | ||
238 | |||
216 | enum rtl_register_content { | 239 | enum rtl_register_content { |
217 | /* InterruptStatusBits */ | 240 | /* InterruptStatusBits */ |
218 | SYSErr = 0x8000, | 241 | SYSErr = 0x8000, |
@@ -266,7 +289,13 @@ enum rtl_register_content { | |||
266 | TxDMAShift = 8, /* DMA burst value (0-7) is shift this many bits */ | 289 | TxDMAShift = 8, /* DMA burst value (0-7) is shift this many bits */ |
267 | 290 | ||
268 | /* Config1 register p.24 */ | 291 | /* Config1 register p.24 */ |
292 | LEDS1 = (1 << 7), | ||
293 | LEDS0 = (1 << 6), | ||
269 | MSIEnable = (1 << 5), /* Enable Message Signaled Interrupt */ | 294 | MSIEnable = (1 << 5), /* Enable Message Signaled Interrupt */ |
295 | Speed_down = (1 << 4), | ||
296 | MEMMAP = (1 << 3), | ||
297 | IOMAP = (1 << 2), | ||
298 | VPD = (1 << 1), | ||
270 | PMEnable = (1 << 0), /* Power Management Enable */ | 299 | PMEnable = (1 << 0), /* Power Management Enable */ |
271 | 300 | ||
272 | /* Config2 register p. 25 */ | 301 | /* Config2 register p. 25 */ |
@@ -276,6 +305,7 @@ enum rtl_register_content { | |||
276 | /* Config3 register p.25 */ | 305 | /* Config3 register p.25 */ |
277 | MagicPacket = (1 << 5), /* Wake up when receives a Magic Packet */ | 306 | MagicPacket = (1 << 5), /* Wake up when receives a Magic Packet */ |
278 | LinkUp = (1 << 4), /* Wake up when the cable connection is re-established */ | 307 | LinkUp = (1 << 4), /* Wake up when the cable connection is re-established */ |
308 | Beacon_en = (1 << 0), /* 8168 only. Reserved in the 8168b */ | ||
279 | 309 | ||
280 | /* Config5 register p.27 */ | 310 | /* Config5 register p.27 */ |
281 | BWF = (1 << 6), /* Accept Broadcast wakeup frame */ | 311 | BWF = (1 << 6), /* Accept Broadcast wakeup frame */ |
@@ -293,7 +323,16 @@ enum rtl_register_content { | |||
293 | TBINwComplete = 0x01000000, | 323 | TBINwComplete = 0x01000000, |
294 | 324 | ||
295 | /* CPlusCmd p.31 */ | 325 | /* CPlusCmd p.31 */ |
296 | PktCntrDisable = (1 << 7), // 8168 | 326 | EnableBist = (1 << 15), // 8168 8101 |
327 | Mac_dbgo_oe = (1 << 14), // 8168 8101 | ||
328 | Normal_mode = (1 << 13), // unused | ||
329 | Force_half_dup = (1 << 12), // 8168 8101 | ||
330 | Force_rxflow_en = (1 << 11), // 8168 8101 | ||
331 | Force_txflow_en = (1 << 10), // 8168 8101 | ||
332 | Cxpl_dbg_sel = (1 << 9), // 8168 8101 | ||
333 | ASF = (1 << 8), // 8168 8101 | ||
334 | PktCntrDisable = (1 << 7), // 8168 8101 | ||
335 | Mac_dbgo_sel = 0x001c, // 8168 | ||
297 | RxVlan = (1 << 6), | 336 | RxVlan = (1 << 6), |
298 | RxChkSum = (1 << 5), | 337 | RxChkSum = (1 << 5), |
299 | PCIDAC = (1 << 4), | 338 | PCIDAC = (1 << 4), |