Skip to content

Commit

Permalink
Add one new file vga-pci.h and cleanup on all platforms
Browse files Browse the repository at this point in the history
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 platforms. This patch also cleans up on all platforms.

Signed-off-by: Li Zhang <zhlcindy@linux.vnet.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
  • Loading branch information
zhlcindy authored and agraf committed Aug 15, 2012
1 parent 7e99826 commit c1195d1
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 8 deletions.
1 change: 1 addition & 0 deletions hw/alpha_pci.c
Expand Up @@ -11,6 +11,7 @@
#include "qemu-log.h"
#include "sysemu.h"
#include "vmware_vga.h"
#include "vga-pci.h"


/* PCI IO reads/writes, to byte-word addressable memory. */
Expand Down
2 changes: 1 addition & 1 deletion hw/cirrus_vga.c
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions hw/mips_malta.c
Expand Up @@ -48,6 +48,7 @@
#include "blockdev.h"
#include "exec-memory.h"
#include "sysbus.h" /* SysBusDevice */
#include "vga-pci.h"

//#define DEBUG_BOARD_INIT

Expand Down
1 change: 1 addition & 0 deletions hw/pc.c
Expand Up @@ -51,6 +51,7 @@
#include "exec-memory.h"
#include "arch_init.h"
#include "bitmap.h"
#include "vga-pci.h"

/* output Bochs bios info messages */
//#define DEBUG_BIOS
Expand Down
4 changes: 0 additions & 4 deletions hw/pc.h
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion hw/ppc_newworld.c
Expand Up @@ -52,7 +52,6 @@
#include "adb.h"
#include "mac_dbdma.h"
#include "nvram.h"
#include "pc.h"
#include "pci.h"
#include "net.h"
#include "sysemu.h"
Expand All @@ -68,6 +67,7 @@
#include "hw/usb.h"
#include "blockdev.h"
#include "exec-memory.h"
#include "vga-pci.h"

#define MAX_IDE_BUS 2
#define CFG_ADDR 0xf0000510
Expand Down
2 changes: 1 addition & 1 deletion hw/ppc_oldworld.c
Expand Up @@ -29,7 +29,6 @@
#include "adb.h"
#include "mac_dbdma.h"
#include "nvram.h"
#include "pc.h"
#include "sysemu.h"
#include "net.h"
#include "isa.h"
Expand All @@ -44,6 +43,7 @@
#include "kvm_ppc.h"
#include "blockdev.h"
#include "exec-memory.h"
#include "vga-pci.h"

#define MAX_IDE_BUS 2
#define CFG_ADDR 0xf0000510
Expand Down
1 change: 1 addition & 0 deletions hw/ppc_prep.c
Expand Up @@ -39,6 +39,7 @@
#include "blockdev.h"
#include "arch_init.h"
#include "exec-memory.h"
#include "vga-pci.h"

//#define HARD_DEBUG_PPC_IO
//#define DEBUG_PPC_IO
Expand Down
1 change: 1 addition & 0 deletions hw/sun4u.c
Expand Up @@ -39,6 +39,7 @@
#include "elf.h"
#include "blockdev.h"
#include "exec-memory.h"
#include "vga-pci.h"

//#define DEBUG_IRQ
//#define DEBUG_EBUS
Expand Down
2 changes: 1 addition & 1 deletion hw/vga-pci.c
Expand Up @@ -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"
Expand Down
12 changes: 12 additions & 0 deletions 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

0 comments on commit c1195d1

Please sign in to comment.