1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-02 14:33:18 +02:00

Mark Fujitsu MBM29F400BC write as broken (implicit eraseblock layout in write)

Use full-chip write function on Fujitsu MBM29F400TC and ST M29F400BT.
Add support for ST M29F400BB.

Corresponding to flashrom svn r1083.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
This commit is contained in:
Carl-Daniel Hailfinger
2010-07-16 22:07:20 +00:00
parent 29a1c66a23
commit 420cf6f633
3 changed files with 36 additions and 59 deletions

View File

@ -204,56 +204,3 @@ int write_m29f400bt(struct flashchip *flash, uint8_t *buf)
return 0;
}
int write_coreboot_m29f400bt(struct flashchip *flash, uint8_t *buf)
{
chipaddr bios = flash->virtual_memory;
msg_cinfo("Programming page:\n ");
/*********************************
*Pages for M29F400BT:
* 16 0x7c000 0x7ffff TOP
* 8 0x7a000 0x7bfff
* 8 0x78000 0x79fff
* 32 0x70000 0x77fff
* 64 0x60000 0x6ffff
* 64 0x50000 0x5ffff
* 64 0x40000 0x4ffff
*---------------------------------
* 64 0x30000 0x3ffff
* 64 0x20000 0x2ffff
* 64 0x10000 0x1ffff
* 64 0x00000 0x0ffff BOTTOM
*********************************/
msg_cinfo("%04d at address: 0x%08x\n", 7, 0x00000);
if (block_erase_m29f400bt(flash, 0x00000, 64 * 1024)) {
msg_cerr("ERASE FAILED!\n");
return -1;
}
write_page_m29f400bt(bios, buf + 0x00000, bios + 0x00000, 64 * 1024);
msg_cinfo("%04d at address: 0x%08x\n", 7, 0x10000);
if (block_erase_m29f400bt(flash, 0x10000, 64 * 1024)) {
msg_cerr("ERASE FAILED!\n");
return -1;
}
write_page_m29f400bt(bios, buf + 0x10000, bios + 0x10000, 64 * 1024);
msg_cinfo("%04d at address: 0x%08x\n", 7, 0x20000);
if (block_erase_m29f400bt(flash, 0x20000, 64 * 1024)) {
msg_cerr("ERASE FAILED!\n");
return -1;
}
write_page_m29f400bt(bios, buf + 0x20000, bios + 0x20000, 64 * 1024);
msg_cinfo("%04d at address: 0x%08x\n", 7, 0x30000);
if (block_erase_m29f400bt(flash, 0x30000, 64 * 1024)) {
msg_cerr("ERASE FAILED!\n");
return -1;
}
write_page_m29f400bt(bios, buf + 0x30000, bios + 0x30000, 64 * 1024);
msg_cinfo("\n");
return 0;
}