diff options
author | Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com> | 2010-03-18 06:26:41 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-03-23 16:50:23 -0400 |
commit | a3b8ea7554862e80a14b83233b37ddd2506d1d70 (patch) | |
tree | b38e5df405ab15cd5a36a9d2a33d67c4f1084e20 | |
parent | c76a0d6c9357d3e6ac32793b89a0a303966e1c4c (diff) |
wl1271: Added DEBUG_SDIO flag
Added separate flag for SDIO debugging. Previously it has used
DEBUG_SPI flag. This patch also includes couple indentation fixes.
Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@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.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_sdio.c | 20 |
2 files changed, 13 insertions, 8 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271.h b/drivers/net/wireless/wl12xx/wl1271.h index 23a0c7e22939..4e608067253e 100644 --- a/drivers/net/wireless/wl12xx/wl1271.h +++ b/drivers/net/wireless/wl12xx/wl1271.h | |||
@@ -53,6 +53,7 @@ enum { | |||
53 | DEBUG_MAC80211 = BIT(11), | 53 | DEBUG_MAC80211 = BIT(11), |
54 | DEBUG_CMD = BIT(12), | 54 | DEBUG_CMD = BIT(12), |
55 | DEBUG_ACX = BIT(13), | 55 | DEBUG_ACX = BIT(13), |
56 | DEBUG_SDIO = BIT(14), | ||
56 | DEBUG_ALL = ~0, | 57 | DEBUG_ALL = ~0, |
57 | }; | 58 | }; |
58 | 59 | ||
diff --git a/drivers/net/wireless/wl12xx/wl1271_sdio.c b/drivers/net/wireless/wl12xx/wl1271_sdio.c index d9183b64e723..0478919138d4 100644 --- a/drivers/net/wireless/wl12xx/wl1271_sdio.c +++ b/drivers/net/wireless/wl12xx/wl1271_sdio.c | |||
@@ -102,14 +102,14 @@ static void wl1271_sdio_init(struct wl1271 *wl) | |||
102 | } | 102 | } |
103 | 103 | ||
104 | static void wl1271_sdio_raw_read(struct wl1271 *wl, int addr, void *buf, | 104 | static void wl1271_sdio_raw_read(struct wl1271 *wl, int addr, void *buf, |
105 | size_t len, bool fixed) | 105 | size_t len, bool fixed) |
106 | { | 106 | { |
107 | int ret; | 107 | int ret; |
108 | struct sdio_func *func = wl_to_func(wl); | 108 | struct sdio_func *func = wl_to_func(wl); |
109 | 109 | ||
110 | if (unlikely(addr == HW_ACCESS_ELP_CTRL_REG_ADDR)) { | 110 | if (unlikely(addr == HW_ACCESS_ELP_CTRL_REG_ADDR)) { |
111 | ((u8 *)buf)[0] = sdio_f0_readb(func, addr, &ret); | 111 | ((u8 *)buf)[0] = sdio_f0_readb(func, addr, &ret); |
112 | wl1271_debug(DEBUG_SPI, "sdio read 52 addr 0x%x, byte 0x%02x", | 112 | wl1271_debug(DEBUG_SDIO, "sdio read 52 addr 0x%x, byte 0x%02x", |
113 | addr, ((u8 *)buf)[0]); | 113 | addr, ((u8 *)buf)[0]); |
114 | } else { | 114 | } else { |
115 | if (fixed) | 115 | if (fixed) |
@@ -117,9 +117,9 @@ static void wl1271_sdio_raw_read(struct wl1271 *wl, int addr, void *buf, | |||
117 | else | 117 | else |
118 | ret = sdio_memcpy_fromio(func, buf, addr, len); | 118 | ret = sdio_memcpy_fromio(func, buf, addr, len); |
119 | 119 | ||
120 | wl1271_debug(DEBUG_SPI, "sdio read 53 addr 0x%x, %d bytes", | 120 | wl1271_debug(DEBUG_SDIO, "sdio read 53 addr 0x%x, %d bytes", |
121 | addr, len); | 121 | addr, len); |
122 | wl1271_dump_ascii(DEBUG_SPI, "data: ", buf, len); | 122 | wl1271_dump_ascii(DEBUG_SDIO, "data: ", buf, len); |
123 | } | 123 | } |
124 | 124 | ||
125 | if (ret) | 125 | if (ret) |
@@ -128,19 +128,19 @@ static void wl1271_sdio_raw_read(struct wl1271 *wl, int addr, void *buf, | |||
128 | } | 128 | } |
129 | 129 | ||
130 | static void wl1271_sdio_raw_write(struct wl1271 *wl, int addr, void *buf, | 130 | static void wl1271_sdio_raw_write(struct wl1271 *wl, int addr, void *buf, |
131 | size_t len, bool fixed) | 131 | size_t len, bool fixed) |
132 | { | 132 | { |
133 | int ret; | 133 | int ret; |
134 | struct sdio_func *func = wl_to_func(wl); | 134 | struct sdio_func *func = wl_to_func(wl); |
135 | 135 | ||
136 | if (unlikely(addr == HW_ACCESS_ELP_CTRL_REG_ADDR)) { | 136 | if (unlikely(addr == HW_ACCESS_ELP_CTRL_REG_ADDR)) { |
137 | sdio_f0_writeb(func, ((u8 *)buf)[0], addr, &ret); | 137 | sdio_f0_writeb(func, ((u8 *)buf)[0], addr, &ret); |
138 | wl1271_debug(DEBUG_SPI, "sdio write 52 addr 0x%x, byte 0x%02x", | 138 | wl1271_debug(DEBUG_SDIO, "sdio write 52 addr 0x%x, byte 0x%02x", |
139 | addr, ((u8 *)buf)[0]); | 139 | addr, ((u8 *)buf)[0]); |
140 | } else { | 140 | } else { |
141 | wl1271_debug(DEBUG_SPI, "sdio write 53 addr 0x%x, %d bytes", | 141 | wl1271_debug(DEBUG_SDIO, "sdio write 53 addr 0x%x, %d bytes", |
142 | addr, len); | 142 | addr, len); |
143 | wl1271_dump_ascii(DEBUG_SPI, "data: ", buf, len); | 143 | wl1271_dump_ascii(DEBUG_SDIO, "data: ", buf, len); |
144 | 144 | ||
145 | if (fixed) | 145 | if (fixed) |
146 | ret = sdio_writesb(func, addr, buf, len); | 146 | ret = sdio_writesb(func, addr, buf, len); |
@@ -156,6 +156,10 @@ static void wl1271_sdio_set_power(struct wl1271 *wl, bool enable) | |||
156 | { | 156 | { |
157 | struct sdio_func *func = wl_to_func(wl); | 157 | struct sdio_func *func = wl_to_func(wl); |
158 | 158 | ||
159 | /* Let the SDIO stack handle wlan_enable control, so we | ||
160 | * keep host claimed while wlan is in use to keep wl1271 | ||
161 | * alive. | ||
162 | */ | ||
159 | if (enable) { | 163 | if (enable) { |
160 | sdio_claim_host(func); | 164 | sdio_claim_host(func); |
161 | sdio_enable_func(func); | 165 | sdio_enable_func(func); |