aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Crosthwaite <peter.crosthwaite@xilinx.com>2014-09-25 22:24:15 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2014-10-23 16:41:26 +0200
commitb5917219090d14065196fc2dca15562e13c23a26 (patch)
treeea5c4c3d172c52694caece35f1f5dce32dff48b1 /include
parent17a96a146cb5195ab1f6b5cf48645f9f6450539f (diff)
sysbus: Use TYPE_DEVICE GPIO functionality
Re-implement the Sysbus GPIOs to use the existing TYPE_DEVICE GPIO named framework. A constant string name is chosen to avoid conflicts with existing unnamed GPIOs. This unifies GPIOs are IRQs for sysbus devices and allows removal of all Sysbus state for GPIOs. Any existing and future-added functionality for GPIOs is now also available for sysbus IRQs. Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/sysbus.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/hw/sysbus.h b/include/hw/sysbus.h
index 0bb91a8824..9fb1782d7b 100644
--- a/include/hw/sysbus.h
+++ b/include/hw/sysbus.h
@@ -8,7 +8,6 @@
#define QDEV_MAX_MMIO 32
#define QDEV_MAX_PIO 32
-#define QDEV_MAX_IRQ 512
#define TYPE_SYSTEM_BUS "System"
#define SYSTEM_BUS(obj) OBJECT_CHECK(IDEBus, (obj), TYPE_IDE_BUS)
@@ -33,6 +32,9 @@ typedef struct SysBusDevice SysBusDevice;
* SysBusDeviceClass is not overriding #DeviceClass.realize, so derived
* classes overriding it are not required to invoke its implementation.
*/
+
+#define SYSBUS_DEVICE_GPIO_IRQ "sysbus-irq"
+
typedef struct SysBusDeviceClass {
/*< private >*/
DeviceClass parent_class;
@@ -46,9 +48,6 @@ struct SysBusDevice {
DeviceState parent_obj;
/*< public >*/
- int num_irq;
- qemu_irq irqs[QDEV_MAX_IRQ];
- qemu_irq *irqp[QDEV_MAX_IRQ];
int num_mmio;
struct {
hwaddr addr;