aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1271_boot.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_boot.c')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_boot.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_boot.c b/drivers/net/wireless/wl12xx/wl1271_boot.c
index acb1d9e6b7d2..1a36d8a2196e 100644
--- a/drivers/net/wireless/wl12xx/wl1271_boot.c
+++ b/drivers/net/wireless/wl12xx/wl1271_boot.c
@@ -441,11 +441,23 @@ static int wl1271_boot_write_irq_polarity(struct wl1271 *wl)
441 return 0; 441 return 0;
442} 442}
443 443
444static void wl1271_boot_hw_version(struct wl1271 *wl)
445{
446 u32 fuse;
447
448 fuse = wl1271_top_reg_read(wl, REG_FUSE_DATA_2_1);
449 fuse = (fuse & PG_VER_MASK) >> PG_VER_OFFSET;
450
451 wl->hw_pg_ver = (s8)fuse;
452}
453
444int wl1271_boot(struct wl1271 *wl) 454int wl1271_boot(struct wl1271 *wl)
445{ 455{
446 int ret = 0; 456 int ret = 0;
447 u32 tmp, clk, pause; 457 u32 tmp, clk, pause;
448 458
459 wl1271_boot_hw_version(wl);
460
449 if (REF_CLOCK == 0 || REF_CLOCK == 2 || REF_CLOCK == 4) 461 if (REF_CLOCK == 0 || REF_CLOCK == 2 || REF_CLOCK == 4)
450 /* ref clk: 19.2/38.4/38.4-XTAL */ 462 /* ref clk: 19.2/38.4/38.4-XTAL */
451 clk = 0x3; 463 clk = 0x3;