提交 e4a6540d 编写于 作者: P Peter Maydell

hw/arm/xilinx_zynq: Don't use arm_pic_init_cpu()

Drop the now-deprecated arm_pic_init_cpu() in favour of directly
getting the IRQ line from the ARMCPU object.
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
Message-id: 1375977856-25046-14-git-send-email-peter.maydell@linaro.org
上级 fe9120a5
...@@ -108,11 +108,9 @@ static void zynq_init(QEMUMachineInitArgs *args) ...@@ -108,11 +108,9 @@ static void zynq_init(QEMUMachineInitArgs *args)
MemoryRegion *ocm_ram = g_new(MemoryRegion, 1); MemoryRegion *ocm_ram = g_new(MemoryRegion, 1);
DeviceState *dev; DeviceState *dev;
SysBusDevice *busdev; SysBusDevice *busdev;
qemu_irq *irqp;
qemu_irq pic[64]; qemu_irq pic[64];
NICInfo *nd; NICInfo *nd;
int n; int n;
qemu_irq cpu_irq;
if (!cpu_model) { if (!cpu_model) {
cpu_model = "cortex-a9"; cpu_model = "cortex-a9";
...@@ -123,8 +121,6 @@ static void zynq_init(QEMUMachineInitArgs *args) ...@@ -123,8 +121,6 @@ static void zynq_init(QEMUMachineInitArgs *args)
fprintf(stderr, "Unable to find CPU definition\n"); fprintf(stderr, "Unable to find CPU definition\n");
exit(1); exit(1);
} }
irqp = arm_pic_init_cpu(cpu);
cpu_irq = irqp[ARM_PIC_CPU_IRQ];
/* max 2GB ram */ /* max 2GB ram */
if (ram_size > 0x80000000) { if (ram_size > 0x80000000) {
...@@ -159,7 +155,8 @@ static void zynq_init(QEMUMachineInitArgs *args) ...@@ -159,7 +155,8 @@ static void zynq_init(QEMUMachineInitArgs *args)
qdev_init_nofail(dev); qdev_init_nofail(dev);
busdev = SYS_BUS_DEVICE(dev); busdev = SYS_BUS_DEVICE(dev);
sysbus_mmio_map(busdev, 0, 0xF8F00000); sysbus_mmio_map(busdev, 0, 0xF8F00000);
sysbus_connect_irq(busdev, 0, cpu_irq); sysbus_connect_irq(busdev, 0,
qdev_get_gpio_in(DEVICE(cpu), ARM_CPU_IRQ));
for (n = 0; n < 64; n++) { for (n = 0; n < 64; n++) {
pic[n] = qdev_get_gpio_in(dev, n); pic[n] = qdev_get_gpio_in(dev, n);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册