Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Huang Shijie <shijie.huang@intel.com>
To: "Bean Huo 霍斌斌 (beanhuo)" <beanhuo@micron.com>
Cc: Brian Norris <computersforpeace@gmail.com>,
	Rafal Milecki <zajec5@gmail.com>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	David Woodhouse <David.Woodhouse@intel.com>,
	Artem Bityutskiy <dedekind1@gmail.com>
Subject: Re: [PATCH V2] mtd: spi-nor: prefer more specific entries from chips database
Date: Fri, 7 Nov 2014 10:06:49 +0800	[thread overview]
Message-ID: <20141107020648.GA30266@shldeISGChi005.sh.intel.com> (raw)
In-Reply-To: <A765B125120D1346A63912DDE6D8B6315EA662@NTXXIAMBX02.xacn.micron.com>

On Fri, Nov 07, 2014 at 01:49:36AM +0000, Bean Huo 霍斌斌 (beanhuo) wrote:
> >> 2) n25q128a13 with ID 0x20bb181234
> >> we should prefer entry with the longer ID.
> >I perfer to make a limit before we add new item to the table:
> >   Put the longest one in the first place.
> 
> >By this way, we can avoid the too much "for"s in the following code which makes the code a little complicated.
>  
> >So It should looks like this in the table.     
>  > 1) n25q128a13 with ID 0x20bb181234
>  > 2) n25q128a11 with ID 0x20bb18
> 
> >Hi Brian, what's your opinion?
>   
> >thanks
> >Huang Shijie
> 
> In general,spi nor include three parts Id infor,
> 
> First,it is Manufacturer ID, size is 1 byte.
> 
> Second,it is Device ID,and size is 2 bytes,this sector will include memory
> type and capacity information.
> 
> Third,it is unique ID,and size is 17 bytes(now only used 2 bytes in linux),first byte
> will indicate length of data to follow,second byte is real Extended id,and
> very important.Next 14 bytes is optional,it can be customized factory data. 
> 
> Now in our linux,former two parts all be used for Deivce Id ,ant its size
> is 3 bytes.third part(extended id)be used 2 bytes,and called extended id.
> 
> In our Micron spi nor serials,there are some spi nor that the same Deivce id 
> with different extended ID,so in order to distinguish this,you only add extended id
> infor in struct spi_device_id spi_nor_ids,and don't let relevant spi nor Extended ID field
> is NULL.just as Spansion:
> 
> { "s25sl032p",  INFO(0x010215, 0x4d00,  64 * 1024,  64, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
> { "s25sl064p",  INFO(0x010216, 0x4d00,  64 * 1024, 128, 0) },
> { "s25fl256s0", INFO(0x010219, 0x4d00, 256 * 1024, 128, 0) },
Sometimes, five bytes ID is not enough, please read the patch:
	http://lists.infradead.org/pipermail/linux-mtd/2014-August/055018.html

In current table, Micron's chips do not have five bytes ID yet.
But Spansion has already had many five bytes ID chips now.

thanks
Huang Shijie

  reply	other threads:[~2014-11-07  2:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-22  7:33 [PATCH] mtd: spi-nor: prefer more specific entries from chips database Rafał Miłecki
2014-11-06  7:02 ` [PATCH V2] " Rafał Miłecki
2014-11-07  1:21   ` Huang Shijie
2014-11-07  1:49     ` Bean Huo 霍斌斌 (beanhuo)
2014-11-07  2:06       ` Huang Shijie [this message]
2014-11-07  2:26         ` Bean Huo 霍斌斌 (beanhuo)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141107020648.GA30266@shldeISGChi005.sh.intel.com \
    --to=shijie.huang@intel.com \
    --cc=David.Woodhouse@intel.com \
    --cc=beanhuo@micron.com \
    --cc=computersforpeace@gmail.com \
    --cc=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=zajec5@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox