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:
balrog 2008-07-23 16:35:45 +00:00
parent c904ef0e7c
commit 89588a4b16

View File

@ -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;