diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-03 12:00:07 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-03 12:00:07 -0800 |
| commit | e9e67a8b579d9605a3d06f7430dbb40465c97bf1 (patch) | |
| tree | cd90f29814359440b0f46995216d523ff5d26730 /drivers/mmc/core/mmc.c | |
| parent | ad6b646fe55c40ec193240b974561f0a3775d68d (diff) | |
| parent | 418f19ea17a99421b22a64e101e14b6a16bed66d (diff) | |
| download | olio-linux-3.10-e9e67a8b579d9605a3d06f7430dbb40465c97bf1.tar.xz olio-linux-3.10-e9e67a8b579d9605a3d06f7430dbb40465c97bf1.zip | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
mmc: warn about voltage mismatches
mmc_spi: Add support for OpenFirmware bindings
pxamci: fix dma_unmap_sg length
mmc_block: ensure all sectors that do not have errors are read
drivers/mmc: Move a dereference below a NULL test
sdhci: handle built-in sdhci with modular leds class
mmc: balanc pci_iomap with pci_iounmap
mmc_block: print better error messages
mmc: Add mmc_vddrange_to_ocrmask() helper function
ricoh_mmc: Handle newer models of Ricoh controllers
mmc: Add 8-bit bus width support
sdhci: activate led support also when module
mmc: trivial annotation of 'blocks'
pci: use pci_ioremap_bar() in drivers/mmc
sdricoh_cs: Add support for Bay Controller devices
mmc: at91_mci: reorder timer setup and mmc_add_host() call
Diffstat (limited to 'drivers/mmc/core/mmc.c')
| -rw-r--r-- | drivers/mmc/core/mmc.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index fdd7c760be8..c232d11a7ed 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -434,13 +434,24 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, * Activate wide bus (if supported). */ if ((card->csd.mmca_vsn >= CSD_SPEC_VER_4) && - (host->caps & MMC_CAP_4_BIT_DATA)) { + (host->caps & (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA))) { + unsigned ext_csd_bit, bus_width; + + if (host->caps & MMC_CAP_8_BIT_DATA) { + ext_csd_bit = EXT_CSD_BUS_WIDTH_8; + bus_width = MMC_BUS_WIDTH_8; + } else { + ext_csd_bit = EXT_CSD_BUS_WIDTH_4; + bus_width = MMC_BUS_WIDTH_4; + } + err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, - EXT_CSD_BUS_WIDTH, EXT_CSD_BUS_WIDTH_4); + EXT_CSD_BUS_WIDTH, ext_csd_bit); + if (err) goto free_card; - mmc_set_bus_width(card->host, MMC_BUS_WIDTH_4); + mmc_set_bus_width(card->host, bus_width); } if (!oldcard) @@ -624,4 +635,3 @@ err: return err; } - |