diff options
author | Anton Vorontsov <avorontsov@ru.mvista.com> | 2009-06-17 16:14:08 -0400 |
---|---|---|
committer | Pierre Ossman <pierre@ossman.eu> | 2009-06-21 15:00:59 -0400 |
commit | 5fe23c7f51def59f66bc6aeee988ef1a467a2c8c (patch) | |
tree | 6d10aa3966cf105a8c6d6b758660fa6f00a49896 /drivers/mmc/host/sdhci-of.c | |
parent | 04ac2f46d6ecb995f78c9ae4e2e4707d00b5339f (diff) |
sdhci: Add support for hosts that are only capable of 1-bit transfers
Some hosts (hardware configurations, or particular SD/MMC slots) may
not support 4-bit bus. For example, on MPC8569E-MDS boards we can
switch between serial (1-bit only) and nibble (4-bit) modes, thought
we have to disable more peripherals to work in 4-bit mode.
Along with some small core changes, this patch modifies sdhci-of
driver, so that now it looks for "sdhci,1-bit-only" property in the
device-tree, and if specified we enable a proper quirk.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
Diffstat (limited to 'drivers/mmc/host/sdhci-of.c')
-rw-r--r-- | drivers/mmc/host/sdhci-of.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-of.c b/drivers/mmc/host/sdhci-of.c index 128c614d11aa..d79fa55c3b89 100644 --- a/drivers/mmc/host/sdhci-of.c +++ b/drivers/mmc/host/sdhci-of.c | |||
@@ -250,6 +250,9 @@ static int __devinit sdhci_of_probe(struct of_device *ofdev, | |||
250 | host->ops = &sdhci_of_data->ops; | 250 | host->ops = &sdhci_of_data->ops; |
251 | } | 251 | } |
252 | 252 | ||
253 | if (of_get_property(np, "sdhci,1-bit-only", NULL)) | ||
254 | host->quirks |= SDHCI_QUIRK_FORCE_1_BIT_DATA; | ||
255 | |||
253 | clk = of_get_property(np, "clock-frequency", &size); | 256 | clk = of_get_property(np, "clock-frequency", &size); |
254 | if (clk && size == sizeof(*clk) && *clk) | 257 | if (clk && size == sizeof(*clk) && *clk) |
255 | of_host->clock = *clk; | 258 | of_host->clock = *clk; |