Commit 9d4e5bb3 authored by Juuso Oikarinen's avatar Juuso Oikarinen Committed by John W. Linville

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: default avatarJuuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: default avatarLuciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: default avatarLuciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 9cea461f
...@@ -451,11 +451,15 @@ int wl1271_boot(struct wl1271 *wl) ...@@ -451,11 +451,15 @@ int wl1271_boot(struct wl1271 *wl)
if (REF_CLOCK != 0) { if (REF_CLOCK != 0) {
u16 val; u16 val;
/* Set clock type */ /* Set clock type (open drain) */
val = wl1271_top_reg_read(wl, OCP_REG_CLK_TYPE); val = wl1271_top_reg_read(wl, OCP_REG_CLK_TYPE);
val &= FREF_CLK_TYPE_BITS; val &= FREF_CLK_TYPE_BITS;
val |= CLK_REQ_PRCM;
wl1271_top_reg_write(wl, OCP_REG_CLK_TYPE, val); wl1271_top_reg_write(wl, OCP_REG_CLK_TYPE, val);
/* Set clock pull mode (no pull) */
val = wl1271_top_reg_read(wl, OCP_REG_CLK_PULL);
val |= NO_PULL;
wl1271_top_reg_write(wl, OCP_REG_CLK_PULL, val);
} else { } else {
u16 val; u16 val;
/* Set clock polarity */ /* Set clock polarity */
......
...@@ -53,10 +53,13 @@ struct wl1271_static_data { ...@@ -53,10 +53,13 @@ struct wl1271_static_data {
#define OCP_REG_POLARITY 0x0064 #define OCP_REG_POLARITY 0x0064
#define OCP_REG_CLK_TYPE 0x0448 #define OCP_REG_CLK_TYPE 0x0448
#define OCP_REG_CLK_POLARITY 0x0cb2 #define OCP_REG_CLK_POLARITY 0x0cb2
#define OCP_REG_CLK_PULL 0x0cb4
#define CMD_MBOX_ADDRESS 0x407B4 #define CMD_MBOX_ADDRESS 0x407B4
#define POLARITY_LOW BIT(1) #define POLARITY_LOW BIT(1)
#define NO_PULL (BIT(14) | BIT(15))
#define FREF_CLK_TYPE_BITS 0xfffffe7f #define FREF_CLK_TYPE_BITS 0xfffffe7f
#define CLK_REQ_PRCM 0x100 #define CLK_REQ_PRCM 0x100
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment