diff options
author | Adam <you@example.com> | 2020-05-17 05:51:50 +0200 |
---|---|---|
committer | Adam <you@example.com> | 2020-05-17 05:51:50 +0200 |
commit | e611b132f9b8abe35b362e5870b74bce94a1e58e (patch) | |
tree | a5781d2ec0e085eeca33cf350cf878f2efea6fe5 /private/ntos/ndis/sonic/mips/sonicdet.h | |
download | NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.gz NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.bz2 NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.lz NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.xz NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.zst NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.zip |
Diffstat (limited to '')
-rw-r--r-- | private/ntos/ndis/sonic/mips/sonicdet.h | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/private/ntos/ndis/sonic/mips/sonicdet.h b/private/ntos/ndis/sonic/mips/sonicdet.h new file mode 100644 index 000000000..9325bec47 --- /dev/null +++ b/private/ntos/ndis/sonic/mips/sonicdet.h @@ -0,0 +1,89 @@ +/*++ + +Copyright (c) 1990-1992 Microsoft Corporation + +Module Name: + + sonicdet.h + +Abstract: + + This file has processor-specific definitions. + + The overall structure is taken from the Lance driver + by Tony Ercolano. + +Author: + + Anthony V. Ercolano (tonye) creation-date 19-Jun-1990 + Adam Barr (adamba) 5-Nov-1991 + +Environment: + + This driver is expected to work at the equivalent of kernel mode. + + Architecturally, there is an assumption in this driver that we are + on a little endian machine. + +Revision History: + + +--*/ + + +// +// Handy macros to read out of sonic ports. +// +// Because the use of PortShift makes the code more complicated, +// we make some assumptions about when it is needed. On MIPS, we +// only support the internal version unless MIPS_EISA_SONIC +// is defined, in which case we support both. +// +// We define two constants, SONIC_EISA and SONIC_INTERNAL, if +// that particular adapter type is supported by this driver. +// This is to prevent unneeded code from being compiled in. +// + + +#ifdef MIPS_EISA_SONIC + + +// +// mips, with support for the EISA card; we have to use PortShift. +// + +#define SONIC_WRITE_PORT(_Adapter, _Port, _Value) \ + NdisRawWritePortUshort((_Adapter)->SonicPortAddress + (_Port << (_Adapter)->PortShift), (USHORT)(_Value)) + +#define SONIC_READ_PORT(_Adapter, _Port, _Value) \ + NdisRawReadPortUshort((_Adapter)->SonicPortAddress + (_Port << (_Adapter)->PortShift), (PUSHORT)(_Value)) + +#define SONIC_EISA +#define SONIC_INTERNAL + + +#else // MIPS_EISA_SONIC + + +// +// mips, internal support only, the registers are always 32 bits +// + +#define SONIC_WRITE_PORT(_Adapter, _Port, _Value) \ + NdisRawWritePortUshort((_Adapter)->SonicPortAddress + (_Port * 4), (USHORT)(_Value)) + +#define SONIC_READ_PORT(_Adapter, _Port, _Value) \ + NdisRawReadPortUshort((_Adapter)->SonicPortAddress + (_Port * 4), (PUSHORT)(_Value)) + +#undef SONIC_EISA +#define SONIC_INTERNAL + + +#endif // MIPS_EISA_SONIC + + +// +// The default adapter type for mips is Internal +// + +#define SONIC_ADAPTER_TYPE_DEFAULT SONIC_ADAPTER_TYPE_INTERNAL |