From patchwork Tue Nov 27 08:59:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 202126 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 9BCF12C0086 for ; Tue, 27 Nov 2012 20:00:11 +1100 (EST) Received: from localhost ([::1]:51893 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TdH1R-0005uB-Uf for incoming@patchwork.ozlabs.org; Tue, 27 Nov 2012 04:00:05 -0500 Received: from eggs.gnu.org ([208.118.235.92]:35941) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TdH11-0005ky-AO for qemu-devel@nongnu.org; Tue, 27 Nov 2012 03:59:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TdH0v-0004zq-7v for qemu-devel@nongnu.org; Tue, 27 Nov 2012 03:59:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48299) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TdH0v-0004zS-0f for qemu-devel@nongnu.org; Tue, 27 Nov 2012 03:59:33 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAR8xWEn026945 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 27 Nov 2012 03:59:32 -0500 Received: from rincewind.home.kraxel.org (ovpn-116-25.ams2.redhat.com [10.36.116.25]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id qAR8xV6l029743; Tue, 27 Nov 2012 03:59:31 -0500 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id B11B6409C1; Tue, 27 Nov 2012 09:59:29 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 27 Nov 2012 09:59:18 +0100 Message-Id: <1354006768-13128-9-git-send-email-kraxel@redhat.com> In-Reply-To: <1354006768-13128-1-git-send-email-kraxel@redhat.com> References: <1354006768-13128-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: afaerber@suse.de, Gerd Hoffmann Subject: [Qemu-devel] [PATCH v2 08/18] acpi: cleanup vt82c686 memory region 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 Nothing left to do, everything handled by subregions, we can zap the reaw/write handlers now. Signed-off-by: Gerd Hoffmann --- hw/vt82c686.c | 61 +-------------------------------------------------------- 1 files changed, 1 insertions(+), 60 deletions(-) diff --git a/hw/vt82c686.c b/hw/vt82c686.c index 52f46f1..99e6b2f 100644 --- a/hw/vt82c686.c +++ b/hw/vt82c686.c @@ -197,65 +197,6 @@ static void pm_tmr_timer(ACPIREGS *ar) pm_update_sci(s); } -static void pm_ioport_writew(void *opaque, uint32_t addr, uint32_t val) -{ - addr &= 0x0f; - switch (addr) { - default: - break; - } - DPRINTF("PM writew port=0x%04x val=0x%02x\n", addr, val); -} - -static uint32_t pm_ioport_readw(void *opaque, uint32_t addr) -{ - uint32_t val; - - addr &= 0x0f; - switch (addr) { - default: - val = 0; - break; - } - DPRINTF("PM readw port=0x%04x val=0x%02x\n", addr, val); - return val; -} - -static void pm_ioport_writel(void *opaque, uint32_t addr, uint32_t val) -{ - addr &= 0x0f; - DPRINTF("PM writel port=0x%04x val=0x%08x\n", addr, val); -} - -static uint32_t pm_ioport_readl(void *opaque, uint32_t addr) -{ - uint32_t val; - - addr &= 0x0f; - switch (addr) { - default: - val = 0; - break; - } - DPRINTF("PM readl port=0x%04x val=0x%08x\n", addr, val); - return val; -} - -static const MemoryRegionOps pm_io_ops = { - .old_portio = (MemoryRegionPortio[]) { - { .offset = 0, .len = 64, .size = 2, - .read = pm_ioport_readw, .write = pm_ioport_writew }, - { .offset = 0, .len = 64, .size = 4, - .read = pm_ioport_readl, .write = pm_ioport_writel }, - PORTIO_END_OF_LIST(), - }, - .valid.min_access_size = 1, - .valid.max_access_size = 4, - .impl.min_access_size = 1, - .impl.max_access_size = 4, - .endianness = DEVICE_LITTLE_ENDIAN, -}; - static void pm_io_space_update(VT686PMState *s) { uint32_t pm_io_base; @@ -415,7 +356,7 @@ static int vt82c686b_pm_initfn(PCIDevice *dev) apm_init(&s->apm, NULL, s); - memory_region_init_io(&s->io, &pm_io_ops, s, "vt82c686-pm", 64); + memory_region_init(&s->io, "vt82c686-pm", 64); memory_region_set_enabled(&s->io, false); memory_region_add_subregion(get_system_io(), 0, &s->io);