From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34600) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJlYS-0005hU-2p for qemu-devel@nongnu.org; Wed, 11 Sep 2013 10:38:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJlYH-0005g1-Sy for qemu-devel@nongnu.org; Wed, 11 Sep 2013 10:38:04 -0400 Received: from cantor2.suse.de ([195.135.220.15]:45151 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJlYH-0005f4-Kz for qemu-devel@nongnu.org; Wed, 11 Sep 2013 10:37:53 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 11 Sep 2013 16:37:37 +0200 Message-Id: <1378910260-7688-22-git-send-email-afaerber@suse.de> In-Reply-To: <1378910260-7688-1-git-send-email-afaerber@suse.de> References: <1378910260-7688-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v4 21/24] realview_gic: Prepare for QOM embedding List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , =?UTF-8?q?Andreas=20F=C3=A4rber?= Move state struct, type constant and cast macro to a new header. Signed-off-by: Andreas F=C3=A4rber --- hw/intc/realview_gic.c | 15 +-------------- include/hw/intc/realview_gic.h | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 14 deletions(-) create mode 100644 include/hw/intc/realview_gic.h diff --git a/hw/intc/realview_gic.c b/hw/intc/realview_gic.c index 4ff48bb..6c81296 100644 --- a/hw/intc/realview_gic.c +++ b/hw/intc/realview_gic.c @@ -7,20 +7,7 @@ * This code is licensed under the GPL. */ =20 -#include "hw/sysbus.h" -#include "hw/intc/arm_gic.h" - -#define TYPE_REALVIEW_GIC "realview_gic" -#define REALVIEW_GIC(obj) \ - OBJECT_CHECK(RealViewGICState, (obj), TYPE_REALVIEW_GIC) - -typedef struct RealViewGICState { - SysBusDevice parent_obj; - - MemoryRegion container; - - GICState gic; -} RealViewGICState; +#include "hw/intc/realview_gic.h" =20 static void realview_gic_set_irq(void *opaque, int irq, int level) { diff --git a/include/hw/intc/realview_gic.h b/include/hw/intc/realview_gi= c.h new file mode 100644 index 0000000..1783ea1 --- /dev/null +++ b/include/hw/intc/realview_gic.h @@ -0,0 +1,28 @@ +/* + * ARM RealView Emulation Baseboard Interrupt Controller + * + * Copyright (c) 2006-2007 CodeSourcery. + * Written by Paul Brook + * + * This code is licensed under the GPL. + */ + +#ifndef HW_INTC_REALVIEW_GIC_H +#define HW_INTC_REALVIEW_GIC_H + +#include "hw/sysbus.h" +#include "hw/intc/arm_gic.h" + +#define TYPE_REALVIEW_GIC "realview_gic" +#define REALVIEW_GIC(obj) \ + OBJECT_CHECK(RealViewGICState, (obj), TYPE_REALVIEW_GIC) + +typedef struct RealViewGICState { + SysBusDevice parent_obj; + + MemoryRegion container; + + GICState gic; +} RealViewGICState; + +#endif --=20 1.8.1.4