mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-15 13:51:24 +00:00
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>
This commit is contained in:
parent
a35d4e4223
commit
5170d661dc
@ -40,7 +40,8 @@ static uint64_t versatile_i2c_read(void *opaque, hwaddr offset,
|
|||||||
if (offset == 0) {
|
if (offset == 0) {
|
||||||
return (s->out & 1) | (s->in << 1);
|
return (s->out & 1) | (s->in << 1);
|
||||||
} else {
|
} 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;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -58,7 +59,8 @@ static void versatile_i2c_write(void *opaque, hwaddr offset,
|
|||||||
s->out &= ~value;
|
s->out &= ~value;
|
||||||
break;
|
break;
|
||||||
default:
|
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);
|
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);
|
s->in = bitbang_i2c_set(s->bitbang, BITBANG_I2C_SDA, (s->out & 2) != 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user