]> Git Repo - u-boot.git/blame - board/mediatek/mt7623/mt7623_rfb.c
common: Drop asm/global_data.h from common header
[u-boot.git] / board / mediatek / mt7623 / mt7623_rfb.c
CommitLineData
361e13f1
WG
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2018 MediaTek Inc.
4 */
5
6#include <common.h>
e3cc511e 7#include <mmc.h>
401d1c4f 8#include <asm/global_data.h>
361e13f1
WG
9
10DECLARE_GLOBAL_DATA_PTR;
11
12int board_init(void)
13{
14 /* address of boot parameters */
15 gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
16
17 return 0;
18}
f3af98ec 19
e3cc511e 20#ifdef CONFIG_MMC
f3af98ec
FW
21int mmc_get_boot_dev(void)
22{
23 int g_mmc_devid = -1;
24 char *uflag = (char *)0x81DFFFF0;
e3cc511e
DW
25
26 if (!find_mmc_device(1))
27 return 0;
28
f3af98ec
FW
29 if (strncmp(uflag,"eMMC",4)==0) {
30 g_mmc_devid = 0;
31 printf("Boot From Emmc(id:%d)\n\n", g_mmc_devid);
32 } else {
33 g_mmc_devid = 1;
34 printf("Boot From SD(id:%d)\n\n", g_mmc_devid);
35 }
36 return g_mmc_devid;
37}
38
39int mmc_get_env_dev(void)
40{
41 return mmc_get_boot_dev();
42}
e3cc511e 43#endif
This page took 0.062717 seconds and 4 git commands to generate.