| // SPDX-License-Identifier: GPL-2.0+ |
| * Copyright (C) 2016 Freescale Semiconductor, Inc. |
| static int check_mmc_autodetect(void) |
| char *autodetect_str = env_get("mmcautodetect"); |
| if ((autodetect_str) && (strcmp(autodetect_str, "yes") == 0)) |
| /* This should be defined for each board */ |
| __weak int mmc_map_to_kernel_blk(int dev_no) |
| void board_late_mmc_env_init(void) |
| u32 dev_no = mmc_get_env_dev(); |
| if (!check_mmc_autodetect()) |
| env_set_ulong("mmcdev", dev_no); |
| sprintf(mmcblk, "/dev/mmcblk%dp2 rootwait rw", |
| mmc_map_to_kernel_blk(dev_no)); |
| env_set("mmcroot", mmcblk); |
| sprintf(cmd, "mmc dev %d", dev_no); |