Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194185
b: refs/heads/master
c: 8a64c0f
h: refs/heads/master
i:
  194183: 661c059
v: v3
  • Loading branch information
Daniel Mack authored and John W. Linville committed Apr 6, 2010
1 parent 7bba9a4 commit c429d8b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cfcfe4469cc39625cb8257355c00dd8f35f900aa
refs/heads/master: 8a64c0f6b7ec7f758c4ef445e49f479e27fa2236
22 changes: 22 additions & 0 deletions trunk/drivers/net/wireless/libertas/if_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
#include <linux/mmc/card.h>
#include <linux/mmc/sdio_func.h>
#include <linux/mmc/sdio_ids.h>
#include <linux/mmc/sdio.h>
#include <linux/mmc/host.h>

#include "host.h"
#include "decl.h"
Expand Down Expand Up @@ -942,6 +944,7 @@ static int if_sdio_probe(struct sdio_func *func,
int ret, i;
unsigned int model;
struct if_sdio_packet *packet;
struct mmc_host *host = func->card->host;

lbs_deb_enter(LBS_DEB_SDIO);

Expand Down Expand Up @@ -1022,6 +1025,25 @@ static int if_sdio_probe(struct sdio_func *func,
if (ret)
goto disable;

/* For 1-bit transfers to the 8686 model, we need to enable the
* interrupt flag in the CCCR register. Set the MMC_QUIRK_LENIENT_FN0
* bit to allow access to non-vendor registers. */
if ((card->model == IF_SDIO_MODEL_8686) &&
(host->caps & MMC_CAP_SDIO_IRQ) &&
(host->ios.bus_width == MMC_BUS_WIDTH_1)) {
u8 reg;

func->card->quirks |= MMC_QUIRK_LENIENT_FN0;
reg = sdio_f0_readb(func, SDIO_CCCR_IF, &ret);
if (ret)
goto release_int;

reg |= SDIO_BUS_ECSI;
sdio_f0_writeb(func, reg, SDIO_CCCR_IF, &ret);
if (ret)
goto release_int;
}

card->ioport = sdio_readb(func, IF_SDIO_IOPORT, &ret);
if (ret)
goto release_int;
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/mmc/sdio.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@

#define SDIO_BUS_WIDTH_1BIT 0x00
#define SDIO_BUS_WIDTH_4BIT 0x02
#define SDIO_BUS_ECSI 0x20 /* Enable continuous SPI interrupt */
#define SDIO_BUS_SCSI 0x40 /* Support continuous SPI interrupt */

#define SDIO_BUS_CD_DISABLE 0x80 /* disable pull-up on DAT3 (pin 1) */

Expand Down

0 comments on commit c429d8b

Please sign in to comment.