diff options
author | David-John Willis <John.Willis@Distant-earth.com> | 2009-11-17 18:50:09 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-11-18 17:09:24 -0500 |
commit | c95cf3d09adc9afe7816a13a920b6df36062a3fe (patch) | |
tree | 6f7b922526c4ae4fa1d593d8bcd89738d37a2784 /drivers/net/wireless/wl12xx/wl1251_boot.c | |
parent | 7010193ad8e64dfbc006b167c2ee712d4441292c (diff) | |
download | blackbird-op-linux-c95cf3d09adc9afe7816a13a920b6df36062a3fe.tar.gz blackbird-op-linux-c95cf3d09adc9afe7816a13a920b6df36062a3fe.zip |
wl1251: add NVS in EEPROM support
wl1251 supports also that NVS is stored in a separate EEPROM, add support
for that.
kvalo: use platform data instead Kconfig and use kernel style
Signed-off-by: David-John Willis <John.Willis@Distant-earth.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1251_boot.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251_boot.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_boot.c b/drivers/net/wireless/wl12xx/wl1251_boot.c index 5094f24ad034..2e733e7bdfd4 100644 --- a/drivers/net/wireless/wl12xx/wl1251_boot.c +++ b/drivers/net/wireless/wl12xx/wl1251_boot.c @@ -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); |