hw/pflash_cfi02: Fix lazy reset of ROMD mode
PATCH 1/1 hw/pflash_cfi02: Fix lazy reset of ROMD mode
From: Jordan Justen <[email protected]>
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(-)
hw/pflash_cfi02.c +1 -1
@@ -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 );
Signature · 1 line
1.7.1
Quoted 15 lines · On Mon, Mar 14, 2011 at 02:10:58PM -0700, [email protected] wrote:
From: Jordan Justen <[email protected]>
When checking
pfl->rom_modefor 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(-)hw/pflash_cfi02.c +0
-0
hw/pflash_cfi02.c static uint32_t pflash_read (pflash_t *pfl, target_phys_addr_t offset, · line 118
Quoted 8 lines
hw/pflash_cfi02.c +1
-1@@ -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 );
The patch looks correct, but is missing a Signed-off-by: line. Can you please resend it?
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net