From patchwork Sat Aug 4 12:05:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Zhang X-Patchwork-Id: 175086 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id EB5C12C008C for ; Sat, 4 Aug 2012 22:07:31 +1000 (EST) Received: from localhost ([::1]:44787 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sxd8j-0008Lk-R0 for incoming@patchwork.ozlabs.org; Sat, 04 Aug 2012 08:07:29 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sxd8Y-0008D1-5o for qemu-devel@nongnu.org; Sat, 04 Aug 2012 08:07:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sxd8W-0003ZK-ND for qemu-devel@nongnu.org; Sat, 04 Aug 2012 08:07:18 -0400 Received: from mail-ob0-f173.google.com ([209.85.214.173]:35131) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sxd8W-0002vX-J8; Sat, 04 Aug 2012 08:07:16 -0400 Received: by mail-ob0-f173.google.com with SMTP id ta14so2476455obb.4 for ; Sat, 04 Aug 2012 05:07:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=eNRcPiTgTcXXyOtZxLOlS21bCthzcASGl/igFuDCj6k=; b=hnuTLIxW3PH5H07Va1dGrKKR6ibd3E82gXrvn0tj+yCe78oRPDjzJ3mrKxH1k3gXjy lAM5fZ3XIrRPtZLymdlbKPcNq/J2en75CJvseOqxLdp2gSrKLg2M7jwARSmZGlOAILTA 7pegWwN3MCbiz9FnoSdCX3bCrDBkraHr20K/M9ebG48Z1AW9LVFerL+jAeYIjErmk1SO tVbwSmdOS60HRt0An1p174CKA87vXj1rk2RF56ftRSKPPn8coZvis7M82Xc8yDnHEriF 8d2fgjzGVqL7UW5ZI4PcF5hPHcRebEmAdRNrbLlGjNp5bawRhav7obWv2hzYUvcOYvrK czuw== Received: by 10.182.174.68 with SMTP id bq4mr10430733obc.53.1344082036364; Sat, 04 Aug 2012 05:07:16 -0700 (PDT) Received: from localhost.localdomain ([175.25.242.10]) by mx.google.com with ESMTPS id th3sm12393434obb.6.2012.08.04.05.07.11 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 04 Aug 2012 05:07:15 -0700 (PDT) From: Li Zhang To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org Date: Sat, 4 Aug 2012 20:05:55 +0800 Message-Id: <1344081957-4717-4-git-send-email-zhlcindy@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1344081957-4717-1-git-send-email-zhlcindy@linux.vnet.ibm.com> References: <1344081957-4717-1-git-send-email-zhlcindy@linux.vnet.ibm.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.214.173 Cc: aliguori@us.ibm.com, agraf@suse.de, Li Zhang , afaerber@suse.de, david@gibson.dropbear.id.au Subject: [Qemu-devel] [Qemu-ppc][PATCH v6 3/5] Add one new file vga-pci.h 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Functions pci_vga_init() and pci_cirrus_vga_init() are declared in pc.h. That prevents other platforms (e.g. sPAPR) to use them. This patch is to create one new file vga-pci.h and move the declarations to vga-pci.h, so that they can be shared by all the platforms. Signed-off-by: Li Zhang --- hw/cirrus_vga.c | 2 +- hw/pc.h | 4 ---- hw/vga-pci.c | 2 +- hw/vga-pci.h | 12 ++++++++++++ 4 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 hw/vga-pci.h diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c index 623dd68..e8dcc6b 100644 --- a/hw/cirrus_vga.c +++ b/hw/cirrus_vga.c @@ -27,8 +27,8 @@ * available at http://home.worldonline.dk/~finth/ */ #include "hw.h" -#include "pc.h" #include "pci.h" +#include "vga-pci.h" #include "console.h" #include "vga_int.h" #include "loader.h" diff --git a/hw/pc.h b/hw/pc.h index 31ccb6f..e4db071 100644 --- a/hw/pc.h +++ b/hw/pc.h @@ -189,14 +189,10 @@ static inline DeviceState *isa_vga_init(ISABus *bus) return &dev->qdev; } -DeviceState *pci_vga_init(PCIBus *bus); int isa_vga_mm_init(target_phys_addr_t vram_base, target_phys_addr_t ctrl_base, int it_shift, MemoryRegion *address_space); -/* cirrus_vga.c */ -DeviceState *pci_cirrus_vga_init(PCIBus *bus); - /* ne2000.c */ static inline bool isa_ne2000_init(ISABus *bus, int base, int irq, NICInfo *nd) { diff --git a/hw/vga-pci.c b/hw/vga-pci.c index 37dc019..9abbada 100644 --- a/hw/vga-pci.c +++ b/hw/vga-pci.c @@ -23,8 +23,8 @@ */ #include "hw.h" #include "console.h" -#include "pc.h" #include "pci.h" +#include "vga-pci.h" #include "vga_int.h" #include "pixel_ops.h" #include "qemu-timer.h" diff --git a/hw/vga-pci.h b/hw/vga-pci.h new file mode 100644 index 0000000..49abf13 --- /dev/null +++ b/hw/vga-pci.h @@ -0,0 +1,12 @@ +#ifndef VGA_PCI_H +#define VGA_PCI_H + +#include "qemu-common.h" + +/* vga-pci.c */ +DeviceState *pci_vga_init(PCIBus *bus); + +/* cirrus_vga.c */ +DeviceState *pci_cirrus_vga_init(PCIBus *bus); + +#endif