mmc: sh_mobile_sdhi: tidyup mmc_data->bus_shift for latest SoC
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 13 Jan 2015 04:59:33 +0000 (04:59 +0000)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 20 Jan 2015 09:23:39 +0000 (10:23 +0100)
Latest SDHI on Renesas has expand register mapping.
update mmc_data->bus_shift for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sh_mobile_sdhi.c

index 48a3be804cc042e89a5ecd967ad5806bde1afa3e..26eeeb690061ec7ade2c3f619e980ee6690a9e87 100644 (file)
@@ -202,7 +202,10 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
        host->clk_disable       = sh_mobile_sdhi_clk_disable;
        host->multi_io_quirk    = sh_mobile_sdhi_multi_io_quirk;
        /* SD control register space size is 0x100, 0x200 for bus_shift=1 */
-       host->bus_shift         = resource_size(res) >> 9;
+       if (resource_size(res) > 0x100)
+               host->bus_shift = 1;
+       else
+               host->bus_shift = 0;
 
        mmc_data->capabilities = MMC_CAP_MMC_HIGHSPEED;
        if (p) {