From patchwork Mon Sep 1 02:20:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: bpqw X-Patchwork-Id: 384618 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F1D414019C for ; Mon, 1 Sep 2014 12:23:05 +1000 (EST) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XOHFL-00050v-He; Mon, 01 Sep 2014 02:21:31 +0000 Received: from mailout.micron.com ([137.201.242.129]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XOHFI-000505-Th; Mon, 01 Sep 2014 02:21:29 +0000 Received: from mail.micron.com (ntxboicas03.micron.com [137.201.84.59]) by mailout.micron.com (8.14.4/8.14.6) with ESMTP id s812Ku83021093 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Sun, 31 Aug 2014 20:20:56 -0600 Received: from NTXXIACAS01.xacn.micron.com (10.167.69.55) by NTXBOICAS03.micron.com (137.201.84.59) with Microsoft SMTP Server (TLS) id 14.3.174.1; Sun, 31 Aug 2014 20:20:56 -0600 Received: from NTXXIAMBX02.xacn.micron.com ([fe80::e19a:c3ed:119d:6971]) by NTXXIACAS01.xacn.micron.com ([::1]) with mapi id 14.03.0174.001; Mon, 1 Sep 2014 10:20:53 +0800 From: bpqw To: David Woodhouse , Brian Norris Subject: [PATCH 1/1] mtd: cfi_cmdset_0002:add fixup for Micron M29EW after erase operation Thread-Topic: [PATCH 1/1] mtd: cfi_cmdset_0002:add fixup for Micron M29EW after erase operation Thread-Index: Ac/FirFoX5r9fafZSu+Pmx6RITsSBwAAIQmw Date: Mon, 1 Sep 2014 02:20:52 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.167.84.5] X-TM-AS-Product-Ver: SMEX-10.0.0.4152-7.000.1014-20920.004 X-TM-AS-Result: No--2.219900-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No x-mt-checkinternalsenderrule: True MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.73 on 137.201.131.43 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140831_192129_019906_FED18597 X-CRM114-Status: UNSURE ( 6.56 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.0 (----) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-4.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [137.201.242.129 listed in list.dnswl.org] -1.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record Cc: Paul Gortmaker , Jingoo Han , Christian Riesch , "linux-kernel@vger.kernel.org" , "linux-mtd@lists.infradead.org" X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org For Micron M29EW,20ms delay is needed after erase operation. Signed-off-by: BeanHuo --- drivers/mtd/chips/cfi_cmdset_0002.c | 11 +++++++++++ 1 file changed, 11 insertions(+) } + cfi_fixup_m29ew_delay_after_erase(cfi); chip->state = FL_READY; DISABLE_VPP(map); put_chip(map, chip, adr); -- 1.7.9.5 diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index 5a4bfe3..9b0de91 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c @@ -509,6 +509,16 @@ static void cfi_fixup_m29ew_delay_after_resume(struct cfi_private *cfi) cfi_udelay(500); } +static void cfi_fixup_m29ew_delay_after_erase(struct cfi_private *cfi) +{ + /* + * Resolving the Delay After ERASE Issue @low temperature. + * 20ms delay is needed after erase operation. + */ + if (is_m29ew(cfi)) + cfi_udelay(20000); +} + struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary) { struct cfi_private *cfi = map->fldrv_priv; @@ -2397,6 +2407,7 @@ static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip, ret = -EIO;