From patchwork Thu Jan 8 16:14:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Coffignal X-Patchwork-Id: 426851 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 2FEAE14012F for ; Fri, 9 Jan 2015 07:21:06 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BF16E4B610; Thu, 8 Jan 2015 21:21:01 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QxIf7vbK+y8s; Thu, 8 Jan 2015 21:21:01 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1DD0A4B606; Thu, 8 Jan 2015 21:21:01 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4608A4B5FA for ; Thu, 8 Jan 2015 17:30:40 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZZRrCwln1+7i for ; Thu, 8 Jan 2015 17:30:40 +0100 (CET) X-Greylist: delayed 918 seconds by postgrey-1.32 at theia; Thu, 08 Jan 2015 17:30:37 CET X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mailhost.geral.com (mailhost.geral.com [37.58.166.5]) by theia.denx.de (Postfix) with ESMTP id 1691A4B5E4 for ; Thu, 8 Jan 2015 17:30:37 +0100 (CET) Received: from localhost.localdomain (192.168.44.180) by VMSMBX01.gpi.pri (192.168.50.135) with Microsoft SMTP Server (TLS) id 15.0.712.24; Thu, 8 Jan 2015 17:14:54 +0100 From: Alexandre Coffignal To: Date: Thu, 8 Jan 2015 17:14:42 +0100 Message-ID: <1420733682-6555-1-git-send-email-acoffignal@geral.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-Originating-IP: [192.168.44.180] X-ClientProxiedBy: VMSCAS01.gpi.pri (192.168.50.137) To VMSMBX01.gpi.pri (192.168.50.135) X-Mailman-Approved-At: Thu, 08 Jan 2015 21:20:59 +0100 Cc: Alexandre Coffignal Subject: [U-Boot] [PATCH] mxsboot : Support of 224-bytes OOB area length X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Add support for the NAND Flash chip with page size of 4096+224-bytes OOB area length For example Micron MT29F4G08 NAND flash device defines a OOB area which is 224 bytes long (oobsize). Signed-off-by: Alexandre Coffignal --- tools/mxsboot.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/mxsboot.c b/tools/mxsboot.c index 90b2173..6d48cfb 100644 --- a/tools/mxsboot.c +++ b/tools/mxsboot.c @@ -142,6 +142,9 @@ static inline uint32_t mx28_nand_get_ecc_strength(uint32_t page_data_size, if (page_oob_size == 218) return 16; + + if (page_oob_size == 224) + return 16; } return 0; @@ -269,6 +272,9 @@ static struct mx28_nand_fcb *mx28_nand_get_fcb(uint32_t size) } else if (nand_oobsize == 218) { fcb->ecc_block_n_ecc_type = 8; fcb->ecc_block_0_ecc_type = 8; + } else if (nand_oobsize == 224) { + fcb->ecc_block_n_ecc_type = 8; + fcb->ecc_block_0_ecc_type = 8; } }