From patchwork Tue Oct 26 09:26:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume LECERF X-Patchwork-Id: 69199 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from canuck.infradead.org (canuck.infradead.org [134.117.69.58]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E7197B6F14 for ; Tue, 26 Oct 2010 20:30:34 +1100 (EST) Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1PAfop-00023l-Np; Tue, 26 Oct 2010 09:27:47 +0000 Received: from smtp1-g21.free.fr ([212.27.42.1]) by canuck.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1PAfon-00022W-2M for linux-mtd@lists.infradead.org; Tue, 26 Oct 2010 09:27:46 +0000 Received: from dev.siriade.com (unknown [82.235.60.83]) by smtp1-g21.free.fr (Postfix) with ESMTP id 162F0940170; Tue, 26 Oct 2010 11:27:35 +0200 (CEST) Received: from localhost ([127.0.0.1] helo=dev.siriade.com) by dev.siriade.com with esmtp (Exim 4.72) (envelope-from ) id 1PAfnW-0001Vw-Qe; Tue, 26 Oct 2010 11:26:26 +0200 Subject: [PATCH 2 1/3] mtd: cfi_util: add support for switching SST 39VF640xB chips into QRY mode To: linux-mtd@lists.infradead.org From: Guillaume LECERF Date: Tue, 26 Oct 2010 11:26:26 +0200 Message-ID: <20101026092626.5790.91523.stgit@dev.siriade.com> User-Agent: StGit/0.15 MIME-Version: 1.0 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20101026_052745_700321_592C6576 X-CRM114-Status: GOOD ( 13.72 ) X-Spam-Score: 1.2 (+) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (1.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is freemail (glecerf[at]gmail.com) 0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is CUSTOM_MED -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, low trust [212.27.42.1 listed in list.dnswl.org] 1.2 NML_ADSP_CUSTOM_MED ADSP custom_med hit, and not from a mailing list 0.0 T_TO_NO_BRKTS_FREEMAIL T_TO_NO_BRKTS_FREEMAIL Cc: fggs@terra.com.br, zhangyd6@gmail.com, w.sang@pengutronix.de, David.Woodhouse@intel.com X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Signed-off-by: Guillaume LECERF --- drivers/mtd/chips/cfi_util.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/chips/cfi_util.c b/drivers/mtd/chips/cfi_util.c index e503b2c..360525c 100644 --- a/drivers/mtd/chips/cfi_util.c +++ b/drivers/mtd/chips/cfi_util.c @@ -77,6 +77,13 @@ int __xipram cfi_qry_mode_on(uint32_t base, struct map_info *map, cfi_send_gen_cmd(0x98, 0x5555, base, map, cfi, cfi->device_type, NULL); if (cfi_qry_present(map, base, cfi)) return 1; + /* SST 39VF640xB */ + cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); + cfi_send_gen_cmd(0xAA, 0x555, base, map, cfi, cfi->device_type, NULL); + cfi_send_gen_cmd(0x55, 0x2AA, base, map, cfi, cfi->device_type, NULL); + cfi_send_gen_cmd(0x98, 0x555, base, map, cfi, cfi->device_type, NULL); + if (cfi_qry_present(map, base, cfi)) + return 1; /* QRY not found */ return 0; }