From: sbabic at denx.de Date: Sat, 20 Jul 2019 08:47:02 +0000 (UTC) Subject: [U-Boot] [PATCH v6 1/3] i.MX6: nand: add nandbcb command for imx In-Reply-To: <20190614073535.12502-1-shyam.saini@amarulasolutions.com> Message-ID: <20190720085353.4E60BC21E02@lists.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 > Writing/updating boot image in nand device is not > straight forward in i.MX6 platform and it requires > boot control block(BCB) to be configured. > It becomes difficult to use uboot 'nand' command to > write BCB since it requires platform specific attributes > need to be taken care of. > It is even difficult to use existing msx-nand.c driver by > incorporating BCB attributes like mxs_dma_desc does > because it requires change in mtd and nand command. > So, cmd_nandbcb implemented in arch/arm/mach-imx > BCB contains two data structures, Firmware Configuration Block(FCB) > and Discovered Bad Block Table(DBBT). FCB has nand timings, > DBBT search area, page address of firmware. > On summary, nandbcb update will > - erase the entire partition > - create BCB by creating 2 FCB/DBBT block followed by > 1 FW block based on partition size and erasesize. > - fill FCB/DBBT structures > - write FW/SPL on FW1 > - write FCB/DBBT in first 2 blocks > for nand boot, up on reset bootrom look for FCB structure in > first block's if FCB found the nand timings are loaded for > further reads. once FCB read done, DTTB will load and finally > firmware will be loaded which is boot image. > Refer section "NAND Boot" from doc/imx/common/imx6.txt for more usage > information. > Reviewed-by: Stefano Babic > Signed-off-by: Jagan Teki > Signed-off-by: Sergey Kubushyn > Signed-off-by: Shyam Saini Applied to u-boot-imx, master, thanks ! Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk 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 =====================================================================