Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198450
b: refs/heads/master
c: 3fcb027
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Mack authored and Sascha Hauer committed Apr 14, 2010
1 parent 6773ea5 commit 8a4a537
Show file tree
Hide file tree
Showing 4 changed files with 26 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: f441b993101d4ee95222ccbaad1e0dd53ea90b64
refs/heads/master: 3fcb027d7fd749569665d34a79ce2a8e00bc2ed6
6 changes: 6 additions & 0 deletions trunk/drivers/mmc/core/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,12 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr,

card->type = MMC_TYPE_SDIO;

/*
* Call the optional HC's init_card function to handle quirks.
*/
if (host->ops->init_card)
host->ops->init_card(host, card);

/*
* For native busses: set card RCA and quit open drain mode.
*/
Expand Down
16 changes: 16 additions & 0 deletions trunk/drivers/mmc/host/mxcmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -724,11 +724,27 @@ static void mxcmci_enable_sdio_irq(struct mmc_host *mmc, int enable)
spin_unlock_irqrestore(&host->lock, flags);
}

static void mxcmci_init_card(struct mmc_host *host, struct mmc_card *card)
{
/*
* MX3 SoCs have a silicon bug which corrupts CRC calculation of
* multi-block transfers when connected SDIO peripheral doesn't
* drive the BUSY line as required by the specs.
* One way to prevent this is to only allow 1-bit transfers.
*/

if (cpu_is_mx3() && card->type == MMC_TYPE_SDIO)
host->caps &= ~MMC_CAP_4_BIT_DATA;
else
host->caps |= MMC_CAP_4_BIT_DATA;
}

static const struct mmc_host_ops mxcmci_ops = {
.request = mxcmci_request,
.set_ios = mxcmci_set_ios,
.get_ro = mxcmci_get_ro,
.enable_sdio_irq = mxcmci_enable_sdio_irq,
.init_card = mxcmci_init_card,
};

static int mxcmci_probe(struct platform_device *pdev)
Expand Down
3 changes: 3 additions & 0 deletions trunk/include/linux/mmc/host.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ struct mmc_host_ops {
int (*get_cd)(struct mmc_host *host);

void (*enable_sdio_irq)(struct mmc_host *host, int enable);

/* optional callback for HC quirks */
void (*init_card)(struct mmc_host *host, struct mmc_card *card);
};

struct mmc_card;
Expand Down

0 comments on commit 8a4a537

Please sign in to comment.