aboutsummaryrefslogtreecommitdiff
path: root/hw/i2c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2020-05-04 09:28:19 +0200
committerPeter Maydell <peter.maydell@linaro.org>2020-05-11 11:05:11 +0100
commit54595a5731ed7c94491008b0d3835ad3f786dbcc (patch)
tree0cda40c3a15b86634e05949c8cafa4f96d1885ca /hw/i2c
parentf4ab4f8e772700dcef1c99b75b0704bd5ca96b6a (diff)
downloadqemu-54595a5731ed7c94491008b0d3835ad3f786dbcc.zip
qemu-54595a5731ed7c94491008b0d3835ad3f786dbcc.tar.gz
qemu-54595a5731ed7c94491008b0d3835ad3f786dbcc.tar.bz2
hw/arm/nrf51: Add NRF51_PERIPHERAL_SIZE definition
On the NRF51 series, all peripherals have a fixed I/O size of 4KiB. Define NRF51_PERIPHERAL_SIZE and use it. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20200504072822.18799-2-f4bug@amsat.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/i2c')
-rw-r--r--hw/i2c/microbit_i2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/i2c/microbit_i2c.c b/hw/i2c/microbit_i2c.c
index 4661f05..8024739 100644
--- a/hw/i2c/microbit_i2c.c
+++ b/hw/i2c/microbit_i2c.c
@@ -100,7 +100,7 @@ static void microbit_i2c_realize(DeviceState *dev, Error **errp)
MicrobitI2CState *s = MICROBIT_I2C(dev);
memory_region_init_io(&s->iomem, OBJECT(s), &microbit_i2c_ops, s,
- "microbit.twi", NRF51_TWI_SIZE);
+ "microbit.twi", NRF51_PERIPHERAL_SIZE);
sysbus_init_mmio(sbd, &s->iomem);
}