Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255207
b: refs/heads/master
c: 68077b0
h: refs/heads/master
i:
  255205: 1081e2e
  255203: b92b156
  255199: 120f3ed
v: v3
  • Loading branch information
Major Lee authored and Chris Ball committed Jul 20, 2011
1 parent e7fa88b commit c04f576
Show file tree
Hide file tree
Showing 2 changed files with 34 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: 94dd5b3371c989b32685a00a54cba7bb530f864d
refs/heads/master: 68077b0261f00e4eb2d26f066efca1edb89488a8
33 changes: 33 additions & 0 deletions trunk/drivers/mmc/host/sdhci-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@ static const struct sdhci_pci_fixes sdhci_cafe = {
SDHCI_QUIRK_BROKEN_TIMEOUT_VAL,
};

static int mrst_hc_probe_slot(struct sdhci_pci_slot *slot)
{
slot->host->mmc->caps |= MMC_CAP_8_BIT_DATA;
return 0;
}

/*
* ADMA operation is disabled for Moorestown platform due to
* hardware bugs.
Expand All @@ -159,6 +165,7 @@ static int mrst_hc_probe(struct sdhci_pci_chip *chip)

static const struct sdhci_pci_fixes sdhci_intel_mrst_hc0 = {
.quirks = SDHCI_QUIRK_BROKEN_ADMA | SDHCI_QUIRK_NO_HISPD_BIT,
.probe_slot = mrst_hc_probe_slot,
};

static const struct sdhci_pci_fixes sdhci_intel_mrst_hc1_hc2 = {
Expand Down Expand Up @@ -789,8 +796,34 @@ static int sdhci_pci_enable_dma(struct sdhci_host *host)
return 0;
}

static int sdhci_pci_8bit_width(struct sdhci_host *host, int width)
{
u8 ctrl;

ctrl = sdhci_readb(host, SDHCI_HOST_CONTROL);

switch (width) {
case MMC_BUS_WIDTH_8:
ctrl |= SDHCI_CTRL_8BITBUS;
ctrl &= ~SDHCI_CTRL_4BITBUS;
break;
case MMC_BUS_WIDTH_4:
ctrl |= SDHCI_CTRL_4BITBUS;
ctrl &= ~SDHCI_CTRL_8BITBUS;
break;
default:
ctrl &= ~(SDHCI_CTRL_8BITBUS | SDHCI_CTRL_4BITBUS);
break;
}

sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL);

return 0;
}

static struct sdhci_ops sdhci_pci_ops = {
.enable_dma = sdhci_pci_enable_dma,
.platform_8bit_width = sdhci_pci_8bit_width,
};

/*****************************************************************************\
Expand Down

0 comments on commit c04f576

Please sign in to comment.