From 29873712e6f82d4dafd7ab8cff930136f92a0e06 Mon Sep 17 00:00:00 2001 From: Peter Crosthwaite Date: Tue, 25 Feb 2014 16:40:39 -0800 Subject: xilinx: Inline usages of xilinx_timer_create() Inline these usages. Converts these init to at least a semi-recent QOM styling. Signed-off-by: Peter Crosthwaite Signed-off-by: Edgar E. Iglesias --- hw/ppc/virtex_ml507.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'hw/ppc/virtex_ml507.c') diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c index 1e2f532a7d..4dffb961c1 100644 --- a/hw/ppc/virtex_ml507.c +++ b/hw/ppc/virtex_ml507.c @@ -231,7 +231,12 @@ static void virtex_init(QEMUMachineInitArgs *args) 115200, serial_hds[0], DEVICE_LITTLE_ENDIAN); /* 2 timers at irq 2 @ 62 Mhz. */ - xilinx_timer_create(0x83c00000, irq[3], 0, 62 * 1000000); + dev = qdev_create(NULL, "xlnx.xps-timer"); + qdev_prop_set_uint32(dev, "one-timer-only", 0); + qdev_prop_set_uint32(dev, "clock-frequency", 62 * 1000000); + qdev_init_nofail(dev); + sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, TIMER_BASEADDR); + sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, irq[TIMER_IRQ]); if (kernel_filename) { uint64_t entry, low, high; -- cgit v1.2.1