Skip to contentSkip to conversation

hw/block: m25p80: Support fast read for SST flashes

PATCH Applied Bin Meng 2 participants 5 messages Mar 6, 2021 – Mar 22, 2021

lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH v2 1/1 hw/block: m25p80: Support fast read for SST flashes

From: Bin Meng <[email protected]>

Per SST25VF016B datasheet [1], SST flash requires a dummy byte after the address bytes. Note only SPI mode is supported by SST flashes.

[1] http://ww1.microchip.com/downloads/en/devicedoc/s71271_04.pdf

---

Changes in v2:
- rebase on qemu/master

 hw/block/m25p80.c | 3 +++
 1 file changed, 3 insertions(+)
hw/block/m25p80.c +3 -0
index 5f9471d83c..183d3f44c2 100644
@@ -895,6 +895,9 @@ static void decode_fast_read_cmd(Flash *s)
     s->needed_bytes = get_addr_length(s);
     switch (get_man(s)) {
     /* Dummy cycles - modeled with bytes writes instead of bits */
+    case MAN_SST:
+        s->needed_bytes += 1;
+        break;
     case MAN_WINBOND:
         s->needed_bytes += 8;
         break;
Signature · 1 line
2.25.1
author
#1 lore raw
Quoted 11 lines · Bin Meng

From: Bin Meng <[email protected]>

Per SST25VF016B datasheet [1], SST flash requires a dummy byte after the address bytes. Note only SPI mode is supported by SST flashes.

[1] http://ww1.microchip.com/downloads/en/devicedoc/s71271_04.pdf

Quoted 8 lines

---

Changes in v2:
- rebase on qemu/master

 hw/block/m25p80.c | 3 +++
 1 file changed, 3 insertions(+)

Ping?

author
#2 lore raw
Quoted 15 lines · Bin Meng
Quoted 13 lines · Bin Meng

From: Bin Meng <[email protected]>

Per SST25VF016B datasheet [1], SST flash requires a dummy byte after the address bytes. Note only SPI mode is supported by SST flashes.

[1] http://ww1.microchip.com/downloads/en/devicedoc/s71271_04.pdf

---

Quoted 8 lines
Quoted 6 lines

Changes in v2:
- rebase on qemu/master

 hw/block/m25p80.c | 3 +++
 1 file changed, 3 insertions(+)

Ping?

Ping?

author
#3 lore raw
Quoted 20 lines · Bin Meng
Quoted 18 lines · Bin Meng
Quoted 16 lines · Bin Meng

From: Bin Meng <[email protected]>

Per SST25VF016B datasheet [1], SST flash requires a dummy byte after the address bytes. Note only SPI mode is supported by SST flashes.

[1] http://ww1.microchip.com/downloads/en/devicedoc/s71271_04.pdf

---

Changes in v2:
- rebase on qemu/master

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
 hw/block/m25p80.c | 3 +++
 1 file changed, 3 insertions(+)

Ping?

Ping?

Ping?

#4 lore raw
In reply to Bin Meng
Quoted 10 lines · Bin Meng

From: Bin Meng <[email protected]>

Per SST25VF016B datasheet [1], SST flash requires a dummy byte after the address bytes. Note only SPI mode is supported by SST flashes.

[1] http://ww1.microchip.com/downloads/en/devicedoc/s71271_04.pdf

Thanks!

Applied to riscv-to-apply.next

Alistair

Quoted 27 lines

---

Changes in v2:
- rebase on qemu/master

 hw/block/m25p80.c | 3 +++
 1 file changed, 3 insertions(+)
hw/block/m25p80.c +3 -1
index 5f9471d83c..183d3f44c2 100644
@@ -895,6 +895,9 @@ static void decode_fast_read_cmd(Flash *s)
     s->needed_bytes = get_addr_length(s);
     switch (get_man(s)) {
     /* Dummy cycles - modeled with bytes writes instead of bits */
+    case MAN_SST:
+        s->needed_bytes += 1;
+        break;
     case MAN_WINBOND:
         s->needed_bytes += 8;
         break;
--

2.25.1