mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-01 22:21:16 +02:00
Add support for Winbond W39F010/W39L010/W39L020
W39F010 is a 128kB parallel 5V flash chip, 16k bootblocks. W39L010 is a 128kB parallel 3.3V flash chip, 8k bootblocks. W39L020 is a 256kB parallel 3.3V flash chip, 64k/16k bootblocks. The W39F010 code was tested with a satasii programmer. The first write attempt after an erase returned with verify failure, but the second write attempt was succesful: http://paste.flashrom.org/view.php?id=1418 Corresponding to flashrom svn r1620. Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
This commit is contained in:

committed by
Stefan Tauner

parent
78ffbeaa02
commit
c31243e173
57
w39.c
57
w39.c
@ -115,6 +115,15 @@ static int printlock_w39_tblwp(uint8_t lock)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int printlock_w39_single_bootblock(uint8_t lock, uint16_t kB)
|
||||
{
|
||||
msg_cdbg("Software %d kB bootblock locking is %sactive.\n", kB, (lock & 0x03) ? "" : "not ");
|
||||
if (lock & 0x03)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int printlock_w39_bootblock_64k16k(uint8_t lock)
|
||||
{
|
||||
msg_cdbg("Software 64 kB bootblock locking is %sactive.\n",
|
||||
@ -160,6 +169,54 @@ static int unlock_w39_fwh(struct flashctx *flash)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int printlock_w39f010(struct flashctx *flash)
|
||||
{
|
||||
uint8_t lock;
|
||||
int ret;
|
||||
|
||||
lock = w39_idmode_readb(flash, 0x00002);
|
||||
msg_cdbg("Bottom boot block:\n");
|
||||
ret = printlock_w39_single_bootblock(lock, 16);
|
||||
|
||||
lock = w39_idmode_readb(flash, 0x1fff2);
|
||||
msg_cdbg("Top boot block:\n");
|
||||
ret |= printlock_w39_single_bootblock(lock, 16);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int printlock_w39l010(struct flashctx *flash)
|
||||
{
|
||||
uint8_t lock;
|
||||
int ret;
|
||||
|
||||
lock = w39_idmode_readb(flash, 0x00002);
|
||||
msg_cdbg("Bottom boot block:\n");
|
||||
ret = printlock_w39_single_bootblock(lock, 8);
|
||||
|
||||
lock = w39_idmode_readb(flash, 0x1fff2);
|
||||
msg_cdbg("Top boot block:\n");
|
||||
ret |= printlock_w39_single_bootblock(lock, 8);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int printlock_w39l020(struct flashctx *flash)
|
||||
{
|
||||
uint8_t lock;
|
||||
int ret;
|
||||
|
||||
lock = w39_idmode_readb(flash, 0x00002);
|
||||
msg_cdbg("Bottom boot block:\n");
|
||||
ret = printlock_w39_bootblock_64k16k(lock);
|
||||
|
||||
lock = w39_idmode_readb(flash, 0x3fff2);
|
||||
msg_cdbg("Top boot block:\n");
|
||||
ret |= printlock_w39_bootblock_64k16k(lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int printlock_w39l040(struct flashctx *flash)
|
||||
{
|
||||
uint8_t lock;
|
||||
|
Reference in New Issue
Block a user