summaryrefslogtreecommitdiff
path: root/hw/nios2/10m50_devboard.c
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2017-03-17 22:06:27 +0100
committerPeter Maydell <peter.maydell@linaro.org>2017-03-18 18:22:54 +0000
commitebedf0f9cd46b617df331eecc857c379d574ac62 (patch)
treebfc41134bcc92311063b4c71f170579c4f3b7dda /hw/nios2/10m50_devboard.c
parent96dd9c89c193a5ce829eff5ef6301a58032dcf63 (diff)
downloadqemu-ebedf0f9cd46b617df331eecc857c379d574ac62.tar.gz
nios2: iic: Convert CPU prop to qom link
Add a const qom link between the CPU and the IIC instead of passing the CPU link through a qom property. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: 20170317210627.23532-1-marex@denx.de Cc: Alexander Graf <agraf@suse.de> Cc: Chris Wulff <crwulff@gmail.com> Cc: Igor Mammedov <imammedo@redhat.com> Cc: Jeff Da Silva <jdasilva@altera.com> Cc: Ley Foon Tan <lftan@altera.com> Cc: Markus Armbruster <armbru@redhat.com> Cc: Richard Henderson <rth@twiddle.net> Cc: Sandra Loosemore <sandra@codesourcery.com> Cc: Yves Vandervennet <yvanderv@altera.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/nios2/10m50_devboard.c')
-rw-r--r--hw/nios2/10m50_devboard.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/nios2/10m50_devboard.c b/hw/nios2/10m50_devboard.c
index 62e5738b65..051be73e9a 100644
--- a/hw/nios2/10m50_devboard.c
+++ b/hw/nios2/10m50_devboard.c
@@ -82,7 +82,8 @@ static void nios2_10m50_ghrd_init(MachineState *machine)
/* Register: Internal Interrupt Controller (IIC) */
dev = qdev_create(NULL, "altera,iic");
- qdev_prop_set_ptr(dev, "cpu", cpu);
+ object_property_add_const_link(OBJECT(dev), "cpu", OBJECT(cpu),
+ &error_abort);
qdev_init_nofail(dev);
sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, cpu_irq[0]);
for (i = 0; i < 32; i++) {