From patchwork Mon Jul 2 05:25:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Zhang X-Patchwork-Id: 168490 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 769512C01E0 for ; Mon, 2 Jul 2012 15:27:11 +1000 (EST) Received: from localhost ([::1]:57453 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlZAD-0002RV-8Z for incoming@patchwork.ozlabs.org; Mon, 02 Jul 2012 01:27:09 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55535) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlZA6-0002Q9-12 for qemu-devel@nongnu.org; Mon, 02 Jul 2012 01:27:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SlZA3-0001Oy-Cg for qemu-devel@nongnu.org; Mon, 02 Jul 2012 01:27:01 -0400 Received: from e7.ny.us.ibm.com ([32.97.182.137]:43817) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlZA3-0001OP-6N for qemu-devel@nongnu.org; Mon, 02 Jul 2012 01:26:59 -0400 Received: from /spool/local by e7.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 2 Jul 2012 01:26:53 -0400 Received: from d01relay04.pok.ibm.com (9.56.227.236) by e7.ny.us.ibm.com (192.168.1.107) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 2 Jul 2012 01:26:51 -0400 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q625QoW2358812; Mon, 2 Jul 2012 01:26:50 -0400 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q62AvgIH028270; Mon, 2 Jul 2012 06:57:42 -0400 Received: from zhlbj-host (zhlbj-host.cn.ibm.com [9.115.122.179] (may be forged)) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q62AvfuG028229; Mon, 2 Jul 2012 06:57:42 -0400 Received: by zhlbj-host (Postfix, from userid 1000) id 286373C0B5C; Mon, 2 Jul 2012 13:26:23 +0800 (CST) From: zhlcindy@gmail.com To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org Date: Mon, 2 Jul 2012 13:25:34 +0800 Message-Id: <38291736343ece40369c8c7b9ca9a2f7a7109ff7.1341204647.git.zhlcindy@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: x-cbid: 12070205-5806-0000-0000-000016DCB7F0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 32.97.182.137 Cc: shangw@linux.vnet.ibm.com, benh@au1.ibm.com, afaerber@suse.de, Li Zhang , agraf@suse.de Subject: [Qemu-devel] [Qemu-ppc][PATCH v5 2/4] 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 From: Li Zhang 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 | 13 +++++++++++++ 4 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 hw/vga-pci.h diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c index 623dd68..3e8e5bb 100644 --- a/hw/cirrus_vga.c +++ b/hw/cirrus_vga.c @@ -27,11 +27,11 @@ * available at http://home.worldonline.dk/~finth/ */ #include "hw.h" -#include "pc.h" #include "pci.h" #include "console.h" #include "vga_int.h" #include "loader.h" +#include "vga-pci.h" /* * TODO: 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..4872056 100644 --- a/hw/vga-pci.c +++ b/hw/vga-pci.c @@ -23,12 +23,12 @@ */ #include "hw.h" #include "console.h" -#include "pc.h" #include "pci.h" #include "vga_int.h" #include "pixel_ops.h" #include "qemu-timer.h" #include "loader.h" +#include "vga-pci.h" typedef struct PCIVGAState { PCIDevice dev; diff --git a/hw/vga-pci.h b/hw/vga-pci.h new file mode 100644 index 0000000..e272deb --- /dev/null +++ b/hw/vga-pci.h @@ -0,0 +1,13 @@ +#ifndef VGA_PCI_H +#define VGA_PCI_H + +#include "qemu-common.h" +#include "qdev.h" + +/* vga-pci.c */ +DeviceState *pci_vga_init(PCIBus *bus); + +/* cirrus_vga.c */ +DeviceState *pci_cirrus_vga_init(PCIBus *bus); + +#endif