root/drivers/net/3c505.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*****************************************************************
   2  *
   3  *  defines for 3Com Etherlink Plus adapter
   4  *
   5  *****************************************************************/
   6 
   7 /*
   8  * I/O register offsets
   9  */
  10 #define PORT_COMMAND    0x00    /* read/write */
  11 #define PORT_STATUS     0x02    /* read only */
  12 #define PORT_AUXDMA     0x02    /* write only */
  13 #define PORT_DATA       0x04    /* read/write */
  14 #define PORT_CONTROL    0x06    /* read/write */
  15 
  16 /*
  17  * host control registers bits
  18  */
  19 #define CONTROL_ATTN    0x80    /* attention */
  20 #define CONTROL_FLSH    0x40    /* flush data register */
  21 #define CONTROL_DMAE    0x20    /* DMA enable */
  22 #define CONTROL_DIR     0x10    /* direction */
  23 #define CONTROL_TCEN    0x08    /* terminal count interrupt enable */
  24 #define CONTROL_CMDE    0x04    /* command register interrupt enable */
  25 #define CONTROL_HSF2    0x02    /* host status flag 2 */
  26 #define CONTROL_HSF1    0x01    /* host status flag 1 */
  27 
  28 /*
  29  * combinations of HSF flags used for PCB transmission
  30  */
  31 #define HSF_PCB_ACK     (CONTROL_HSF1)
  32 #define HSF_PCB_NAK     (CONTROL_HSF2)
  33 #define HSF_PCB_END     (CONTROL_HSF2|CONTROL_HSF1)
  34 #define HSF_PCB_MASK    (CONTROL_HSF2|CONTROL_HSF1)
  35 
  36 /*
  37  * host status register bits
  38  */
  39 #define STATUS_HRDY     0x80    /* data register ready */
  40 #define STATUS_HCRE     0x40    /* command register empty */
  41 #define STATUS_ACRF     0x20    /* adapter command register full */
  42 #define STATUS_DIR      0x10    /* direction */
  43 #define STATUS_DONE     0x08    /* DMA done */
  44 #define STATUS_ASF3     0x04    /* adapter status flag 3 */
  45 #define STATUS_ASF2     0x02    /* adapter status flag 2 */
  46 #define STATUS_ASF1     0x01    /* adapter status flag 1 */
  47 
  48 /*
  49  * combinations of ASF flags used for PCB reception
  50  */
  51 #define ASF_PCB_ACK     (STATUS_ASF1)
  52 #define ASF_PCB_NAK     (STATUS_ASF2)
  53 #define ASF_PCB_END     (STATUS_ASF2|STATUS_ASF1)
  54 #define ASF_PCB_MASK    (STATUS_ASF2|STATUS_ASF1)
  55 
  56 /*
  57  * host aux DMA register bits
  58  */
  59 #define AUXDMA_BRST     0x01    /* DMA burst */
  60 
  61 /*
  62  * maximum amount of data data allowed in a PCB
  63  */
  64 #define MAX_PCB_DATA    62
  65 
  66 /*****************************************************************
  67  *
  68  *  timeout value
  69  *      this is a rough value used for loops to stop them from 
  70  *      locking up the whole machine in the case of failure or
  71  *      error conditions
  72  *
  73  *****************************************************************/
  74 
  75 #define TIMEOUT 300
  76 
  77 /*****************************************************************
  78  *
  79  * PCB commands
  80  *
  81  *****************************************************************/
  82 
  83 enum {
  84   /*
  85    * host PCB commands
  86    */
  87   CMD_CONFIGURE_ADAPTER_MEMORY  = 0x01,
  88   CMD_CONFIGURE_82586           = 0x02,
  89   CMD_STATION_ADDRESS           = 0x03,
  90   CMD_DMA_DOWNLOAD              = 0x04,
  91   CMD_DMA_UPLOAD                = 0x05,
  92   CMD_PIO_DOWNLOAD              = 0x06,
  93   CMD_PIO_UPLOAD                = 0x07,
  94   CMD_RECEIVE_PACKET            = 0x08,
  95   CMD_TRANSMIT_PACKET           = 0x09,
  96   CMD_NETWORK_STATISTICS        = 0x0a,
  97   CMD_LOAD_MULTICAST_LIST       = 0x0b,
  98   CMD_CLEAR_PROGRAM             = 0x0c,
  99   CMD_DOWNLOAD_PROGRAM          = 0x0d,
 100   CMD_EXECUTE_PROGRAM           = 0x0e,
 101   CMD_SELF_TEST                 = 0x0f,
 102   CMD_SET_STATION_ADDRESS       = 0x10,
 103   CMD_ADAPTER_INFO              = 0x11,
 104   NUM_TRANSMIT_CMDS,
 105 
 106   /*
 107    * adapter PCB commands
 108    */
 109   CMD_CONFIGURE_ADAPTER_RESPONSE        = 0x31,
 110   CMD_CONFIGURE_82586_RESPONSE          = 0x32,
 111   CMD_ADDRESS_RESPONSE                  = 0x33,
 112   CMD_DOWNLOAD_DATA_REQUEST             = 0x34,
 113   CMD_UPLOAD_DATA_REQUEST               = 0x35,
 114   CMD_RECEIVE_PACKET_COMPLETE           = 0x38,
 115   CMD_TRANSMIT_PACKET_COMPLETE          = 0x39,
 116   CMD_NETWORK_STATISTICS_RESPONSE       = 0x3a,
 117   CMD_LOAD_MULTICAST_RESPONSE           = 0x3b,
 118   CMD_CLEAR_PROGRAM_RESPONSE            = 0x3c,
 119   CMD_DOWNLOAD_PROGRAM_RESPONSE         = 0x3d,
 120   CMD_EXECUTE_RESPONSE                  = 0x3e,
 121   CMD_SELF_TEST_RESPONSE                = 0x3f,
 122   CMD_SET_ADDRESS_RESPONSE              = 0x40,
 123   CMD_ADAPTER_INFO_RESPONSE             = 0x41
 124 };
 125 

/* [previous][next][first][last][top][bottom][index][help] */