aboutsummaryrefslogtreecommitdiff
path: root/hw/spapr_vio.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2011-05-26 11:52:45 +0200
committerAlexander Graf <agraf@suse.de>2011-10-06 09:43:32 +0200
commit77c7ea5ebbcf494f36f243d786e5f8409d7a4b85 (patch)
tree06e25e43fc61814541dbe33b103ab89a9e875242 /hw/spapr_vio.h
parent277f9acf79bbf3affb98200c92a4aedaa3234083 (diff)
spapr: prepare for qdevification of irq
Restructure common properties for sPAPR devices so that IRQ definitions can be added in one place. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Cc: Alexander Graf <agraf@suse.de> Cc: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/spapr_vio.h')
-rw-r--r--hw/spapr_vio.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/spapr_vio.h b/hw/spapr_vio.h
index faa5d94d7a..7eb5367653 100644
--- a/hw/spapr_vio.h
+++ b/hw/spapr_vio.h
@@ -60,6 +60,11 @@ typedef struct VIOsPAPRDevice {
VIOsPAPR_CRQ crq;
} VIOsPAPRDevice;
+#define DEFINE_SPAPR_PROPERTIES(type, field, default_reg, default_dma_window) \
+ DEFINE_PROP_UINT32("reg", type, field.reg, default_reg), \
+ DEFINE_PROP_UINT32("dma-window", type, field.rtce_window_size, \
+ default_dma_window)
+
typedef struct VIOsPAPRBus {
BusState bus;
int irq;