1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2018 MediaTek Inc.
8 #include <asm/global_data.h>
10 DECLARE_GLOBAL_DATA_PTR;
14 /* address of boot parameters */
15 gd->bd->bi_boot_params = CFG_SYS_SDRAM_BASE + 0x100;
21 int mmc_get_boot_dev(void)
24 char *uflag = (char *)0x81DFFFF0;
26 if (!find_mmc_device(1))
29 if (strncmp(uflag,"eMMC",4)==0) {
31 printf("Boot From Emmc(id:%d)\n\n", g_mmc_devid);
34 printf("Boot From SD(id:%d)\n\n", g_mmc_devid);
39 int mmc_get_env_dev(void)
41 return mmc_get_boot_dev();