diff options
Diffstat (limited to 'roms/u-boot/board/mediatek/mt7623')
-rw-r--r-- | roms/u-boot/board/mediatek/mt7623/Kconfig | 13 | ||||
-rw-r--r-- | roms/u-boot/board/mediatek/mt7623/MAINTAINERS | 14 | ||||
-rw-r--r-- | roms/u-boot/board/mediatek/mt7623/Makefile | 3 | ||||
-rw-r--r-- | roms/u-boot/board/mediatek/mt7623/mt7623_rfb.c | 43 |
4 files changed, 73 insertions, 0 deletions
diff --git a/roms/u-boot/board/mediatek/mt7623/Kconfig b/roms/u-boot/board/mediatek/mt7623/Kconfig new file mode 100644 index 000000000..a8c670e71 --- /dev/null +++ b/roms/u-boot/board/mediatek/mt7623/Kconfig @@ -0,0 +1,13 @@ +if TARGET_MT7623 + +config SYS_BOARD + default "mt7623" + +config SYS_CONFIG_NAME + default "mt7623" + +config MTK_BROM_HEADER_INFO + string + default "lk=1" + +endif diff --git a/roms/u-boot/board/mediatek/mt7623/MAINTAINERS b/roms/u-boot/board/mediatek/mt7623/MAINTAINERS new file mode 100644 index 000000000..1a8d796bd --- /dev/null +++ b/roms/u-boot/board/mediatek/mt7623/MAINTAINERS @@ -0,0 +1,14 @@ +MT7623 +M: Ryder Lee <ryder.lee@mediatek.com> +M: Weijie Gao <weijie.gao@mediatek.com> +S: Maintained +F: board/mediatek/mt7623 +F: include/configs/mt7623.h +F: configs/mt7623n_bpir2_defconfig + +UNIELEC U7623 +M: Ryder Lee <ryder.lee@mediatek.com> +M: David Woodhouse <dwmw2@infradead.org> +S: Maintained +F: arch/arm/dts/mt7623a-unielec-u7623-02-emmc.dts +F: configs/mt7623a_unielec_u7623_02_defconfig diff --git a/roms/u-boot/board/mediatek/mt7623/Makefile b/roms/u-boot/board/mediatek/mt7623/Makefile new file mode 100644 index 000000000..2b42071c4 --- /dev/null +++ b/roms/u-boot/board/mediatek/mt7623/Makefile @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0 + +obj-y += mt7623_rfb.o diff --git a/roms/u-boot/board/mediatek/mt7623/mt7623_rfb.c b/roms/u-boot/board/mediatek/mt7623/mt7623_rfb.c new file mode 100644 index 000000000..755e87908 --- /dev/null +++ b/roms/u-boot/board/mediatek/mt7623/mt7623_rfb.c @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2018 MediaTek Inc. + */ + +#include <common.h> +#include <mmc.h> +#include <asm/global_data.h> + +DECLARE_GLOBAL_DATA_PTR; + +int board_init(void) +{ + /* address of boot parameters */ + gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; + + return 0; +} + +#ifdef CONFIG_MMC +int mmc_get_boot_dev(void) +{ + int g_mmc_devid = -1; + char *uflag = (char *)0x81DFFFF0; + + if (!find_mmc_device(1)) + return 0; + + if (strncmp(uflag,"eMMC",4)==0) { + g_mmc_devid = 0; + printf("Boot From Emmc(id:%d)\n\n", g_mmc_devid); + } else { + g_mmc_devid = 1; + printf("Boot From SD(id:%d)\n\n", g_mmc_devid); + } + return g_mmc_devid; +} + +int mmc_get_env_dev(void) +{ + return mmc_get_boot_dev(); +} +#endif |