1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-02 22:43:17 +02:00

Here's a very quick patch to fix the missing unlock code

Fixes missing unlock for certain chips:
 * unlock_49lf00x
    * Pm49fl002
    * Pm49fl004

 * unlock_49flxxxc
    * SST49LF160C

 * unlock_winbond_fwhub
    * W39V080FA
    * W39V080FA (dual mode)

Fixes missing printlock for certain chip:
 * printlock_w39v040c
    * W39V040C

Corresponding to flashrom svn r907.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
This commit is contained in:
Sean Nelson
2010-02-19 00:52:10 +00:00
parent ce5fad038d
commit 6e0b912f46
8 changed files with 64 additions and 7 deletions

View File

@ -50,6 +50,32 @@ int probe_w39v040c(struct flashchip *flash)
return 1;
}
int printlock_w39v040c(struct flashchip *flash)
{
chipaddr bios = flash->virtual_memory;
uint8_t lock;
chip_writeb(0xAA, bios + 0x5555);
programmer_delay(10);
chip_writeb(0x55, bios + 0x2AAA);
programmer_delay(10);
chip_writeb(0x90, bios + 0x5555);
programmer_delay(10);
lock = chip_readb(bios + 0xfff2);
chip_writeb(0xAA, bios + 0x5555);
programmer_delay(10);
chip_writeb(0x55, bios + 0x2AAA);
programmer_delay(10);
chip_writeb(0xF0, bios + 0x5555);
programmer_delay(40);
printf("%s: Boot block #TBL is %slocked, rest of chip #WP is %slocked.\n",
__func__, lock & 0x4 ? "" : "un", lock & 0x8 ? "" : "un");
return 0;
}
int erase_w39v040c(struct flashchip *flash)
{
int i;