From patchwork Wed Jul 24 23:16:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 261560 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 81ABA2C007C for ; Thu, 25 Jul 2013 09:21:08 +1000 (EST) Received: from localhost ([::1]:39516 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V28Mk-0006rq-IT for incoming@patchwork.ozlabs.org; Wed, 24 Jul 2013 19:21:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56799) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V28Is-0000c9-UT for qemu-devel@nongnu.org; Wed, 24 Jul 2013 19:17:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V28Iq-0001pQ-P1 for qemu-devel@nongnu.org; Wed, 24 Jul 2013 19:17:06 -0400 Received: from cantor2.suse.de ([195.135.220.15]:50939 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V28Iq-0001pJ-Cx for qemu-devel@nongnu.org; Wed, 24 Jul 2013 19:17:04 -0400 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 010DAA51CB for ; Thu, 25 Jul 2013 01:17:04 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Thu, 25 Jul 2013 01:16:50 +0200 Message-Id: <1374707812-21404-7-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1374707812-21404-1-git-send-email-afaerber@suse.de> References: <1374707812-21404-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 195.135.220.15 Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [Qemu-devel] [PATCH qom-next for-1.6 6/8] pl110: Rename pl110_state to PL110State X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Andreas Färber --- hw/display/pl110.c | 64 +++++++++++++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/hw/display/pl110.c b/hw/display/pl110.c index 60afcf3..7c2cd36 100644 --- a/hw/display/pl110.c +++ b/hw/display/pl110.c @@ -39,7 +39,7 @@ enum pl110_version PL111 }; -typedef struct { +typedef struct PL110State { SysBusDevice busdev; MemoryRegion iomem; QemuConsole *con; @@ -59,7 +59,7 @@ typedef struct { uint32_t palette[256]; uint32_t raw_palette[128]; qemu_irq irq; -} pl110_state; +} PL110State; static int vmstate_pl110_post_load(void *opaque, int version_id); @@ -69,20 +69,20 @@ static const VMStateDescription vmstate_pl110 = { .minimum_version_id = 1, .post_load = vmstate_pl110_post_load, .fields = (VMStateField[]) { - VMSTATE_INT32(version, pl110_state), - VMSTATE_UINT32_ARRAY(timing, pl110_state, 4), - VMSTATE_UINT32(cr, pl110_state), - VMSTATE_UINT32(upbase, pl110_state), - VMSTATE_UINT32(lpbase, pl110_state), - VMSTATE_UINT32(int_status, pl110_state), - VMSTATE_UINT32(int_mask, pl110_state), - VMSTATE_INT32(cols, pl110_state), - VMSTATE_INT32(rows, pl110_state), - VMSTATE_UINT32(bpp, pl110_state), - VMSTATE_INT32(invalidate, pl110_state), - VMSTATE_UINT32_ARRAY(palette, pl110_state, 256), - VMSTATE_UINT32_ARRAY(raw_palette, pl110_state, 128), - VMSTATE_UINT32_V(mux_ctrl, pl110_state, 2), + VMSTATE_INT32(version, PL110State), + VMSTATE_UINT32_ARRAY(timing, PL110State, 4), + VMSTATE_UINT32(cr, PL110State), + VMSTATE_UINT32(upbase, PL110State), + VMSTATE_UINT32(lpbase, PL110State), + VMSTATE_UINT32(int_status, PL110State), + VMSTATE_UINT32(int_mask, PL110State), + VMSTATE_INT32(cols, PL110State), + VMSTATE_INT32(rows, PL110State), + VMSTATE_UINT32(bpp, PL110State), + VMSTATE_INT32(invalidate, PL110State), + VMSTATE_UINT32_ARRAY(palette, PL110State, 256), + VMSTATE_UINT32_ARRAY(raw_palette, PL110State, 128), + VMSTATE_UINT32_V(mux_ctrl, PL110State, 2), VMSTATE_END_OF_LIST() } }; @@ -121,14 +121,14 @@ static const unsigned char *idregs[] = { #define BITS 32 #include "pl110_template.h" -static int pl110_enabled(pl110_state *s) +static int pl110_enabled(PL110State *s) { return (s->cr & PL110_CR_EN) && (s->cr & PL110_CR_PWR); } static void pl110_update_display(void *opaque) { - pl110_state *s = (pl110_state *)opaque; + PL110State *s = (PL110State *)opaque; DisplaySurface *surface = qemu_console_surface(s->con); drawfn* fntable; drawfn fn; @@ -246,14 +246,14 @@ static void pl110_update_display(void *opaque) static void pl110_invalidate_display(void * opaque) { - pl110_state *s = (pl110_state *)opaque; + PL110State *s = (PL110State *)opaque; s->invalidate = 1; if (pl110_enabled(s)) { qemu_console_resize(s->con, s->cols, s->rows); } } -static void pl110_update_palette(pl110_state *s, int n) +static void pl110_update_palette(PL110State *s, int n) { DisplaySurface *surface = qemu_console_surface(s->con); int i; @@ -289,7 +289,7 @@ static void pl110_update_palette(pl110_state *s, int n) } } -static void pl110_resize(pl110_state *s, int width, int height) +static void pl110_resize(PL110State *s, int width, int height) { if (width != s->cols || height != s->rows) { if (pl110_enabled(s)) { @@ -301,7 +301,7 @@ static void pl110_resize(pl110_state *s, int width, int height) } /* Update interrupts. */ -static void pl110_update(pl110_state *s) +static void pl110_update(PL110State *s) { /* TODO: Implement interrupts. */ } @@ -309,7 +309,7 @@ static void pl110_update(pl110_state *s) static uint64_t pl110_read(void *opaque, hwaddr offset, unsigned size) { - pl110_state *s = (pl110_state *)opaque; + PL110State *s = (PL110State *)opaque; if (offset >= 0xfe0 && offset < 0x1000) { return idregs[s->version][(offset - 0xfe0) >> 2]; @@ -359,7 +359,7 @@ static uint64_t pl110_read(void *opaque, hwaddr offset, static void pl110_write(void *opaque, hwaddr offset, uint64_t val, unsigned size) { - pl110_state *s = (pl110_state *)opaque; + PL110State *s = (PL110State *)opaque; int n; /* For simplicity invalidate the display whenever a control register @@ -432,13 +432,13 @@ static const MemoryRegionOps pl110_ops = { static void pl110_mux_ctrl_set(void *opaque, int line, int level) { - pl110_state *s = (pl110_state *)opaque; + PL110State *s = (PL110State *)opaque; s->mux_ctrl = level; } static int vmstate_pl110_post_load(void *opaque, int version_id) { - pl110_state *s = opaque; + PL110State *s = opaque; /* Make sure we redraw, and at the right size */ pl110_invalidate_display(s); return 0; @@ -451,7 +451,7 @@ static const GraphicHwOps pl110_gfx_ops = { static int pl110_init(SysBusDevice *dev) { - pl110_state *s = FROM_SYSBUS(pl110_state, dev); + PL110State *s = FROM_SYSBUS(PL110State, dev); memory_region_init_io(&s->iomem, OBJECT(s), &pl110_ops, s, "pl110", 0x1000); sysbus_init_mmio(dev, &s->iomem); @@ -463,14 +463,14 @@ static int pl110_init(SysBusDevice *dev) static int pl110_versatile_init(SysBusDevice *dev) { - pl110_state *s = FROM_SYSBUS(pl110_state, dev); + PL110State *s = FROM_SYSBUS(PL110State, dev); s->version = PL110_VERSATILE; return pl110_init(dev); } static int pl111_init(SysBusDevice *dev) { - pl110_state *s = FROM_SYSBUS(pl110_state, dev); + PL110State *s = FROM_SYSBUS(PL110State, dev); s->version = PL111; return pl110_init(dev); } @@ -488,7 +488,7 @@ static void pl110_class_init(ObjectClass *klass, void *data) static const TypeInfo pl110_info = { .name = "pl110", .parent = TYPE_SYS_BUS_DEVICE, - .instance_size = sizeof(pl110_state), + .instance_size = sizeof(PL110State), .class_init = pl110_class_init, }; @@ -505,7 +505,7 @@ static void pl110_versatile_class_init(ObjectClass *klass, void *data) static const TypeInfo pl110_versatile_info = { .name = "pl110_versatile", .parent = TYPE_SYS_BUS_DEVICE, - .instance_size = sizeof(pl110_state), + .instance_size = sizeof(PL110State), .class_init = pl110_versatile_class_init, }; @@ -522,7 +522,7 @@ static void pl111_class_init(ObjectClass *klass, void *data) static const TypeInfo pl111_info = { .name = "pl111", .parent = TYPE_SYS_BUS_DEVICE, - .instance_size = sizeof(pl110_state), + .instance_size = sizeof(PL110State), .class_init = pl111_class_init, };