Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208445
b: refs/heads/master
c: c4512f7
h: refs/heads/master
i:
  208443: 775cd43
v: v3
  • Loading branch information
Jerry Huang authored and Linus Torvalds committed Aug 11, 2010
1 parent b448512 commit c9befaa
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9bea3c850dbff2296892298614388bdc71ad2170
refs/heads/master: c4512f79dcb236c8dc2afae176a0dc520096f0bc
4 changes: 4 additions & 0 deletions trunk/drivers/mmc/host/sdhci-of-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ static int __devinit sdhci_of_probe(struct of_device *ofdev,
host->ops = &sdhci_of_data->ops;
}

if (of_get_property(np, "sdhci,auto-cmd12", NULL))
host->quirks |= SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12;


if (of_get_property(np, "sdhci,1-bit-only", NULL))
host->quirks |= SDHCI_QUIRK_FORCE_1_BIT_DATA;

Expand Down
14 changes: 12 additions & 2 deletions trunk/drivers/mmc/host/sdhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -818,8 +818,12 @@ static void sdhci_set_transfer_mode(struct sdhci_host *host,
WARN_ON(!host->data);

mode = SDHCI_TRNS_BLK_CNT_EN;
if (data->blocks > 1)
mode |= SDHCI_TRNS_MULTI;
if (data->blocks > 1) {
if (host->quirks & SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12)
mode |= SDHCI_TRNS_MULTI | SDHCI_TRNS_ACMD12;
else
mode |= SDHCI_TRNS_MULTI;
}
if (data->flags & MMC_DATA_READ)
mode |= SDHCI_TRNS_READ;
if (host->flags & SDHCI_REQ_USE_DMA)
Expand Down Expand Up @@ -1109,6 +1113,12 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq)
#ifndef SDHCI_USE_LEDS_CLASS
sdhci_activate_led(host);
#endif
if (host->quirks & SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12) {
if (mrq->stop) {
mrq->data->stop = NULL;
mrq->stop = NULL;
}
}

host->mrq = mrq;

Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/mmc/host/sdhci.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ struct sdhci_host {
#define SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC (1<<26)
/* Controller is missing device caps. Use caps provided by host */
#define SDHCI_QUIRK_MISSING_CAPS (1<<27)
/* Controller uses Auto CMD12 command to stop the transfer */
#define SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 (1<<28)

int irq; /* Device IRQ */
void __iomem * ioaddr; /* Mapped address */
Expand Down

0 comments on commit c9befaa

Please sign in to comment.