aboutsummaryrefslogtreecommitdiff
path: root/hw/pc.h
diff options
context:
space:
mode:
authorHervé Poussineau <hpoussin@reactos.org>2011-12-15 22:09:51 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2011-12-20 15:44:30 -0600
commit48a18b3c698295e4d891f34e919615e84e20f027 (patch)
tree689d5ec205341895b0eef457f3c0313be53b5432 /hw/pc.h
parent0fa29915cdcadb5853515703d3eca8992627dcf2 (diff)
isa: give ISABus/ISADevice to isa_create(), isa_bus_irqs() and isa_get_irq() functions
NULL is a valid bus/device, so there is no change in behaviour. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/pc.h')
-rw-r--r--hw/pc.h35
1 files changed, 18 insertions, 17 deletions
diff --git a/hw/pc.h b/hw/pc.h
index b2000e7873..afb75352ee 100644
--- a/hw/pc.h
+++ b/hw/pc.h
@@ -20,11 +20,12 @@ SerialState *serial_mm_init(MemoryRegion *address_space,
target_phys_addr_t base, int it_shift,
qemu_irq irq, int baudbase,
CharDriverState *chr, enum device_endian);
-static inline bool serial_isa_init(int index, CharDriverState *chr)
+static inline bool serial_isa_init(ISABus *bus, int index,
+ CharDriverState *chr)
{
ISADevice *dev;
- dev = isa_try_create("isa-serial");
+ dev = isa_try_create(bus, "isa-serial");
if (!dev) {
return false;
}
@@ -39,11 +40,11 @@ static inline bool serial_isa_init(int index, CharDriverState *chr)
void serial_set_frequency(SerialState *s, uint32_t frequency);
/* parallel.c */
-static inline bool parallel_init(int index, CharDriverState *chr)
+static inline bool parallel_init(ISABus *bus, int index, CharDriverState *chr)
{
ISADevice *dev;
- dev = isa_try_create("isa-parallel");
+ dev = isa_try_create(bus, "isa-parallel");
if (!dev) {
return false;
}
@@ -63,7 +64,7 @@ bool parallel_mm_init(MemoryRegion *address_space,
typedef struct PicState PicState;
extern PicState *isa_pic;
-qemu_irq *i8259_init(qemu_irq parent_irq);
+qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq);
int pic_read_irq(PicState *s);
int pic_get_output(PicState *s);
void pic_info(Monitor *mon);
@@ -84,11 +85,11 @@ void gsi_handler(void *opaque, int n, int level);
#define PIT_FREQ 1193182
-static inline ISADevice *pit_init(int base, int irq)
+static inline ISADevice *pit_init(ISABus *bus, int base, int irq)
{
ISADevice *dev;
- dev = isa_create("isa-pit");
+ dev = isa_create(bus, "isa-pit");
qdev_prop_set_uint32(&dev->qdev, "iobase", base);
qdev_prop_set_uint32(&dev->qdev, "irq", irq);
qdev_init_nofail(&dev->qdev);
@@ -106,9 +107,9 @@ void hpet_pit_disable(void);
void hpet_pit_enable(void);
/* vmport.c */
-static inline void vmport_init(void)
+static inline void vmport_init(ISABus *bus)
{
- isa_create_simple("vmport");
+ isa_create_simple(bus, "vmport");
}
void vmport_register(unsigned char command, IOPortReadFunc *func, void *opaque);
void vmmouse_get_data(uint32_t *data);
@@ -140,12 +141,12 @@ void pc_memory_init(MemoryRegion *system_memory,
MemoryRegion *rom_memory,
MemoryRegion **ram_memory);
qemu_irq *pc_allocate_cpu_irq(void);
-DeviceState *pc_vga_init(PCIBus *pci_bus);
-void pc_basic_device_init(qemu_irq *gsi,
+DeviceState *pc_vga_init(ISABus *isa_bus, PCIBus *pci_bus);
+void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi,
ISADevice **rtc_state,
ISADevice **floppy,
bool no_vmport);
-void pc_init_ne2k_isa(NICInfo *nd);
+void pc_init_ne2k_isa(ISABus *bus, NICInfo *nd);
void pc_cmos_init(ram_addr_t ram_size, ram_addr_t above_4g_mem_size,
const char *boot_device,
ISADevice *floppy, BusState *ide0, BusState *ide1,
@@ -175,7 +176,7 @@ extern int no_hpet;
/* pcspk.c */
void pcspk_init(ISADevice *pit);
-int pcspk_audio_init(qemu_irq *pic);
+int pcspk_audio_init(ISABus *bus, qemu_irq *pic);
/* piix_pci.c */
struct PCII440FXState;
@@ -205,11 +206,11 @@ enum vga_retrace_method {
extern enum vga_retrace_method vga_retrace_method;
-static inline DeviceState *isa_vga_init(void)
+static inline DeviceState *isa_vga_init(ISABus *bus)
{
ISADevice *dev;
- dev = isa_try_create("isa-vga");
+ dev = isa_try_create(bus, "isa-vga");
if (!dev) {
fprintf(stderr, "Warning: isa-vga not available\n");
return NULL;
@@ -228,13 +229,13 @@ DeviceState *pci_cirrus_vga_init(PCIBus *bus);
DeviceState *isa_cirrus_vga_init(MemoryRegion *address_space);
/* ne2000.c */
-static inline bool isa_ne2000_init(int base, int irq, NICInfo *nd)
+static inline bool isa_ne2000_init(ISABus *bus, int base, int irq, NICInfo *nd)
{
ISADevice *dev;
qemu_check_nic_model(nd, "ne2k_isa");
- dev = isa_try_create("ne2k_isa");
+ dev = isa_try_create(bus, "ne2k_isa");
if (!dev) {
return false;
}