]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
dm: mmc: Convert uclass to livetree
authorSimon Glass <sjg@chromium.org>
Fri, 19 May 2017 02:09:36 +0000 (20:09 -0600)
committerSimon Glass <sjg@chromium.org>
Thu, 1 Jun 2017 13:03:13 +0000 (07:03 -0600)
Update the mmc uclass to support a live device tree.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/mmc/mmc-uclass.c

index 16cc91ebdfd002d845227e457422a63c9c9c3be7..4dc3925fe6c206c60ec375fbe0eb99e89c91736a 100644 (file)
@@ -202,7 +202,8 @@ int mmc_bind(struct udevice *dev, struct mmc *mmc, const struct mmc_config *cfg)
 #endif
 #ifndef CONFIG_SPL_BUILD
        /* Use the fixed index with aliase node's index */
-       fdtdec_get_alias_seq(gd->fdt_blob, "mmc", dev_of_offset(dev), &devnum);
+       ret = dev_read_alias_seq(dev, &devnum);
+       debug("%s: alias ret=%d, devnum=%d\n", __func__, ret, devnum);
 #endif
 
        ret = blk_create_devicef(dev, "mmc_blk", "blk", IF_TYPE_MMC,