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>
This commit is contained in:
		
							parent
							
								
									29e5badadf
								
							
						
					
					
						commit
						5145b3d1cc
					
				@ -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);
 | 
					    DPRINTF("%s: offset " TARGET_FMT_plx "\n", __func__, offset);
 | 
				
			||||||
    ret = -1;
 | 
					    ret = -1;
 | 
				
			||||||
    if (pfl->rom_mode) {
 | 
					    if (!pfl->rom_mode) {
 | 
				
			||||||
        /* Lazy reset of to ROMD mode */
 | 
					        /* Lazy reset of to ROMD mode */
 | 
				
			||||||
        if (pfl->wcycle == 0)
 | 
					        if (pfl->wcycle == 0)
 | 
				
			||||||
            pflash_register_memory(pfl, 1);
 | 
					            pflash_register_memory(pfl, 1);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user