]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
mmc: tegra: support 4-bit operation too on 8-bit slots
authorStephen Warren <swarren@nvidia.com>
Fri, 2 Nov 2012 06:56:12 +0000 (06:56 +0000)
committerTom Warren <twarren@nvidia.com>
Mon, 19 Nov 2012 15:15:41 +0000 (08:15 -0700)
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>
drivers/mmc/tegra_mmc.c

index 8fea6a6bfb2cc0a9aa7c85c1b191e1972612233c..1fd5592f2de76bf5dbad93cb3b1b63e8a3972d8b 100644 (file)
@@ -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;
 
        /*