From patchwork Tue Nov 23 15:10:54 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergej Stepanov X-Patchwork-Id: 72691 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id D9DBDB7172 for ; Wed, 24 Nov 2010 02:41:37 +1100 (EST) X-Greylist: delayed 1697 seconds by postgrey-1.32 at bilbo; Wed, 24 Nov 2010 02:41:32 EST Received: from ares.ids.de (ares.ids.de [88.79.252.171]) by ozlabs.org (Postfix) with ESMTP id 758D2B70D6 for ; Wed, 24 Nov 2010 02:41:31 +1100 (EST) Received: from ares.ids.de (ares.ids.de [127.0.0.1]) by ares.ids.de (PGP Universal) with ESMTP id 32309F4909D for ; Tue, 23 Nov 2010 16:08:01 +0100 (CET) Received: from HERMES2.ids.de ([192.168.0.115]) by ares.ids.de (PGP Universal service); Tue, 23 Nov 2010 16:08:01 +0100 X-PGP-Universal: processed; by ares.ids.de on Tue, 23 Nov 2010 16:08:01 +0100 Received: from HERMES2.ids.de ([127.0.0.1]) by HERMES2 ([127.0.0.1]) with mapi; Tue, 23 Nov 2010 16:10:55 +0100 From: To: Date: Tue, 23 Nov 2010 16:10:54 +0100 Subject: [PATCH] Fixing the garbage collector problem after NAND-flash image record in u-boot Thread-Topic: [PATCH] Fixing the garbage collector problem after NAND-flash image record in u-boot Thread-Index: AQHLiyCfq2f2AcTm1USbD/Fe/7pr5A== Message-ID: <4206182445660643B9AEB8D4E55BBD0A106A0AA938@HERMES2> Accept-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE MIME-Version: 1.0 Content-Language: de-DE X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org This patch should fix the following problem: 1. the jffs2-image update in the u-boot was ok 2. first restart and first mount of the NAND-flash-partition was also ok 3. before the restart of controller there are no any activity on NAND-flash except of the jffs2_gcd_mtdX-process ... 4. BUT after the second restart the NAND-flash-partition could not be really used after the second mount, dmesg filled with messages: ... jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x03ce0000: 0xc0ff instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x03d00000: 0xc0ff instead .... Just for for info: the behaviour observed on mpc8313-based board. The only activity on NAND-flash was the garbage collector process, that looks for CLEANMARKER-nodes Signed-off-by: Sergej Stepanov Cc: Rolf Riehle Acked-by: Scott Wood diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c index c141b07..775c2f5 100644 --- a/drivers/mtd/nand/fsl_elbc_nand.c +++ b/drivers/mtd/nand/fsl_elbc_nand.c @@ -388,6 +388,7 @@ static void fsl_elbc_cmdfunc(struct mtd_info *mtd, unsigned int command, "page_addr: 0x%x, column: 0x%x.\n", page_addr, column); + elbc_fcm_ctrl->column = column; elbc_fcm_ctrl->use_mdr = 1; fcr = (NAND_CMD_STATUS << FCR_CMD1_SHIFT) |