diff options
author | Max Krummenacher <max.oss.09@gmail.com> | 2015-11-25 11:15:07 +0100 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2015-12-15 13:42:18 +0100 |
commit | 3a0c5a7210a81ef8f7f2ebff71bd3e98ffcc888a (patch) | |
tree | d8dd7c37c854e0c1a9ff22c00b0a105a17933a8a /board | |
parent | a76377388ed74c69a9e0c129d31cb953b34ebbc5 (diff) |
configblock.c: use is_cpu_type to detect i.MX 6 CPU
Using the RAM size on Colibri iMX6 might fail if the DCD is not yet
updated to a 64-bit DDR bus on the Colibri iMX6DL.
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/toradex/common/configblock.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/board/toradex/common/configblock.c b/board/toradex/common/configblock.c index ba6aa49a694..6539860c74d 100644 --- a/board/toradex/common/configblock.c +++ b/board/toradex/common/configblock.c @@ -7,6 +7,11 @@ #include "configblock.h" #include <common.h> +#if defined(CONFIG_TARGET_APALIS_IMX6) || defined(CONFIG_TARGET_COLIBRI_IMX6) +#include <asm/arch/sys_proto.h> +#else +#define is_cpu_type(cpu) (0) +#endif #include <cli.h> #include <malloc.h> #include <mmc.h> @@ -227,18 +232,18 @@ static int get_cfgblock_interactive(void) if (it == 'y' || it == 'Y') trdx_hw_tag.prodid = APALIS_IMX6Q_IT; else - if (gd->ram_size == 0x40000000) + if (is_cpu_type(MXC_CPU_MX6Q)) trdx_hw_tag.prodid = APALIS_IMX6Q; else trdx_hw_tag.prodid = APALIS_IMX6D; #else if (it == 'y' || it == 'Y') - if (gd->ram_size == 0x20000000) + if (is_cpu_type(MXC_CPU_MX6DL)) trdx_hw_tag.prodid = COLIBRI_IMX6DL_IT; else trdx_hw_tag.prodid = COLIBRI_IMX6S_IT; else - if (gd->ram_size == 0x20000000) + if (is_cpu_type(MXC_CPU_MX6DL)) trdx_hw_tag.prodid = COLIBRI_IMX6DL; else trdx_hw_tag.prodid = COLIBRI_IMX6S; |