Commit | Line | Data |
---|---|---|
f7c1be0c MB |
1 | //--------------------------------------------------------------------------- |
2 | // FT1000 driver for Flarion Flash OFDM NIC Device | |
3 | // | |
4 | // Copyright (C) 2002 Flarion Technologies, All rights reserved. | |
5 | // | |
bf3146c8 | 6 | // This program is free software; you can redistribute it and/or modify it |
f7c1be0c | 7 | // under the terms of the GNU General Public License as published by the Free |
bf3146c8 GKH |
8 | // Software Foundation; either version 2 of the License, or (at your option) any |
9 | // later version. This program is distributed in the hope that it will be useful, | |
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
11 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
12 | // more details. You should have received a copy of the GNU General Public | |
13 | // License along with this program; if not, write to the | |
14 | // Free Software Foundation, Inc., 59 Temple Place - | |
15 | // Suite 330, Boston, MA 02111-1307, USA. | |
f7c1be0c MB |
16 | //--------------------------------------------------------------------------- |
17 | // | |
18 | // File: ft1000_dev.h | |
19 | // | |
20 | // Description: Register definitions and bit masks for the FT1000 NIC | |
21 | // | |
22 | // History: | |
23 | // 2/5/02 Ivan Bohannon Written. | |
24 | // 8/29/02 Whc Ported to Linux. | |
25 | // | |
26 | //--------------------------------------------------------------------------- | |
27 | #ifndef _FT1000_DEVH_ | |
28 | #define _FT1000_DEVH_ | |
29 | ||
30 | //--------------------------------------------------------------------------- | |
31 | // | |
32 | // Function: ft1000_read_reg | |
25985edc | 33 | // Description: This function will read the value of a given ASIC register. |
f7c1be0c MB |
34 | // Input: |
35 | // dev - device structure | |
36 | // offset - ASIC register offset | |
37 | // Output: | |
38 | // data - ASIC register value | |
39 | // | |
40 | //--------------------------------------------------------------------------- | |
41 | static inline u16 ft1000_read_reg (struct net_device *dev, u16 offset) { | |
42 | u16 data = 0; | |
43 | ||
44 | data = inw(dev->base_addr + offset); | |
45 | ||
46 | return (data); | |
47 | } | |
48 | ||
49 | //--------------------------------------------------------------------------- | |
50 | // | |
51 | // Function: ft1000_write_reg | |
25985edc | 52 | // Description: This function will set the value for a given ASIC register. |
f7c1be0c MB |
53 | // Input: |
54 | // dev - device structure | |
55 | // offset - ASIC register offset | |
56 | // value - value to write | |
57 | // Output: | |
58 | // None. | |
59 | // | |
60 | //--------------------------------------------------------------------------- | |
61 | static inline void ft1000_write_reg (struct net_device *dev, u16 offset, u16 value) { | |
62 | outw (value, dev->base_addr + offset); | |
63 | } | |
64 | ||
65 | #endif // _FT1000_DEVH_ | |
66 |