From patchwork Tue Dec 11 21:36:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Benard X-Patchwork-Id: 205303 X-Patchwork-Delegate: scottwood@freescale.com 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 DC1122C0087 for ; Wed, 12 Dec 2012 08:36:48 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A0AAF4A12F; Tue, 11 Dec 2012 22:36:44 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 01blNJrWMd6P; Tue, 11 Dec 2012 22:36:44 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 511CB4A10C; Tue, 11 Dec 2012 22:36:42 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5B5064A10C for ; Tue, 11 Dec 2012 22:36:35 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 SNmV8ZX5LB90 for ; Tue, 11 Dec 2012 22:36:30 +0100 (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 smtp3-g21.free.fr (smtp3-g21.free.fr [212.27.42.3]) by theia.denx.de (Postfix) with ESMTP id 09F2B4A10B for ; Tue, 11 Dec 2012 22:36:28 +0100 (CET) Received: from localhost.localdomain (unknown [82.233.81.124]) by smtp3-g21.free.fr (Postfix) with ESMTP id E4719A6163; Tue, 11 Dec 2012 22:36:23 +0100 (CET) From: =?UTF-8?q?Eric=20B=C3=A9nard?= To: u-boot@lists.denx.de Date: Tue, 11 Dec 2012 22:36:21 +0100 Message-Id: <1355261781-3701-1-git-send-email-eric@eukrea.com> X-Mailer: git-send-email 1.7.7.6 In-Reply-To: <1355245805.13481.0@snotra> References: <1355245805.13481.0@snotra> MIME-Version: 1.0 Cc: Marek Vasut , Fabio Estevam Subject: [U-Boot] [PATCH v2] m28evk/mx28evk: fix nand_update_full X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 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 - since commit 418396e212b59bf907dbccad997ff50f7eb61b16 nand write.raw can take the number of page to be written as an argument. nand_update_full is passing the size (in bytes) to nand write.raw. This value was previously ignored but now breaks the write. - this patch updates the default environment of these boards to provide a pagecount instead of a size to nand write.raw. - tested on a mx28evk with a 4k page NAND and on a custom board with a 2k page NAND. Signed-off-by: Eric BĂ©nard Cc: Marek Vasut Cc: Fabio Estevam Acked-by: Marek Vasut --- include/configs/m28evk.h | 2 +- include/configs/mx28evk.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h index b49ec8c..3f37e84 100644 --- a/include/configs/m28evk.h +++ b/include/configs/m28evk.h @@ -297,7 +297,7 @@ "if tftp ${update_nand_full_filename} ; then " \ "run update_nand_get_fcb_size ; " \ "nand scrub -y 0x0 ${filesize} ; " \ - "nand write.raw ${loadaddr} 0x0 ${update_nand_fcb} ; " \ + "nand write.raw ${loadaddr} 0x0 ${fcb_sz} ; " \ "setexpr update_off ${loadaddr} + ${update_nand_fcb} ; " \ "setexpr update_sz ${filesize} - ${update_nand_fcb} ; " \ "nand write ${update_off} ${update_nand_fcb} ${update_sz} ; " \ diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h index 0511cd1..d474a92 100644 --- a/include/configs/mx28evk.h +++ b/include/configs/mx28evk.h @@ -264,7 +264,7 @@ "if tftp ${update_nand_full_filename} ; then " \ "run update_nand_get_fcb_size ; " \ "nand scrub -y 0x0 ${filesize} ; " \ - "nand write.raw ${loadaddr} 0x0 ${update_nand_fcb} ; " \ + "nand write.raw ${loadaddr} 0x0 ${fcb_sz} ; " \ "setexpr update_off ${loadaddr} + ${update_nand_fcb} ; " \ "setexpr update_sz ${filesize} - ${update_nand_fcb} ; " \ "nand write ${update_off} ${update_nand_fcb} ${update_sz} ; " \