Add OneNAND Unlock All command
PATCH 1/1 Add OneNAND Unlock All command
Add OneNAND Unlock All command
Signed-off-by Kyungmin Park <[email protected]>
--- hw/onenand.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-)
hw/onenand.c +16 -0
@@ -355,6 +355,22 @@ 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 block(s) */ + 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 ;
Signature · 1 line
1.5.3.3