From patchwork Fri Jun 21 16:41:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 253292 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 E57BF2C03B3 for ; Sat, 22 Jun 2013 03:37:56 +1000 (EST) Received: from localhost ([::1]:41683 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uq4SY-0006DR-1H for incoming@patchwork.ozlabs.org; Fri, 21 Jun 2013 12:45:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60251) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uq4PT-0002A4-1v for qemu-devel@nongnu.org; Fri, 21 Jun 2013 12:42:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uq4PR-0006zm-1m for qemu-devel@nongnu.org; Fri, 21 Jun 2013 12:42:02 -0400 Received: from goliath.siemens.de ([192.35.17.28]:17844) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uq4PQ-0006zX-Mk for qemu-devel@nongnu.org; Fri, 21 Jun 2013 12:42:00 -0400 Received: from mail1.siemens.de (localhost [127.0.0.1]) by goliath.siemens.de (8.13.6/8.13.6) with ESMTP id r5LGfkjr021845; Fri, 21 Jun 2013 18:41:46 +0200 Received: from mchn199C.mchp.siemens.de ([139.25.109.49]) by mail1.siemens.de (8.13.6/8.13.6) with ESMTP id r5LGfk5K023216; Fri, 21 Jun 2013 18:41:46 +0200 From: Jan Kiszka To: qemu-devel Date: Fri, 21 Jun 2013 18:41:35 +0200 Message-Id: <42baf38b4e4d8b720b39df22980c46484ecd4601.1371832904.git.jan.kiszka@siemens.com> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 192.35.17.28 Cc: Paolo Bonzini , Liu Ping Fan , =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [Qemu-devel] [PATCH v2 03/13] wdt_ib700: replace register_ioport* 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 Convert over to memory regions to obsolete register_ioport*. Signed-off-by: Jan Kiszka --- hw/watchdog/wdt_ib700.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/hw/watchdog/wdt_ib700.c b/hw/watchdog/wdt_ib700.c index d85c894..597a923 100644 --- a/hw/watchdog/wdt_ib700.c +++ b/hw/watchdog/wdt_ib700.c @@ -97,15 +97,23 @@ static const VMStateDescription vmstate_ib700 = { } }; +static const MemoryRegionPortio wdt_portio_list[] = { + { 0x441, 2, 1, .write = ib700_write_disable_reg, }, + { 0x443, 2, 1, .write = ib700_write_enable_reg, }, + PORTIO_END_OF_LIST(), +}; + static void wdt_ib700_realize(DeviceState *dev, Error **errp) { IB700State *s = IB700(dev); + PortioList *port_list = g_new(PortioList, 1); ib700_debug("watchdog init\n"); s->timer = qemu_new_timer_ns(vm_clock, ib700_timer_expired, s); - register_ioport_write(0x441, 2, 1, ib700_write_disable_reg, s); - register_ioport_write(0x443, 2, 1, ib700_write_enable_reg, s); + + portio_list_init(port_list, wdt_portio_list, s, "ib700"); + portio_list_add(port_list, isa_address_space_io(&s->parent_obj), 0); } static void wdt_ib700_reset(DeviceState *dev)