Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171715
b: refs/heads/master
c: a659868
h: refs/heads/master
i:
  171713: a1c7604
  171711: 0153afb
v: v3
  • Loading branch information
Gertjan van Wingerde authored and John W. Linville committed Nov 11, 2009
1 parent 139e054 commit 4d16543
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 748d451028ef037576b57517bc81e62f1fd92250
refs/heads/master: a65986824d2552dd76786d5a0012989a64c45ab7
22 changes: 18 additions & 4 deletions trunk/drivers/net/wireless/rt2x00/rt2800pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,15 @@ static void rt2800pci_read_eeprom_pci(struct rt2x00_dev *rt2x00dev)
EEPROM_SIZE / sizeof(u16));
}

static int rt2800pci_efuse_detect(struct rt2x00_dev *rt2x00dev)
{
u32 reg;

rt2800_register_read(rt2x00dev, EFUSE_CTRL, &reg);

return rt2x00_get_field32(reg, EFUSE_CTRL_PRESENT);
}

static void rt2800pci_efuse_read(struct rt2x00_dev *rt2x00dev,
unsigned int i)
{
Expand Down Expand Up @@ -182,6 +191,11 @@ static inline void rt2800pci_read_eeprom_pci(struct rt2x00_dev *rt2x00dev)
{
}

static inline int rt2800pci_efuse_detect(struct rt2x00_dev *rt2x00dev)
{
return 0;
}

static inline void rt2800pci_read_eeprom_efuse(struct rt2x00_dev *rt2x00dev)
{
}
Expand Down Expand Up @@ -1091,11 +1105,11 @@ static int rt2800pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
case RT3052:
rt2800pci_read_eeprom_soc(rt2x00dev);
break;
case RT3090:
rt2800pci_read_eeprom_efuse(rt2x00dev);
break;
default:
rt2800pci_read_eeprom_pci(rt2x00dev);
if (rt2800pci_efuse_detect(rt2x00dev))
rt2800pci_read_eeprom_efuse(rt2x00dev);
else
rt2800pci_read_eeprom_pci(rt2x00dev);
break;
}

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/rt2x00/rt2800pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
#define EFUSE_CTRL_ADDRESS_IN FIELD32(0x03fe0000)
#define EFUSE_CTRL_MODE FIELD32(0x000000c0)
#define EFUSE_CTRL_KICK FIELD32(0x40000000)
#define EFUSE_CTRL_PRESENT FIELD32(0x80000000)

/*
* EFUSE_DATA0
Expand Down

0 comments on commit 4d16543

Please sign in to comment.