diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2010-03-26 06:53:15 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-03-31 14:39:12 -0400 |
commit | 9d4e5bb3dec8c4b9245035bf29628071801041a8 (patch) | |
tree | 3ba38b2d17cb3be5a63753ce7c7e6edebb49c2e5 | |
parent | 9cea461fb0a37dae9ef0a83714c5fcdc4b2074c8 (diff) |
wl1271: Configure clock-request drive mode to open-drain
This patch configures the wl1271 chipset clock-request line to be
driver in open-drain mode instead of push-pull.
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>
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_boot.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_boot.h | 7 |
2 files changed, 11 insertions, 4 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_boot.c b/drivers/net/wireless/wl12xx/wl1271_boot.c index 41c6affbee29..4195298b5abc 100644 --- a/drivers/net/wireless/wl12xx/wl1271_boot.c +++ b/drivers/net/wireless/wl12xx/wl1271_boot.c | |||
@@ -451,11 +451,15 @@ int wl1271_boot(struct wl1271 *wl) | |||
451 | 451 | ||
452 | if (REF_CLOCK != 0) { | 452 | if (REF_CLOCK != 0) { |
453 | u16 val; | 453 | u16 val; |
454 | /* Set clock type */ | 454 | /* Set clock type (open drain) */ |
455 | val = wl1271_top_reg_read(wl, OCP_REG_CLK_TYPE); | 455 | val = wl1271_top_reg_read(wl, OCP_REG_CLK_TYPE); |
456 | val &= FREF_CLK_TYPE_BITS; | 456 | val &= FREF_CLK_TYPE_BITS; |
457 | val |= CLK_REQ_PRCM; | ||
458 | wl1271_top_reg_write(wl, OCP_REG_CLK_TYPE, val); | 457 | wl1271_top_reg_write(wl, OCP_REG_CLK_TYPE, val); |
458 | |||
459 | /* Set clock pull mode (no pull) */ | ||
460 | val = wl1271_top_reg_read(wl, OCP_REG_CLK_PULL); | ||
461 | val |= NO_PULL; | ||
462 | wl1271_top_reg_write(wl, OCP_REG_CLK_PULL, val); | ||
459 | } else { | 463 | } else { |
460 | u16 val; | 464 | u16 val; |
461 | /* Set clock polarity */ | 465 | /* Set clock polarity */ |
diff --git a/drivers/net/wireless/wl12xx/wl1271_boot.h b/drivers/net/wireless/wl12xx/wl1271_boot.h index 412443ee655a..95ecc5241959 100644 --- a/drivers/net/wireless/wl12xx/wl1271_boot.h +++ b/drivers/net/wireless/wl12xx/wl1271_boot.h | |||
@@ -53,10 +53,13 @@ struct wl1271_static_data { | |||
53 | #define OCP_REG_POLARITY 0x0064 | 53 | #define OCP_REG_POLARITY 0x0064 |
54 | #define OCP_REG_CLK_TYPE 0x0448 | 54 | #define OCP_REG_CLK_TYPE 0x0448 |
55 | #define OCP_REG_CLK_POLARITY 0x0cb2 | 55 | #define OCP_REG_CLK_POLARITY 0x0cb2 |
56 | #define OCP_REG_CLK_PULL 0x0cb4 | ||
56 | 57 | ||
57 | #define CMD_MBOX_ADDRESS 0x407B4 | ||
58 | 58 | ||
59 | #define POLARITY_LOW BIT(1) | 59 | #define CMD_MBOX_ADDRESS 0x407B4 |
60 | |||
61 | #define POLARITY_LOW BIT(1) | ||
62 | #define NO_PULL (BIT(14) | BIT(15)) | ||
60 | 63 | ||
61 | #define FREF_CLK_TYPE_BITS 0xfffffe7f | 64 | #define FREF_CLK_TYPE_BITS 0xfffffe7f |
62 | #define CLK_REQ_PRCM 0x100 | 65 | #define CLK_REQ_PRCM 0x100 |