summaryrefslogtreecommitdiffstats
path: root/board/gateworks
diff options
context:
space:
mode:
authorTim Harvey <tharvey@gateworks.com>2014-08-07 22:35:41 -0700
committerStefano Babic <sbabic@denx.de>2014-08-20 12:51:35 +0200
commit63b85adcecdd019f049cbbebf10119cea45d3645 (patch)
treeb3010f1f13e263254acbdcca863545665b38cb11 /board/gateworks
parenteb5c18078dfab0bfab5409d365ad3902b18a04c7 (diff)
downloadblackbird-obmc-uboot-63b85adcecdd019f049cbbebf10119cea45d3645.tar.gz
blackbird-obmc-uboot-63b85adcecdd019f049cbbebf10119cea45d3645.zip
imx: ventana: set dynamic env var for flash layout
NAND devices have differing layouts with respect to page size and pages per block. These parameters affect the parameters that need to be passed to mkfs.ubifs and ubinize used to create UBI images. The various NAND chips supported by Gateworks Ventana fall into two different layouts which we refer to as 'normal' and 'large'. This layout is useful when referencing ubi files to download and flash so we create a dynamic env variable for it. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Diffstat (limited to 'board/gateworks')
-rw-r--r--board/gateworks/gw_ventana/gw_ventana.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c
index ae1cf8702e..3afb9facd4 100644
--- a/board/gateworks/gw_ventana/gw_ventana.c
+++ b/board/gateworks/gw_ventana/gw_ventana.c
@@ -1263,6 +1263,10 @@ int misc_init_r(void)
else if (is_cpu_type(MXC_CPU_MX6DL) ||
is_cpu_type(MXC_CPU_MX6SOLO))
cputype = "imx6dl";
+ if (8 << (ventana_info.nand_flash_size-1) >= 2048)
+ setenv("flash_layout", "large");
+ else
+ setenv("flash_layout", "normal");
memset(str, 0, sizeof(str));
for (i = 0; i < (sizeof(str)-1) && info->model[i]; i++)
str[i] = tolower(info->model[i]);
OpenPOWER on IntegriCloud