Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
eeprom_93cx6.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2004 - 2006 rt2x00 SourceForge Project
3  <http://rt2x00.serialmonkey.com>
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; if not, write to the
17  Free Software Foundation, Inc.,
18  59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19  */
20 
21 /*
22  Module: eeprom_93cx6
23  Abstract: EEPROM reader datastructures for 93cx6 chipsets.
24  Supported chipsets: 93c46, 93c56 and 93c66.
25  */
26 
27 /*
28  * EEPROM operation defines.
29  */
30 #define PCI_EEPROM_WIDTH_93C46 6
31 #define PCI_EEPROM_WIDTH_93C56 8
32 #define PCI_EEPROM_WIDTH_93C66 8
33 #define PCI_EEPROM_WIDTH_93C86 8
34 #define PCI_EEPROM_WIDTH_OPCODE 3
35 #define PCI_EEPROM_WRITE_OPCODE 0x05
36 #define PCI_EEPROM_ERASE_OPCODE 0x07
37 #define PCI_EEPROM_READ_OPCODE 0x06
38 #define PCI_EEPROM_EWDS_OPCODE 0x10
39 #define PCI_EEPROM_EWEN_OPCODE 0x13
40 
59 struct eeprom_93cx6 {
60  void *data;
61 
64 
65  int width;
66 
67  char drive_data;
72 };
73 
74 extern void eeprom_93cx6_read(struct eeprom_93cx6 *eeprom,
75  const u8 word, u16 *data);
76 extern void eeprom_93cx6_multiread(struct eeprom_93cx6 *eeprom,
77  const u8 word, __le16 *data, const u16 words);
78 
79 extern void eeprom_93cx6_wren(struct eeprom_93cx6 *eeprom, bool enable);
80 
81 extern void eeprom_93cx6_write(struct eeprom_93cx6 *eeprom,
82  u8 addr, u16 data);