summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-11-02 06:56:12 +0000
committerTom Warren <twarren@nvidia.com>2012-11-19 08:15:41 -0700
commit8c0ec0dbc4cce76c6c745858116a404791d28b8b (patch)
tree55c23dfce6198765ceabdba1244db74832dc506e /drivers
parent1ed0b51b7d58bfcf1901005fb98591bbdb9e30e3 (diff)
downloadu-boot-imx-8c0ec0dbc4cce76c6c745858116a404791d28b8b.zip
u-boot-imx-8c0ec0dbc4cce76c6c745858116a404791d28b8b.tar.gz
u-boot-imx-8c0ec0dbc4cce76c6c745858116a404791d28b8b.tar.bz2
mmc: tegra: support 4-bit operation too on 8-bit slots
If a board has all 8 data lines routed, the SD/MMC controller can still operate in 4-bit (or presumably even 1-bit) mode. Adjust Tegra's MMC driver to report the 4-bit capability even for 8-bit slots. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/tegra_mmc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mmc/tegra_mmc.c b/drivers/mmc/tegra_mmc.c
index 8fea6a6..1fd5592 100644
--- a/drivers/mmc/tegra_mmc.c
+++ b/drivers/mmc/tegra_mmc.c
@@ -547,10 +547,11 @@ int tegra_mmc_init(int dev_index, int bus_width, int pwr_gpio, int cd_gpio)
mmc->getcd = tegra_mmc_getcd;
mmc->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195;
+ mmc->host_caps = 0;
if (bus_width == 8)
- mmc->host_caps = MMC_MODE_8BIT;
- else
- mmc->host_caps = MMC_MODE_4BIT;
+ mmc->host_caps |= MMC_MODE_8BIT;
+ if (bus_width >= 4)
+ mmc->host_caps |= MMC_MODE_4BIT;
mmc->host_caps |= MMC_MODE_HS_52MHz | MMC_MODE_HS | MMC_MODE_HC;
/*