2 /* OPB Interrupt Controller. */
3 qemu_irq
*microblaze_pic_init_cpu(CPUState
*env
);
5 static inline DeviceState
*
6 xilinx_intc_create(target_phys_addr_t base
, qemu_irq irq
, int kind_of_intr
)
10 dev
= qdev_create(NULL
, "xilinx,intc");
11 qdev_prop_set_uint32(dev
, "kind-of-intr", kind_of_intr
);
13 sysbus_mmio_map(sysbus_from_qdev(dev
), 0, base
);
14 sysbus_connect_irq(sysbus_from_qdev(dev
), 0, irq
);
18 /* OPB Timer/Counter. */
19 static inline DeviceState
*
20 xilinx_timer_create(target_phys_addr_t base
, qemu_irq irq
, int nr
, int freq
)
24 dev
= qdev_create(NULL
, "xilinx,timer");
25 qdev_prop_set_uint32(dev
, "nr-timers", nr
);
26 qdev_prop_set_uint32(dev
, "frequency", freq
);
28 sysbus_mmio_map(sysbus_from_qdev(dev
), 0, base
);
29 sysbus_connect_irq(sysbus_from_qdev(dev
), 0, irq
);
33 /* XPS Ethernet Lite MAC. */
34 static inline DeviceState
*
35 xilinx_ethlite_create(NICInfo
*nd
, target_phys_addr_t base
, qemu_irq irq
,
36 int txpingpong
, int rxpingpong
)
40 qemu_check_nic_model(nd
, "xilinx-ethlite");
42 dev
= qdev_create(NULL
, "xilinx,ethlite");
44 qdev_prop_set_uint32(dev
, "txpingpong", txpingpong
);
45 qdev_prop_set_uint32(dev
, "rxpingpong", rxpingpong
);
47 sysbus_mmio_map(sysbus_from_qdev(dev
), 0, base
);
48 sysbus_connect_irq(sysbus_from_qdev(dev
), 0, irq
);