From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-by2lp0244.outbound.protection.outlook.com ([207.46.163.244] helo=na01-by2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WqCIH-0004Rb-Pf for linux-mtd@lists.infradead.org; Fri, 30 May 2014 02:11:46 +0000 Date: Fri, 30 May 2014 08:49:30 +0800 From: Huang Shijie To: Marek Vasut Subject: Re: [PATCH] mtd: spi-nor: read 6 bytes for the ID Message-ID: <20140530004928.GA31796@shlinux1.ap.freescale.net> References: <1397470174-27856-1-git-send-email-b32955@freescale.com> <5384B5EB.4050203@st.com> <20140528052237.GA7984@shlinux1.ap.freescale.net> <201405292258.52803.marex@denx.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <201405292258.52803.marex@denx.de> Cc: dwmw2@infradead.org, computersforpeace@gmail.com, Christophe KERELLO , linux-mtd@lists.infradead.org, angus.clark@st.com List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thu, May 29, 2014 at 10:58:52PM +0200, Marek Vasut wrote: > On Wednesday, May 28, 2014 at 07:22:40 AM, Huang Shijie wrote: > [...] > > From 7b920141899e4e7249bd23792dc8d5f1558cb7ca Mon Sep 17 00:00:00 2001 > > From: Huang Shijie > > Date: Mon, 14 Apr 2014 18:09:34 +0800 > > Subject: [PATCH v2] mtd: spi-nor: read 6 bytes for the ID > > > > Currently, we read 5 bytes for ID, but s25fl128s has the same > > ext_id(0x4d01) with s25fl129p1. The s25fl128s can support the DDR Quad > > read, while s25fl129p1 does not. So we have to distinguish the two NOR > > flashs. > > > > This patch reads out 6 bytes for the ID, and use the 6 bytes ID to search > > the right flash_info. > > > > The detail of the patch is: > > [1] change the "ext_id" from u16 to u32. > > We can store two bytes or three bytes with the @ext_id now. > > > > [2] search the right flash_info with the 6byte ID and the new @ext_id. > > We use "matched" variable to track the legacy two bytes @ext_id. > > If the flash_info's @ext_id is three bytes, we will use the > > sixth byte of the ID to check it. > > > > [3] add the new item to spi_nor_ids for s25fl128s. > > > > Signed-off-by: Huang Shijie > > --- > > drivers/mtd/spi-nor/spi-nor.c | 30 +++++++++++++++++++++++++----- > > 1 files changed, 25 insertions(+), 5 deletions(-) > > What exactly changed here please ? This patch will reset the ext_jedec to the old value if the sixth-byte-match fails. ------------------------------------------------------------ + /* reset back the ext_jedec */ + ext_jedec >>= 8; ------------------------------------------------------------ thanks Huang Shijie