From: Alistair Francis <alistair.francis@xilinx.com>
To: qemu-devel@nongnu.org, qemu-arm@nongnu.org,
peter.maydell@linaro.org, fred.konrad@greensocs.com
Cc: alistair.francis@xilinx.com, alistair23@gmail.com
Subject: [Qemu-devel] [PATCH v3 3/3] xlnx-zynqmp: Connect the ARM Generic Timer
Date: Tue, 20 Dec 2016 14:42:06 -0800 [thread overview]
Message-ID: <5b9a682feb30a4c22b068d698d65063c299d24cf.1482265908.git.alistair.francis@xilinx.com> (raw)
In-Reply-To: <cover.1482265908.git.alistair.francis@xilinx.com>
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
---
hw/arm/xlnx-zynqmp.c | 14 ++++++++++++++
include/hw/arm/xlnx-zynqmp.h | 2 ++
2 files changed, 16 insertions(+)
diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c
index 0d86ba3..f3891ae 100644
--- a/hw/arm/xlnx-zynqmp.c
+++ b/hw/arm/xlnx-zynqmp.c
@@ -38,6 +38,8 @@
#define SATA_ADDR 0xFD0C0000
#define SATA_NUM_PORTS 2
+#define ARM_GEN_TIMER_ADDR 0xFF260000
+
#define DP_ADDR 0xfd4a0000
#define DP_IRQ 113
@@ -172,6 +174,10 @@ static void xlnx_zynqmp_init(Object *obj)
qdev_set_parent_bus(DEVICE(&s->spi[i]), sysbus_get_default());
}
+ object_initialize(&s->arm_gen_timer, sizeof(s->arm_gen_timer),
+ TYPE_ARM_GEN_TIMER);
+ qdev_set_parent_bus(DEVICE(&s->arm_gen_timer), sysbus_get_default());
+
object_initialize(&s->dp, sizeof(s->dp), TYPE_XLNX_DP);
qdev_set_parent_bus(DEVICE(&s->dp), sysbus_get_default());
@@ -405,6 +411,14 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp)
g_free(bus_name);
}
+ object_property_set_bool(OBJECT(&s->arm_gen_timer), true, "realized", &err);
+ if (err) {
+ error_propagate(errp, err);
+ return;
+ }
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->arm_gen_timer), 0, ARM_GEN_TIMER_ADDR);
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->arm_gen_timer), 1, ARM_GEN_TIMER_ADDR - 0x10000);
+
object_property_set_bool(OBJECT(&s->dp), true, "realized", &err);
if (err) {
error_propagate(errp, err);
diff --git a/include/hw/arm/xlnx-zynqmp.h b/include/hw/arm/xlnx-zynqmp.h
index c2931bf..8deabb4 100644
--- a/include/hw/arm/xlnx-zynqmp.h
+++ b/include/hw/arm/xlnx-zynqmp.h
@@ -26,6 +26,7 @@
#include "hw/ide/ahci.h"
#include "hw/sd/sdhci.h"
#include "hw/ssi/xilinx_spips.h"
+#include "hw/timer/arm_generic_timer.h"
#include "hw/dma/xlnx_dpdma.h"
#include "hw/display/xlnx_dp.h"
@@ -83,6 +84,7 @@ typedef struct XlnxZynqMPState {
SysbusAHCIState sata;
SDHCIState sdhci[XLNX_ZYNQMP_NUM_SDHCI];
XilinxSPIPS spi[XLNX_ZYNQMP_NUM_SPIS];
+ ARMGenTimer arm_gen_timer;
XlnxDPState dp;
XlnxDPDMAState dpdma;
--
2.7.4
next prev parent reply other threads:[~2016-12-20 23:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-20 22:41 [Qemu-devel] [PATCH v3 0/3] Add the generic ARM timer Alistair Francis
2016-12-20 22:42 ` [Qemu-devel] [PATCH v3 1/3] arm_generic_timer: Add the ARM Generic Timer Alistair Francis
2017-01-06 11:57 ` Peter Maydell
2017-01-10 1:41 ` Alistair Francis
2017-01-10 9:42 ` Peter Maydell
2017-01-11 0:02 ` Alistair Francis
2016-12-20 22:42 ` [Qemu-devel] [PATCH v3 2/3] arm_generic_timer: Add support for the ReadBase memory map Alistair Francis
2017-01-06 12:01 ` Peter Maydell
2016-12-20 22:42 ` Alistair Francis [this message]
2017-01-06 12:03 ` [Qemu-devel] [PATCH v3 3/3] xlnx-zynqmp: Connect the ARM Generic Timer Peter Maydell
2017-01-06 12:07 ` [Qemu-devel] [PATCH v3 0/3] Add the generic ARM timer Peter Maydell
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=5b9a682feb30a4c22b068d698d65063c299d24cf.1482265908.git.alistair.francis@xilinx.com \
--to=alistair.francis@xilinx.com \
--cc=alistair23@gmail.com \
--cc=fred.konrad@greensocs.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.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.