board: mediatek: fix mmc_get_boot_dev() for platforms without external SD
Subsystems (2)
PATCH 1/3 board: mediatek: fix mmc_get_boot_dev() for platforms without external SD
On the UniElec U7623 board there is no external SD slot and the preloader doesn't fill in the magic field at 0x81dffff0 to indicate that it was booted from eMMC.
--- board/mediatek/mt7623/mt7623_rfb.c | 7 +++++++ 1 file changed, 7 insertions(+)
board/mediatek/mt7623/mt7623_rfb.c +7 -0
@@ -4,6 +4,7 @@*/ #include <common.h> +#include <mmc.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -15,10 +16,15 @@ int board_init(void)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);
@@ -33,3 +39,4 @@ int mmc_get_env_dev(void) {return mmc_get_boot_dev (); } +#endif
Signature · 1 line
2.26.2
PATCH 2/3 board: mediatek: Use CONFIG_DEFAULT_FDT_FILE for default environment
Rather than hard-coding it to the Banana Pi R2.
--- configs/mt7623n_bpir2_defconfig | 2 +- include/configs/mt7623.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
configs/mt7623n_bpir2_defconfig +1 -1
@@ -12,7 +12,7 @@ CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_BOOTDELAY=3 CONFIG_SYS_CONSOLE_IS_IN_ENV=y -CONFIG_DEFAULT_FDT_FILE="mt7623n-bananapi-bpi-r2" +CONFIG_DEFAULT_FDT_FILE="mt7623n-bananapi-bpi-r2.dtb" # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_SYS_PROMPT="U-Boot> " CONFIG_CMD_BOOTMENU=y
include/configs/mt7623.h +1 -1
@@ -51,7 +51,7 @@"fdt_high=" FDT_HIGH "\0" \"kernel_addr_r=0x84000000\0" \"fdt_addr_r=" FDT_HIGH "\0" \ -"fdtfile=mt7623n-bananapi-bpi-r2.dtb" "\0" +"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" /* Ethernet */#define CONFIG_IPADDR 192.168.1.1
Signature · 1 line
2.26.2
PATCH 2/3 board: mediatek: Use CONFIG_DEFAULT_FDT_FILE for default environment
Quoted 3 lines · David Woodhouse
Rather than hard-coding it to the Banana Pi R2.
Signed-off-by David Woodhouse <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200729/fee36ec3/attachment.sig>
PATCH 3/3 board: mediatek: Add support for UniElec U7623 board
In reply to David WoodhouseThis is an MT7623A-based board, very similar to the Banana Pi R2.
http://www.unielecinc.com/q/news/cn/p/product/detail.html?qd_guid=OjXwKCaRlN
--- arch/arm/dts/Makefile | 1 + .../arm/dts/mt7623a-unielec-u7623-02-emmc.dts | 211 ++++++++++++++++++ configs/mt7623a_unielec_u7623_02_defconfig | 54 +++++ 3 files changed, 266 insertions(+) create mode 100644 arch/arm/dts/mt7623a-unielec-u7623-02-emmc.dts create mode 100644 configs/mt7623a_unielec_u7623_02_defconfig
arch/arm/dts/Makefile +1 -0
@@ -938,6 +938,7 @@ dtb-$(CONFIG_SOC_K3_J721E) += k3-j721e-common-proc-board.dtb \ dtb-$(CONFIG_ARCH_MEDIATEK) += \ mt7622-rfb.dtb \ + mt7623a-unielec-u7623-02-emmc.dtb \ mt7623n-bananapi-bpi-r2.dtb \ mt7629-rfb.dtb \ mt8512-bm1-emmc.dtb \
arch/arm/dts/mt7623a-unielec-u7623-02-emmc.dts new file +211 -0
211 lines not on this page · raw message
configs/mt7623a_unielec_u7623_02_defconfig new file +54 -0
54 lines not on this page · raw message
Signature · 1 line
2.26.2
PATCH 3/3 board: mediatek: Add support for UniElec U7623 board
Quoted 3 lines · David Woodhouse
This is an MT7623A-based board, very similar to the Banana Pi R2.
http://www.unielecinc.com/q/news/cn/p/product/detail.html?qd_guid=OjXwKCaRlN
Ping?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5174 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200724/8a1f7dd8/attachment.bin>
PATCH 3/3 board: mediatek: Add support for UniElec U7623 board
In reply to David WoodhouseQuoted 5 lines · David Woodhouse
This is an MT7623A-based board, very similar to the Banana Pi R2.
http://www.unielecinc.com/q/news/cn/p/product/detail.html?qd_guid=OjXwKCaRlN
Signed-off-by David Woodhouse <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200729/a1ea40ec/attachment.sig>
PATCH 1/3 board: mediatek: fix mmc_get_boot_dev() for platforms without external SD
In reply to David WoodhouseQuoted 5 lines · David Woodhouse
On the UniElec U7623 board there is no external SD slot and the preloader doesn't fill in the magic field at
0x81dffff0to indicate that it was booted from eMMC.Signed-off-by David Woodhouse <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200729/dbafa0e0/attachment.sig>