From patchwork Mon Oct 8 12:23:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 190008 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 97B0E2C00E7 for ; Mon, 8 Oct 2012 23:25:49 +1100 (EST) Received: from localhost ([::1]:56975 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLCP5-0007CW-NM for incoming@patchwork.ozlabs.org; Mon, 08 Oct 2012 08:25:47 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41826) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLCNc-0004KW-DZ for qemu-devel@nongnu.org; Mon, 08 Oct 2012 08:24:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLCNT-0005Ku-Ki for qemu-devel@nongnu.org; Mon, 08 Oct 2012 08:24:16 -0400 Received: from cantor2.suse.de ([195.135.220.15]:53028 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLCNT-0005Kp-ER; Mon, 08 Oct 2012 08:24:07 -0400 Received: from relay1.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id F1536A24CA; Mon, 8 Oct 2012 14:24:06 +0200 (CEST) From: Alexander Graf To: qemu-devel qemu-devel Date: Mon, 8 Oct 2012 14:23:46 +0200 Message-Id: <1349699033-6703-8-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: <1349699033-6703-1-git-send-email-agraf@suse.de> References: <1349699033-6703-1-git-send-email-agraf@suse.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 195.135.220.15 Cc: Anthony Liguori , xen-devel@lists.xensource.com, Stefano Stabellini , "qemu-ppc@nongnu.org List" , Avi Kivity , Scott Wood , David Gibson Subject: [Qemu-devel] [PATCH 07/14] pc port92: convert PIO to new memory api read/write 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: Alexander Graf --- hw/pc.c | 19 +++++++++++-------- 1 files changed, 11 insertions(+), 8 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 7e7e0e2..9eb1230 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -422,7 +422,8 @@ typedef struct Port92State { qemu_irq *a20_out; } Port92State; -static void port92_write(void *opaque, uint32_t addr, uint32_t val) +static void port92_write(void *opaque, target_phys_addr_t addr, uint64_t val, + unsigned size) { Port92State *s = opaque; @@ -434,7 +435,8 @@ static void port92_write(void *opaque, uint32_t addr, uint32_t val) } } -static uint32_t port92_read(void *opaque, uint32_t addr) +static uint64_t port92_read(void *opaque, target_phys_addr_t addr, + unsigned size) { Port92State *s = opaque; uint32_t ret; @@ -469,13 +471,14 @@ static void port92_reset(DeviceState *d) s->outport &= ~1; } -static const MemoryRegionPortio port92_portio[] = { - { 0, 1, 1, .read = port92_read, .write = port92_write }, - PORTIO_END_OF_LIST(), -}; - static const MemoryRegionOps port92_ops = { - .old_portio = port92_portio + .read = port92_read, + .write = port92_write, + .impl = { + .min_access_size = 1, + .max_access_size = 1, + }, + .endianness = DEVICE_LITTLE_ENDIAN, }; static int port92_initfn(ISADevice *dev)