From patchwork Mon May 6 14:26:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 241742 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 527712C0107 for ; Tue, 7 May 2013 03:57:03 +1000 (EST) Received: from localhost ([::1]:40195 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZMUs-0006ti-F6 for incoming@patchwork.ozlabs.org; Mon, 06 May 2013 10:34:34 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41826) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZMNf-0006KD-Ez for qemu-devel@nongnu.org; Mon, 06 May 2013 10:27:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZMNd-0005oF-QN for qemu-devel@nongnu.org; Mon, 06 May 2013 10:27:07 -0400 Received: from goliath.siemens.de ([192.35.17.28]:25314) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZMNd-0005oB-Gd for qemu-devel@nongnu.org; Mon, 06 May 2013 10:27:05 -0400 Received: from mail1.siemens.de (localhost [127.0.0.1]) by goliath.siemens.de (8.13.6/8.13.6) with ESMTP id r46EQKf9014125; Mon, 6 May 2013 16:26:20 +0200 Received: from mchn199C.mchp.siemens.de ([139.25.109.49]) by mail1.siemens.de (8.13.6/8.13.6) with ESMTP id r46EQJBJ011305; Mon, 6 May 2013 16:26:20 +0200 From: Jan Kiszka To: qemu-devel Date: Mon, 6 May 2013 16:26:07 +0200 Message-Id: <96788b0a8f90d9f8eba9ae514f238a0f898df059.1367849167.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] [RFC][PATCH 04/15] i82374: 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/dma/i82374.c | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/hw/dma/i82374.c b/hw/dma/i82374.c index f3d1924..3cc9aab 100644 --- a/hw/dma/i82374.c +++ b/hw/dma/i82374.c @@ -124,16 +124,23 @@ static const VMStateDescription vmstate_isa_i82374 = { }, }; +static const MemoryRegionPortio i82374_portio_list[] = { + { 0x0A, 1, 1, .read = i82374_read_isr, }, + { 0x10, 8, 1, .write = i82374_write_command, }, + { 0x18, 8, 1, .read = i82374_read_status, }, + { 0x20, 0x20, 1, + .write = i82374_write_descriptor, .read = i82374_read_descriptor, }, + PORTIO_END_OF_LIST(), +}; + static int i82374_isa_init(ISADevice *dev) { ISAi82374State *isa = I82374(dev); I82374State *s = &isa->state; + PortioList *port_list = g_new(PortioList, 1); - register_ioport_read(isa->iobase + 0x0A, 1, 1, i82374_read_isr, s); - register_ioport_write(isa->iobase + 0x10, 8, 1, i82374_write_command, s); - register_ioport_read(isa->iobase + 0x18, 8, 1, i82374_read_status, s); - register_ioport_write(isa->iobase + 0x20, 0x20, 1, i82374_write_descriptor, s); - register_ioport_read(isa->iobase + 0x20, 0x20, 1, i82374_read_descriptor, s); + portio_list_init(port_list, i82374_portio_list, s, "i82374"); + portio_list_add(port_list, isa_address_space_io(dev), isa->iobase); i82374_init(s);