mirror of
https://github.com/qemu/qemu.git
synced 2025-01-21 13:03:26 +08:00
Add OneNAND Unlock All command (Kyungmin Park).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4930 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
c904ef0e7c
commit
89588a4b16
15
hw/onenand.c
15
hw/onenand.c
@ -355,6 +355,21 @@ static void onenand_command(struct onenand_s *s, int cmd)
|
||||
s->wpstatus = s->blockwp[b] = ONEN_LOCK_UNLOCKED;
|
||||
}
|
||||
break;
|
||||
case 0x27: /* Unlock All NAND array blocks */
|
||||
s->intstatus |= ONEN_INT;
|
||||
|
||||
for (b = 0; b < s->blocks; b ++) {
|
||||
if (b >= s->blocks) {
|
||||
s->status |= ONEN_ERR_CMD;
|
||||
break;
|
||||
}
|
||||
if (s->blockwp[b] == ONEN_LOCK_LOCKTIGHTEN)
|
||||
break;
|
||||
|
||||
s->wpstatus = s->blockwp[b] = ONEN_LOCK_UNLOCKED;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x2a: /* Lock NAND array block(s) */
|
||||
s->intstatus |= ONEN_INT;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user