From 597c15f0ddadd3e731c8301a4034fe9ce0c846b3 Mon Sep 17 00:00:00 2001 From: Marcin Krzeminski Date: Fri, 20 Jan 2017 11:15:06 +0000 Subject: block: m25p80: Add Quad Page Program 4byte Some flash chips have additional page program opcode that takes only 4 byte address. This commit adds support for such command in Qemu. Signed-off-by: Marcin Krzeminski Reviewed-by: Edgar E. Iglesias Message-id: 20170108083854.5006-2-mar.krzeminski@gmail.com Signed-off-by: Peter Maydell --- hw/block/m25p80.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'hw/block') diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index 4c5f8c3590..4ad67ac588 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c @@ -327,6 +327,7 @@ typedef enum { PP4_4 = 0x3e, DPP = 0xa2, QPP = 0x32, + QPP_4 = 0x34, ERASE_4K = 0x20, ERASE4_4K = 0x21, @@ -577,6 +578,7 @@ static inline int get_addr_length(Flash *s) switch (s->cmd_in_progress) { case PP4: case PP4_4: + case QPP_4: case READ4: case QIOR4: case ERASE4_4K: @@ -610,6 +612,7 @@ static void complete_collecting_data(Flash *s) switch (s->cmd_in_progress) { case DPP: case QPP: + case QPP_4: case PP: case PP4: case PP4_4: @@ -877,6 +880,7 @@ static void decode_new_cmd(Flash *s, uint32_t value) case READ4: case DPP: case QPP: + case QPP_4: case PP: case PP4: case PP4_4: -- cgit v1.2.3