aboutsummaryrefslogtreecommitdiff
path: root/hw/misc
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2018-08-29 17:59:07 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2018-08-30 10:42:18 +1000
commit5c8e3d17eda655ee7644a41cc0df646c7280ab2f (patch)
tree354ce4069e3c567908594ec042b44a8e578b4c4b /hw/misc
parentbf31c56f096ae11367c6ba19a47387d008791996 (diff)
downloadqemu-5c8e3d17eda655ee7644a41cc0df646c7280ab2f.zip
qemu-5c8e3d17eda655ee7644a41cc0df646c7280ab2f.tar.gz
qemu-5c8e3d17eda655ee7644a41cc0df646c7280ab2f.tar.bz2
macio: add addr property to macio IDE object
This contains the offset of the IDE controller within the macio address space and is required to allow the address to be included within the fw path. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/misc')
-rw-r--r--hw/misc/macio/macio.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c
index 229bfdd..94da85c 100644
--- a/hw/misc/macio/macio.c
+++ b/hw/misc/macio/macio.c
@@ -219,10 +219,11 @@ static void macio_init_ide(MacIOState *s, MACIOIDEState *ide, size_t ide_size,
int index)
{
gchar *name = g_strdup_printf("ide[%i]", index);
+ uint32_t addr = 0x1f000 + ((index + 1) * 0x1000);
macio_init_child_obj(s, name, ide, ide_size, TYPE_MACIO_IDE);
- memory_region_add_subregion(&s->bar, 0x1f000 + ((index + 1) * 0x1000),
- &ide->mem);
+ qdev_prop_set_uint32(DEVICE(ide), "addr", addr);
+ memory_region_add_subregion(&s->bar, addr, &ide->mem);
g_free(name);
}