am79c961a.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. /*
  2. * linux/drivers/net/ethernet/amd/am79c961a.h
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #ifndef _LINUX_am79c961a_H
  9. #define _LINUX_am79c961a_H
  10. /* use 0 for production, 1 for verification, >2 for debug. debug flags: */
  11. #define DEBUG_TX 2
  12. #define DEBUG_RX 4
  13. #define DEBUG_INT 8
  14. #define DEBUG_IC 16
  15. #ifndef NET_DEBUG
  16. #define NET_DEBUG 0
  17. #endif
  18. #define NET_UID 0
  19. #define NET_RDP 0x10
  20. #define NET_RAP 0x12
  21. #define NET_RESET 0x14
  22. #define NET_IDP 0x16
  23. /*
  24. * RAP registers
  25. */
  26. #define CSR0 0
  27. #define CSR0_INIT 0x0001
  28. #define CSR0_STRT 0x0002
  29. #define CSR0_STOP 0x0004
  30. #define CSR0_TDMD 0x0008
  31. #define CSR0_TXON 0x0010
  32. #define CSR0_RXON 0x0020
  33. #define CSR0_IENA 0x0040
  34. #define CSR0_INTR 0x0080
  35. #define CSR0_IDON 0x0100
  36. #define CSR0_TINT 0x0200
  37. #define CSR0_RINT 0x0400
  38. #define CSR0_MERR 0x0800
  39. #define CSR0_MISS 0x1000
  40. #define CSR0_CERR 0x2000
  41. #define CSR0_BABL 0x4000
  42. #define CSR0_ERR 0x8000
  43. #define CSR3 3
  44. #define CSR3_EMBA 0x0008
  45. #define CSR3_DXMT2PD 0x0010
  46. #define CSR3_LAPPEN 0x0020
  47. #define CSR3_DXSUFLO 0x0040
  48. #define CSR3_IDONM 0x0100
  49. #define CSR3_TINTM 0x0200
  50. #define CSR3_RINTM 0x0400
  51. #define CSR3_MERRM 0x0800
  52. #define CSR3_MISSM 0x1000
  53. #define CSR3_BABLM 0x4000
  54. #define CSR3_MASKALL 0x5F00
  55. #define CSR4 4
  56. #define CSR4_JABM 0x0001
  57. #define CSR4_JAB 0x0002
  58. #define CSR4_TXSTRTM 0x0004
  59. #define CSR4_TXSTRT 0x0008
  60. #define CSR4_RCVCCOM 0x0010
  61. #define CSR4_RCVCCO 0x0020
  62. #define CSR4_MFCOM 0x0100
  63. #define CSR4_MFCO 0x0200
  64. #define CSR4_ASTRP_RCV 0x0400
  65. #define CSR4_APAD_XMIT 0x0800
  66. #define CTRL1 5
  67. #define CTRL1_SPND 0x0001
  68. #define LADRL 8
  69. #define LADRM1 9
  70. #define LADRM2 10
  71. #define LADRH 11
  72. #define PADRL 12
  73. #define PADRM 13
  74. #define PADRH 14
  75. #define MODE 15
  76. #define MODE_DISRX 0x0001
  77. #define MODE_DISTX 0x0002
  78. #define MODE_LOOP 0x0004
  79. #define MODE_DTCRC 0x0008
  80. #define MODE_COLL 0x0010
  81. #define MODE_DRETRY 0x0020
  82. #define MODE_INTLOOP 0x0040
  83. #define MODE_PORT_AUI 0x0000
  84. #define MODE_PORT_10BT 0x0080
  85. #define MODE_DRXPA 0x2000
  86. #define MODE_DRXBA 0x4000
  87. #define MODE_PROMISC 0x8000
  88. #define BASERXL 24
  89. #define BASERXH 25
  90. #define BASETXL 30
  91. #define BASETXH 31
  92. #define POLLINT 47
  93. #define SIZERXR 76
  94. #define SIZETXR 78
  95. #define CSR_MFC 112
  96. #define RMD_ENP 0x0100
  97. #define RMD_STP 0x0200
  98. #define RMD_CRC 0x0800
  99. #define RMD_FRAM 0x2000
  100. #define RMD_ERR 0x4000
  101. #define RMD_OWN 0x8000
  102. #define TMD_ENP 0x0100
  103. #define TMD_STP 0x0200
  104. #define TMD_MORE 0x1000
  105. #define TMD_ERR 0x4000
  106. #define TMD_OWN 0x8000
  107. #define TST_RTRY 0x0400
  108. #define TST_LCAR 0x0800
  109. #define TST_LCOL 0x1000
  110. #define TST_UFLO 0x4000
  111. #define TST_BUFF 0x8000
  112. #define ISALED0 0x0004
  113. #define ISALED0_LNKST 0x8000
  114. struct dev_priv {
  115. unsigned long rxbuffer[RX_BUFFERS];
  116. unsigned long txbuffer[TX_BUFFERS];
  117. unsigned char txhead;
  118. unsigned char txtail;
  119. unsigned char rxhead;
  120. unsigned char rxtail;
  121. unsigned long rxhdr;
  122. unsigned long txhdr;
  123. spinlock_t chip_lock;
  124. struct timer_list timer;
  125. };
  126. #endif