qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alistair Francis <alistair23@gmail.com>
To: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Cc: figlesia@xilinx.com, "Peter Maydell" <peter.maydell@linaro.org>,
	"Edgar Iglesias" <edgar.iglesias@xilinx.com>,
	"Sai Pavan Boddu" <sai.pavan.boddu@xilinx.com>,
	"Francisco Iglesias" <frasse.iglesias@gmail.com>,
	"Alistair Francis" <alistair@alistair23.me>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
	"KONRAD Frederic" <frederic.konrad@adacore.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	qemu-arm <qemu-arm@nongnu.org>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Luc Michel" <luc.michel@greensocs.com>
Subject: Re: [PATCH v1 06/11] hw/arm: versal: Embedd the ADMAs into the SoC type
Date: Mon, 27 Apr 2020 15:18:57 -0700	[thread overview]
Message-ID: <CAKmqyKN4JBcQ7=fJ9tckm+MQiiG3S5LrB+ff-3GDM6k80wXPCA@mail.gmail.com> (raw)
In-Reply-To: <20200427181649.26851-7-edgar.iglesias@gmail.com>

On Mon, Apr 27, 2020 at 11:22 AM Edgar E. Iglesias
<edgar.iglesias@gmail.com> wrote:
>
> From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>
>
> Embedd the ADMAs into the SoC type.
>
> Suggested-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  hw/arm/xlnx-versal.c         | 14 +++++++-------
>  include/hw/arm/xlnx-versal.h |  3 ++-
>  2 files changed, 9 insertions(+), 8 deletions(-)
>
> diff --git a/hw/arm/xlnx-versal.c b/hw/arm/xlnx-versal.c
> index e424aa789e..ebd2dc51be 100644
> --- a/hw/arm/xlnx-versal.c
> +++ b/hw/arm/xlnx-versal.c
> @@ -203,18 +203,18 @@ static void versal_create_admas(Versal *s, qemu_irq *pic)
>          DeviceState *dev;
>          MemoryRegion *mr;
>
> -        dev = qdev_create(NULL, "xlnx.zdma");
> -        s->lpd.iou.adma[i] = SYS_BUS_DEVICE(dev);
> -        object_property_set_int(OBJECT(s->lpd.iou.adma[i]), 128, "bus-width",
> -                                &error_abort);
> -        object_property_add_child(OBJECT(s), name, OBJECT(dev), &error_fatal);
> +        sysbus_init_child_obj(OBJECT(s), name,
> +                              &s->lpd.iou.adma[i], sizeof(s->lpd.iou.adma[i]),
> +                              TYPE_XLNX_ZDMA);
> +        dev = DEVICE(&s->lpd.iou.adma[i]);
> +        object_property_set_int(OBJECT(dev), 128, "bus-width", &error_abort);
>          qdev_init_nofail(dev);
>
> -        mr = sysbus_mmio_get_region(s->lpd.iou.adma[i], 0);
> +        mr = sysbus_mmio_get_region(SYS_BUS_DEVICE(dev), 0);
>          memory_region_add_subregion(&s->mr_ps,
>                                      MM_ADMA_CH0 + i * MM_ADMA_CH0_SIZE, mr);
>
> -        sysbus_connect_irq(s->lpd.iou.adma[i], 0, pic[VERSAL_ADMA_IRQ_0 + i]);
> +        sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, pic[VERSAL_ADMA_IRQ_0 + i]);
>          g_free(name);
>      }
>  }
> diff --git a/include/hw/arm/xlnx-versal.h b/include/hw/arm/xlnx-versal.h
> index 01da736a5b..94b7826fd4 100644
> --- a/include/hw/arm/xlnx-versal.h
> +++ b/include/hw/arm/xlnx-versal.h
> @@ -16,6 +16,7 @@
>  #include "hw/arm/boot.h"
>  #include "hw/intc/arm_gicv3.h"
>  #include "hw/char/pl011.h"
> +#include "hw/dma/xlnx-zdma.h"
>  #include "hw/net/cadence_gem.h"
>
>  #define TYPE_XLNX_VERSAL "xlnx-versal"
> @@ -53,7 +54,7 @@ typedef struct Versal {
>          struct {
>              PL011State uart[XLNX_VERSAL_NR_UARTS];
>              CadenceGEMState gem[XLNX_VERSAL_NR_GEMS];
> -            SysBusDevice *adma[XLNX_VERSAL_NR_ADMAS];
> +            XlnxZDMA adma[XLNX_VERSAL_NR_ADMAS];
>          } iou;
>      } lpd;
>
> --
> 2.20.1
>
>


  reply	other threads:[~2020-04-27 22:29 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-27 18:16 [PATCH v1 00/11] hw/arm: versal: Add SD and the RTC Edgar E. Iglesias
2020-04-27 18:16 ` [PATCH v1 01/11] hw/arm: versal: Remove inclusion of arm_gicv3_common.h Edgar E. Iglesias
2020-04-27 20:08   ` Alistair Francis
2020-04-29  7:23   ` Luc Michel
2020-04-27 18:16 ` [PATCH v1 02/11] hw/arm: versal: Move misplaced comment Edgar E. Iglesias
2020-04-27 20:08   ` Alistair Francis
2020-04-28  7:46   ` Philippe Mathieu-Daudé
2020-04-29  7:23   ` Luc Michel
2020-04-27 18:16 ` [PATCH v1 03/11] hw/arm: versal-virt: Fix typo xlnx-ve -> xlnx-versal Edgar E. Iglesias
2020-04-27 22:18   ` Alistair Francis
2020-04-28  7:46   ` Philippe Mathieu-Daudé
2020-04-29  7:24   ` Luc Michel
2020-04-27 18:16 ` [PATCH v1 04/11] hw/arm: versal: Embedd the UARTs into the SoC type Edgar E. Iglesias
2020-04-27 22:16   ` Alistair Francis
2020-04-28  7:47   ` Philippe Mathieu-Daudé
2020-04-29  7:27   ` Luc Michel
2020-04-27 18:16 ` [PATCH v1 05/11] hw/arm: versal: Embedd the GEMs " Edgar E. Iglesias
2020-04-27 22:17   ` Alistair Francis
2020-04-28  7:48   ` Philippe Mathieu-Daudé
2020-04-29  7:27   ` Luc Michel
2020-04-27 18:16 ` [PATCH v1 06/11] hw/arm: versal: Embedd the ADMAs " Edgar E. Iglesias
2020-04-27 22:18   ` Alistair Francis [this message]
2020-04-28  7:49   ` Philippe Mathieu-Daudé
2020-04-29  7:28   ` Luc Michel
2020-04-27 18:16 ` [PATCH v1 07/11] hw/arm: versal: Embedd the APUs " Edgar E. Iglesias
2020-04-27 22:20   ` Alistair Francis
2020-04-28  7:50   ` Philippe Mathieu-Daudé
2020-04-29  7:28   ` Luc Michel
2020-04-27 18:16 ` [PATCH v1 08/11] hw/arm: versal: Add support for SD Edgar E. Iglesias
2020-04-27 22:24   ` Alistair Francis
2020-04-28  7:51   ` Philippe Mathieu-Daudé
2020-04-29  7:28   ` Luc Michel
2020-04-27 18:16 ` [PATCH v1 09/11] hw/arm: versal: Add support for the RTC Edgar E. Iglesias
2020-04-28  8:01   ` Philippe Mathieu-Daudé
2020-04-28 17:51   ` Alistair Francis
2020-04-29  7:28   ` Luc Michel
2020-04-27 18:16 ` [PATCH v1 10/11] hw/arm: versal-virt: Add support for SD Edgar E. Iglesias
2020-04-28 17:54   ` Alistair Francis
2020-04-29  7:36   ` Luc Michel
2020-04-27 18:16 ` [PATCH v1 11/11] hw/arm: versal-virt: Add support for the RTC Edgar E. Iglesias
2020-04-28 17:55   ` Alistair Francis
2020-04-29  7:57   ` Luc Michel
2020-05-04 10:13 ` [PATCH v1 00/11] hw/arm: versal: Add SD and " 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='CAKmqyKN4JBcQ7=fJ9tckm+MQiiG3S5LrB+ff-3GDM6k80wXPCA@mail.gmail.com' \
    --to=alistair23@gmail.com \
    --cc=alistair@alistair23.me \
    --cc=edgar.iglesias@gmail.com \
    --cc=edgar.iglesias@xilinx.com \
    --cc=figlesia@xilinx.com \
    --cc=frasse.iglesias@gmail.com \
    --cc=frederic.konrad@adacore.com \
    --cc=luc.michel@greensocs.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=sai.pavan.boddu@xilinx.com \
    --cc=sstabellini@kernel.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).