qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: jordan.l.justen@intel.com
To: qemu-devel@nongnu.org
Cc: Jordan Justen <jordan.l.justen@intel.com>, jljusten@gmail.com
Subject: [Qemu-devel] [PATCH] hw/pflash_cfi02: Fix lazy reset of ROMD mode
Date: Mon, 14 Mar 2011 14:10:58 -0700	[thread overview]
Message-ID: <1300137058-16576-1-git-send-email-jordan.l.justen@intel.com> (raw)

From: Jordan Justen <jordan.l.justen@intel.com>

When checking pfl->rom_mode for when to lazily reenter ROMD mode,
the value was check was the opposite of what it should have been.
This prevent the part from returning to ROMD mode after a write
was made to the CFI rom region.
---
 hw/pflash_cfi02.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/pflash_cfi02.c b/hw/pflash_cfi02.c
index 3594a36..a936cdb 100644
--- a/hw/pflash_cfi02.c
+++ b/hw/pflash_cfi02.c
@@ -112,7 +112,7 @@ static uint32_t pflash_read (pflash_t *pfl, target_phys_addr_t offset,
 
     DPRINTF("%s: offset " TARGET_FMT_plx "\n", __func__, offset);
     ret = -1;
-    if (pfl->rom_mode) {
+    if (!pfl->rom_mode) {
         /* Lazy reset of to ROMD mode */
         if (pfl->wcycle == 0)
             pflash_register_memory(pfl, 1);
-- 
1.7.1

             reply	other threads:[~2011-03-14 21:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-14 21:10 jordan.l.justen [this message]
2011-04-03 19:51 ` [Qemu-devel] [PATCH] hw/pflash_cfi02: Fix lazy reset of ROMD mode Aurelien Jarno
  -- strict thread matches above, loose matches on Subject: below --
2011-04-03 20:16 Jordan Justen
2011-04-09 16:35 ` Aurelien Jarno

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=1300137058-16576-1-git-send-email-jordan.l.justen@intel.com \
    --to=jordan.l.justen@intel.com \
    --cc=jljusten@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 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).