Add erase and write functions to the following chip definitions:
AT25DF021 AT25DF041A AT25DF081 AT25DF161 AT25DF321 AT25DF321A AT25DF641 AT25F512B AT25FS010 AT25FS040 AT26DF081A AT26DF161 AT26DF161A AT26DF321 AT26F004
Straight from the data sheets, untested because I lack the hardware.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Index: flashrom-atmel_readerasewrite/flashchips.c =================================================================== --- flashrom-atmel_readerasewrite/flashchips.c (Revision 3852) +++ flashrom-atmel_readerasewrite/flashchips.c (Arbeitskopie) @@ -123,8 +123,8 @@ .page_size = 256, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, - .erase = NULL, - .write = NULL, + .erase = spi_chip_erase_60_c7, + .write = spi_chip_write, .read = spi_chip_read, },
@@ -137,8 +137,8 @@ .page_size = 256, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, - .erase = NULL, - .write = NULL, + .erase = spi_chip_erase_60_c7, + .write = spi_chip_write, .read = spi_chip_read, },
@@ -151,8 +151,8 @@ .page_size = 256, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, - .erase = NULL, - .write = NULL, + .erase = spi_chip_erase_60_c7, + .write = spi_chip_write, .read = spi_chip_read, },
@@ -165,8 +165,8 @@ .page_size = 256, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, - .erase = NULL, - .write = NULL, + .erase = spi_chip_erase_60_c7, + .write = spi_chip_write, .read = spi_chip_read, },
@@ -179,7 +179,7 @@ .page_size = 256, .tested = TEST_OK_PREW, .probe = probe_spi_rdid, - .erase = spi_chip_erase_c7, + .erase = spi_chip_erase_60_c7, .write = spi_chip_write, .read = spi_chip_read, }, @@ -193,8 +193,8 @@ .page_size = 256, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, - .erase = NULL, - .write = NULL, + .erase = spi_chip_erase_60_c7, + .write = spi_chip_write, .read = spi_chip_read, },
@@ -207,8 +207,8 @@ .page_size = 256, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, - .erase = NULL, - .write = NULL, + .erase = spi_chip_erase_60_c7, + .write = spi_chip_write, .read = spi_chip_read, },
@@ -221,8 +221,8 @@ .page_size = 256, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, - .erase = NULL, - .write = NULL, + .erase = spi_chip_erase_60_c7, + .write = spi_chip_write, .read = spi_chip_read, },
@@ -235,8 +235,8 @@ .page_size = 256, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, - .erase = NULL, - .write = NULL, + .erase = spi_chip_erase_60_c7, + .write = spi_chip_write, .read = spi_chip_read, },
@@ -249,8 +249,8 @@ .page_size = 256, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, - .erase = NULL, - .write = NULL, + .erase = spi_chip_erase_60_c7, + .write = spi_chip_write, .read = spi_chip_read, },
@@ -277,8 +277,8 @@ .page_size = 256, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, - .erase = NULL, - .write = NULL, + .erase = spi_chip_erase_60_c7, + .write = spi_chip_write, .read = spi_chip_read, },
@@ -291,8 +291,8 @@ .page_size = 256, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, - .erase = NULL, - .write = NULL, + .erase = spi_chip_erase_60_c7, + .write = spi_chip_write, .read = spi_chip_read, },
@@ -305,8 +305,8 @@ .page_size = 256, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, - .erase = NULL, - .write = NULL, + .erase = spi_chip_erase_60_c7, + .write = spi_chip_write, .read = spi_chip_read, },
@@ -320,7 +320,7 @@ .page_size = 256, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, - .erase = spi_chip_erase_c7, + .erase = spi_chip_erase_60_c7, .write = spi_chip_write, .read = spi_chip_read, },*/ @@ -334,7 +334,7 @@ .page_size = 256, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, - .erase = NULL, + .erase = spi_chip_erase_60_c7, .write = NULL /* Incompatible Page write */, .read = spi_chip_read, },
Carl-Daniel Hailfinger wrote:
Add erase and write functions to the following chip definitions:
AT25DF021 AT25DF041A AT25DF081 AT25DF161 AT25DF321 AT25DF321A AT25DF641 AT25F512B AT25FS010 AT25FS040 AT26DF081A AT26DF161 AT26DF161A AT26DF321 AT26F004
Straight from the data sheets, untested because I lack the hardware.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Acked-by: Peter Stuge peter@stuge.se
On 08.01.2009 17:44, Peter Stuge wrote:
Carl-Daniel Hailfinger wrote:
Add erase and write functions to the following chip definitions:
AT25DF021 AT25DF041A AT25DF081 AT25DF161 AT25DF321 AT25DF321A AT25DF641 AT25F512B AT25FS010 AT25FS040 AT26DF081A AT26DF161 AT26DF161A AT26DF321 AT26F004
Straight from the data sheets, untested because I lack the hardware.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Acked-by: Peter Stuge peter@stuge.se
Thanks, r3853.
Regards, Carl-Daniel
On Thu, Jan 8, 2009 at 9:38 AM, Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net wrote:
Add erase and write functions to the following chip definitions:
AT25DF021 AT25DF041A AT25DF081 AT25DF161 AT25DF321 AT25DF321A AT25DF641 AT25F512B AT25FS010 AT25FS040 AT26DF081A AT26DF161 AT26DF161A AT26DF321 AT26F004
Straight from the data sheets, untested because I lack the hardware.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
@@ -179,7 +179,7 @@ .page_size = 256, .tested = TEST_OK_PREW, .probe = probe_spi_rdid,
.erase = spi_chip_erase_c7,
.erase = spi_chip_erase_60_c7,
It's surprising to change this one since it was tested OK. Shouldn't you mark it TEST_UNTESTED now or TEST_OK_PRW?
Thanks, Myles
Myles Watson wrote:
@@ -179,7 +179,7 @@ .page_size = 256, .tested = TEST_OK_PREW, .probe = probe_spi_rdid,
.erase = spi_chip_erase_c7,
.erase = spi_chip_erase_60_c7,
It's surprising to change this one since it was tested OK. Shouldn't you mark it TEST_UNTESTED now or TEST_OK_PRW?
Thanks for catching that. Please revert this hunk.
//Peter
On 08.01.2009 18:01, Peter Stuge wrote:
Myles Watson wrote:
@@ -179,7 +179,7 @@ .page_size = 256, .tested = TEST_OK_PREW, .probe = probe_spi_rdid,
.erase = spi_chip_erase_c7,
.erase = spi_chip_erase_60_c7,
It's surprising to change this one since it was tested OK. Shouldn't you mark it TEST_UNTESTED now or TEST_OK_PRW?
Thanks for catching that. Please revert this hunk.
Sure, will do. Thanks Myles!
Regards, Carl-Daniel
On 08.01.2009 18:04, Carl-Daniel Hailfinger wrote:
On 08.01.2009 18:01, Peter Stuge wrote:
Myles Watson wrote:
@@ -179,7 +179,7 @@ .page_size = 256, .tested = TEST_OK_PREW, .probe = probe_spi_rdid,
.erase = spi_chip_erase_c7,
.erase = spi_chip_erase_60_c7,
It's surprising to change this one since it was tested OK. Shouldn't you mark it TEST_UNTESTED now or TEST_OK_PRW?
Thanks for catching that. Please revert this hunk.
Sure, will do. Thanks Myles!
Per the discussion with Peter, that hunk will stay as is unless anyone objects to the reason below: The new erase function calls the old erase function and if that fails it will call an alternative erase function. Worst case: The new function behaves like the old function. Best case: The new function works even if the old function fails due to chipset constraints.
Regards, Carl-Daniel