aboutsummaryrefslogtreecommitdiff
path: root/hw/nand.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/nand.c')
-rw-r--r--hw/nand.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/nand.c b/hw/nand.c
index de3e502596..63620938fb 100644
--- a/hw/nand.c
+++ b/hw/nand.c
@@ -297,6 +297,7 @@ static void nand_command(NANDFlashState *s)
break;
case NAND_CMD_BLOCKERASE2:
+ s->addr &= (1ull << s->addrlen * 8) - 1;
if (nand_flash_ids[s->chip_id].options & NAND_SAMSUNG_LP)
s->addr <<= 16;
else