9a14f7c7ab04d132700297ed7ede54c2a882e8c8
[tpg/acess2.git] / KernelLand / Modules / Network / PRO100 / pro100.h
1 /*
2  
3  */
4 #ifndef _PRO100_H_
5 #define _PRO100_H_
6
7 struct sCSR
8 {
9         Uint16  Status;
10         Uint16  Command;
11         
12         Uint32  GenPtr;
13         Uint32  Port;
14         
15         Uint16  FlashCtrl;
16         Uint16  EEPROMCtrl;
17         
18         Uint32  MDICtrl;
19         Uint32  RXDMACount;
20 };
21
22 #define STATUS_RUS_MASK 0x003C  // Receive Unit Status
23 #define STATUS_CUS_MASK 0x00C0  // Comamnd Unit Status
24 #define STATUS_FCP      0x0100  // Flow Control Pause
25 #define STATUS_ER       0x0200  // Early Recieve
26 #define STATUS_SWI      0x0400  // Software Interrupt
27 #define STATUS_MDI      0x0800  // Management Data Interrupt
28 #define STATUS_RNR      0x1000  // Receive Not Ready
29 #define STATUS_CNA      0x2000  // Command Unit not active
30 #define STATUS_FR       0x4000  // Frame Recieved
31 #define STATUS_CX       0x8000  // Command Unit executed
32
33 #define CMD_RUC 0x0007
34 #define CMD_CUC 0x00F0
35 #define CMD_M   0x0100  // Interrupt Mask
36 #define CMD_SI  0x0200  // Software Interrupt
37
38 #define MDI_IE  (1 << 29)
39 #define MDI_RDY (1 << 28)
40
41 #define EEPROM_CTRL_SK  0x01    // 
42 #define EEPROM_CTRL_CS  0x02
43 #define EEPROM_CTRL_DI  0x04
44 #define EEPROM_CTRL_DO  0x08
45
46 enum ePortCommands {
47         PORT_SOFTWARERESET      = 0,
48         PORT_SELFTEST   = 1,
49         PORT_SELECTIVERESET     = 2,
50 };
51
52 struct sCommandBuffer
53 {
54         Uint16  Status;
55         Uint16  Command;
56         Uint32  Link;
57         
58         tIPStackBuffer  *Buffer;
59         tCommandBuffer  *Next;
60 } __align__(4);
61
62 #endif
63

UCC git Repository :: git.ucc.asn.au