aboutsummaryrefslogtreecommitdiff
path: root/hw/block
diff options
context:
space:
mode:
authorMarcin Krzeminski <mar.krzeminski@gmail.com>2017-01-20 11:15:06 +0000
committerPeter Maydell <peter.maydell@linaro.org>2017-01-20 11:15:06 +0000
commit597c15f0ddadd3e731c8301a4034fe9ce0c846b3 (patch)
tree41f9632c377efb3d7cf44726c7b3fc4f55eea6e0 /hw/block
parent643bb6fca7102e49c156d4ba210d2ec3c160b844 (diff)
downloadqemu-597c15f0ddadd3e731c8301a4034fe9ce0c846b3.zip
qemu-597c15f0ddadd3e731c8301a4034fe9ce0c846b3.tar.gz
qemu-597c15f0ddadd3e731c8301a4034fe9ce0c846b3.tar.bz2
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 <mar.krzeminski@gmail.com> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Message-id: 20170108083854.5006-2-mar.krzeminski@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/block')
-rw-r--r--hw/block/m25p80.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c
index 4c5f8c3..4ad67ac 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: