diff options
author | Peter Crosthwaite <peter.crosthwaite@xilinx.com> | 2013-04-16 10:33:32 +1000 |
---|---|---|
committer | Edgar E. Iglesias <edgar.iglesias@gmail.com> | 2013-04-16 10:25:34 +0200 |
commit | e9711b4d52ed07b9b754f9aa10b4a8c741815d0a (patch) | |
tree | fae154902290cbc33e5ff5bacc4c1ce3167183bb /hw/block | |
parent | 3bec0c7d461a2f0139d60e959a80641487835d5a (diff) | |
download | qemu-e9711b4d52ed07b9b754f9aa10b4a8c741815d0a.zip qemu-e9711b4d52ed07b9b754f9aa10b4a8c741815d0a.tar.gz qemu-e9711b4d52ed07b9b754f9aa10b4a8c741815d0a.tar.bz2 |
m25p80: Convert guest errors to LOG_GUEST_ERROR
Some of the debug printfs in m25p80 are really guest errors.
Changed over to qemu_log_mask(LOG_GUEST_ERROR accordingly.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Diffstat (limited to 'hw/block')
-rw-r--r-- | hw/block/m25p80.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index c395e98..44fc428 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c @@ -319,11 +319,12 @@ static void flash_erase(Flash *s, int offset, FlashCMD cmd) DB_PRINT("offset = %#x, len = %d\n", offset, len); if ((s->pi->flags & capa_to_assert) != capa_to_assert) { - hw_error("m25p80: %d erase size not supported by device\n", len); + qemu_log_mask(LOG_GUEST_ERROR, "M25P80: %d erase size not supported by" + " device\n", len); } if (!s->write_enable) { - DB_PRINT("erase with write protect!\n"); + qemu_log_mask(LOG_GUEST_ERROR, "M25P80: erase with write protect!\n"); return; } memset(s->storage + offset, 0xff, len); @@ -345,7 +346,7 @@ void flash_write8(Flash *s, uint64_t addr, uint8_t data) uint8_t prev = s->storage[s->cur_addr]; if (!s->write_enable) { - DB_PRINT("write with write protect!\n"); + qemu_log_mask(LOG_GUEST_ERROR, "M25P80: write with write protect!\n"); } if ((prev ^ data) & data) { @@ -503,13 +504,14 @@ static void decode_new_cmd(Flash *s, uint32_t value) DB_PRINT("chip erase\n"); flash_erase(s, 0, BULK_ERASE); } else { - DB_PRINT("chip erase with write protect!\n"); + qemu_log_mask(LOG_GUEST_ERROR, "M25P80: chip erase with write " + "protect!\n"); } break; case NOP: break; default: - DB_PRINT("Unknown cmd %x\n", value); + qemu_log_mask(LOG_GUEST_ERROR, "M25P80: Unknown cmd %x\n", value); break; } } |