aboutsummaryrefslogtreecommitdiff
path: root/hw/arm/xilinx_zynq.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2013-03-17 17:44:47 +0000
committerBlue Swirl <blauwirbel@gmail.com>2013-03-17 17:44:47 +0000
commit7fb7377594887db99a2100adcddf3bd6394ef540 (patch)
tree6ead329409c9687ae617eba42f876653c07c315c /hw/arm/xilinx_zynq.c
parent8b758d0568a986d58c254b3c209691c82e0f82a1 (diff)
parentf8b9fe249a706bfed61e0bb66c73394553696382 (diff)
Merge branch 'arm-devs.next' of git://git.linaro.org/people/pmaydell/qemu-arm
* 'arm-devs.next' of git://git.linaro.org/people/pmaydell/qemu-arm: xilinx_spips: QOM styling fixes xilinx_spips: Add missing dual-bus snoop commands xilinx_spips: Fix bus setup conditional check xilinx_spips: Set unused IRQs to NULL xilinx_zynq: added pl330 to machine model pl330: Initial version iov: Factor out hexdumper hw/vexpress: Set reset values for daughterboard oscillators hw/arm_sysctl: Implement SYS_CFG_OSC function hw/vexpress: Pass voltage sensor properties to sysctl device hw/arm_sysctl: Implement SYS_CFG_VOLT qdev: Implement (variable length) array properties hw/arm_sysctl: Convert from qdev init to instance_init hw/arm_sysctl: Implement SYS_CFG_DVIMODE as a no-op hw/arm_sysctl: Implement SYS_CFG_MUXFPGA writes as a no-op hw/arm_sysctl: Handle SYS_CFGCTRL in a more structured way hw/vexpress: Pass proc_id via VEDBoardInfo
Diffstat (limited to 'hw/arm/xilinx_zynq.c')
-rw-r--r--hw/arm/xilinx_zynq.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c
index f78c47e43e..6f362865f9 100644
--- a/hw/arm/xilinx_zynq.c
+++ b/hw/arm/xilinx_zynq.c
@@ -35,6 +35,10 @@
#define IRQ_OFFSET 32 /* pic interrupts start from index 32 */
+static const int dma_irqs[8] = {
+ 46, 47, 48, 49, 72, 73, 74, 75
+};
+
static struct arm_boot_info zynq_binfo = {};
static void gem_init(NICInfo *nd, uint32_t base, qemu_irq irq)
@@ -196,6 +200,26 @@ static void zynq_init(QEMUMachineInitArgs *args)
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, 0xE0101000);
sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, pic[79-IRQ_OFFSET]);
+ dev = qdev_create(NULL, "pl330");
+ qdev_prop_set_uint8(dev, "num_chnls", 8);
+ qdev_prop_set_uint8(dev, "num_periph_req", 4);
+ qdev_prop_set_uint8(dev, "num_events", 16);
+
+ qdev_prop_set_uint8(dev, "data_width", 64);
+ qdev_prop_set_uint8(dev, "wr_cap", 8);
+ qdev_prop_set_uint8(dev, "wr_q_dep", 16);
+ qdev_prop_set_uint8(dev, "rd_cap", 8);
+ qdev_prop_set_uint8(dev, "rd_q_dep", 16);
+ qdev_prop_set_uint16(dev, "data_buffer_dep", 256);
+
+ qdev_init_nofail(dev);
+ busdev = SYS_BUS_DEVICE(dev);
+ sysbus_mmio_map(busdev, 0, 0xF8003000);
+ sysbus_connect_irq(busdev, 0, pic[45-IRQ_OFFSET]); /* abort irq line */
+ for (n = 0; n < 8; ++n) { /* event irqs */
+ sysbus_connect_irq(busdev, n + 1, pic[dma_irqs[n] - IRQ_OFFSET]);
+ }
+
zynq_binfo.ram_size = ram_size;
zynq_binfo.kernel_filename = kernel_filename;
zynq_binfo.kernel_cmdline = kernel_cmdline;