From patchwork Tue Sep 25 09:05:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu CASTET X-Patchwork-Id: 186744 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (unknown [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BBB072C007D for ; Tue, 25 Sep 2012 19:06:55 +1000 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TGR5J-0003dm-Le; Tue, 25 Sep 2012 09:05:41 +0000 Received: from mail-ee0-f49.google.com ([74.125.83.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TGR5G-0003dY-Eo for linux-mtd@lists.infradead.org; Tue, 25 Sep 2012 09:05:39 +0000 Received: by eekd49 with SMTP id d49so1689126eek.36 for ; Tue, 25 Sep 2012 02:05:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=CtEwtMvpTLSYcW42AHXeFyUg8gf4QO9YsLdBSlaeiIQ=; b=zBnvLxOAnG9Rmo4e0TLERusSoCBG6hYURblk4pG0l4Saajn200e9+QpKSg/yEGd3BQ QX02NSjmJtoxx+DZml5YAv91E1II0L/Spi1ExWzdqePe47vZ10pPFBmc9UKztPB0ORpi finzhmtoDj8kgPvnmxYcPEcEgtBwEcystDqnx27A14AQ5WHLCln3yuCj9LTjh32gOLFc EVu/shYCOk9umAAqLIcT6n2T+C3VvwAwOqp7RKYJ7FK0uB2G5ypVVEQnhy3u7hX9D2LX RNrD9vE+KVVsIweKoEkmDAJimIQaoIvOPuYxWEAwHDO1F7gYXoGmSf3UunAh0tw90sAU 19xg== Received: by 10.14.220.134 with SMTP id o6mr18071419eep.35.1348563936293; Tue, 25 Sep 2012 02:05:36 -0700 (PDT) Received: from perruche.Parrot.Biz ([46.218.109.82]) by mx.google.com with ESMTPS id hy11sm2927212bkc.5.2012.09.25.02.05.34 (version=SSLv3 cipher=OTHER); Tue, 25 Sep 2012 02:05:35 -0700 (PDT) From: Matthieu CASTET To: linux-mtd@lists.infradead.org, dedekind1@gmail.com Subject: [PATCH] mtd: m25p80: add support for the windbond w25q256 chip Date: Tue, 25 Sep 2012 11:05:27 +0200 Message-Id: <1348563927-9131-1-git-send-email-matthieu.castet@parrot.com> X-Mailer: git-send-email 1.7.10.4 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.83.49 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (matthieu.castet[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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 Cc: Matthieu CASTET X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.14 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 Signed-off-by: Matthieu CASTET --- drivers/mtd/devices/m25p80.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index 5257345..4eb99c6 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c @@ -168,6 +168,7 @@ static inline int set_4byte(struct m25p *flash, u32 jedec_id, int enable) { switch (JEDEC_MFR(jedec_id)) { case CFI_MFR_MACRONIX: + case 0xEF /* winbond */: flash->command[0] = enable ? OPCODE_EN4B : OPCODE_EX4B; return spi_write(flash->spi, flash->command, 1); default: @@ -739,6 +740,7 @@ static const struct spi_device_id m25p_ids[] = { { "w25x64", INFO(0xef3017, 0, 64 * 1024, 128, SECT_4K) }, { "w25q64", INFO(0xef4017, 0, 64 * 1024, 128, SECT_4K) }, { "w25q80", INFO(0xef5014, 0, 64 * 1024, 16, SECT_4K) }, + { "w25q256", INFO(0xef4019, 0, 64 * 1024, 512, SECT_4K) }, /* Catalyst / On Semiconductor -- non-JEDEC */ { "cat25c11", CAT25_INFO( 16, 8, 16, 1) },