qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-arm] [PATCH 2/3] hw/dma/pl330: Factor out pl330_init() from hw


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-arm] [PATCH 2/3] hw/dma/pl330: Factor out pl330_init() from hw/arm/xilinx_zynq.c
Date: Tue, 30 Oct 2018 12:28:06 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

On 30/10/18 10:36, Peter Maydell wrote:
On 29 October 2018 at 23:20, Philippe Mathieu-Daudé <address@hidden> wrote:
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
  MAINTAINERS            |  1 +
  hw/arm/xilinx_zynq.c   | 18 ++----------------
  hw/dma/pl330.c         |  2 +-
  include/hw/dma/pl330.h | 41 +++++++++++++++++++++++++++++++++++++++++
  4 files changed, 45 insertions(+), 17 deletions(-)
  create mode 100644 include/hw/dma/pl330.h

+static inline void pl330_init(uint32_t base, qemu_irq irq, int nreq)
+{
+    SysBusDevice *busdev;
+    DeviceState *dev;
+
+    dev = qdev_create(NULL, TYPE_PL330);
+    qdev_prop_set_uint8(dev, "num_chnls", 8);
+    qdev_prop_set_uint8(dev, "num_periph_req", nreq);
+    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);

These are the settings the Xilinx board uses, but are
they really the settings every SoC that has a PL330 will use ?

Except "num_periph_req", all are pl330_properties defaults.


thanks
-- PMM




reply via email to

[Prev in Thread] Current Thread [Next in Thread]