@@ -163,6 +163,7 @@ void pc_basic_device_init(struct PCMachineState *pcms,
bool create_fdctrl,
uint32_t hpet_irqs);
void pc_nic_init(PCMachineClass *pcmc, ISABus *isa_bus, PCIBus *pci_bus);
+void pc_piix_init(MachineState *machine, const char *pci_type);
void pc_i8259_create(ISABus *isa_bus, qemu_irq *i8259_irqs);
@@ -111,7 +111,7 @@ static bool gigabyte_align(PCMachineState *pcms)
}
/* PC hardware initialisation */
-static void pc_init1(MachineState *machine, const char *pci_type)
+void pc_piix_init(MachineState *machine, const char *pci_type)
{
PCMachineState *pcms = PC_MACHINE(machine);
PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms);
@@ -437,7 +437,7 @@ static void pc_set_south_bridge(Object *obj, int value, Error **errp)
#ifdef CONFIG_ISAPC
static void pc_init_isa(MachineState *machine)
{
- pc_init1(machine, NULL);
+ pc_piix_init(machine, NULL);
}
#endif
@@ -447,7 +447,7 @@ static void pc_xen_hvm_init_pci(MachineState *machine)
const char *pci_type = xen_igd_gfx_pt_enabled() ?
TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE : TYPE_I440FX_PCI_DEVICE;
- pc_init1(machine, pci_type);
+ pc_piix_init(machine, pci_type);
}
static void pc_xen_hvm_init(MachineState *machine)
@@ -472,7 +472,7 @@ static void pc_xen_hvm_init(MachineState *machine)
if (compat) { \
compat(machine); \
} \
- pc_init1(machine, TYPE_I440FX_PCI_DEVICE); \
+ pc_piix_init(machine, TYPE_I440FX_PCI_DEVICE); \
} \
DEFINE_PC_MACHINE(suffix, name, pc_init_##suffix, optionfn, \
TYPE_PC_PCI_MACHINE)
@@ -432,7 +432,7 @@ static void pci_piix_class_init(ObjectClass *klass, void *data)
k->class_id = PCI_CLASS_BRIDGE_ISA;
/*
* Reason: part of PIIX southbridge, needs to be wired up by e.g.
- * pc_piix.c's pc_init1()
+ * pc_piix.c's pc_piix_init()
*/
dc->user_creatable = false;
device_class_set_props(dc, pci_piix_props);
@@ -374,7 +374,7 @@ static void i440fx_pcihost_class_init(ObjectClass *klass, void *data)
dc->realize = i440fx_pcihost_realize;
dc->fw_name = "pci";
device_class_set_props(dc, i440fx_props);
- /* Reason: needs to be wired up by pc_init1 */
+ /* Reason: needs to be wired up by pc_piix_init */
dc->user_creatable = false;
object_class_property_add(klass, PCI_HOST_PROP_PCI_HOLE_START, "uint32",
pc_init1() is specific to the isapc and i440fx/piix machines, rename it as pc_piix_init(). Expose it in "hw/i386/pc.h" to be able to call it externally (see next patch). Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- include/hw/i386/pc.h | 1 + hw/i386/pc_piix.c | 8 ++++---- hw/isa/piix.c | 2 +- hw/pci-host/i440fx.c | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-)