From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35095) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbvUm-0006HM-Ah for qemu-devel@nongnu.org; Fri, 23 Nov 2012 10:48:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TbvUZ-0006im-H2 for qemu-devel@nongnu.org; Fri, 23 Nov 2012 10:48:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:15051) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbvUZ-0006iE-8B for qemu-devel@nongnu.org; Fri, 23 Nov 2012 10:48:35 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qANFmYok023465 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 23 Nov 2012 10:48:34 -0500 From: Gerd Hoffmann Date: Fri, 23 Nov 2012 16:48:21 +0100 Message-Id: <1353685711-24573-11-git-send-email-kraxel@redhat.com> In-Reply-To: <1353685711-24573-1-git-send-email-kraxel@redhat.com> References: <1353685711-24573-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 10/20] acpi: cleanup piix4 memory region List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Nothing left to do, everything handled by subregions, we can zap the reaw/write handlers now. Signed-off-by: Gerd Hoffmann --- hw/acpi_piix4.c | 41 +---------------------------------------- 1 files changed, 1 insertions(+), 40 deletions(-) diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c index e4fe6f1..2f1d77b 100644 --- a/hw/acpi_piix4.c +++ b/hw/acpi_piix4.c @@ -110,45 +110,6 @@ static void pm_tmr_timer(ACPIREGS *ar) pm_update_sci(s); } -static void pm_ioport_write(void *opaque, hwaddr addr, uint64_t val, - unsigned width) -{ - if (width != 2) { - PIIX4_DPRINTF("PM write port=0x%04x width=%d val=0x%08x\n", - (unsigned)addr, width, (unsigned)val); - } - - switch(addr) { - default: - break; - } - PIIX4_DPRINTF("PM writew port=0x%04x val=0x%04x\n", (unsigned int)addr, - (unsigned int)val); -} - -static uint64_t pm_ioport_read(void *opaque, hwaddr addr, unsigned width) -{ - uint32_t val; - - switch(addr) { - default: - val = 0; - break; - } - PIIX4_DPRINTF("PM readw port=0x%04x val=0x%04x\n", (unsigned int)addr, val); - return val; -} - -static const MemoryRegionOps pm_io_ops = { - .read = pm_ioport_read, - .write = pm_ioport_write, - .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 apm_ctrl_changed(uint32_t val, void *arg) { PIIX4PMState *s = arg; @@ -437,7 +398,7 @@ static int piix4_pm_initfn(PCIDevice *dev) register_ioport_write(s->smb_io_base, 64, 1, smb_ioport_writeb, &s->smb); register_ioport_read(s->smb_io_base, 64, 1, smb_ioport_readb, &s->smb); - memory_region_init_io(&s->io, &pm_io_ops, s, "piix4-pm", 64); + memory_region_init(&s->io, "piix4-pm", 64); acpi_pm_tmr_init(&s->ar, pm_tmr_timer, &s->io); acpi_pm1_evt_init(&s->ar, pm_tmr_timer, &s->io); acpi_pm1_cnt_init(&s->ar, &s->io); -- 1.7.1