From: fred.konrad@greensocs.com
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, peter.crosthwaite@xilinx.com,
hyunk@xilinx.com, mark.burton@greensocs.com,
guillaume.delbergue@greensocs.com, fred.konrad@greensocs.com
Subject: [Qemu-devel] [PATCH V2 7/7] arm: xlnx-zynqmp: Add DisplayPort and DPDMA.
Date: Mon, 15 Jun 2015 17:15:43 +0200 [thread overview]
Message-ID: <1434381343-7583-8-git-send-email-fred.konrad@greensocs.com> (raw)
In-Reply-To: <1434381343-7583-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.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
---
hw/arm/xlnx-zynqmp.c | 20 ++++++++++++++++++++
include/hw/arm/xlnx-zynqmp.h | 4 ++++
2 files changed, 24 insertions(+)
diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c
index 6b01965..c29046a 100644
--- a/hw/arm/xlnx-zynqmp.c
+++ b/hw/arm/xlnx-zynqmp.c
@@ -28,6 +28,12 @@
#define GIC_DIST_ADDR 0xf9010000
#define GIC_CPU_ADDR 0xf9020000
+#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,
};
@@ -83,6 +89,11 @@ static void xlnx_zynqmp_init(Object *obj)
object_initialize(&s->uart[i], sizeof(s->uart[i]), TYPE_CADENCE_UART);
qdev_set_parent_bus(DEVICE(&s->uart[i]), sysbus_get_default());
}
+
+ object_initialize(&s->dp, sizeof(s->dp), TYPE_XILINX_DP);
+ qdev_set_parent_bus(DEVICE(&s->dp), sysbus_get_default());
+ object_initialize(&s->dpdma, sizeof(s->dpdma), TYPE_XILINX_DPDMA);
+ qdev_set_parent_bus(DEVICE(&s->dpdma), sysbus_get_default());
}
static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp)
@@ -186,6 +197,15 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp)
sysbus_connect_irq(SYS_BUS_DEVICE(&s->uart[i]), 0,
gic_spi[uart_intr[i]]);
}
+
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->dp), 0, DP_ADDR);
+ sysbus_connect_irq(SYS_BUS_DEVICE(&s->dp), 0, gic_spi[DP_IRQ]);
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->dpdma), 0, DPDMA_ADDR);
+ sysbus_connect_irq(SYS_BUS_DEVICE(&s->dpdma), 0, gic_spi[DPDMA_IRQ]);
+ object_property_set_bool(OBJECT(&s->dp), true, "realized", &err);
+ object_property_set_bool(OBJECT(&s->dpdma), true, "realized", &err);
+ object_property_set_link(OBJECT(&s->dp), OBJECT(&s->dpdma), "dpdma",
+ &error_abort);
}
static void xlnx_zynqmp_class_init(ObjectClass *oc, void *data)
diff --git a/include/hw/arm/xlnx-zynqmp.h b/include/hw/arm/xlnx-zynqmp.h
index 79c2b0b..66ec010 100644
--- a/include/hw/arm/xlnx-zynqmp.h
+++ b/include/hw/arm/xlnx-zynqmp.h
@@ -22,6 +22,8 @@
#include "hw/intc/arm_gic.h"
#include "hw/net/cadence_gem.h"
#include "hw/char/cadence_uart.h"
+#include "hw/dma/xilinx_dpdma.h"
+#include "hw/display/xilinx_dp.h"
#define TYPE_XLNX_ZYNQMP "xlnx,zynqmp"
#define XLNX_ZYNQMP(obj) OBJECT_CHECK(XlnxZynqMPState, (obj), \
@@ -52,6 +54,8 @@ typedef struct XlnxZynqMPState {
MemoryRegion gic_mr[XLNX_ZYNQMP_GIC_REGIONS][XLNX_ZYNQMP_GIC_ALIASES];
CadenceGEMState gem[XLNX_ZYNQMP_NUM_GEMS];
CadenceUARTState uart[XLNX_ZYNQMP_NUM_UARTS];
+ XilinxDPState dp;
+ XilinxDPDMAState dpdma;
} XlnxZynqMPState;
#define XLNX_ZYNQMP_H
--
1.9.0
next prev parent reply other threads:[~2015-06-15 15:16 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-15 15:15 [Qemu-devel] [PATCH V2 0/7] Xilinx DisplayPort fred.konrad
2015-06-15 15:15 ` [Qemu-devel] [PATCH V2 1/7] Introduce AUX bus fred.konrad
2015-06-24 6:21 ` Peter Crosthwaite
2015-07-06 16:27 ` Frederic Konrad
2015-06-15 15:15 ` [Qemu-devel] [PATCH V2 2/7] i2c: implement broadcast write fred.konrad
2015-06-24 6:35 ` Peter Crosthwaite
2015-07-06 16:28 ` Frederic Konrad
2015-07-06 16:54 ` Peter Crosthwaite
2015-06-15 15:15 ` [Qemu-devel] [PATCH V2 3/7] introduce dpcd module fred.konrad
2015-06-24 6:44 ` Peter Crosthwaite
2015-07-06 16:30 ` Frederic Konrad
2015-07-06 16:57 ` Peter Crosthwaite
2015-06-15 15:15 ` [Qemu-devel] [PATCH V2 4/7] hw/i2c-ddc.c: Implement DDC I2C slave fred.konrad
2015-06-24 7:03 ` Peter Crosthwaite
2015-06-15 15:15 ` [Qemu-devel] [PATCH V2 5/7] Introduce xilinx dpdma fred.konrad
2015-06-24 7:41 ` Peter Crosthwaite
2015-06-15 15:15 ` [Qemu-devel] [PATCH V2 6/7] Introduce xilinx dp fred.konrad
2015-06-24 8:21 ` Peter Crosthwaite
2015-06-15 15:15 ` fred.konrad [this message]
2015-06-24 8:23 ` [Qemu-devel] [PATCH V2 7/7] arm: xlnx-zynqmp: Add DisplayPort and DPDMA Peter Crosthwaite
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=1434381343-7583-8-git-send-email-fred.konrad@greensocs.com \
--to=fred.konrad@greensocs.com \
--cc=guillaume.delbergue@greensocs.com \
--cc=hyunk@xilinx.com \
--cc=mark.burton@greensocs.com \
--cc=peter.crosthwaite@xilinx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).