Re: [PATCH 1/1] MTD DataFlash: fix bug - ATMEL AT45DF321D spi flash card fails to be copied to

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Bryan Wu <cooloney@...>, Michael Hennerich <michael.hennerich@...>
Cc: <linux@...>, <linux-mtd@...>, <linux-kernel@...>
Date: Sunday, June 1, 2008 - 4:28 pm

On Saturday 31 May 2008, Bryan Wu wrote:

I like the idea, but I'm afraid this approach isn't sufficient.

Thing is, the LSB of the status register is explicitly
undefined for earlier chip revisions (e.g. see datasheets
for AT45DB321B and AT45DB321C vs AT45DB321D), so you should
use a different chip discovery algorithm.  Perhaps:

 * Try the original scheme (read status register);

 * If it indicates a chip that has new versions with
   binary page size options, use the 0x9F command to
   read the JEDEC id (and chip revision);

 * If it's a sufficently new revision, *then* you can
   interpret that LSB as indicating the page size

Example, on the AT45DB321x chips, that JEDEC instruction was
added for the 'C' revision (according to my copies of the
datasheets) and wasn't there for the 'B' revision ... while
it was the 'D' revision which introduced the binary page size.

Maybe the JEDEC code from the m25p80 driver can be reused.

Also, I'd like to see a pre-existing typo fixed (in case anyone
uses a flash that small) ... see below.

- Dave



1024 pages (of 264 bytes), not 1025.  :)


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
RE: [PATCH 1/1] MTD DataFlash: fix bug - ATMEL AT45DF321D sp..., Hennerich, Michael, (Mon Jun 2, 3:39 am)
Re: [PATCH 1/1] MTD DataFlash: fix bug - ATMEL AT45DF321D sp..., David Brownell, (Sun Jun 1, 4:28 pm)