aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/if_sdio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/libertas/if_sdio.c')
-rw-r--r--drivers/net/wireless/libertas/if_sdio.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c
index 7d1a3c6b6ce0..cd464a2589b9 100644
--- a/drivers/net/wireless/libertas/if_sdio.c
+++ b/drivers/net/wireless/libertas/if_sdio.c
@@ -35,6 +35,8 @@
35#include <linux/mmc/card.h> 35#include <linux/mmc/card.h>
36#include <linux/mmc/sdio_func.h> 36#include <linux/mmc/sdio_func.h>
37#include <linux/mmc/sdio_ids.h> 37#include <linux/mmc/sdio_ids.h>
38#include <linux/mmc/sdio.h>
39#include <linux/mmc/host.h>
38 40
39#include "host.h" 41#include "host.h"
40#include "decl.h" 42#include "decl.h"
@@ -943,6 +945,7 @@ static int if_sdio_probe(struct sdio_func *func,
943 int ret, i; 945 int ret, i;
944 unsigned int model; 946 unsigned int model;
945 struct if_sdio_packet *packet; 947 struct if_sdio_packet *packet;
948 struct mmc_host *host = func->card->host;
946 949
947 lbs_deb_enter(LBS_DEB_SDIO); 950 lbs_deb_enter(LBS_DEB_SDIO);
948 951
@@ -1023,6 +1026,25 @@ static int if_sdio_probe(struct sdio_func *func,
1023 if (ret) 1026 if (ret)
1024 goto disable; 1027 goto disable;
1025 1028
1029 /* For 1-bit transfers to the 8686 model, we need to enable the
1030 * interrupt flag in the CCCR register. Set the MMC_QUIRK_LENIENT_FN0
1031 * bit to allow access to non-vendor registers. */
1032 if ((card->model == IF_SDIO_MODEL_8686) &&
1033 (host->caps & MMC_CAP_SDIO_IRQ) &&
1034 (host->ios.bus_width == MMC_BUS_WIDTH_1)) {
1035 u8 reg;
1036
1037 func->card->quirks |= MMC_QUIRK_LENIENT_FN0;
1038 reg = sdio_f0_readb(func, SDIO_CCCR_IF, &ret);
1039 if (ret)
1040 goto release_int;
1041
1042 reg |= SDIO_BUS_ECSI;
1043 sdio_f0_writeb(func, reg, SDIO_CCCR_IF, &ret);
1044 if (ret)
1045 goto release_int;
1046 }
1047
1026 card->ioport = sdio_readb(func, IF_SDIO_IOPORT, &ret); 1048 card->ioport = sdio_readb(func, IF_SDIO_IOPORT, &ret);
1027 if (ret) 1049 if (ret)
1028 goto release_int; 1050 goto release_int;