From patchwork Tue Sep 8 16:51:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 53282 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by patches.linaro.org (Postfix) with ESMTPS id 7CFA922B05 for ; Tue, 8 Sep 2015 17:01:56 +0000 (UTC) Received: by lbbti1 with SMTP id ti1sf38511805lbb.3 for ; Tue, 08 Sep 2015 10:01:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=1Ac/JUE5xhh5UTeEu6WjQ/ICz/xQkXEFpH94OUhlPKk=; b=Gxohyu3J7bfBpe9+Aep0oL975p+h5/jslvcXoWY2Asz2Yjq2vLo4KB8EktImXLHMnr FkQiOC75o8wvzhVPAwBAPPyLFSCBfdgmaMdgZts0Sb4x7HEmfCZyvffan4vagzvs6hnV 43eqZnKdN/Pxsva8318C3PT4IUew4FPUE0ssnWywW2MCIL2uE7sgstfQtr36V1pLj+Lt 7HDT3I4sN8N1Ocjm05mPghXJZF/ksAIRDL8eIHJv4BVQkQDq/wIdxccrrvP1skGIfCWO aPpK565UhRmmtxAsdfVzzaGB1pWqdPhb78WjviJBqB/ADGBZCGhMHtCu5DHzY3x4wLhP C6NQ== X-Gm-Message-State: ALoCoQlHd+F06hq3X7Z+ElR1RPdq2cBZH6yXeWMYPvX0iDvXQFfGsm+u3gxfv5T3qfMrrSHRS8PV X-Received: by 10.180.35.132 with SMTP id h4mr3600432wij.5.1441731715470; Tue, 08 Sep 2015 10:01:55 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.163.69 with SMTP id yg5ls734062lab.5.gmail; Tue, 08 Sep 2015 10:01:55 -0700 (PDT) X-Received: by 10.112.170.103 with SMTP id al7mr23839640lbc.66.1441731715292; Tue, 08 Sep 2015 10:01:55 -0700 (PDT) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id mz8si3804440lbb.18.2015.09.08.10.01.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Sep 2015 10:01:55 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by lamp12 with SMTP id p12so71642094lam.0 for ; Tue, 08 Sep 2015 10:01:55 -0700 (PDT) X-Received: by 10.112.125.134 with SMTP id mq6mr12855919lbb.19.1441731714393; Tue, 08 Sep 2015 10:01:54 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1099467lbq; Tue, 8 Sep 2015 10:01:52 -0700 (PDT) X-Received: by 10.55.49.75 with SMTP id x72mr36153060qkx.45.1441731712630; Tue, 08 Sep 2015 10:01:52 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [208.118.235.17]) by mx.google.com with ESMTPS id d133si4551184qhc.92.2015.09.08.10.01.52 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 08 Sep 2015 10:01:52 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; Received: from localhost ([::1]:35873 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZMHH-0007lw-Ta for patch@linaro.org; Tue, 08 Sep 2015 13:01:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49237) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZM7Y-0002Wz-2Y for qemu-devel@nongnu.org; Tue, 08 Sep 2015 12:51:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZM7S-0007on-Vk for qemu-devel@nongnu.org; Tue, 08 Sep 2015 12:51:47 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:35049) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZM7S-0007b2-P1 for qemu-devel@nongnu.org; Tue, 08 Sep 2015 12:51:42 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1ZZM7I-0001ic-S8 for qemu-devel@nongnu.org; Tue, 08 Sep 2015 17:51:32 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Tue, 8 Sep 2015 17:51:29 +0100 Message-Id: <1441731092-6513-18-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1441731092-6513-1-git-send-email-peter.maydell@linaro.org> References: <1441731092-6513-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Subject: [Qemu-devel] [PULL 17/20] ahci: Separate the AHCI state structure into the header X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Alistair Francis 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 Reviewed-by: Sai Pavan Boddu Reviewed-by: Peter Crosthwaite Signed-off-by: Peter Maydell --- 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 #include #include -#include #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 + #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 */