diff options
| author | huang lin <[email protected]> | 2015-11-18 09:37:25 +0800 |
|---|---|---|
| committer | Simon Glass <[email protected]> | 2015-12-01 08:07:22 -0700 |
| commit | ace2198b7c54b3078f537255eb215ec5819cd0c8 (patch) | |
| tree | d24ab1b2cedd7832d472a58557e0287cf6cb9214 | |
| parent | a65f51b97886f0b1d911eb1ea951fce9efd1700f (diff) | |
rockchip: mmc: use non-removable property to distinguish emmc and sdcard register
emmc and sdcard have different register address, use non-removeable property
to distinguish them.
Signed-off-by: Lin Huang <[email protected]>
Acked-by: Simon Glass <[email protected]>
| -rw-r--r-- | drivers/mmc/rockchip_dw_mmc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mmc/rockchip_dw_mmc.c b/drivers/mmc/rockchip_dw_mmc.c index f11c8e00395..dfe20f90f5d 100644 --- a/drivers/mmc/rockchip_dw_mmc.c +++ b/drivers/mmc/rockchip_dw_mmc.c @@ -50,8 +50,9 @@ static int rockchip_dwmmc_ofdata_to_platdata(struct udevice *dev) host->get_mmc_clk = rockchip_dwmmc_get_mmc_clk; host->priv = dev; - /* TODO([email protected]): Remove the need for this hack */ - host->dev_index = (ulong)host->ioaddr == 0xff0f0000 ? 0 : 1; + /* use non-removeable as sdcard and emmc as judgement */ + if (fdtdec_get_bool(gd->fdt_blob, dev->of_offset, "non-removable")) + host->dev_index = 1; return 0; } |
