All of lore.kernel.org
 help / color / mirror / Atom feed
From: Francisco Iglesias <frasse.iglesias@gmail.com>
To: qemu-devel@nongnu.org
Cc: edgari@xilinx.com, alistai@xilinx.com,
	francisco.iglesias@feimtech.se, mar.krzeminski@gmail.com
Subject: [Qemu-devel] [PATCH v6 03/13] m25p80: Add support for BRRD/BRWR and BULK_ERASE (0x60)
Date: Wed,  1 Nov 2017 08:16:42 +0100	[thread overview]
Message-ID: <20171101071652.19375-4-frasse.iglesias@gmail.com> (raw)
In-Reply-To: <20171101071652.19375-1-frasse.iglesias@gmail.com>

Add support for the bank address register access commands (BRRD/BRWR) and
the BULK_ERASE (0x60) command.

Signed-off-by: Francisco Iglesias <frasse.iglesias@gmail.com>
Acked-by: Marcin Krzemiński <mar.krzeminski@gmail.com>
---
 hw/block/m25p80.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c
index 12ff656..3f8154b 100644
--- a/hw/block/m25p80.c
+++ b/hw/block/m25p80.c
@@ -331,7 +331,10 @@ typedef enum {
     WRDI = 0x4,
     RDSR = 0x5,
     WREN = 0x6,
+    BRRD = 0x16,
+    BRWR = 0x17,
     JEDEC_READ = 0x9f,
+    BULK_ERASE_60 = 0x60,
     BULK_ERASE = 0xc7,
     READ_FSR = 0x70,
     RDCR = 0x15,
@@ -704,6 +707,7 @@ static void complete_collecting_data(Flash *s)
             s->write_enable = false;
         }
         break;
+    case BRWR:
     case EXTEND_ADDR_WRITE:
         s->ear = s->data[0];
         break;
@@ -1041,6 +1045,7 @@ static void decode_new_cmd(Flash *s, uint32_t value)
         s->state = STATE_READING_DATA;
         break;
 
+    case BULK_ERASE_60:
     case BULK_ERASE:
         if (s->write_enable) {
             DB_PRINT_L(0, "chip erase\n");
@@ -1058,12 +1063,14 @@ static void decode_new_cmd(Flash *s, uint32_t value)
     case EX_4BYTE_ADDR:
         s->four_bytes_address_mode = false;
         break;
+    case BRRD:
     case EXTEND_ADDR_READ:
         s->data[0] = s->ear;
         s->pos = 0;
         s->len = 1;
         s->state = STATE_READING_DATA;
         break;
+    case BRWR:
     case EXTEND_ADDR_WRITE:
         if (s->write_enable) {
             s->needed_bytes = 1;
-- 
2.9.3

  parent reply	other threads:[~2017-11-01  7:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-01  7:16 [Qemu-devel] [PATCH v6 00/13] Add support for the ZynqMP Generic QSPI Francisco Iglesias
2017-11-01  7:16 ` [Qemu-devel] [PATCH v6 01/13] m25p80: Add support for continuous read out of RDSR and READ_FSR Francisco Iglesias
2017-11-01 19:20   ` mar.krzeminski
2017-11-01 20:42     ` francisco iglesias
2017-11-01  7:16 ` [Qemu-devel] [PATCH v6 02/13] m25p80: Add support for SST READ ID 0x90/0xAB commands Francisco Iglesias
2017-11-01  7:16 ` Francisco Iglesias [this message]
2017-11-01  7:16 ` [Qemu-devel] [PATCH v6 04/13] m25p80: Add support for n25q512a11 and n25q512a13 Francisco Iglesias
2017-11-01  7:16 ` [Qemu-devel] [PATCH v6 05/13] xilinx_spips: Move FlashCMD, XilinxQSPIPS and XilinxSPIPSClass Francisco Iglesias
2017-11-01  7:16 ` [Qemu-devel] [PATCH v6 06/13] xilinx_spips: Update striping to be big-endian bit order Francisco Iglesias
2017-11-01  7:16 ` [Qemu-devel] [PATCH v6 07/13] xilinx_spips: Add support for RX discard and RX drain Francisco Iglesias
2017-11-01  7:16 ` [Qemu-devel] [PATCH v6 08/13] xilinx_spips: Make tx/rx_data_bytes more generic and reusable Francisco Iglesias
2017-11-01  7:16 ` [Qemu-devel] [PATCH v6 09/13] xilinx_spips: Add support for zero pumping Francisco Iglesias
2017-11-01  7:16 ` [Qemu-devel] [PATCH v6 10/13] xilinx_spips: Add support for 4 byte addresses in the LQSPI Francisco Iglesias
2017-11-01  7:16 ` [Qemu-devel] [PATCH v6 11/13] xilinx_spips: Don't set TX FIFO UNDERFLOW at cmd done Francisco Iglesias
2017-11-01  7:16 ` [Qemu-devel] [PATCH v6 12/13] xilinx_spips: Add support for the ZynqMP Generic QSPI Francisco Iglesias
2017-11-01  7:16 ` [Qemu-devel] [PATCH v6 13/13] xlnx-zcu102: Add support for the ZynqMP QSPI Francisco Iglesias

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171101071652.19375-4-frasse.iglesias@gmail.com \
    --to=frasse.iglesias@gmail.com \
    --cc=alistai@xilinx.com \
    --cc=edgari@xilinx.com \
    --cc=francisco.iglesias@feimtech.se \
    --cc=mar.krzeminski@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.