ARM: i.MX: use device_detect_by_name where applicable
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
fd2e121b5b
commit
746089c224
|
@ -117,11 +117,7 @@ static int realq7_env_init(void)
|
|||
{
|
||||
switch (bootsource_get()) {
|
||||
case BOOTSOURCE_MMC:
|
||||
if (!IS_ENABLED(CONFIG_MCI_STARTUP)) {
|
||||
struct device_d *dev = get_device_by_name("mmc3");
|
||||
if (dev)
|
||||
device_detect(dev);
|
||||
}
|
||||
device_detect_by_name("mmc3");
|
||||
devfs_add_partition("mmc3", 0, SZ_1M, DEVFS_PARTITION_FIXED, "mmc3.barebox");
|
||||
devfs_add_partition("mmc3", SZ_1M, SZ_1M, DEVFS_PARTITION_FIXED, "mmc3.bareboxenv");
|
||||
default_environment_path = "/dev/mmc3.bareboxenv";
|
||||
|
|
|
@ -79,12 +79,10 @@ extern char flash_header_start[], flash_header_end[];
|
|||
|
||||
static int loco_late_init(void)
|
||||
{
|
||||
struct device_d *dev = get_device_by_name("mmc0");
|
||||
struct mc34708 *mc34708;
|
||||
int rev;
|
||||
|
||||
if (dev)
|
||||
device_detect(dev);
|
||||
device_detect_by_name("mmc0");
|
||||
|
||||
devfs_add_partition("mmc0", 0x40000, 0x20000, DEVFS_PARTITION_FIXED, "env0");
|
||||
|
||||
|
|
Loading…
Reference in New Issue