[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 16/26] pc: split out pci device init from pc_init1()
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH 16/26] pc: split out pci device init from pc_init1() into pc_pci_device_init() |
Date: |
Fri, 14 May 2010 16:29:14 +0900 |
Split out pci device initialization from pc_init1() into pc_pci_device_init().
and removed unnecessary braces.
Signed-off-by: Isaku Yamahata <address@hidden>
Acked-by: Gerd Hoffmann <address@hidden>
---
hw/pc.c | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/hw/pc.c b/hw/pc.c
index d820a51..5c8a11b 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -997,6 +997,17 @@ static void pc_basic_device_init(qemu_irq *isa_irq,
*floppy_controller = fdctrl_init_isa(fd);
}
+static void pc_pci_device_init(PCIBus *pci_bus)
+{
+ int max_bus;
+ int bus;
+
+ max_bus = drive_get_max_bus(IF_SCSI);
+ for (bus = 0; bus <= max_bus; bus++) {
+ pci_create_simple(pci_bus, -1, "lsi53c895a");
+ }
+}
+
/* PC hardware initialisation */
static void pc_init1(ram_addr_t ram_size,
const char *boot_device,
@@ -1116,13 +1127,7 @@ static void pc_init1(ram_addr_t ram_size,
}
if (pci_enabled) {
- int max_bus;
- int bus;
-
- max_bus = drive_get_max_bus(IF_SCSI);
- for (bus = 0; bus <= max_bus; bus++) {
- pci_create_simple(pci_bus, -1, "lsi53c895a");
- }
+ pc_pci_device_init(pci_bus);
}
}
--
1.6.6.1
- [Qemu-devel] [PATCH 14/26] pc: split out vga initialization from pc_init1() into pc_vga_init()., (continued)
- [Qemu-devel] [PATCH 14/26] pc: split out vga initialization from pc_init1() into pc_vga_init()., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 24/26] acpi_piix4: remove #ifdef DEBUG., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 21/26] pci hotplug: add argument to pci hot plug callback., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 18/26] pc: move rtc declarations from pc.h into a dedicated header file., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 25/26] apm: remove #ifdef DEBUG., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 26/26] mc146818rtc: remove #ifdef DEBUG_CMOS., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 03/26] acpi: add acpi constants from linux header files and use them., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 12/26] pc: split out cpu initialization from pc_init1() into pc_cpus_init()., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 20/26] acpi_piix4: qdevfy., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 23/26] pm_smbus: remove #ifdef DEBUG., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 16/26] pc: split out pci device init from pc_init1() into pc_pci_device_init(),
Isaku Yamahata <=
- [Qemu-devel] [PATCH 17/26] pc: split out piix specific part from pc.c into pc_piix.c, Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 19/26] rtc: make rtc_xxx accept/return ISADevice instead of RTCState., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 22/26] pci hotadd, acpi_piix4: remove global variables, Isaku Yamahata, 2010/05/14
- [Qemu-devel] Re: [PATCH 00/26] split out piix specific part from pc emulator and some clean ups, Blue Swirl, 2010/05/15