MOXA linux-2.6.x / linux-2.6.19-uc1 from UC-7110-LX-BOOTLOADER-1.9_VERSION-4.2.tgz
[linux-2.6.19-moxart.git] / drivers / net / ks8695 / ks8695_fxhw.h
blob889ec73fc0ddbaddc26cee7402310c54d21e2f3c
1 /*
2 Copyright (c) 2002, Micrel Kendin Operations
4 Written 2002 by LIQUN RUAN
6 This software may be used and distributed according to the terms of
7 the GNU General Public License (GPL), incorporated herein by reference.
8 Drivers based on or derived from this code fall under the GPL and must
9 retain the authorship, copyright and license notice. This file is not
10 a complete program and may only be used when the entire operating
11 system is licensed under the GPL.
13 The author may be reached as lruan@kendin.com
14 Micrel Kendin Operations
15 486 Mercury Dr.
16 Sunnyvale, CA 94085
18 This driver is for Kendin's KS8695 SOHO Router Chipset as ethernet driver.
20 Support and updates available at
21 www.kendin.com/ks8695/
24 #ifndef KS8695_FXHW_H
25 #define KS8695_FXHW_H
26 #include "ks8695_drv.h"
28 #define ASSERT(x) if(!(x)) panic("KS8695: x")
29 #define DelayInMicroseconds(x) udelay(x)
30 #define DelayInMilliseconds(x) mdelay(x)
32 typedef uint8_t UCHAR, UINT8, BOOLEAN, *PUCHAR;
33 typedef uint16_t USHORT, UINT16, *PUSHORT;
34 typedef uint32_t UINT, ULONG, UINT32, *PUINT, *PULONG;
36 #define SPEED_UNKNOWN 0
37 #define SPEED_10 10
38 #define SPEED_100 100
39 #define FULL_DUPLEX 1 // default for full duplex
40 #define HALF_DUPLEX 0
42 #define KS8695_WRITE_REG(reg, value) ((*(volatile uint32_t *)(Adapter->stDMAInfo.nBaseAddr + (reg))) = value)
43 #define KS8695_READ_REG(reg) (*(volatile uint32_t *)(Adapter->stDMAInfo.nBaseAddr + (reg)))
45 #endif /*KS8695_FXHW_H*/