qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: "Marcin Krzemiński" <mar.krzeminski@gmail.com>,
	"Peter Crosthwaite" <crosthwaite.peter@gmail.com>,
	"Alistair Francis" <alistair@alistair23.me>,
	"Kevin Wolf" <kwolf@redhat.com>, "Max Reitz" <mreitz@redhat.com>
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: [Qemu-devel] [PATCH for-2.12?] m25p80: Correct the at25128a/at25256a eeproms size
Date: Sun, 15 Apr 2018 17:31:06 -0300	[thread overview]
Message-ID: <20180415203106.24333-1-f4bug@amsat.org> (raw)

>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.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
This is not a regression, so can now wait for 2.13.

 hw/block/m25p80.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c
index b49c8e9caa..d0b9fbfc50 100644
--- a/hw/block/m25p80.c
+++ b/hw/block/m25p80.c
@@ -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) },
-- 
2.17.0

             reply	other threads:[~2018-04-15 20:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-15 20:31 Philippe Mathieu-Daudé [this message]
2018-04-16 16:05 ` [Qemu-devel] [PATCH for-2.12?] m25p80: Correct the at25128a/at25256a eeproms size mar.krzeminski
2018-04-16 20:52   ` Alistair Francis
2018-05-09  3:50     ` Philippe Mathieu-Daudé

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=20180415203106.24333-1-f4bug@amsat.org \
    --to=f4bug@amsat.org \
    --cc=alistair@alistair23.me \
    --cc=crosthwaite.peter@gmail.com \
    --cc=kwolf@redhat.com \
    --cc=mar.krzeminski@gmail.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).