Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753346AbcDMRYW (ORCPT ); Wed, 13 Apr 2016 13:24:22 -0400 Received: from eusmtp01.atmel.com ([212.144.249.243]:25795 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752552AbcDMRYV (ORCPT ); Wed, 13 Apr 2016 13:24:21 -0400 From: Cyrille Pitchen To: , CC: , , , , Cyrille Pitchen Subject: [PATCH RFC 3/8] mtd: spi-nor: add entry for Macronix mx25l25673g Date: Wed, 13 Apr 2016 19:23:35 +0200 Message-ID: X-Mailer: git-send-email 1.8.2.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1523 Lines: 34 The Macronix MX25L25635E and MX25L25673G share the same JEDEC ID, C22019, with no extended ID to differenciate them at runtime. However, the 73G supports dedicated 4byte address op code for (Fast) Read, Page Program and Sectore Erase Operation whereas the 35E doesn't. So this patch adds a specific entry to support the 73G revision. For backward compatibility purpose, this new entry is inserted AFTER the legacy "mx25l25635e" entry so this later entry is still the first one found hence returned by spi_nor_read_id(). Then using the new entry requires the "mx25l25673g" string to be given as the 'name' argument of spi_nor_scan(). Signed-off-by: Cyrille Pitchen --- drivers/mtd/spi-nor/spi-nor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index aac291a590e1..54115aface9f 100644 --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c @@ -933,6 +933,7 @@ static const struct flash_info spi_nor_ids[] = { { "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) }, { "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) }, { "mx25l25635e", INFO(0xc22019, 0, 64 * 1024, 512, 0) }, + { "mx25l25673g", INFO(0xc22019, 0, 64 * 1024, 512, SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, { "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) }, { "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_QUAD_READ) }, { "mx66l1g55g", INFO(0xc2261b, 0, 64 * 1024, 2048, SPI_NOR_QUAD_READ) }, -- 1.8.2.2