}
static void wl1271_sdio_raw_read(struct wl1271 *wl, int addr, void *buf,
- size_t len, bool fixed)
+ size_t len, bool fixed)
{
int ret;
struct sdio_func *func = wl_to_func(wl);
if (unlikely(addr == HW_ACCESS_ELP_CTRL_REG_ADDR)) {
((u8 *)buf)[0] = sdio_f0_readb(func, addr, &ret);
- wl1271_debug(DEBUG_SPI, "sdio read 52 addr 0x%x, byte 0x%02x",
+ wl1271_debug(DEBUG_SDIO, "sdio read 52 addr 0x%x, byte 0x%02x",
addr, ((u8 *)buf)[0]);
} else {
if (fixed)
else
ret = sdio_memcpy_fromio(func, buf, addr, len);
- wl1271_debug(DEBUG_SPI, "sdio read 53 addr 0x%x, %d bytes",
+ wl1271_debug(DEBUG_SDIO, "sdio read 53 addr 0x%x, %d bytes",
addr, len);
- wl1271_dump_ascii(DEBUG_SPI, "data: ", buf, len);
+ wl1271_dump_ascii(DEBUG_SDIO, "data: ", buf, len);
}
if (ret)
}
static void wl1271_sdio_raw_write(struct wl1271 *wl, int addr, void *buf,
- size_t len, bool fixed)
+ size_t len, bool fixed)
{
int ret;
struct sdio_func *func = wl_to_func(wl);
if (unlikely(addr == HW_ACCESS_ELP_CTRL_REG_ADDR)) {
sdio_f0_writeb(func, ((u8 *)buf)[0], addr, &ret);
- wl1271_debug(DEBUG_SPI, "sdio write 52 addr 0x%x, byte 0x%02x",
+ wl1271_debug(DEBUG_SDIO, "sdio write 52 addr 0x%x, byte 0x%02x",
addr, ((u8 *)buf)[0]);
} else {
- wl1271_debug(DEBUG_SPI, "sdio write 53 addr 0x%x, %d bytes",
+ wl1271_debug(DEBUG_SDIO, "sdio write 53 addr 0x%x, %d bytes",
addr, len);
- wl1271_dump_ascii(DEBUG_SPI, "data: ", buf, len);
+ wl1271_dump_ascii(DEBUG_SDIO, "data: ", buf, len);
if (fixed)
ret = sdio_writesb(func, addr, buf, len);
{
struct sdio_func *func = wl_to_func(wl);
+ /* Let the SDIO stack handle wlan_enable control, so we
+ * keep host claimed while wlan is in use to keep wl1271
+ * alive.
+ */
if (enable) {
sdio_claim_host(func);
sdio_enable_func(func);