From: fred.konrad@greensocs.com
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, crosthwaitepeter@gmail.com,
alistair.francis@xilinx.com, edgar.iglesias@xilinx.com,
hyunk@xilinx.com, guillaume.delbergue@greensocs.com,
mark.burton@greensocs.com, fred.konrad@greensocs.com
Subject: [Qemu-devel] [PATCH V8 9/9] arm: xlnx-zynqmp: Add xlnx-dp and xlnx-dpdma
Date: Mon, 6 Jun 2016 16:21:47 +0200 [thread overview]
Message-ID: <1465222907-19168-10-git-send-email-fred.konrad@greensocs.com> (raw)
In-Reply-To: <1465222907-19168-1-git-send-email-fred.konrad@greensocs.com>
From: KONRAD Frederic <fred.konrad@greensocs.com>
This adds the DP and the DPDMA to the Zynq MP platform.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Tested-By: Hyun Kwon <hyun.kwon@xilinx.com>
---
hw/arm/xlnx-zynqmp.c | 32 +++++++++++++++++++++++++++++++-
include/hw/arm/xlnx-zynqmp.h | 4 ++++
2 files changed, 35 insertions(+), 1 deletion(-)
diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c
index 4d504da..5069df2 100644
--- a/hw/arm/xlnx-zynqmp.c
+++ b/hw/arm/xlnx-zynqmp.c
@@ -36,6 +36,12 @@
#define SATA_ADDR 0xFD0C0000
#define SATA_NUM_PORTS 2
+#define DP_ADDR 0xfd4a0000
+#define DP_IRQ 113
+
+#define DPDMA_ADDR 0xfd4c0000
+#define DPDMA_IRQ 116
+
static const uint64_t gem_addr[XLNX_ZYNQMP_NUM_GEMS] = {
0xFF0B0000, 0xFF0C0000, 0xFF0D0000, 0xFF0E0000,
};
@@ -135,6 +141,12 @@ static void xlnx_zynqmp_init(Object *obj)
TYPE_XILINX_SPIPS);
qdev_set_parent_bus(DEVICE(&s->spi[i]), sysbus_get_default());
}
+
+ object_initialize(&s->dp, sizeof(s->dp), TYPE_XLNX_DP);
+ qdev_set_parent_bus(DEVICE(&s->dp), sysbus_get_default());
+
+ object_initialize(&s->dpdma, sizeof(s->dpdma), TYPE_XLNX_DPDMA);
+ qdev_set_parent_bus(DEVICE(&s->dpdma), sysbus_get_default());
}
static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp)
@@ -364,8 +376,26 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp)
object_property_add_alias(OBJECT(s), bus_name,
OBJECT(&s->spi[i]), "spi0",
&error_abort);
- g_free(bus_name);
+ g_free(bus_name);
+ }
+
+ object_property_set_bool(OBJECT(&s->dp), true, "realized", &err);
+ if (err) {
+ error_propagate(errp, err);
+ return;
+ }
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->dp), 0, DP_ADDR);
+ sysbus_connect_irq(SYS_BUS_DEVICE(&s->dp), 0, gic_spi[DP_IRQ]);
+
+ object_property_set_bool(OBJECT(&s->dpdma), true, "realized", &err);
+ if (err) {
+ error_propagate(errp, err);
+ return;
}
+ object_property_set_link(OBJECT(&s->dp), OBJECT(&s->dpdma), "dpdma",
+ &error_abort);
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->dpdma), 0, DPDMA_ADDR);
+ sysbus_connect_irq(SYS_BUS_DEVICE(&s->dpdma), 0, gic_spi[DPDMA_IRQ]);
}
static Property xlnx_zynqmp_props[] = {
diff --git a/include/hw/arm/xlnx-zynqmp.h b/include/hw/arm/xlnx-zynqmp.h
index 2332596..3067aaa 100644
--- a/include/hw/arm/xlnx-zynqmp.h
+++ b/include/hw/arm/xlnx-zynqmp.h
@@ -26,6 +26,8 @@
#include "hw/ide/ahci.h"
#include "hw/sd/sdhci.h"
#include "hw/ssi/xilinx_spips.h"
+#include "hw/dma/xlnx_dpdma.h"
+#include "hw/display/xlnx_dp.h"
#define TYPE_XLNX_ZYNQMP "xlnx,zynqmp"
#define XLNX_ZYNQMP(obj) OBJECT_CHECK(XlnxZynqMPState, (obj), \
@@ -81,6 +83,8 @@ typedef struct XlnxZynqMPState {
SysbusAHCIState sata;
SDHCIState sdhci[XLNX_ZYNQMP_NUM_SDHCI];
XilinxSPIPS spi[XLNX_ZYNQMP_NUM_SPIS];
+ XlnxDPState dp;
+ XlnxDPDMAState dpdma;
char *boot_cpu;
ARMCPU *boot_cpu_ptr;
--
1.8.3.1
prev parent reply other threads:[~2016-06-06 14:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-06 14:21 [Qemu-devel] [PATCH V8 0/9] Xilinx DisplayPort fred.konrad
2016-06-06 14:21 ` [Qemu-devel] [PATCH V8 1/9] i2cbus: remove unused dev field fred.konrad
2016-06-06 14:21 ` [Qemu-devel] [PATCH V8 2/9] i2c: implement broadcast write fred.konrad
2016-06-06 14:21 ` [Qemu-devel] [PATCH V8 3/9] i2c: Factor our send() and recv() common logic fred.konrad
2016-06-06 14:21 ` [Qemu-devel] [PATCH V8 4/9] introduce aux-bus fred.konrad
2016-06-06 18:41 ` Alistair Francis
2016-06-07 7:02 ` KONRAD Frederic
2016-06-07 20:21 ` Alistair Francis
2016-06-06 14:21 ` [Qemu-devel] [PATCH V8 5/9] introduce dpcd module fred.konrad
2016-06-06 14:21 ` [Qemu-devel] [PATCH V8 6/9] hw/i2c-ddc.c: Implement DDC I2C slave fred.konrad
2016-06-06 14:21 ` [Qemu-devel] [PATCH V8 7/9] introduce xlnx-dpdma fred.konrad
2016-06-06 14:21 ` [Qemu-devel] [PATCH V8 8/9] introduce xlnx-dp fred.konrad
2016-06-06 19:02 ` Alistair Francis
2016-06-06 14:21 ` fred.konrad [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1465222907-19168-10-git-send-email-fred.konrad@greensocs.com \
--to=fred.konrad@greensocs.com \
--cc=alistair.francis@xilinx.com \
--cc=crosthwaitepeter@gmail.com \
--cc=edgar.iglesias@xilinx.com \
--cc=guillaume.delbergue@greensocs.com \
--cc=hyunk@xilinx.com \
--cc=mark.burton@greensocs.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.