Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171875
b: refs/heads/master
c: c95cf3d
h: refs/heads/master
i:
  171873: aa490ed
  171871: 462bc82
v: v3
  • Loading branch information
David-John Willis authored and John W. Linville committed Nov 18, 2009
1 parent d2ea798 commit dc326f4
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 8 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: 7010193ad8e64dfbc006b167c2ee712d4441292c
refs/heads/master: c95cf3d09adc9afe7816a13a920b6df36062a3fe
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/wl12xx/wl1251.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ struct wl1251 {

void (*set_power)(bool enable);
int irq;
bool use_eeprom;

enum wl1251_state state;
struct mutex mutex;
Expand Down
20 changes: 13 additions & 7 deletions trunk/drivers/net/wireless/wl12xx/wl1251_boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,13 +494,19 @@ int wl1251_boot(struct wl1251 *wl)
goto out;

/* 2. start processing NVS file */
ret = wl1251_boot_upload_nvs(wl);
if (ret < 0)
goto out;

/* write firmware's last address (ie. it's length) to
* ACX_EEPROMLESS_IND_REG */
wl1251_reg_write32(wl, ACX_EEPROMLESS_IND_REG, wl->fw_len);
if (wl->use_eeprom) {
wl1251_reg_write32(wl, ACX_REG_EE_START, START_EEPROM_MGR);
msleep(4000);
wl1251_reg_write32(wl, ACX_EEPROMLESS_IND_REG, USE_EEPROM);
} else {
ret = wl1251_boot_upload_nvs(wl);
if (ret < 0)
goto out;

/* write firmware's last address (ie. it's length) to
* ACX_EEPROMLESS_IND_REG */
wl1251_reg_write32(wl, ACX_EEPROMLESS_IND_REG, wl->fw_len);
}

/* 6. read the EEPROM parameters */
tmp = wl1251_reg_read32(wl, SCR_PAD2);
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/net/wireless/wl12xx/wl1251_reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ enum wl12xx_acx_int_reg {
EEPROM location specified in the EE_ADDR register.
The Wlan hardware hardware clears this bit automatically.
*===============================================*/
#define EE_CTL (REGISTERS_BASE + 0x2000)
#define ACX_EE_CTL_REG EE_CTL
#define EE_WRITE 0x00000001ul
#define EE_READ 0x00000002ul
Expand All @@ -380,6 +381,7 @@ enum wl12xx_acx_int_reg {
This register specifies the address
within the EEPROM from/to which to read/write data.
===============================================*/
#define EE_ADDR (REGISTERS_BASE + 0x2008)
#define ACX_EE_ADDR_REG EE_ADDR

/*===============================================
Expand All @@ -389,8 +391,12 @@ enum wl12xx_acx_int_reg {
data from the EEPROM or the write data
to be written to the EEPROM.
===============================================*/
#define EE_DATA (REGISTERS_BASE + 0x2004)
#define ACX_EE_DATA_REG EE_DATA

#define EEPROM_ACCESS_TO 10000 /* timeout counter */
#define START_EEPROM_MGR 0x00000001

/*===============================================
EEPROM Base Address - 32bit RW
------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/net/wireless/wl12xx/wl1251_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ static int __devinit wl1251_spi_probe(struct spi_device *spi)
return -ENODEV;
}

wl->use_eeprom = pdata->use_eeprom;

ret = request_irq(wl->irq, wl1251_irq, 0, DRIVER_NAME, wl);
if (ret < 0) {
wl1251_error("request_irq() failed: %d", ret);
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/spi/wl12xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

struct wl12xx_platform_data {
void (*set_power)(bool enable);
bool use_eeprom;
};

#endif

0 comments on commit dc326f4

Please sign in to comment.