From patchwork Wed Dec 8 11:05:44 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 74666 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 64091B6EF1 for ; Wed, 8 Dec 2010 22:13:49 +1100 (EST) Received: from localhost ([127.0.0.1]:57389 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQHxw-0000tk-Ph for incoming@patchwork.ozlabs.org; Wed, 08 Dec 2010 06:13:44 -0500 Received: from [140.186.70.92] (port=49472 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQHqO-0005KQ-PX for qemu-devel@nongnu.org; Wed, 08 Dec 2010 06:06:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PQHqL-0000J9-95 for qemu-devel@nongnu.org; Wed, 08 Dec 2010 06:05:56 -0500 Received: from cantor.suse.de ([195.135.220.2]:58996 helo=mx1.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PQHqL-0000Ig-3p for qemu-devel@nongnu.org; Wed, 08 Dec 2010 06:05:53 -0500 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 6F5DD94109; Wed, 8 Dec 2010 12:05:51 +0100 (CET) From: Alexander Graf To: QEMU-devel Developers Date: Wed, 8 Dec 2010 12:05:44 +0100 Message-Id: <1291806350-9646-10-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: <1291806350-9646-1-git-send-email-agraf@suse.de> References: <1291806350-9646-1-git-send-email-agraf@suse.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 Cc: Blue Swirl , Paul Brook Subject: [Qemu-devel] [PATCH 09/15] versatile_pci: Declare as little endian X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This patch replaces explicit bswaps with endianness hints to the mmio layer. Signed-off-by: Alexander Graf --- hw/versatile_pci.c | 14 +------------- 1 files changed, 1 insertions(+), 13 deletions(-) diff --git a/hw/versatile_pci.c b/hw/versatile_pci.c index 3baad96..cc8f9f8 100644 --- a/hw/versatile_pci.c +++ b/hw/versatile_pci.c @@ -32,18 +32,12 @@ static void pci_vpb_config_writeb (void *opaque, target_phys_addr_t addr, static void pci_vpb_config_writew (void *opaque, target_phys_addr_t addr, uint32_t val) { -#ifdef TARGET_WORDS_BIGENDIAN - val = bswap16(val); -#endif pci_data_write(opaque, vpb_pci_config_addr (addr), val, 2); } static void pci_vpb_config_writel (void *opaque, target_phys_addr_t addr, uint32_t val) { -#ifdef TARGET_WORDS_BIGENDIAN - val = bswap32(val); -#endif pci_data_write(opaque, vpb_pci_config_addr (addr), val, 4); } @@ -58,9 +52,6 @@ static uint32_t pci_vpb_config_readw (void *opaque, target_phys_addr_t addr) { uint32_t val; val = pci_data_read(opaque, vpb_pci_config_addr (addr), 2); -#ifdef TARGET_WORDS_BIGENDIAN - val = bswap16(val); -#endif return val; } @@ -68,9 +59,6 @@ static uint32_t pci_vpb_config_readl (void *opaque, target_phys_addr_t addr) { uint32_t val; val = pci_data_read(opaque, vpb_pci_config_addr (addr), 4); -#ifdef TARGET_WORDS_BIGENDIAN - val = bswap32(val); -#endif return val; } @@ -133,7 +121,7 @@ static int pci_vpb_init(SysBusDevice *dev) s->mem_config = cpu_register_io_memory(pci_vpb_config_read, pci_vpb_config_write, bus, - DEVICE_NATIVE_ENDIAN); + DEVICE_LITTLE_ENDIAN); sysbus_init_mmio_cb(dev, 0x04000000, pci_vpb_map); pci_create_simple(bus, -1, "versatile_pci_host");