From patchwork Thu Apr 28 21:47:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Gardiner X-Patchwork-Id: 93341 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 DE28CB6EF3 for ; Fri, 29 Apr 2011 07:49:20 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 79453280EC; Thu, 28 Apr 2011 23:48:40 +0200 (CEST) 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 BeqTlmhxeb19; Thu, 28 Apr 2011 23:48:40 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CBE19280F2; Thu, 28 Apr 2011 23:48:23 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 43E472809F for ; Thu, 28 Apr 2011 23:48:15 +0200 (CEST) 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 LzHH3fKisNdt for ; Thu, 28 Apr 2011 23:48:13 +0200 (CEST) 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 na3sys009aog113.obsmtp.com (na3sys009aog113.obsmtp.com [74.125.149.209]) by theia.denx.de (Postfix) with ESMTPS id 0AE63280A6 for ; Thu, 28 Apr 2011 23:48:07 +0200 (CEST) Received: from mail-yx0-f175.google.com ([209.85.213.175]) (using TLSv1) by na3sys009aob113.postini.com ([74.125.148.12]) with SMTP ID DSNKTbnglaYotR84u++VdA+IyU/wF+JV097X@postini.com; Thu, 28 Apr 2011 14:48:09 PDT Received: by mail-yx0-f175.google.com with SMTP id 22so1136092yxn.20 for ; Thu, 28 Apr 2011 14:48:05 -0700 (PDT) Received: by 10.101.63.10 with SMTP id q10mr2696087ank.61.1304027285626; Thu, 28 Apr 2011 14:48:05 -0700 (PDT) Received: from localhost.localdomain ([206.191.47.130]) by mx.google.com with ESMTPS id s36sm2164907ano.1.2011.04.28.14.48.04 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 28 Apr 2011 14:48:05 -0700 (PDT) From: Ben Gardiner To: Scott Wood , u-boot@lists.denx.de Date: Thu, 28 Apr 2011 17:47:55 -0400 Message-Id: X-Mailer: git-send-email 1.7.1 In-Reply-To: References: Cc: Artem Bityutskiy Subject: [U-Boot] [PATCH 5/5] cmd_nand: also drop 0xff pages for jffs2 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de The behaviour of dropping trailing 0xff pages of an eraseblock was observed to fix JFFS2 images on da850evm which usually resulted in numerous 'ECC errors.' Assign also the behaviour of dropping trailing 0xff pages to the .jffs2 nand write variant as it was to the previously introduced .ubi variant. Signed-off-by: Ben Gardiner --- common/cmd_nand.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/common/cmd_nand.c b/common/cmd_nand.c index faece07..b9d5ae6 100644 --- a/common/cmd_nand.c +++ b/common/cmd_nand.c @@ -567,12 +567,11 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) rwsize = size; s = strchr(cmd, '.'); - if (!strcmp(s, ".ubi")) { + if (!strcmp(s, ".ubi") || !strcmp(s, ".jffs2")) { ret = nand_write_skip_bad(nand, off, &rwsize, (u_char *)addr, WITH_DROP_FFS); - } else if (!s || !strcmp(s, ".jffs2") || - !strcmp(s, ".e") || !strcmp(s, ".i")) { + } else if (!s || !strcmp(s, ".e") || !strcmp(s, ".i")) { if (read) ret = nand_read_skip_bad(nand, off, &rwsize, (u_char *)addr);