Skip to contentSkip to conversation

m25p80: Correct the at25128a/at25256a eeproms size

PATCH In review Philippe Mathieu-Daudé 3 participants 4 messages Apr 15, 2018 – May 9, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 m25p80: Correct the at25128a/at25256a eeproms size

Quoted 1 line

From the datasheet (3368J–SEEPR) description:

    The AT25128A/256A provides 131,072/262,144 bits of serial
    electrically-erasable programmable read only memory (EEPROM)
    organized as 16,384/32,768 words of 8 bits each.

However QEMU models the flash size in bytes.
Correct the at25128a/at25256a entries to reflect the datasheet size.

---
This is not a regression, so can now wait for 2.13.

 hw/block/m25p80.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/block/m25p80.c +2 -2
index b49c8e9caa..d0b9fbfc50 100644
@@ -196,8 +196,8 @@ static const FlashPartInfo known_devices[] = {
     /* Atmel EEPROMS - it is assumed, that don't care bit in command
      * is set to 0. Block protection is not supported.
      */
-    { INFO("at25128a-nonjedec", 0x0,     0,         1, 131072, EEPROM) },
-    { INFO("at25256a-nonjedec", 0x0,     0,         1, 262144, EEPROM) },
+    { INFO("at25128a-nonjedec", 0x0,     0,         1, 16384, EEPROM) },
+    { INFO("at25256a-nonjedec", 0x0,     0,         1, 32768, EEPROM) },
 
     /* EON -- en25xxx */
     { INFO("en25f32",     0x1c3116,      0,  64 << 10,  64, ER_4K) },
Signature · 1 line
2.17.0
Reviewed-by on v1 1/1
#1 lore raw

W dniu 15.04.2018 o 22:31, Philippe Mathieu-Daudé pisze:

Quoted 9 lines
Quoted 1 line

From the datasheet (3368J–SEEPR) description:

     The AT25128A/256A provides 131,072/262,144 bits of serial
     electrically-erasable programmable read only memory (EEPROM)
     organized as 16,384/32,768 words of 8 bits each.

However QEMU models the flash size in bytes.
Correct the at25128a/at25256a entries to reflect the datasheet size.

Quoted 11 lines

---
This is not a regression, so can now wait for 2.13.

  hw/block/m25p80.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
hw/block/m25p80.c +0 -0
index b49c8e9caa..d0b9fbfc50 100644

hw/block/m25p80.c static const FlashPartInfo known_devices[] = { · line 200

Quoted 7 lines
hw/block/m25p80.c +2 -2
@@ -196,8 +196,8 @@ static const FlashPartInfo known_devices[] = {
      /* Atmel EEPROMS - it is assumed, that don't care bit in command
       * is set to 0. Block protection is not supported.
       */
-    { INFO("at25128a-nonjedec", 0x0,     0,         1, 131072, EEPROM) },
-    { INFO("at25256a-nonjedec", 0x0,     0,         1, 262144, EEPROM) },
+    { INFO("at25128a-nonjedec", 0x0,     0,         1, 16384, EEPROM) },
+    { INFO("at25256a-nonjedec", 0x0,     0,         1, 32768, EEPROM) },

Thanks!
Marcin

Quoted 3 lines
hw/block/m25p80.c +0 -0
      /* EON -- en25xxx */
      { INFO("en25f32",     0x1c3116,      0,  64 << 10,  64, ER_4K) },
Reviewed-by
#2 lore raw
Quoted 7 lines · mar.krzeminski

W dniu 15.04.2018 o 22:31, Philippe Mathieu-Daudé pisze:

Quoted 6 lines
Quoted 2 lines

From the datasheet (3368J–SEEPR) description:

     The AT25128A/256A provides 131,072/262,144 bits of serial
     electrically-erasable programmable read only memory (EEPROM)
     organized as 16,384/32,768 words of 8 bits each.
Quoted 6 lines
Quoted 4 lines

However QEMU models the flash size in bytes.
Correct the at25128a/at25256a entries to reflect the datasheet size.

Alistair

Quoted 28 lines
Quoted 12 lines

---
This is not a regression, so can now wait for 2.13.

  hw/block/m25p80.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
hw/block/m25p80.c +0 -0
index b49c8e9caa..d0b9fbfc50 100644

hw/block/m25p80.c static const FlashPartInfo known_devices[] = { · line 200

Quoted 7 lines
hw/block/m25p80.c +2 -2
@@ -196,8 +196,8 @@ static const FlashPartInfo known_devices[] = {
      /* Atmel EEPROMS - it is assumed, that don't care bit in command
       * is set to 0. Block protection is not supported.
       */
-    { INFO("at25128a-nonjedec", 0x0,     0,         1, 131072, EEPROM) },
-    { INFO("at25256a-nonjedec", 0x0,     0,         1, 262144, EEPROM) },
+    { INFO("at25128a-nonjedec", 0x0,     0,         1, 16384, EEPROM) },
+    { INFO("at25256a-nonjedec", 0x0,     0,         1, 32768, EEPROM) },

Thanks!
Marcin

Quoted 2 lines
hw/block/m25p80.c +0 -0
        /* EON -- en25xxx */
      { INFO("en25f32",     0x1c3116,      0,  64 << 10,  64, ER_4K) },
#3 lore raw

Hi Peter, Kevin,

Quoted 12 lines · Alistair Francis
Quoted 10 lines · mar.krzeminski

W dniu 15.04.2018 o 22:31, Philippe Mathieu-Daudé pisze:

Quoted 9 lines
Quoted 2 lines

From the datasheet (3368J–SEEPR) description:

     The AT25128A/256A provides 131,072/262,144 bits of serial
     electrically-erasable programmable read only memory (EEPROM)
     organized as 16,384/32,768 words of 8 bits each.

However QEMU models the flash size in bytes.
Correct the at25128a/at25256a entries to reflect the datasheet size.

Quoted 36 lines
Quoted 3 lines
Quoted 1 line

Alistair

Quoted 28 lines
Quoted 12 lines

---
This is not a regression, so can now wait for 2.13.

  hw/block/m25p80.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
hw/block/m25p80.c +0 -0
index b49c8e9caa..d0b9fbfc50 100644

hw/block/m25p80.c static const FlashPartInfo known_devices[] = { · line 200

Quoted 7 lines
hw/block/m25p80.c +2 -2
@@ -196,8 +196,8 @@ static const FlashPartInfo known_devices[] = {
      /* Atmel EEPROMS - it is assumed, that don't care bit in command
       * is set to 0. Block protection is not supported.
       */
-    { INFO("at25128a-nonjedec", 0x0,     0,         1, 131072, EEPROM) },
-    { INFO("at25256a-nonjedec", 0x0,     0,         1, 262144, EEPROM) },
+    { INFO("at25128a-nonjedec", 0x0,     0,         1, 16384, EEPROM) },
+    { INFO("at25256a-nonjedec", 0x0,     0,         1, 32768, EEPROM) },

Thanks!
Marcin

Quoted 2 lines
hw/block/m25p80.c +0 -0
        /* EON -- en25xxx */
      { INFO("en25f32",     0x1c3116,      0,  64 << 10,  64, ER_4K) },

Can this patch goes via the ARM or Block tree?

Thanks,

Phil.