mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-20 22:21:41 +00:00
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 <hl@rock-chips.com> Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
a65f51b978
commit
ace2198b7c
1 changed files with 3 additions and 2 deletions
|
@ -50,8 +50,9 @@ static int rockchip_dwmmc_ofdata_to_platdata(struct udevice *dev)
|
||||||
host->get_mmc_clk = rockchip_dwmmc_get_mmc_clk;
|
host->get_mmc_clk = rockchip_dwmmc_get_mmc_clk;
|
||||||
host->priv = dev;
|
host->priv = dev;
|
||||||
|
|
||||||
/* TODO(sjg@chromium.org): Remove the need for this hack */
|
/* use non-removeable as sdcard and emmc as judgement */
|
||||||
host->dev_index = (ulong)host->ioaddr == 0xff0f0000 ? 0 : 1;
|
if (fdtdec_get_bool(gd->fdt_blob, dev->of_offset, "non-removable"))
|
||||||
|
host->dev_index = 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue