diff options
author | Peng Fan <peng.fan@nxp.com> | 2020-05-05 20:28:45 +0800 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2020-05-10 20:55:20 +0200 |
commit | a6c36f15ebc5e004c5914bb55ef93bb453e640db (patch) | |
tree | 1d987537135a5e5c49b1b453c3a8fb5d3da6de33 /board/freescale/imx8qxp_mek | |
parent | e825d3089abbca850d8370bcbeaa8dc6e5d4a69a (diff) | |
download | u-boot-a6c36f15ebc5e004c5914bb55ef93bb453e640db.tar.gz |
imx: imx8qxp: update fdt_file according to m4 state
Update fdt_file according to m4 parts state
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'board/freescale/imx8qxp_mek')
-rw-r--r-- | board/freescale/imx8qxp_mek/imx8qxp_mek.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/board/freescale/imx8qxp_mek/imx8qxp_mek.c b/board/freescale/imx8qxp_mek/imx8qxp_mek.c index 93f0cd827c..dc9ffaabf2 100644 --- a/board/freescale/imx8qxp_mek/imx8qxp_mek.c +++ b/board/freescale/imx8qxp_mek/imx8qxp_mek.c @@ -146,10 +146,23 @@ int board_mmc_get_env_dev(int devno) int board_late_init(void) { + char *fdt_file; + bool m4_booted; + #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG env_set("board_name", "MEK"); env_set("board_rev", "iMX8QXP"); #endif + fdt_file = env_get("fdt_file"); + m4_booted = m4_parts_booted(); + + if (fdt_file && !strcmp(fdt_file, "undefined")) { + if (m4_booted) + env_set("fdt_file", "imx8qxp-mek-rpmsg.dtb"); + else + env_set("fdt_file", "imx8qxp-mek.dtb"); + } + return 0; } |