diff options
author | Jordan Justen <jordan.l.justen@intel.com> | 2011-04-03 13:16:26 -0700 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2011-04-09 18:32:13 +0200 |
commit | 5145b3d1cc4dc77d82086d99b0690a76e1073071 (patch) | |
tree | c908db2929e668316d7cb335b4b9e57462a478ae /hw/pflash_cfi02.c | |
parent | 29e5badadffe2cc70a911a95e258d1fb01f2db71 (diff) | |
download | qemu-5145b3d1cc4dc77d82086d99b0690a76e1073071.zip qemu-5145b3d1cc4dc77d82086d99b0690a76e1073071.tar.gz qemu-5145b3d1cc4dc77d82086d99b0690a76e1073071.tar.bz2 |
hw/pflash_cfi02: Fix lazy reset of ROMD mode
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.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'hw/pflash_cfi02.c')
-rw-r--r-- | 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 30c8aa4..370c5ee 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); |