From nobody Thu Nov 13 20:39:58 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1582499521; cv=none; d=zohomail.com; s=zohoarc; b=l0MNl8VBHC2Bgd8FgKt7ihfNLuiQHnvMfRisIB/g1ZoVcEgRX9DFEi4isk6jnYlhFD10/nhGTn4b6s70Zmrag1tVL6uFAQ0kPSCUHskYGVwqEuXzsOfKm7qI1BaxrbVuzqJJ/PnEt8GP+4tc+b8ghgVLneuaRMhImjIlRAb8BsU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582499521; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=NyXYVtWhp6qL8hE5dy2LdXvwOXEHU2mr4RpD1naeFOQ=; b=k2j+E4gVN0hjQi2itFddDl+Fs9GTBE3Zdutj5mmVH6wSwxHEQgab6loKCRZVD6eKxuHoZN7OyR/eHVnOf9IesQCDzXGHPt4a/l4LXrCpP6ZHPAiX78hR2jQwVQimwqQ6oMsMFGSHzOdTBZzkECytC6f59nW/xMHHaZkO5QV4MZA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1582499521163238.14695299660173; Sun, 23 Feb 2020 15:12:01 -0800 (PST) Received: from localhost ([::1]:57624 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j60Pn-0002fT-Sr for importer@patchew.org; Sun, 23 Feb 2020 18:11:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36638) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j60Ok-0001Hu-91 for qemu-devel@nongnu.org; Sun, 23 Feb 2020 18:10:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j60Oj-00089p-0l for qemu-devel@nongnu.org; Sun, 23 Feb 2020 18:10:54 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:50148 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j60Oi-000897-Tt for qemu-devel@nongnu.org; Sun, 23 Feb 2020 18:10:52 -0500 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-443-NmbosiP5MW-m2wq_0Emxtw-1; Sun, 23 Feb 2020 18:10:50 -0500 Received: by mail-wr1-f71.google.com with SMTP id t3so2852942wrp.2 for ; Sun, 23 Feb 2020 15:10:50 -0800 (PST) Received: from localhost.localdomain (47.red-88-21-205.staticip.rima-tde.net. [88.21.205.47]) by smtp.gmail.com with ESMTPSA id r6sm15777598wrp.95.2020.02.23.15.10.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Feb 2020 15:10:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582499452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NyXYVtWhp6qL8hE5dy2LdXvwOXEHU2mr4RpD1naeFOQ=; b=ZluuA7O41WJmekFyt9UYvHWRRMcJUEeLXR74RyJCXSKX8xZee15oKmkS41sYaRjQZ8alcu 2teMvu99JJ4A6CKvMdg1XCC48JcBxDHCFJkGnkp+FWsSkXYJQIbXgYZnr93/Mz9ZfxwECG Y1NZZLCjWN/TenHsHmNQphPN+U58o/c= X-MC-Unique: NmbosiP5MW-m2wq_0Emxtw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mQ+Dd+23qu9EG86MqcX+Rg8VXyUHQRNEJK1Q2ZO2kEM=; b=Yk+v6KHAhktW/rUrheaNajbNOcPrynTpuQapJRFdvRicoDyxSKuevQXh9Hp2hihOyQ rvQjgNzbR7dDXqx/hCPdLtvKXuwIiMyWEoBkPoV1Y+uNIVTjVVFbYAOFcSvVKW1Psdw7 m9JhfQSVWUOPGd/d2UYdHVVlUvKThhRg+EZhWciFTs1DGRpi/xXXNiZ5BhW9CtmMvSLz xSbxWSal2gx4o/X8cfD1pPvsWJb+C2Le/K2jA20VbDRWcw+SMtF6xUuda+XhiLNwnsM5 noVol+nH5aYjM32s8XBOJz2t/PZDMbEAA1c96W34dgv7PVhyTcwAAQJtt0w7AUaiexpH lYyw== X-Gm-Message-State: APjAAAVU75C8nv+m+AEuAalF6X/C62g0Rrtp5iAxo2UyBKFF9sfTbAH/ PqanElv9vx+OdNj5ZybwB4OF/J2E+0tomaNESsyX/ipy5EuGGL07uEAfqQlTw8CV3ZeynEG8Bjr uvs70HJgdPeb+u64= X-Received: by 2002:adf:ee01:: with SMTP id y1mr66197019wrn.152.1582499449149; Sun, 23 Feb 2020 15:10:49 -0800 (PST) X-Google-Smtp-Source: APXvYqyZoQ700ID/waMVgYsmMsEiFTbrkAh6K3jfcjsVa16gmVRAtqj696JoZxW8/TlEBfZU8DnFLA== X-Received: by 2002:adf:ee01:: with SMTP id y1mr66196999wrn.152.1582499448921; Sun, 23 Feb 2020 15:10:48 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 1/2] hw/arm/gumstix: Simplify since the machines are little-endian only Date: Mon, 24 Feb 2020 00:10:43 +0100 Message-Id: <20200223231044.8003-2-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200223231044.8003-1-philmd@redhat.com> References: <20200223231044.8003-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , qemu-trivial@nongnu.org, Michael Tokarev , Laurent Vivier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 As the Connex and Verdex machines only boot in little-endian, we can simplify the code. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Peter Maydell --- hw/arm/gumstix.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/hw/arm/gumstix.c b/hw/arm/gumstix.c index f26a0e8010..94904d717b 100644 --- a/hw/arm/gumstix.c +++ b/hw/arm/gumstix.c @@ -51,7 +51,6 @@ static void connex_init(MachineState *machine) { PXA2xxState *cpu; DriveInfo *dinfo; - int be; MemoryRegion *address_space_mem =3D get_system_memory(); =20 uint32_t connex_rom =3D 0x01000000; @@ -66,14 +65,9 @@ static void connex_init(MachineState *machine) exit(1); } =20 -#ifdef TARGET_WORDS_BIGENDIAN - be =3D 1; -#else - be =3D 0; -#endif if (!pflash_cfi01_register(0x00000000, "connext.rom", connex_rom, dinfo ? blk_by_legacy_dinfo(dinfo) : NULL, - sector_len, 2, 0, 0, 0, 0, be)) { + sector_len, 2, 0, 0, 0, 0, 0)) { error_report("Error registering flash memory"); exit(1); } @@ -87,7 +81,6 @@ static void verdex_init(MachineState *machine) { PXA2xxState *cpu; DriveInfo *dinfo; - int be; MemoryRegion *address_space_mem =3D get_system_memory(); =20 uint32_t verdex_rom =3D 0x02000000; @@ -102,14 +95,9 @@ static void verdex_init(MachineState *machine) exit(1); } =20 -#ifdef TARGET_WORDS_BIGENDIAN - be =3D 1; -#else - be =3D 0; -#endif if (!pflash_cfi01_register(0x00000000, "verdex.rom", verdex_rom, dinfo ? blk_by_legacy_dinfo(dinfo) : NULL, - sector_len, 2, 0, 0, 0, 0, be)) { + sector_len, 2, 0, 0, 0, 0, 0)) { error_report("Error registering flash memory"); exit(1); } @@ -152,6 +140,9 @@ static const TypeInfo verdex_type =3D { =20 static void gumstix_machine_init(void) { + if (target_words_bigendian()) { + return; + } type_register_static(&connex_type); type_register_static(&verdex_type); } --=20 2.21.1