diff options
author | Alan Cox | 2010-01-18 16:34:24 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2010-03-04 01:42:51 +0100 |
commit | 69ea5fcb5e33b785f3f554db0ab0c2694da3f22f (patch) | |
tree | 12376acfb1e687dfa77b74147fd84a1756a24fc3 /drivers/staging/et131x/et1310_eeprom.c | |
parent | Staging: et131x: Kill unused error defines (diff) | |
download | kernel-qcow2-linux-69ea5fcb5e33b785f3f554db0ab0c2694da3f22f.tar.gz kernel-qcow2-linux-69ea5fcb5e33b785f3f554db0ab0c2694da3f22f.tar.xz kernel-qcow2-linux-69ea5fcb5e33b785f3f554db0ab0c2694da3f22f.zip |
Staging: et131x: Collapse all the function definitions into one place
We have lots of tiny files right now that could be one
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/et131x/et1310_eeprom.c')
-rw-r--r-- | drivers/staging/et131x/et1310_eeprom.c | 41 |
1 files changed, 33 insertions, 8 deletions
diff --git a/drivers/staging/et131x/et1310_eeprom.c b/drivers/staging/et131x/et1310_eeprom.c index bcca1f86f516..3ca253672ba1 100644 --- a/drivers/staging/et131x/et1310_eeprom.c +++ b/drivers/staging/et131x/et1310_eeprom.c @@ -84,17 +84,42 @@ #include <linux/ioport.h> #include "et1310_phy.h" -#include "et1310_pm.h" -#include "et1310_jagcore.h" -#include "et1310_eeprom.h" - #include "et131x_adapter.h" -#include "et131x_initpci.h" -#include "et131x_isr.h" - -#include "et1310_tx.h" +#include "et131x.h" +/* + * EEPROM Defines + */ +/* LBCIF Register Groups (addressed via 32-bit offsets) */ +#define LBCIF_DWORD0_GROUP 0xAC +#define LBCIF_DWORD1_GROUP 0xB0 + +/* LBCIF Registers (addressed via 8-bit offsets) */ +#define LBCIF_ADDRESS_REGISTER 0xAC +#define LBCIF_DATA_REGISTER 0xB0 +#define LBCIF_CONTROL_REGISTER 0xB1 +#define LBCIF_STATUS_REGISTER 0xB2 + +/* LBCIF Control Register Bits */ +#define LBCIF_CONTROL_SEQUENTIAL_READ 0x01 +#define LBCIF_CONTROL_PAGE_WRITE 0x02 +#define LBCIF_CONTROL_EEPROM_RELOAD 0x08 +#define LBCIF_CONTROL_TWO_BYTE_ADDR 0x20 +#define LBCIF_CONTROL_I2C_WRITE 0x40 +#define LBCIF_CONTROL_LBCIF_ENABLE 0x80 + +/* LBCIF Status Register Bits */ +#define LBCIF_STATUS_PHY_QUEUE_AVAIL 0x01 +#define LBCIF_STATUS_I2C_IDLE 0x02 +#define LBCIF_STATUS_ACK_ERROR 0x04 +#define LBCIF_STATUS_GENERAL_ERROR 0x08 +#define LBCIF_STATUS_CHECKSUM_ERROR 0x40 +#define LBCIF_STATUS_EEPROM_PRESENT 0x80 + +/* Miscellaneous Constraints */ +#define MAX_NUM_REGISTER_POLLS 1000 +#define MAX_NUM_WRITE_RETRIES 2 static int eeprom_wait_ready(struct pci_dev *pdev, u32 *status) { |