mmc: Test bus-width for old MMC devices
authorAries Lee <arieslee@jmicron.com>
Wed, 15 Dec 2010 07:14:24 +0000 (08:14 +0100)
committerChris Ball <cjb@laptop.org>
Sun, 9 Jan 2011 04:52:09 +0000 (23:52 -0500)
commit22113efd00491310da802f3b1a9a66cfcf415fac
tree1faf6e99a591f9b6856bab6c8318eeeacb076051
parente6f29a8dc1602e170daf955233891a9130573a55
mmc: Test bus-width for old MMC devices

Some old MMC devices fail with the 4/8 bits the driver tries to use
exclusively.  This patch adds a test for the given bus setup and falls
back to the lower bit mode (until 1-bit mode) when the test fails.

[Major rework and refactoring by tiwai]
[Quirk addition and many fixes by prakity]

Signed-off-by: Aries Lee <arieslee@jmicron.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Philip Rakity <prakity@marvell.com>
Tested-by: Philip Rakity <prakity@marvell.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/core/mmc.c
drivers/mmc/core/mmc_ops.c
drivers/mmc/core/mmc_ops.h
drivers/mmc/host/sdhci.c
drivers/mmc/host/sdhci.h
include/linux/mmc/host.h
include/linux/mmc/mmc.h