|
|
1.1 root 1: /*++
2:
3: Copyright (c) 1990-1992 Microsoft Corporation
4:
5: Module Name:
6:
7: sonicdet.h
8:
9: Abstract:
10:
11: This file has processor-specific definitions.
12:
13: The overall structure is taken from the Lance driver
14: by Tony Ercolano.
15:
16: Author:
17:
18: Anthony V. Ercolano (tonye) creation-date 19-Jun-1990
19: Adam Barr (adamba) 5-Nov-1991
20:
21: Environment:
22:
23: This driver is expected to work at the equivalent of kernel mode.
24:
25: Architecturally, there is an assumption in this driver that we are
26: on a little endian machine.
27:
28: Revision History:
29:
30:
31: --*/
32:
33:
34: //
35: // Handy macros to read out of sonic ports.
36: //
37: // Because the use of PortShift makes the code more complicated,
38: // we make some assumptions about when it is needed. On MIPS, we
39: // only support the internal version unless MIPS_EISA_SONIC
40: // is defined, in which case we support both.
41: //
42: // We define two constants, SONIC_EISA and SONIC_INTERNAL, if
43: // that particular adapter type is supported by this driver.
44: // This is to prevent unneeded code from being compiled in.
45: //
46:
47:
48: #ifdef MIPS_EISA_SONIC
49:
50:
51: //
52: // mips, with support for the EISA card; we have to use PortShift.
53: //
54:
55: #define SONIC_WRITE_PORT(_Adapter, _Port, _Value) \
56: NdisRawWritePortUshort((_Adapter)->SonicPortAddress + (_Port << (_Adapter)->PortShift), (USHORT)(_Value))
57:
58: #define SONIC_READ_PORT(_Adapter, _Port, _Value) \
59: NdisRawReadPortUshort((_Adapter)->SonicPortAddress + (_Port << (_Adapter)->PortShift), (PUSHORT)(_Value))
60:
61: #define SONIC_EISA
62: #define SONIC_INTERNAL
63:
64:
65: #else // MIPS_EISA_SONIC
66:
67:
68: //
69: // mips, internal support only, the registers are always 32 bits
70: //
71:
72: #define SONIC_WRITE_PORT(_Adapter, _Port, _Value) \
73: NdisRawWritePortUshort((_Adapter)->SonicPortAddress + (_Port * 4), (USHORT)(_Value))
74:
75: #define SONIC_READ_PORT(_Adapter, _Port, _Value) \
76: NdisRawReadPortUshort((_Adapter)->SonicPortAddress + (_Port * 4), (PUSHORT)(_Value))
77:
78: #undef SONIC_EISA
79: #define SONIC_INTERNAL
80:
81:
82: #endif // MIPS_EISA_SONIC
83:
84:
85: //
86: // The default adapter type for mips is Internal
87: //
88:
89: #define SONIC_ADAPTER_TYPE_DEFAULT SONIC_ADAPTER_TYPE_INTERNAL
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.