diff --git a/hw/pflash_cfi01.c b/hw/pflash_cfi01.c index b0c7b4ca321be97f5810879ebadf63e8b39be01b..d9e30d99422c4b103f8da7a4d6c4c5b106e4a12f 100644 --- a/hw/pflash_cfi01.c +++ b/hw/pflash_cfi01.c @@ -247,8 +247,10 @@ static void pflash_write(pflash_t *pfl, target_phys_addr_t offset, DPRINTF("%s: writing offset " TARGET_FMT_plx " value %08x width %d wcycle 0x%x\n", __func__, offset, value, width, pfl->wcycle); - /* Set the device in I/O access mode */ - cpu_register_physical_memory(pfl->base, pfl->total_len, pfl->fl_mem); + if (!pfl->wcycle) { + /* Set the device in I/O access mode */ + cpu_register_physical_memory(pfl->base, pfl->total_len, pfl->fl_mem); + } switch (pfl->wcycle) { case 0: