]> git.proxmox.com Git - qemu.git/commitdiff
pci: pci.h cleanup: move out stuff not in pci.c
authorMichael S. Tsirkin <mst@redhat.com>
Wed, 11 Nov 2009 12:59:56 +0000 (14:59 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 1 Dec 2009 15:51:04 +0000 (17:51 +0200)
pci.h declares some functions which aren't
defined in pci.h. Clean up moving things
to appropriate headers, and update all users.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
23 files changed:
hw/apb_pci.c
hw/apb_pci.h [new file with mode: 0644]
hw/lsi53c895a.c
hw/mips_malta.c
hw/pc.c
hw/pci.h
hw/ppc_newworld.c
hw/ppc_oldworld.c
hw/ppc_prep.c
hw/prep_pci.c
hw/prep_pci.h [new file with mode: 0644]
hw/r2d.c
hw/realview.c
hw/sh_pci.c
hw/sh_pci.h [new file with mode: 0644]
hw/sun4u.c
hw/usb-ohci.c
hw/usb-ohci.h [new file with mode: 0644]
hw/usb-uhci.c
hw/usb-uhci.h [new file with mode: 0644]
hw/versatilepb.c
hw/vmware_vga.c
hw/vmware_vga.h [new file with mode: 0644]

index 39998791f226e72f73ed268fdbf4ca7ee464bfd9..1748d8dc7936a5e80f645fb52ac9a1d70a7c79ba 100644 (file)
@@ -29,6 +29,7 @@
 #include "sysbus.h"
 #include "pci.h"
 #include "pci_host.h"
+#include "apb_pci.h"
 
 /* debug APB */
 //#define DEBUG_APB
diff --git a/hw/apb_pci.h b/hw/apb_pci.h
new file mode 100644 (file)
index 0000000..8869f9d
--- /dev/null
@@ -0,0 +1,9 @@
+#ifndef APB_PCI_H
+#define APB_PCI_H
+
+#include "qemu-common.h"
+
+PCIBus *pci_apb_init(target_phys_addr_t special_base,
+                     target_phys_addr_t mem_base,
+                     qemu_irq *pic, PCIBus **bus2, PCIBus **bus3);
+#endif
index 7e47fc9abca72114f4a6347a8ffd3eba82b958d1..8b8a80b898bc82db35ef2c87c3fda7598eb241d1 100644 (file)
@@ -31,6 +31,8 @@ do { fprintf(stderr, "lsi_scsi: error: " fmt , ## __VA_ARGS__); exit(1);} while
 do { fprintf(stderr, "lsi_scsi: error: " fmt , ## __VA_ARGS__);} while (0)
 #endif
 
+#define LSI_MAX_DEVS 7
+
 #define LSI_SCNTL0_TRG    0x01
 #define LSI_SCNTL0_AAP    0x02
 #define LSI_SCNTL0_EPC    0x08
index 76884570fb0b36822fbbbc80e67cf068f8562ee3..571d8ced164d36e92b9dc5962e092d91a3709028 100644 (file)
@@ -32,6 +32,8 @@
 #include "flash.h"
 #include "mips.h"
 #include "pci.h"
+#include "usb-uhci.h"
+#include "vmware_vga.h"
 #include "qemu-char.h"
 #include "sysemu.h"
 #include "audio/audio.h"
diff --git a/hw/pc.c b/hw/pc.c
index 7c791c413697eb463d24de550a0ccb2a3e81cb89..97964b27ebd487de863e782541d4fbf73d8c8a54 100644 (file)
--- a/hw/pc.c
+++ b/hw/pc.c
 #include "pc.h"
 #include "fdc.h"
 #include "pci.h"
+#include "vmware_vga.h"
+#include "usb-uhci.h"
+#include "usb-ohci.h"
+#include "prep_pci.h"
+#include "apb_pci.h"
 #include "block.h"
 #include "sysemu.h"
 #include "audio/audio.h"
index 9a56d0df6e0abcfc0a91b17ed44e3cc7b2f26d67..560da5074e7bdecfa9e4da9fa27f44ede6dc61b4 100644 (file)
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -413,31 +413,6 @@ static inline uint32_t pci_config_size(PCIDevice *d)
     return pci_is_express(d) ? PCIE_CONFIG_SPACE_SIZE : PCI_CONFIG_SPACE_SIZE;
 }
 
-/* lsi53c895a.c */
-#define LSI_MAX_DEVS 7
-
-/* vmware_vga.c */
-void pci_vmsvga_init(PCIBus *bus);
-
-/* usb-uhci.c */
-void usb_uhci_piix3_init(PCIBus *bus, int devfn);
-void usb_uhci_piix4_init(PCIBus *bus, int devfn);
-
-/* usb-ohci.c */
-void usb_ohci_init_pci(struct PCIBus *bus, int devfn);
-
-/* prep_pci.c */
-PCIBus *pci_prep_init(qemu_irq *pic);
-
-/* apb_pci.c */
-PCIBus *pci_apb_init(target_phys_addr_t special_base,
-                     target_phys_addr_t mem_base,
-                     qemu_irq *pic, PCIBus **bus2, PCIBus **bus3);
-
-/* sh_pci.c */
-PCIBus *sh_pci_register_bus(pci_set_irq_fn set_irq, pci_map_irq_fn map_irq,
-                            void *pic, int devfn_min, int nirq);
-
 /* These are not pci specific. Should move into a separate header.
  * Only pci.c uses them, so keep them here for now.
  */
index da868d302b0d5f79b306438ace44d69e768931c9..7579ddd3402087cc173f876987a8203ccdb9e6de 100644 (file)
@@ -29,6 +29,7 @@
 #include "nvram.h"
 #include "pc.h"
 #include "pci.h"
+#include "usb-ohci.h"
 #include "net.h"
 #include "sysemu.h"
 #include "boards.h"
index 9b49a3dbdd89c428c17f5fca8b3056b99f601e06..32fd03a900bcdfaca8c1f3f2bdfdeaacb683c153 100644 (file)
@@ -32,6 +32,7 @@
 #include "net.h"
 #include "isa.h"
 #include "pci.h"
+#include "usb-ohci.h"
 #include "boards.h"
 #include "fw_cfg.h"
 #include "escc.h"
index cd561e10c67676429d66a811a4021273632f3e70..eb758f2dab1079fedb2d5b4159ce45d069446da2 100644 (file)
@@ -29,6 +29,8 @@
 #include "sysemu.h"
 #include "isa.h"
 #include "pci.h"
+#include "prep_pci.h"
+#include "usb-ohci.h"
 #include "ppc.h"
 #include "boards.h"
 #include "qemu-log.h"
index a338f81e1172fc1a9d5545f4a1d9f0b91dc7fecd..80e20ac1ae97c5fba7f68e605e6a4e0336842a60 100644 (file)
@@ -25,6 +25,7 @@
 #include "hw.h"
 #include "pci.h"
 #include "pci_host.h"
+#include "prep_pci.h"
 
 typedef PCIHostState PREPPCIState;
 
diff --git a/hw/prep_pci.h b/hw/prep_pci.h
new file mode 100644 (file)
index 0000000..cd68512
--- /dev/null
@@ -0,0 +1,8 @@
+#ifndef QEMU_PREP_PCI_H
+#define QEMU_PREP_PCI_H
+
+#include "qemu-common.h"
+
+PCIBus *pci_prep_init(qemu_irq *pic);
+
+#endif
index c074a6e9c54722eca4be83f0f2137a340f207f8c..e4c02f05ef6a0249ec1a79d81d46929c017770ed 100644 (file)
--- a/hw/r2d.c
+++ b/hw/r2d.c
@@ -29,6 +29,7 @@
 #include "sysemu.h"
 #include "boards.h"
 #include "pci.h"
+#include "sh_pci.h"
 #include "net.h"
 #include "sh7750_regs.h"
 #include "ide.h"
index f0b83473409fda775e1c9b56bb304f9608f2d0f6..3322c4fd5d99ebbe93265f3f96f7adb10ee6a1ca 100644 (file)
@@ -12,6 +12,7 @@
 #include "primecell.h"
 #include "devices.h"
 #include "pci.h"
+#include "usb-ohci.h"
 #include "net.h"
 #include "sysemu.h"
 #include "boards.h"
index 4277b01c9f40006ede318a31396712d64efbcb91..52dc02e1e798d0a482cefbd659d0a67f8c44e29a 100644 (file)
@@ -24,6 +24,7 @@
 #include "hw.h"
 #include "sh.h"
 #include "pci.h"
+#include "sh_pci.h"
 #include "bswap.h"
 
 typedef struct {
diff --git a/hw/sh_pci.h b/hw/sh_pci.h
new file mode 100644 (file)
index 0000000..b1a5ec3
--- /dev/null
@@ -0,0 +1,9 @@
+#ifndef QEMU_SH_PCI_H
+#define QEMU_SH_PCI_H
+
+#include "qemu-common.h"
+
+PCIBus *sh_pci_register_bus(pci_set_irq_fn set_irq, pci_map_irq_fn map_irq,
+                            void *pic, int devfn_min, int nirq);
+
+#endif
index 2189fa06afb9a6a2bd8c3a5fab2b9e5501c105b4..a7a227bbec72df7edae30f1c7b5e16b73316300f 100644 (file)
@@ -23,6 +23,7 @@
  */
 #include "hw.h"
 #include "pci.h"
+#include "apb_pci.h"
 #include "pc.h"
 #include "nvram.h"
 #include "fdc.h"
index 0f7f4de154a37ef1b46f77cb10242f6c9b39ee2c..7ab3a98619cd7887ffc000e4ab4782851ade0162 100644 (file)
@@ -32,6 +32,7 @@
 #include "pci.h"
 #include "pxa.h"
 #include "devices.h"
+#include "usb-ohci.h"
 
 //#define DEBUG_OHCI
 /* Dump packet contents.  */
diff --git a/hw/usb-ohci.h b/hw/usb-ohci.h
new file mode 100644 (file)
index 0000000..eefcef3
--- /dev/null
@@ -0,0 +1,9 @@
+#ifndef QEMU_USB_OHCI_H
+#define QEMU_USB_OHCI_H
+
+#include "qemu-common.h"
+
+void usb_ohci_init_pci(struct PCIBus *bus, int devfn);
+
+#endif
+
index 8babb0265e4ef239967383c59a3c33c6e2c124b7..671916e05629b9171cef4034c29d471a5b9fbaab 100644 (file)
@@ -29,6 +29,7 @@
 #include "usb.h"
 #include "pci.h"
 #include "qemu-timer.h"
+#include "usb-uhci.h"
 
 //#define DEBUG
 //#define DEBUG_DUMP_DATA
diff --git a/hw/usb-uhci.h b/hw/usb-uhci.h
new file mode 100644 (file)
index 0000000..911948e
--- /dev/null
@@ -0,0 +1,9 @@
+#ifndef QEMU_USB_UHCI_H
+#define QEMU_USB_UHCI_H
+
+#include "qemu-common.h"
+
+void usb_uhci_piix3_init(PCIBus *bus, int devfn);
+void usb_uhci_piix4_init(PCIBus *bus, int devfn);
+
+#endif
index 226c616ee30f6a180ab12105eebe4731100641f6..391f5b88c6bf8e98d5c22935d9b706b7a3adaeb9 100644 (file)
@@ -14,6 +14,7 @@
 #include "net.h"
 #include "sysemu.h"
 #include "pci.h"
+#include "usb-ohci.h"
 #include "boards.h"
 
 /* Primary interrupt controller.  */
index 33e876e959bd27f6b724aaaae57cb4f60b72ea43..bb3410105fb0f01122a3df0929684bc47db6523e 100644 (file)
@@ -24,6 +24,7 @@
 #include "hw.h"
 #include "console.h"
 #include "pci.h"
+#include "vmware_vga.h"
 
 #define VERBOSE
 #undef DIRECT_VRAM
diff --git a/hw/vmware_vga.h b/hw/vmware_vga.h
new file mode 100644 (file)
index 0000000..2e0813c
--- /dev/null
@@ -0,0 +1,9 @@
+#ifndef QEMU_VMWARE_VGA_H
+#define QEMU_VMWARE_VGA_H
+
+#include "qemu-common.h"
+
+/* vmware_vga.c */
+void pci_vmsvga_init(PCIBus *bus);
+
+#endif