|
||||
Warning, cross-references for /kernel/include/drivers/eeprom/93cx6.h need to be fixed.
0001 /* The Quest Operating System 0002 * Copyright (C) 2005-2010 Richard West, Boston University 0003 * 0004 * This program is free software: you can redistribute it and/or modify 0005 * it under the terms of the GNU General Public License as published by 0006 * the Free Software Foundation, either version 3 of the License, or 0007 * (at your option) any later version. 0008 * 0009 * This program is distributed in the hope that it will be useful, 0010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0012 * GNU General Public License for more details. 0013 * 0014 * You should have received a copy of the GNU General Public License 0015 * along with this program. If not, see <http://www.gnu.org/licenses/>. 0016 */ 0017 0018 /* Based on the Linux driver: 0019 * Copyright (C) 2004 - 2006 rt2x00 SourceForge Project 0020 * <http://rt2x00.serialmonkey.com> 0021 * 0022 * This program is free software; you can redistribute it and/or modify 0023 * it under the terms of the GNU General Public License as published by 0024 * the Free Software Foundation; either version 2 of the License, or 0025 * (at your option) any later version. 0026 * 0027 */ 0028 0029 /* Abstract: EEPROM reader routines for 93cx6 chipsets. */ 0030 0031 0032 #ifndef _93CX6_H_ 0033 #define _93CX6_H_ 0034 0035 /* 0036 * EEPROM operation defines. 0037 */ 0038 #define PCI_EEPROM_WIDTH_93C46 6 0039 #define PCI_EEPROM_WIDTH_93C56 8 0040 #define PCI_EEPROM_WIDTH_93C66 8 0041 #define PCI_EEPROM_WIDTH_OPCODE 3 0042 #define PCI_EEPROM_WRITE_OPCODE 0x05 0043 #define PCI_EEPROM_READ_OPCODE 0x06 0044 #define PCI_EEPROM_EWDS_OPCODE 0x10 0045 #define PCI_EEPROM_EWEN_OPCODE 0x13 0046 0047 /** 0048 * struct eeprom_93cx6 - control structure for setting the commands 0049 * for reading the eeprom data. 0050 * @data: private pointer for the driver. 0051 * @register_read(struct eeprom_93cx6 *eeprom): handler to 0052 * read the eeprom register, this function should set all reg_* fields. 0053 * @register_write(struct eeprom_93cx6 *eeprom): handler to 0054 * write to the eeprom register by using all reg_* fields. 0055 * @width: eeprom width, should be one of the PCI_EEPROM_WIDTH_* defines 0056 * @reg_data_in: register field to indicate data input 0057 * @reg_data_out: register field to indicate data output 0058 * @reg_data_clock: register field to set the data clock 0059 * @reg_chip_select: register field to set the chip select 0060 * 0061 * This structure is used for the communication between the driver 0062 * and the eeprom_93cx6 handlers for reading the eeprom. 0063 */ 0064 struct eeprom_93cx6 { 0065 void *data; 0066 0067 void (*register_read)(struct eeprom_93cx6 *eeprom); 0068 void (*register_write)(struct eeprom_93cx6 *eeprom); 0069 0070 int width; 0071 0072 char reg_data_in; 0073 char reg_data_out; 0074 char reg_data_clock; 0075 char reg_chip_select; 0076 }; 0077 0078 extern void eeprom_93cx6_read(struct eeprom_93cx6 *eeprom, 0079 const uint8 word, uint16 *data); 0080 extern void eeprom_93cx6_multiread(struct eeprom_93cx6 *eeprom, 0081 const uint8 word, uint16 *data, const uint16 words); 0082 0083 #endif 0084 0085 /* 0086 * Local Variables: 0087 * indent-tabs-mode: nil 0088 * mode: C 0089 * c-file-style: "gnu" 0090 * c-basic-offset: 2 0091 * End: 0092 */ 0093 0094 /* vi: set et sw=2 sts=2: */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 1.2.0 LXR engine. |