qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: Alistair Francis <alistair.francis@xilinx.com>,
	qemu-devel@nongnu.org, peter.maydell@linaro.org,
	crosthwaitepeter@gmail.com
Cc: saipava@xilinx.com, edgar.iglesias@xilinx.com, afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH v6 4/4] xlnx-zynqmp: Connect the sysbus AHCI to ZynqMP
Date: Mon, 31 Aug 2015 16:54:28 -0400	[thread overview]
Message-ID: <55E4BF04.3070701@redhat.com> (raw)
In-Reply-To: <6e0045ed58a395ec0e3caa1c1abf478b41e5023b.1440806502.git.alistair.francis@xilinx.com>



On 08/28/2015 08:04 PM, Alistair Francis wrote:
> Connect the Sysbus AHCI device to ZynqMP.
> 
> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
> Reviewed-by: Sai Pavan Boddu <saipava@xilinx.com>
> ---
> V6:
>  - Fix up Macros
> V2:
>  - Marcoify the number of SATA prts
>  - Change the error for setting num-ports to error_abort
> 
>  hw/arm/xlnx-zynqmp.c         |   18 ++++++++++++++++++
>  include/hw/arm/xlnx-zynqmp.h |    3 +++
>  2 files changed, 21 insertions(+), 0 deletions(-)
> 
> diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c
> index 6756c74..90b2aca 100644
> --- a/hw/arm/xlnx-zynqmp.c
> +++ b/hw/arm/xlnx-zynqmp.c
> @@ -28,6 +28,10 @@
>  #define GIC_DIST_ADDR       0xf9010000
>  #define GIC_CPU_ADDR        0xf9020000
>  
> +#define SATA_INTR           133
> +#define SATA_ADDR           0xFD0C0000
> +#define SATA_NUM_PORTS      2
> +
>  static const uint64_t gem_addr[XLNX_ZYNQMP_NUM_GEMS] = {
>      0xFF0B0000, 0xFF0C0000, 0xFF0D0000, 0xFF0E0000,
>  };
> @@ -90,6 +94,9 @@ 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->sata, sizeof(s->sata), TYPE_SYSBUS_AHCI);
> +    qdev_set_parent_bus(DEVICE(&s->sata), sysbus_get_default());
>  }
>  
>  static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp)
> @@ -240,6 +247,17 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp)
>          sysbus_connect_irq(SYS_BUS_DEVICE(&s->uart[i]), 0,
>                             gic_spi[uart_intr[i]]);
>      }
> +
> +    object_property_set_int(OBJECT(&s->sata), SATA_NUM_PORTS, "num-ports",
> +                            &error_abort);
> +    object_property_set_bool(OBJECT(&s->sata), true, "realized", &err);
> +    if (err) {
> +        error_propagate((errp), (err));
> +        return;
> +    }
> +
> +    sysbus_mmio_map(SYS_BUS_DEVICE(&s->sata), 0, SATA_ADDR);
> +    sysbus_connect_irq(SYS_BUS_DEVICE(&s->sata), 0, gic_spi[SATA_INTR]);
>  }
>  
>  static Property xlnx_zynqmp_props[] = {
> diff --git a/include/hw/arm/xlnx-zynqmp.h b/include/hw/arm/xlnx-zynqmp.h
> index 6ccb57b..97622ec 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/ide/pci.h"
> +#include "hw/ide/ahci.h"
>  
>  #define TYPE_XLNX_ZYNQMP "xlnx,zynqmp"
>  #define XLNX_ZYNQMP(obj) OBJECT_CHECK(XlnxZynqMPState, (obj), \
> @@ -60,6 +62,7 @@ typedef struct XlnxZynqMPState {
>  
>      CadenceGEMState gem[XLNX_ZYNQMP_NUM_GEMS];
>      CadenceUARTState uart[XLNX_ZYNQMP_NUM_UARTS];
> +    SysbusAHCIState sata;
>  
>      char *boot_cpu;
>      ARMCPU *boot_cpu_ptr;
> 

For some reason, this patch never made it to the qemu-devel archives for
either v5 or v6. I only received a direct copy to my inbox, but the
mailer daemon seems to have dropped this patch for ... some reason or
another.

--js

  parent reply	other threads:[~2015-08-31 20:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-29  0:04 [Qemu-devel] [PATCH v6 0/4] xlnx-zynqmp: Connect the AHCI SATA device Alistair Francis
2015-08-29  0:04 ` [Qemu-devel] [PATCH v6 1/4] ahci: Separate the AHCI state structure into the header Alistair Francis
2015-08-29  0:04 ` [Qemu-devel] [PATCH v6 2/4] ahci.c: Don't assume AHCIState's parent is AHCIPCIState Alistair Francis
2015-08-31 22:38   ` John Snow
2015-09-01  0:59     ` Alistair Francis
2015-09-04 19:48   ` [Qemu-devel] [PATCH RESEND " Peter Crosthwaite
2015-08-29  0:04 ` [Qemu-devel] [PATCH v6 3/4] xlnx-zynqmp.c: Convert some of the error_propagate() calls to error_abort Alistair Francis
     [not found] ` <6e0045ed58a395ec0e3caa1c1abf478b41e5023b.1440806502.git.alistair.francis@xilinx.com>
2015-08-31 20:54   ` John Snow [this message]
2015-08-31 21:28     ` [Qemu-devel] [PATCH v6 4/4] xlnx-zynqmp: Connect the sysbus AHCI to ZynqMP Alistair Francis
2015-09-04 13:42       ` Peter Maydell
2015-09-04 15:19         ` Alistair Francis
2015-09-04 19:59         ` John Snow
2015-09-04 23:46           ` Alistair Francis
2015-09-04 19:51   ` [Qemu-devel] [PATCH RESEND " Peter Crosthwaite
2015-09-08 14:57   ` [Qemu-devel] [PATCH " Peter Maydell
2015-09-08 19:35     ` Alistair Francis
2015-09-08 15:00 ` [Qemu-devel] [PATCH RESEND v6 0/4] xlnx-zynqmp: Connect the AHCI SATA device Peter Maydell
2015-09-09  0:08   ` Alistair Francis

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=55E4BF04.3070701@redhat.com \
    --to=jsnow@redhat.com \
    --cc=afaerber@suse.de \
    --cc=alistair.francis@xilinx.com \
    --cc=crosthwaitepeter@gmail.com \
    --cc=edgar.iglesias@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=saipava@xilinx.com \
    /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).