From patchwork Wed Oct 7 14:56:22 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 35299 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 0E0C1B7B8F for ; Thu, 8 Oct 2009 02:12:38 +1100 (EST) Received: from localhost ([127.0.0.1]:49863 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvYBu-0008Bs-OX for incoming@patchwork.ozlabs.org; Wed, 07 Oct 2009 11:12:34 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvXwt-000306-PF for qemu-devel@nongnu.org; Wed, 07 Oct 2009 10:57:03 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvXwn-0002rQ-3X for qemu-devel@nongnu.org; Wed, 07 Oct 2009 10:57:01 -0400 Received: from [199.232.76.173] (port=55160 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvXwm-0002qz-LT for qemu-devel@nongnu.org; Wed, 07 Oct 2009 10:56:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26260) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MvXwm-0003fE-3E for qemu-devel@nongnu.org; Wed, 07 Oct 2009 10:56:56 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n97Eutlx010373 for ; Wed, 7 Oct 2009 10:56:55 -0400 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n97Eulnr016943; Wed, 7 Oct 2009 10:56:54 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Wed, 7 Oct 2009 16:56:22 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: [Qemu-devel] [PATCH 05/12] ide: create ide/pci.h for common ide pci definitions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Juan Quintela --- hw/ide/pci.c | 14 +------------- hw/ide/pci.h | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 13 deletions(-) create mode 100644 hw/ide/pci.h diff --git a/hw/ide/pci.c b/hw/ide/pci.c index 9d7fdd4..3e1f53b 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -31,7 +31,7 @@ #include "sysemu.h" #include "dma.h" -#include +#include /***********************************************************/ /* PCI IDE definitions */ @@ -45,18 +45,6 @@ #define UDIDETCR0 0x73 #define UDIDETCR1 0x7B -#define IDE_TYPE_PIIX3 0 -#define IDE_TYPE_CMD646 1 -#define IDE_TYPE_PIIX4 2 - -typedef struct PCIIDEState { - PCIDevice dev; - IDEBus bus[2]; - BMDMAState bmdma[2]; - int type; /* see IDE_TYPE_xxx */ - uint32_t secondary; -} PCIIDEState; - static void cmd646_update_irq(PCIIDEState *d); static void ide_map(PCIDevice *pci_dev, int region_num, diff --git a/hw/ide/pci.h b/hw/ide/pci.h new file mode 100644 index 0000000..7f3f297 --- /dev/null +++ b/hw/ide/pci.h @@ -0,0 +1,18 @@ +#ifndef HW_IDE_PCI_H +#define HW_IDE_PCI_H + +#include + +#define IDE_TYPE_PIIX3 0 +#define IDE_TYPE_CMD646 1 +#define IDE_TYPE_PIIX4 2 + +typedef struct PCIIDEState { + PCIDevice dev; + IDEBus bus[2]; + BMDMAState bmdma[2]; + int type; /* see IDE_TYPE_xxx */ + uint32_t secondary; +} PCIIDEState; + +#endif