From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=42902 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PNeVL-0006LL-SJ for qemu-devel@nongnu.org; Tue, 30 Nov 2010 23:41:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PNRJh-0001oT-HD for qemu-devel@nongnu.org; Tue, 30 Nov 2010 09:36:26 -0500 Received: from cantor2.suse.de ([195.135.220.15]:33235 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PNRJh-0000zF-Bc for qemu-devel@nongnu.org; Tue, 30 Nov 2010 09:36:25 -0500 From: Alexander Graf Date: Tue, 30 Nov 2010 15:35:52 +0100 Message-Id: <1291127761-16501-7-git-send-email-agraf@suse.de> In-Reply-To: <1291127761-16501-1-git-send-email-agraf@suse.de> References: <1291127761-16501-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PATCH 06/15] uninorth: Get rid of bswap List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU-devel Developers Cc: Blue Swirl , Paul Brook There's no need to bswap once we correctly set the mmio to be little endian. Signed-off-by: Alexander Graf --- hw/unin_pci.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/unin_pci.c b/hw/unin_pci.c index f2e440e..5f15058 100644 --- a/hw/unin_pci.c +++ b/hw/unin_pci.c @@ -121,7 +121,6 @@ static void unin_data_write(ReadWriteHandler *handler, pcibus_t addr, uint32_t val, int len) { UNINState *s = container_of(handler, UNINState, data_handler); - val = qemu_bswap_len(val, len); UNIN_DPRINTF("write addr %" FMT_PCIBUS " len %d val %x\n", addr, len, val); pci_data_write(s->host_state.bus, unin_get_config_reg(s->host_state.config_reg, addr), @@ -138,7 +137,6 @@ static uint32_t unin_data_read(ReadWriteHandler *handler, unin_get_config_reg(s->host_state.config_reg, addr), len); UNIN_DPRINTF("read addr %" FMT_PCIBUS " len %d val %x\n", addr, len, val); - val = qemu_bswap_len(val, len); return val; } @@ -156,7 +154,7 @@ static int pci_unin_main_init_device(SysBusDevice *dev) s->data_handler.read = unin_data_read; s->data_handler.write = unin_data_write; pci_mem_data = cpu_register_io_memory_simple(&s->data_handler, - DEVICE_NATIVE_ENDIAN); + DEVICE_LITTLE_ENDIAN); sysbus_init_mmio(dev, 0x1000, pci_mem_config); sysbus_init_mmio(dev, 0x1000, pci_mem_data); @@ -179,7 +177,7 @@ static int pci_u3_agp_init_device(SysBusDevice *dev) s->data_handler.read = unin_data_read; s->data_handler.write = unin_data_write; pci_mem_data = cpu_register_io_memory_simple(&s->data_handler, - DEVICE_NATIVE_ENDIAN); + DEVICE_LITTLE_ENDIAN); sysbus_init_mmio(dev, 0x1000, pci_mem_config); sysbus_init_mmio(dev, 0x1000, pci_mem_data); -- 1.6.0.2