From patchwork Thu Jul 4 15:13:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 256916 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 83AC32C0092 for ; Fri, 5 Jul 2013 01:18:24 +1000 (EST) Received: from localhost ([::1]:49744 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UulIc-0005fr-72 for incoming@patchwork.ozlabs.org; Thu, 04 Jul 2013 11:18:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44334) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UulEo-0007uI-7B for qemu-devel@nongnu.org; Thu, 04 Jul 2013 11:14:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UulEm-0004rq-OW for qemu-devel@nongnu.org; Thu, 04 Jul 2013 11:14:26 -0400 Received: from mail-we0-x236.google.com ([2a00:1450:400c:c03::236]:54713) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UulEm-0004rh-Ad for qemu-devel@nongnu.org; Thu, 04 Jul 2013 11:14:24 -0400 Received: by mail-we0-f182.google.com with SMTP id p60so1205693wes.41 for ; Thu, 04 Jul 2013 08:14:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=JHJuv7Z+O7bEiEiMZovu30u6OsbyEf6iET7YhLFgLGA=; b=l0NkIVEEzARXBiLKNdpToUh7gIis18ZEpwauq8BYeNOdUJAewmuTWyDvTabHonYt8D Hc6a8ARqQQKsqmBZBiofS1LyzvhZq7rrsreLVVEEe/5byEf+86XITNey0i1Is6S6crIM mMtNbXeLoSFgNL1N3EZxS2MSL2sBdP3o7KLvrHtB1bQM59QUNXYk3BE4F9OsmA61PbRm kZzoXxyecJlrBFRjXGPXWfLsQR5S6t0mg7Phztik2I8gRzsc4nXlSeCprMr+vMZVuB6H LHWx40H8MjJvK3WihUco/hTEW6uCl1vy+m4j/M7ILELPJmfvqItZxNo9yjfEexA+LGd1 4iqA== X-Received: by 10.180.83.68 with SMTP id o4mr21566488wiy.5.1372950863723; Thu, 04 Jul 2013 08:14:23 -0700 (PDT) Received: from playground.station (net-37-117-148-210.cust.dsl.vodafone.it. [37.117.148.210]) by mx.google.com with ESMTPSA id d8sm4212546wiz.0.2013.07.04.08.14.21 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 04 Jul 2013 08:14:22 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 4 Jul 2013 17:13:02 +0200 Message-Id: <1372950842-32422-7-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1372950842-32422-1-git-send-email-pbonzini@redhat.com> References: <1372950842-32422-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c03::236 Cc: Jan Kiszka Subject: [Qemu-devel] [PATCH 06/66] 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 From: Jan Kiszka Convert over to memory regions to obsolete register_ioport*. Signed-off-by: Jan Kiszka Signed-off-by: Paolo Bonzini --- hw/watchdog/wdt_ib700.c | 12 ++++++++++-- 1 file 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)