From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Wed, 20 Aug 2014 12:52:26 +0200 Subject: [U-Boot] [PATCH 01/11] imx: ventana: set dynamic env var for flash layout In-Reply-To: <1407476151-5603-2-git-send-email-tharvey@gateworks.com> References: <1407476151-5603-1-git-send-email-tharvey@gateworks.com> <1407476151-5603-2-git-send-email-tharvey@gateworks.com> Message-ID: <53F47DEA.6010408@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Tim, On 08/08/2014 07:35, Tim Harvey wrote: > 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 > --- > board/gateworks/gw_ventana/gw_ventana.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c > index 9d2651f..a8fcb5d 100644 > --- a/board/gateworks/gw_ventana/gw_ventana.c > +++ b/board/gateworks/gw_ventana/gw_ventana.c > @@ -1264,6 +1264,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]); > Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================