From patchwork Fri Oct 22 02:53:42 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zhangyd X-Patchwork-Id: 68622 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 26C16B70EF for ; Fri, 22 Oct 2010 01:57:10 +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 1P8wXO-0006ZM-7c; Thu, 21 Oct 2010 14:54:38 +0000 Received: from mail-iw0-f177.google.com ([209.85.214.177]) by canuck.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1P8wXK-0006YK-Gm for linux-mtd@lists.infradead.org; Thu, 21 Oct 2010 14:54:36 +0000 Received: by iwn8 with SMTP id 8so2727995iwn.36 for ; Thu, 21 Oct 2010 07:54:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=mRDW20CsCRMEOdwGh0TJobA9CU8QZ6LzxJ6Lcf484hc=; b=GqRI+P9NdMyqPcrvX0Tao3UdqXIG8Ih3xDlVuAy+1MBWGmh0IHNnH7aIkqJkMq5Mba /JIhrZdgsozKRF0YHE+HcAy+jvRTfebDGrmyE/6/txv2KALqNAchAIYklpntYuUcy70Q ohAAOMYaG/cUYaxMRJ9S6xTrZwtnALlAMgZxs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=uQ/rN3jAVuFJjVR7P+Zu1GfsAb7bPOVfrjL4PX/qGB078696KMXmD3LkN85yLs7IHj 34ZcYGDdp8h+/ZljSU/2Lp0wMYwZ3l12kuyagksJQGBs1ic29UO65puLjpeQDL/n8la+ P+e/UPt1h4DaAtXAtdY6qn7Efs9c6VKnpPSEY= Received: by 10.231.14.199 with SMTP id h7mr1050972iba.60.1287672868374; Thu, 21 Oct 2010 07:54:28 -0700 (PDT) Received: from localhost.localdomain ([119.164.138.146]) by mx.google.com with ESMTPS id 34sm1843187ibi.14.2010.10.21.07.54.24 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 21 Oct 2010 07:54:27 -0700 (PDT) From: zhangyd To: glecerf@gmail.com Subject: [PATCH] mtd: chips: add SST38VF640x nor-flashes Date: Thu, 21 Oct 2010 22:53:42 -0400 Message-Id: <1287716022-2792-1-git-send-email-zhangyd6@gmail.com> X-Mailer: git-send-email 1.7.2.3 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20101021_105434_697104_3CD250BB X-CRM114-Status: GOOD ( 13.60 ) X-Spam-Score: 2.1 (++) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (2.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is freemail (zhangyd6[at]gmail.com) 0.0 DATE_IN_FUTURE_06_12 Date: is 6 to 12 hours after Received: date 2.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (zhangyd6[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.214.177 listed in list.dnswl.org] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 T_TO_NO_BRKTS_FREEMAIL T_TO_NO_BRKTS_FREEMAIL Cc: linux-mtd@lists.infradead.org, zhangyd , dwmw2@infradead.org, w.sang@pengutronix.de 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: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Due to broken CFI, these flashes should be operated in jedec probe mode. When you operate them in the CFI probe mode, you will get the wrong sector size.And it will fail to set up the flash during the probe(CFI mode). And i have tested it on my platform. Signed-off-by: yidong zhang --- drivers/mtd/chips/jedec_probe.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/chips/jedec_probe.c b/drivers/mtd/chips/jedec_probe.c index d72a5fb..21f07da 100644 --- a/drivers/mtd/chips/jedec_probe.c +++ b/drivers/mtd/chips/jedec_probe.c @@ -163,6 +163,7 @@ #define SST49LF030A 0x001C #define SST49LF040A 0x0051 #define SST49LF080A 0x005B +#define SST38VF6401 0x536B #define SST36VF3203 0x7354 /* Toshiba */ @@ -1557,6 +1558,18 @@ static const struct amd_flash_info jedec_table[] = { } }, { .mfr_id = CFI_MFR_SST, + .dev_id = SST38VF6401, + .name = "SST 38VF6401", + .devtypes = CFI_DEVICETYPE_X16, + .uaddr = MTD_UADDR_0x0AAA_0x0555, + .dev_size = SIZE_8MiB, + .cmd_set = P_ID_AMD_STD, + .nr_regions = 1, + .regions = { + ERASEINFO(0x10000,128), + } + }, { + .mfr_id = CFI_MFR_SST, .dev_id = SST36VF3203, .name = "SST 36VF3203", .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,