aboutsummaryrefslogtreecommitdiff
path: root/hw/isa.h
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-07-31 12:30:14 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-08-10 13:05:28 -0500
commitf915a11563a6b4377acbf9ff800bcfbc9225f1d3 (patch)
tree70bc1a4f938eea10282b8c9d919848f7a5cf0891 /hw/isa.h
parentd176c495b6664b72dc1e595f6e89dc5648aa248b (diff)
qdev/isa: add isa bus support to qdev.
Pretty simple and straigt forward. IRQs modeled simliar to sysbus. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-Id:
Diffstat (limited to 'hw/isa.h')
-rw-r--r--hw/isa.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/hw/isa.h b/hw/isa.h
index f126eccb14..49c58f84fa 100644
--- a/hw/isa.h
+++ b/hw/isa.h
@@ -1,8 +1,33 @@
#ifndef HW_ISA_H
#define HW_ISA_H
+
/* ISA bus */
#include "ioport.h"
+#include "qdev.h"
+
+typedef struct ISABus ISABus;
+typedef struct ISADevice ISADevice;
+typedef struct ISADeviceInfo ISADeviceInfo;
+
+struct ISADevice {
+ DeviceState qdev;
+ uint32_t iobase[2];
+ qemu_irq *irqs[2];
+ int nirqs;
+};
+
+typedef void (*isa_qdev_initfn)(ISADevice *dev);
+struct ISADeviceInfo {
+ DeviceInfo qdev;
+ isa_qdev_initfn init;
+};
+
+ISABus *isa_bus_new(DeviceState *dev);
+void isa_connect_irq(ISADevice *dev, int n, qemu_irq irq);
+void isa_init_irq(ISADevice *dev, qemu_irq *p);
+void isa_qdev_register(ISADeviceInfo *info);
+ISADevice *isa_create_simple(const char *name, uint32_t iobase, uint32_t iobase2);
extern target_phys_addr_t isa_mem_base;