mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
i.MX6: engicam: Move set_fdt_file to common
setenv_fdt_file to common code and set dtb based on CONFIG_DEFAULT_DEVICE_TREE and cpu_type. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
This commit is contained in:
parent
f086812acd
commit
409b16d3e0
6 changed files with 24 additions and 34 deletions
|
@ -32,6 +32,30 @@ static void mmc_late_init(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
static void setenv_fdt_file(void)
|
||||
{
|
||||
const char *cmp_dtb = CONFIG_DEFAULT_DEVICE_TREE;
|
||||
|
||||
if (!strcmp(cmp_dtb, "imx6q-icore")) {
|
||||
if (is_mx6dq())
|
||||
env_set("fdt_file", "imx6q-icore.dtb");
|
||||
else if(is_mx6dl() || is_mx6solo())
|
||||
env_set("fdt_file", "imx6dl-icore.dtb");
|
||||
} else if (!strcmp(cmp_dtb, "imx6q-icore-rqs")) {
|
||||
if (is_mx6dq())
|
||||
env_set("fdt_file", "imx6q-icore-rqs.dtb");
|
||||
else if(is_mx6dl() || is_mx6solo())
|
||||
env_set("fdt_file", "imx6dl-icore-rqs.dtb");
|
||||
} else if (!strcmp(cmp_dtb, "imx6ul-geam-kit"))
|
||||
env_set("fdt_file", "imx6ul-geam-kit.dtb");
|
||||
else if (!strcmp(cmp_dtb, "imx6ul-isiot-mmc"))
|
||||
env_set("fdt_file", "imx6ul-isiot-mmc.dtb");
|
||||
else if (!strcmp(cmp_dtb, "imx6ul-isiot-emmc"))
|
||||
env_set("fdt_file", "imx6ul-isiot-emmc.dtb");
|
||||
else if (!strcmp(cmp_dtb, "imx6ul-isiot-nand"))
|
||||
env_set("fdt_file", "imx6ul-isiot-nand.dtb");
|
||||
}
|
||||
|
||||
int board_late_init(void)
|
||||
{
|
||||
switch ((imx6_src_get_boot_mode() & IMX6_BMODE_MASK) >>
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
#ifndef _BOARD_H_
|
||||
#define _BOARD_H_
|
||||
void setenv_fdt_file(void);
|
||||
void setup_gpmi_nand(void);
|
||||
void setup_display(void);
|
||||
#endif /* _BOARD_H_ */
|
||||
|
|
|
@ -90,12 +90,6 @@ void setup_gpmi_nand(void)
|
|||
}
|
||||
#endif /* CONFIG_NAND_MXS */
|
||||
|
||||
void setenv_fdt_file(void)
|
||||
{
|
||||
if (is_mx6ul())
|
||||
env_set("fdt_file", "imx6ul-geam-kit.dtb");
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SPL_BUILD
|
||||
/* MMC board initialization is needed till adding DM support in SPL */
|
||||
#if defined(CONFIG_FSL_ESDHC) && !defined(CONFIG_DM_MMC)
|
||||
|
|
|
@ -192,14 +192,6 @@ void setup_display(void)
|
|||
}
|
||||
#endif /* CONFIG_VIDEO_IPUV3 */
|
||||
|
||||
void setenv_fdt_file(void)
|
||||
{
|
||||
if (is_mx6dq())
|
||||
env_set("fdt_file", "imx6q-icore.dtb");
|
||||
else if(is_mx6dl() || is_mx6solo())
|
||||
env_set("fdt_file", "imx6dl-icore.dtb");
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SPL_BUILD
|
||||
/* MMC board initialization is needed till adding DM support in SPL */
|
||||
#if defined(CONFIG_FSL_ESDHC) && !defined(CONFIG_DM_MMC)
|
||||
|
|
|
@ -31,14 +31,6 @@ int board_mmc_get_env_dev(int devno)
|
|||
}
|
||||
#endif
|
||||
|
||||
void setenv_fdt_file(void)
|
||||
{
|
||||
if (is_mx6dq())
|
||||
env_set("fdt_file", "imx6q-icore-rqs.dtb");
|
||||
else if(is_mx6dl() || is_mx6solo())
|
||||
env_set("fdt_file", "imx6dl-icore-rqs.dtb");
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SPL_BUILD
|
||||
#include <spl.h>
|
||||
|
||||
|
|
|
@ -98,17 +98,6 @@ int board_mmc_get_env_dev(int devno)
|
|||
}
|
||||
#endif
|
||||
|
||||
void setenv_fdt_file(void)
|
||||
{
|
||||
if (is_mx6ul()) {
|
||||
#ifdef CONFIG_ENV_IS_IN_MMC
|
||||
env_set("fdt_file", "imx6ul-isiot-emmc.dtb");
|
||||
#else
|
||||
env_set("fdt_file", "imx6ul-isiot-nand.dtb");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SPL_BUILD
|
||||
#include <spl.h>
|
||||
|
||||
|
|
Loading…
Reference in a new issue