aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/bitbang_i2c.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/bitbang_i2c.c b/hw/bitbang_i2c.c
index 431359d615..71dd5951e9 100644
--- a/hw/bitbang_i2c.c
+++ b/hw/bitbang_i2c.c
@@ -184,6 +184,7 @@ bitbang_i2c_interface *bitbang_i2c_init(i2c_bus *bus)
/* GPIO interface. */
typedef struct {
SysBusDevice busdev;
+ MemoryRegion dummy_iomem;
bitbang_i2c_interface *bitbang;
int last_level;
qemu_irq out;
@@ -205,7 +206,8 @@ static int gpio_i2c_init(SysBusDevice *dev)
GPIOI2CState *s = FROM_SYSBUS(GPIOI2CState, dev);
i2c_bus *bus;
- sysbus_init_mmio(dev, 0x0, 0);
+ memory_region_init(&s->dummy_iomem, "gpio_i2c", 0);
+ sysbus_init_mmio_region(dev, &s->dummy_iomem);
bus = i2c_init_bus(&dev->qdev, "i2c");
s->bitbang = bitbang_i2c_init(bus);