diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2009-10-12 08:08:49 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-27 16:48:04 -0400 |
commit | 284134eb6f928f6cdbfe95ab79f8e46233a22c98 (patch) | |
tree | 53e70a9c2a6597a9896ab014e710972a85858a25 /drivers/net/wireless/wl12xx/wl1271_boot.c | |
parent | e8768eeb5993bf9695adb4afe4118b7fd5e307a3 (diff) |
wl1271: RefClk configuration
Updated RefClk configuration based on reference sources. Apparently this
change will improve RF performance.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_boot.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_boot.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_boot.c b/drivers/net/wireless/wl12xx/wl1271_boot.c index 1a3084cca9b8..b58657750716 100644 --- a/drivers/net/wireless/wl12xx/wl1271_boot.c +++ b/drivers/net/wireless/wl12xx/wl1271_boot.c | |||
@@ -435,13 +435,29 @@ int wl1271_boot(struct wl1271 *wl) | |||
435 | int ret = 0; | 435 | int ret = 0; |
436 | u32 tmp, clk, pause; | 436 | u32 tmp, clk, pause; |
437 | 437 | ||
438 | if (REF_CLOCK == 0 || REF_CLOCK == 2) | 438 | if (REF_CLOCK == 0 || REF_CLOCK == 2 || REF_CLOCK == 4) |
439 | /* ref clk: 19.2/38.4 */ | 439 | /* ref clk: 19.2/38.4/38.4-XTAL */ |
440 | clk = 0x3; | 440 | clk = 0x3; |
441 | else if (REF_CLOCK == 1 || REF_CLOCK == 3) | 441 | else if (REF_CLOCK == 1 || REF_CLOCK == 3) |
442 | /* ref clk: 26/52 */ | 442 | /* ref clk: 26/52 */ |
443 | clk = 0x5; | 443 | clk = 0x5; |
444 | 444 | ||
445 | if (REF_CLOCK != 0) { | ||
446 | u16 val; | ||
447 | /* Set clock type */ | ||
448 | val = wl1271_top_reg_read(wl, OCP_REG_CLK_TYPE); | ||
449 | val &= FREF_CLK_TYPE_BITS; | ||
450 | val |= CLK_REQ_PRCM; | ||
451 | wl1271_top_reg_write(wl, OCP_REG_CLK_TYPE, val); | ||
452 | } else { | ||
453 | u16 val; | ||
454 | /* Set clock polarity */ | ||
455 | val = wl1271_top_reg_read(wl, OCP_REG_CLK_POLARITY); | ||
456 | val &= FREF_CLK_POLARITY_BITS; | ||
457 | val |= CLK_REQ_OUTN_SEL; | ||
458 | wl1271_top_reg_write(wl, OCP_REG_CLK_POLARITY, val); | ||
459 | } | ||
460 | |||
445 | wl1271_reg_write32(wl, PLL_PARAMETERS, clk); | 461 | wl1271_reg_write32(wl, PLL_PARAMETERS, clk); |
446 | 462 | ||
447 | pause = wl1271_reg_read32(wl, PLL_PARAMETERS); | 463 | pause = wl1271_reg_read32(wl, PLL_PARAMETERS); |