int printlock_w39l040(struct flashchip * 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, 0x7fff2); msg_cdbg("Top boot block:\n"); ret |= printlock_w39_bootblock_64k16k(lock); return ret; }
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_at49f(struct flashctx *flash) { uint8_t lock = w39_idmode_readb(flash, 0x00002); msg_cdbg("Hardware bootblock lockout is %sactive.\n", (lock & 0x01) ? "" : "not "); return 0; }
static int printlock_w39_common(struct flashchip *flash, int offset) { uint8_t lock; lock = w39_idmode_readb(flash, offset); msg_cdbg("Lockout bits:\n"); return printlock_w39_tblwp(lock); }
int printlock_w39v040a(struct flashchip *flash) { uint8_t lock; int ret = 0; /* The W39V040A datasheet contradicts itself on the lock register * location: 0x00002 and 0x7fff2 are both mentioned. Pick the one * which is similar to the other chips of the same family. */ lock = w39_idmode_readb(flash, 0x7fff2); msg_cdbg("Lockout bits:\n"); ret = printlock_w39_tblwp(lock); ret |= printlock_w39_bootblock_64k16k(lock); return ret; }