diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2013-05-07 19:04:25 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-05-24 18:42:46 +0200 |
commit | 5f9a5ea1c0a8391033e7d33abd335dd804a1001a (patch) | |
tree | d2c1c997858117b0156b80d54a31280d25c886b3 /hw/block | |
parent | 4b81126e3399bfbcc47a4d696902c93401169f72 (diff) | |
download | qemu-5f9a5ea1c0a8391033e7d33abd335dd804a1001a.zip qemu-5f9a5ea1c0a8391033e7d33abd335dd804a1001a.tar.gz qemu-5f9a5ea1c0a8391033e7d33abd335dd804a1001a.tar.bz2 |
memory: Rename readable flag to romd_mode
"Readable" is a very unfortunate name for this flag because even a
rom_device region will always be readable from the guest POV. What
differs is the mapping, just like the comments had to explain already.
Also, readable could currently be understood as being a generic region
flag, but it only applies to rom_device regions.
So rename the flag and the function to modify it after the original term
"ROMD" which could also be interpreted as "ROM direct", i.e. ROM mode
with direct access. In any case, the scope of the flag is clearer now.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/block')
-rw-r--r-- | hw/block/pflash_cfi01.c | 6 | ||||
-rw-r--r-- | hw/block/pflash_cfi02.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index 3ff20e0..63d7c99 100644 --- a/hw/block/pflash_cfi01.c +++ b/hw/block/pflash_cfi01.c @@ -105,7 +105,7 @@ static void pflash_timer (void *opaque) DPRINTF("%s: command %02x done\n", __func__, pfl->cmd); /* Reset flash */ pfl->status ^= 0x80; - memory_region_rom_device_set_readable(&pfl->mem, true); + memory_region_rom_device_set_romd(&pfl->mem, true); pfl->wcycle = 0; pfl->cmd = 0; } @@ -281,7 +281,7 @@ static void pflash_write(pflash_t *pfl, hwaddr offset, if (!pfl->wcycle) { /* Set the device in I/O access mode */ - memory_region_rom_device_set_readable(&pfl->mem, false); + memory_region_rom_device_set_romd(&pfl->mem, false); } switch (pfl->wcycle) { @@ -458,7 +458,7 @@ static void pflash_write(pflash_t *pfl, hwaddr offset, "\n", __func__, offset, pfl->wcycle, pfl->cmd, value); reset_flash: - memory_region_rom_device_set_readable(&pfl->mem, true); + memory_region_rom_device_set_romd(&pfl->mem, true); pfl->wcycle = 0; pfl->cmd = 0; diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c index 9a7fa70..5f25246 100644 --- a/hw/block/pflash_cfi02.c +++ b/hw/block/pflash_cfi02.c @@ -111,7 +111,7 @@ static void pflash_setup_mappings(pflash_t *pfl) static void pflash_register_memory(pflash_t *pfl, int rom_mode) { - memory_region_rom_device_set_readable(&pfl->orig_mem, rom_mode); + memory_region_rom_device_set_romd(&pfl->orig_mem, rom_mode); pfl->rom_mode = rom_mode; } |