[#3930] read_flash doesn't work with Atmel spi flashes AT45DB041A, AT45DB041B

Document created by Aaronwu Employee on Sep 25, 2013
Version 1Show Document
  • View in full screen mode

[#3930] read_flash doesn't work with Atmel spi flashes AT45DB041A, AT45DB041B

Submitted By: Alexander Kochetkov

Open Date

2008-02-23 18:27:16     Close Date

2008-10-13 03:36:33

Priority:

Very Low     Assignee:

Mike Frysinger

Category:

N/A     Fixed In Release:

N/A

Found In Release:

pre-releases     Status:

Closed

Board:

N/A     Processor:

BF537

Silicon Revision:

    Resolution:

Duplicated

Is the bug repeatable?:

yes     

Summary: read_flash doesn't work with Atmel spi flashes AT45DB041A, AT45DB041B

Details:

 

U-Boot version:

1.1.6, trunk

 

Source file:

/trunk/drivers/mtd/devices/mtd_dataflash.c

 

According with datasheets, AT45DB041A, AT45DB041B doesn't support read commands 0x03, 0x0B, which present only for AT45DB041D. But 'eeprom info' command displays this flashes as AT45DB041x, so we think that 'eeprom read' should work properly with all of these flashes.

 

For backward compatibility, should be used 0xE8.

 

Maybe we should place warning comment at file mtd_dataflash.c?

 

These are datasheets for AT45DB041A, AT45DB041B, AT45DB041D

http://www.atmel.com/dyn/resources/prod_documents/DOC1496.PDF

http://www.atmel.com/dyn/resources/prod_documents/doc3443.pdf

http://www.atmel.com/dyn/resources/prod_documents/doc3595.pdf

 

 

Follow-ups

 

--- Mike Frysinger                                           2008-02-23 18:59:29

are you talking about the kernel or u-boot ?  you refer to both, but dont really

say which one is problematic

 

--- Alexander Kochetkov                                      2008-02-24 16:07:24

I am sorry for the mistake in a previous comment.

I meant u-boot, not kernel. And source file, which I refer, is

/trunk/u-boot-1.1.6/board/bf537-stamp/spi_flash.c.

 

Perhaps this is not the problem, because AT45DB041A, AT45DB041B is obsolete

devices and for new designs should be used AT45DB041D (this is written on first

pages of datasheets). The new code should not support obsolete devices. It

detects this devices like 'AT45DB041x'. I think, that it can work with

AT45DB041A, AT45DB041B, AT45DB041D, but it works only with AT45DB041D. So maybe,

it is better to insert comments into source file like this:

 

/* SPI Speeds: 66 MHz / 33 MHz */

static struct flash_info flash_atmel_dataflash[] = {

    { "AT45DB011x", 0x0c, 264, 512 },

    { "AT45DB021x", 0x14, 264, 1025 },

-    { "AT45DB041x", 0x1c, 264, 2048 },

+    { "AT45DB041x", 0x1c, 264, 2048 },  // only AT45DB041D

    { "AT45DB081x", 0x24, 264, 4096 },

    { "AT45DB161x", 0x2c, 528, 4096 },

    { "AT45DB321x", 0x34, 528, 8192 },

    { "AT45DB642x", 0x3c, 1056, 8192 },

    { NULL, 0, 0, 0 }

};

 

static struct flash_ops flash_atmel_ops = {

-    .read = OP_READ,

+    .read = OP_READ, // valid only for AT45DBxxxD versions

    .write = 0x82,

    .erase = 0x81,

    .status = 0xD7,

};

 

--- Mike Frysinger                                           2008-10-13 03:36:33

dataflash issues are tracked at [#4367]

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes