Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
eeprom_93cx6.h File Reference

Go to the source code of this file.

Data Structures

struct  eeprom_93cx6
 

Macros

#define PCI_EEPROM_WIDTH_93C46   6
 
#define PCI_EEPROM_WIDTH_93C56   8
 
#define PCI_EEPROM_WIDTH_93C66   8
 
#define PCI_EEPROM_WIDTH_93C86   8
 
#define PCI_EEPROM_WIDTH_OPCODE   3
 
#define PCI_EEPROM_WRITE_OPCODE   0x05
 
#define PCI_EEPROM_ERASE_OPCODE   0x07
 
#define PCI_EEPROM_READ_OPCODE   0x06
 
#define PCI_EEPROM_EWDS_OPCODE   0x10
 
#define PCI_EEPROM_EWEN_OPCODE   0x13
 

Functions

void eeprom_93cx6_read (struct eeprom_93cx6 *eeprom, const u8 word, u16 *data)
 
void eeprom_93cx6_multiread (struct eeprom_93cx6 *eeprom, const u8 word, __le16 *data, const u16 words)
 
void eeprom_93cx6_wren (struct eeprom_93cx6 *eeprom, bool enable)
 
void eeprom_93cx6_write (struct eeprom_93cx6 *eeprom, u8 addr, u16 data)
 

Macro Definition Documentation

#define PCI_EEPROM_ERASE_OPCODE   0x07

Definition at line 36 of file eeprom_93cx6.h.

#define PCI_EEPROM_EWDS_OPCODE   0x10

Definition at line 38 of file eeprom_93cx6.h.

#define PCI_EEPROM_EWEN_OPCODE   0x13

Definition at line 39 of file eeprom_93cx6.h.

#define PCI_EEPROM_READ_OPCODE   0x06

Definition at line 37 of file eeprom_93cx6.h.

#define PCI_EEPROM_WIDTH_93C46   6

Definition at line 30 of file eeprom_93cx6.h.

#define PCI_EEPROM_WIDTH_93C56   8

Definition at line 31 of file eeprom_93cx6.h.

#define PCI_EEPROM_WIDTH_93C66   8

Definition at line 32 of file eeprom_93cx6.h.

#define PCI_EEPROM_WIDTH_93C86   8

Definition at line 33 of file eeprom_93cx6.h.

#define PCI_EEPROM_WIDTH_OPCODE   3

Definition at line 34 of file eeprom_93cx6.h.

#define PCI_EEPROM_WRITE_OPCODE   0x05

Definition at line 35 of file eeprom_93cx6.h.

Function Documentation

void eeprom_93cx6_multiread ( struct eeprom_93cx6 eeprom,
const u8  word,
__le16 data,
const u16  words 
)

eeprom_93cx6_multiread - Read multiple words from eeprom : Pointer to eeprom structure : Word index from where we should start reading : target pointer where the information will have to be stored : Number of words that should be read.

This function will read all requested words from the eeprom, this is done by calling eeprom_93cx6_read() multiple times. But with the additional change that while the eeprom_93cx6_read will return host ordered bytes, this method will return little endian words.

Definition at line 223 of file eeprom_93cx6.c.

void eeprom_93cx6_read ( struct eeprom_93cx6 eeprom,
const u8  word,
u16 data 
)

eeprom_93cx6_read - Read multiple words from eeprom : Pointer to eeprom structure : Word index from where we should start reading : target pointer where the information will have to be stored

This function will read the eeprom data as host-endian word into the given data pointer.

Definition at line 181 of file eeprom_93cx6.c.

void eeprom_93cx6_wren ( struct eeprom_93cx6 eeprom,
bool  enable 
)

eeprom_93cx6_wren - set the write enable state : Pointer to eeprom structure : true to enable writes, otherwise disable writes

Set the EEPROM write enable state to either allow or deny writes depending on the value.

Definition at line 245 of file eeprom_93cx6.c.

void eeprom_93cx6_write ( struct eeprom_93cx6 eeprom,
u8  addr,
u16  data 
)

eeprom_93cx6_write - write data to the EEPROM : Pointer to eeprom structure : Address to write data to. : The data to write to address .

Write the to the specified in the EEPROM and waiting for the device to finish writing.

Note, since we do not expect large number of write operations we delay in between parts of the operation to avoid using excessive amounts of CPU time busy waiting.

Definition at line 277 of file eeprom_93cx6.c.