From b5917219090d14065196fc2dca15562e13c23a26 Mon Sep 17 00:00:00 2001 From: Peter Crosthwaite Date: Thu, 25 Sep 2014 22:24:15 -0700 Subject: 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 Signed-off-by: Peter Crosthwaite Signed-off-by: Paolo Bonzini --- include/hw/sysbus.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'include/hw/sysbus.h') 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; -- cgit v1.2.3