summaryrefslogtreecommitdiff
path: root/hw/versatile_i2c.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2012-10-30 07:45:11 +0000
committerPeter Maydell <peter.maydell@linaro.org>2012-10-30 07:45:11 +0000
commit5170d661dc1a2a28e1a242f6814bea4dcc29ad23 (patch)
tree2b581de52436520205aa04da4feec3c799e60df4 /hw/versatile_i2c.c
parenta35d4e422328eeb770b7b0c08bb073e8940b158e (diff)
hw/versatile_i2c: Use LOG_GUEST_ERROR
Use LOG_GUEST_ERROR to report bad guest accesses. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/versatile_i2c.c')
-rw-r--r--hw/versatile_i2c.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/versatile_i2c.c b/hw/versatile_i2c.c
index 44e7e40f2f..ad71e9d92d 100644
--- a/hw/versatile_i2c.c
+++ b/hw/versatile_i2c.c
@@ -40,7 +40,8 @@ static uint64_t versatile_i2c_read(void *opaque, hwaddr offset,
if (offset == 0) {
return (s->out & 1) | (s->in << 1);
} else {
- hw_error("%s: Bad offset 0x%x\n", __func__, (int)offset);
+ qemu_log_mask(LOG_GUEST_ERROR,
+ "%s: Bad offset 0x%x\n", __func__, (int)offset);
return -1;
}
}
@@ -58,7 +59,8 @@ static void versatile_i2c_write(void *opaque, hwaddr offset,
s->out &= ~value;
break;
default:
- hw_error("%s: Bad offset 0x%x\n", __func__, (int)offset);
+ qemu_log_mask(LOG_GUEST_ERROR,
+ "%s: Bad offset 0x%x\n", __func__, (int)offset);
}
bitbang_i2c_set(s->bitbang, BITBANG_I2C_SCL, (s->out & 1) != 0);
s->in = bitbang_i2c_set(s->bitbang, BITBANG_I2C_SDA, (s->out & 2) != 0);