-#ifdef CONFIG_MMC
- if (strcmp(FAT_ENV_INTERFACE, "mmc") == 0) {
- struct mmc *mmc = find_mmc_device(dev);
-
- if (!mmc) {
- printf("no mmc device at slot %x\n", dev);
- return 1;
- }
-
- mmc->has_init = 0;
- mmc_init(mmc);
- }
-#endif /* CONFIG_MMC */
-
- dev_desc = get_dev(FAT_ENV_INTERFACE, dev);
- if (dev_desc == NULL) {
- printf("Failed to find %s%d\n",
- FAT_ENV_INTERFACE, dev);
+ part = get_device_and_partition(FAT_ENV_INTERFACE,
+ FAT_ENV_DEVICE_AND_PART,
+ &dev_desc, &info, 1);
+ if (part < 0)