From: Frederic Konrad <fred.konrad@greensocs.com>
To: Alistair Francis <alistair.francis@xilinx.com>
Cc: Edgar Iglesias <edgar.iglesias@xilinx.com>,
Peter Maydell <peter.maydell@linaro.org>,
hyunk@xilinx.com, Mark Burton <mark.burton@greensocs.com>,
"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
Peter Crosthwaite <crosthwaitepeter@gmail.com>,
Guillaume Delbergue <guillaume.delbergue@greensocs.com>
Subject: Re: [Qemu-devel] [PATCH V6 8/8] arm: xlnx-zynqmp: Add xlnx-dp and xlnx-dpdma
Date: Thu, 28 Jan 2016 15:39:56 +0100 [thread overview]
Message-ID: <56AA283C.4020907@greensocs.com> (raw)
In-Reply-To: <CAKmqyKOD_9TEbPPZh0Vb_GpS3Uzon-d97KtLn_DntP4mRACw=g@mail.gmail.com>
On 16/01/2016 02:50, Alistair Francis wrote:
> On Mon, Jan 4, 2016 at 10:25 AM, <fred.konrad@greensocs.com> wrote:
>> 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>
>> Tested-By: Hyun Kwon <hyun.kwon@xilinx.com>
>> ---
>> hw/arm/xlnx-zynqmp.c | 30 ++++++++++++++++++++++++++++++
>> include/hw/arm/xlnx-zynqmp.h | 5 +++++
>> 2 files changed, 35 insertions(+)
>>
>> diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c
>> index 87553bb..ce9919f 100644
>> --- a/hw/arm/xlnx-zynqmp.c
>> +++ b/hw/arm/xlnx-zynqmp.c
>> @@ -32,6 +32,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,
>> };
>> @@ -112,6 +118,12 @@ static void xlnx_zynqmp_init(Object *obj)
>> qdev_set_parent_bus(DEVICE(&s->sdhci[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)
>> @@ -286,6 +298,24 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp)
>> sysbus_connect_irq(SYS_BUS_DEVICE(&s->sdhci[i]), 0,
>> gic_spi[sdhci_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);
>> + if (err) {
>> + error_propagate(errp, err);
>> + return;
>> + }
>> + object_property_set_bool(OBJECT(&s->dpdma), true, "realized", &err);
>> + if (err) {
>> + error_propagate(errp, err);
>> + return;
>> + }
> Can you set the device as realized before the sysbus connections? That
> is how every other device does it.
Ok will do that.
>
>> + object_property_set_link(OBJECT(&s->dp), OBJECT(&s->dpdma), "dpdma",
>> + &error_abort);
>> }
>>
>> static Property xlnx_zynqmp_props[] = {
>> diff --git a/include/hw/arm/xlnx-zynqmp.h b/include/hw/arm/xlnx-zynqmp.h
>> index d116092..e683eaf 100644
>> --- a/include/hw/arm/xlnx-zynqmp.h
>> +++ b/include/hw/arm/xlnx-zynqmp.h
>> @@ -25,6 +25,8 @@
>> #include "hw/ide/pci.h"
>> #include "hw/ide/ahci.h"
>> #include "hw/sd/sdhci.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), \
>> @@ -69,6 +71,9 @@ typedef struct XlnxZynqMPState {
>>
>> char *boot_cpu;
>> ARMCPU *boot_cpu_ptr;
>> +
>> + XlnxDPState dp;
>> + XlnxDPDMAState dpdma;
> Can you also move these up so they are with the rest of the devices?
yes
>
> Otherwise:
>
> Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
>
> Thanks,
>
> Alistair
>
>> } XlnxZynqMPState;
>>
>> #define XLNX_ZYNQMP_H
>> --
>> 1.9.0
>>
>>
next prev parent reply other threads:[~2016-01-28 14:40 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-04 18:25 [Qemu-devel] [PATCH V6 0/8] Xilinx DisplayPort fred.konrad
2016-01-04 18:25 ` [Qemu-devel] [PATCH V6 1/8] i2cbus: remove unused dev field fred.konrad
2016-01-04 18:25 ` [Qemu-devel] [PATCH V6 2/8] introduce aux-bus fred.konrad
2016-01-13 21:02 ` Peter Crosthwaite
2016-01-14 9:57 ` KONRAD Frederic
2016-01-14 21:09 ` Peter Crosthwaite
2016-01-16 1:24 ` Alistair Francis
2016-01-04 18:25 ` [Qemu-devel] [PATCH V6 3/8] i2c: implement broadcast write fred.konrad
2016-01-04 18:25 ` [Qemu-devel] [PATCH V6 4/8] introduce dpcd module fred.konrad
2016-01-04 18:25 ` [Qemu-devel] [PATCH V6 5/8] hw/i2c-ddc.c: Implement DDC I2C slave fred.konrad
2016-01-04 18:25 ` [Qemu-devel] [PATCH V6 6/8] introduce xlnx-dpdma fred.konrad
2016-01-04 18:25 ` [Qemu-devel] [PATCH V6 7/8] introduce xlnx-dp fred.konrad
2016-01-16 1:51 ` Alistair Francis
2016-01-28 14:34 ` Frederic Konrad
2016-01-04 18:25 ` [Qemu-devel] [PATCH V6 8/8] arm: xlnx-zynqmp: Add xlnx-dp and xlnx-dpdma fred.konrad
2016-01-16 1:50 ` Alistair Francis
2016-01-28 14:39 ` Frederic Konrad [this message]
2016-01-16 0:33 ` [Qemu-devel] [PATCH V6 0/8] Xilinx DisplayPort Alistair Francis
2016-01-28 14:29 ` Frederic Konrad
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=56AA283C.4020907@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.