All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: qemu-devel <qemu-devel@nongnu.org>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Liu Ping Fan" <pingfank@linux.vnet.ibm.com>,
	"Hervé Poussineau" <hpoussin@reactos.org>,
	"Andreas Färber" <afaerber@suse.de>,
	"Jan Kiszka" <jan.kiszka@siemens.com>
Subject: [Qemu-devel] [PATCH v3 04/14] i82374: replace register_ioport*
Date: Sat, 22 Jun 2013 08:06:57 +0200	[thread overview]
Message-ID: <ee341f258f2bae53476e5b6702473764f43ca9ee.1371881222.git.jan.kiszka@web.de> (raw)
In-Reply-To: <cover.1371881222.git.jan.kiszka@web.de>
In-Reply-To: <cover.1371881222.git.jan.kiszka@web.de>

From: Jan Kiszka <jan.kiszka@siemens.com>

Convert over to memory regions to obsolete register_ioport*.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 hw/dma/i82374.c |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/hw/dma/i82374.c b/hw/dma/i82374.c
index 6192780..ecda5cb 100644
--- a/hw/dma/i82374.c
+++ b/hw/dma/i82374.c
@@ -124,16 +124,24 @@ 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 void i82374_isa_realize(DeviceState *dev, Error **errp)
 {
     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(&isa->parent_obj),
+                    isa->iobase);
 
     i82374_realize(s, errp);
 
-- 
1.7.3.4

  parent reply	other threads:[~2013-06-22  6:07 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-22  6:06 [Qemu-devel] [PATCH v3 00/14] Refactor portio dispatching Jan Kiszka
2013-06-22  6:06 ` [Qemu-devel] [PATCH v3 01/14] adlib: replace register_ioport* Jan Kiszka
2013-06-22  6:06 ` [Qemu-devel] [PATCH v3 02/14] applesmc: " Jan Kiszka
2013-06-22  6:06 ` [Qemu-devel] [PATCH v3 03/14] wdt_ib700: " Jan Kiszka
2013-06-22  6:06 ` Jan Kiszka [this message]
2013-06-22  6:06 ` [Qemu-devel] [PATCH v3 05/14] prep: " Jan Kiszka
2013-06-22  6:06 ` [Qemu-devel] [PATCH v3 06/14] vt82c686: " Jan Kiszka
2013-06-22  6:07 ` [Qemu-devel] [PATCH v3 07/14] Privatize register_ioport_read/write Jan Kiszka
2013-06-22  6:07 ` [Qemu-devel] [PATCH v3 08/14] isa: implement isa_is_ioport_assigned via memory_region_find Jan Kiszka
2013-06-22  6:07 ` [Qemu-devel] [PATCH v3 09/14] vmware-vga: Accept unaligned I/O accesses Jan Kiszka
2013-06-22  6:07 ` [Qemu-devel] [PATCH v3 10/14] xen: Mark fixed platform I/O as unaligned Jan Kiszka
2013-06-22  6:07 ` [Qemu-devel] [PATCH v3 11/14] ioport: Switch dispatching to memory core layer Jan Kiszka
2013-06-23 20:50   ` Hervé Poussineau
2013-06-24  6:07     ` Jan Kiszka
2013-07-11 12:29       ` Alexander Graf
2013-07-11 12:34         ` Alexander Graf
2013-07-11 12:46           ` Andreas Färber
2013-07-11 12:48             ` Alexander Graf
2013-07-11 13:28               ` Alexander Graf
2013-07-11 13:35                 ` Alexander Graf
2013-07-11 22:30                 ` [Qemu-devel] [Qemu-ppc] " Benjamin Herrenschmidt
2013-07-11 22:32                 ` Benjamin Herrenschmidt
2013-07-12  3:18                   ` Alexander Graf
2013-07-12 11:35                     ` Benjamin Herrenschmidt
2013-07-12 17:04                       ` Hervé Poussineau
2013-07-12 19:06                         ` Anthony Liguori
2013-07-12 22:59                           ` Benjamin Herrenschmidt
2013-07-12 22:39                         ` Benjamin Herrenschmidt
2013-07-12 17:49                       ` Anthony Liguori
2013-07-12 18:26                         ` Peter Maydell
2013-07-12 22:50                           ` Benjamin Herrenschmidt
2013-07-12 23:10                             ` Peter Maydell
2013-07-12 23:49                               ` Benjamin Herrenschmidt
2013-07-15 14:01                               ` Anthony Liguori
2013-07-15 14:10                                 ` Peter Maydell
2013-07-15 14:16                                 ` Benjamin Herrenschmidt
2013-07-12 22:44                         ` Benjamin Herrenschmidt
2013-07-13 14:38             ` [Qemu-devel] " Paolo Bonzini
2013-07-13 15:22               ` Anthony Liguori
2013-07-13 18:11                 ` Hervé Poussineau
2013-07-14  6:15                 ` Paolo Bonzini
2013-07-14 13:05                   ` Anthony Liguori
2013-07-14 14:58                     ` Peter Maydell
2013-07-14 15:18                       ` Anthony Liguori
2013-07-14 16:50                         ` Peter Maydell
2013-07-16  7:18                         ` Jan Kiszka
2013-07-16  7:33                           ` Paolo Bonzini
2013-07-16 16:59                             ` Hervé Poussineau
2013-07-16 17:12                               ` Paolo Bonzini
2013-07-12 12:56           ` Anthony Liguori
2013-07-12 14:30             ` Alexander Graf
2013-07-19 11:09         ` [Qemu-devel] BUG: " Alexey Kardashevskiy
2013-07-19 12:49           ` Paolo Bonzini
2013-07-19 15:48             ` Alexey Kardashevskiy
2013-07-20  0:55               ` Alexey Kardashevskiy
2013-07-20  1:11                 ` Alexey Kardashevskiy
2013-07-20 10:11                   ` Paolo Bonzini
2013-07-20 20:53                     ` Edgar E. Iglesias
2013-07-21 15:13                     ` Hervé Poussineau
2013-07-22 10:25                       ` Paolo Bonzini
2013-06-24  8:45     ` [Qemu-devel] [PATCH v4 " Jan Kiszka
2013-07-12 19:36     ` [Qemu-devel] [PATCH v3 " Anthony Liguori
2013-06-22  6:07 ` [Qemu-devel] [PATCH v3 12/14] ioport: Remove unused old dispatching services Jan Kiszka
2013-06-22  6:07 ` [Qemu-devel] [PATCH v3 13/14] vmport: Disentangle read handler type from portio Jan Kiszka
2013-06-22  6:07 ` [Qemu-devel] [PATCH v3 14/14] ioport: Move portio types to ioport.h Jan Kiszka
2013-06-23 20:45 ` [Qemu-devel] [PATCH v3 00/14] Refactor portio dispatching Hervé Poussineau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ee341f258f2bae53476e5b6702473764f43ca9ee.1371881222.git.jan.kiszka@web.de \
    --to=jan.kiszka@web.de \
    --cc=afaerber@suse.de \
    --cc=hpoussin@reactos.org \
    --cc=jan.kiszka@siemens.com \
    --cc=pbonzini@redhat.com \
    --cc=pingfank@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.