From patchwork Mon Dec 5 10:54:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shengzhou Liu X-Patchwork-Id: 129276 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id AF1741009D0 for ; Mon, 5 Dec 2011 22:29:23 +1100 (EST) Received: from AM1EHSOBE005.bigfish.com (am1ehsobe005.messaging.microsoft.com [213.199.154.208]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "mail.global.frontbridge.com", Issuer "Microsoft Secure Server Authority" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id BF67A1007D4 for ; Mon, 5 Dec 2011 22:29:04 +1100 (EST) Received: from mail108-am1-R.bigfish.com (10.3.201.253) by AM1EHSOBE005.bigfish.com (10.3.204.25) with Microsoft SMTP Server id 14.1.225.23; Mon, 5 Dec 2011 11:28:57 +0000 Received: from mail108-am1 (localhost [127.0.0.1]) by mail108-am1-R.bigfish.com (Postfix) with ESMTP id 9C4B4660175; Mon, 5 Dec 2011 11:28:57 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h839h) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail108-am1 (localhost.localdomain [127.0.0.1]) by mail108-am1 (MessageSwitch) id 1323084537538763_7975; Mon, 5 Dec 2011 11:28:57 +0000 (UTC) Received: from AM1EHSMHS014.bigfish.com (unknown [10.3.201.251]) by mail108-am1.bigfish.com (Postfix) with ESMTP id 7E1E2520042; Mon, 5 Dec 2011 11:28:57 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by AM1EHSMHS014.bigfish.com (10.3.207.152) with Microsoft SMTP Server (TLS) id 14.1.225.23; Mon, 5 Dec 2011 11:28:53 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server id 14.1.339.2; Mon, 5 Dec 2011 05:28:52 -0600 Received: from localhost (tank.ap.freescale.net [10.193.20.104]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id pB5BSoTi029679; Mon, 5 Dec 2011 05:28:51 -0600 (CST) From: Shengzhou Liu To: Subject: [PATCH 1/2] mtd/nand: fixup for fmr initialization of Freescale NAND controller Date: Mon, 5 Dec 2011 18:54:52 +0800 Message-ID: <1323082493-22617-1-git-send-email-Shengzhou.Liu@freescale.com> X-Mailer: git-send-email 1.6.4 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Cc: scottwood@freescale.com, dwmw2@infradead.org, kumar.gala@freescale.com, linux-mtd@lists.infradead.org, Shengzhou Liu X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org There was a bug for fmr initialization, which lead to fmr was always 0x100 in fsl_elbc_chip_init() and caused FCM command timeout before calling fsl_elbc_chip_init_tail(). Signed-off-by: Shengzhou Liu --- drivers/mtd/nand/fsl_elbc_nand.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c index eedd8ee..742bf73 100644 --- a/drivers/mtd/nand/fsl_elbc_nand.c +++ b/drivers/mtd/nand/fsl_elbc_nand.c @@ -659,9 +659,7 @@ static int fsl_elbc_chip_init_tail(struct mtd_info *mtd) if (chip->pagemask & 0xff000000) al++; - /* add to ECCM mode set in fsl_elbc_init */ - priv->fmr |= (12 << FMR_CWTO_SHIFT) | /* Timeout > 12 ms */ - (al << FMR_AL_SHIFT); + priv->fmr |= al << FMR_AL_SHIFT; dev_dbg(priv->dev, "fsl_elbc_init: nand->numchips = %d\n", chip->numchips); @@ -764,8 +762,8 @@ static int fsl_elbc_chip_init(struct fsl_elbc_mtd *priv) priv->mtd.priv = chip; priv->mtd.owner = THIS_MODULE; - /* Set the ECCM according to the settings in bootloader.*/ - priv->fmr = in_be32(&lbc->fmr) & FMR_ECCM; + /* Set fmr according to the settings in bootloader.*/ + priv->fmr = in_be32(&lbc->fmr); /* fill in nand_chip structure */ /* set up function call table */