qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alistair Francis <alistair.francis@xilinx.com>
To: qemu-devel@nongnu.org, peter.maydell@linaro.org,
	crosthwaitepeter@gmail.com
Cc: saipava@xilinx.com, edgar.iglesias@xilinx.com, jsnow@redhat.com,
	afaerber@suse.de, alistair.francis@xilinx.com
Subject: [Qemu-devel] [PATCH v6 1/4] ahci: Separate the AHCI state structure into the header
Date: Fri, 28 Aug 2015 17:04:23 -0700	[thread overview]
Message-ID: <8c1d2ab6b46e652ae7ae0b2ef8df694503fc9eb0.1440806501.git.alistair.francis@xilinx.com> (raw)
In-Reply-To: <cover.1440806501.git.alistair.francis@xilinx.com>

Pull the AHCI state structure out into the header. This allows
other containers to access the struct. This is required to add
the device to modern SoC containers.

Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Reviewed-by: Sai Pavan Boddu <saipava@xilinx.com>
Reviewed-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
---

 hw/ide/ahci.c |   13 -------------
 hw/ide/ahci.h |   14 ++++++++++++++
 2 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index 48749c1..02d85fa 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -25,7 +25,6 @@
 #include <hw/pci/msi.h>
 #include <hw/i386/pc.h>
 #include <hw/pci/pci.h>
-#include <hw/sysbus.h>
 
 #include "qemu/error-report.h"
 #include "sysemu/block-backend.h"
@@ -1625,18 +1624,6 @@ const VMStateDescription vmstate_ahci = {
     },
 };
 
-#define TYPE_SYSBUS_AHCI "sysbus-ahci"
-#define SYSBUS_AHCI(obj) OBJECT_CHECK(SysbusAHCIState, (obj), TYPE_SYSBUS_AHCI)
-
-typedef struct SysbusAHCIState {
-    /*< private >*/
-    SysBusDevice parent_obj;
-    /*< public >*/
-
-    AHCIState ahci;
-    uint32_t num_ports;
-} SysbusAHCIState;
-
 static const VMStateDescription vmstate_sysbus_ahci = {
     .name = "sysbus-ahci",
     .fields = (VMStateField[]) {
diff --git a/hw/ide/ahci.h b/hw/ide/ahci.h
index 79a463d..c055d6b 100644
--- a/hw/ide/ahci.h
+++ b/hw/ide/ahci.h
@@ -24,6 +24,8 @@
 #ifndef HW_IDE_AHCI_H
 #define HW_IDE_AHCI_H
 
+#include <hw/sysbus.h>
+
 #define AHCI_MEM_BAR_SIZE         0x1000
 #define AHCI_MAX_PORTS            32
 #define AHCI_MAX_SG               168 /* hardware max is 64K */
@@ -369,4 +371,16 @@ void ahci_reset(AHCIState *s);
 
 void ahci_ide_create_devs(PCIDevice *dev, DriveInfo **hd);
 
+#define TYPE_SYSBUS_AHCI "sysbus-ahci"
+#define SYSBUS_AHCI(obj) OBJECT_CHECK(SysbusAHCIState, (obj), TYPE_SYSBUS_AHCI)
+
+typedef struct SysbusAHCIState {
+    /*< private >*/
+    SysBusDevice parent_obj;
+    /*< public >*/
+
+    AHCIState ahci;
+    uint32_t num_ports;
+} SysbusAHCIState;
+
 #endif /* HW_IDE_AHCI_H */
-- 
1.7.1

  reply	other threads:[~2015-08-29  0:04 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 ` Alistair Francis [this message]
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   ` [Qemu-devel] [PATCH v6 4/4] xlnx-zynqmp: Connect the sysbus AHCI to ZynqMP John Snow
2015-08-31 21:28     ` 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=8c1d2ab6b46e652ae7ae0b2ef8df694503fc9eb0.1440806501.git.alistair.francis@xilinx.com \
    --to=alistair.francis@xilinx.com \
    --cc=afaerber@suse.de \
    --cc=crosthwaitepeter@gmail.com \
    --cc=edgar.iglesias@xilinx.com \
    --cc=jsnow@redhat.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).