From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C7018C00140 for ; Mon, 1 Aug 2022 01:08:39 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8E5C284221; Mon, 1 Aug 2022 03:08:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="bhi+rkzg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BD2D784221; Mon, 1 Aug 2022 03:08:35 +0200 (CEST) Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3378C84187 for ; Mon, 1 Aug 2022 03:08:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x836.google.com with SMTP id u12so7075937qtk.0 for ; Sun, 31 Jul 2022 18:08:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=30iIGANBiAS67JsMhsP1gYBaS77UGV5Jbt2dsEM8FzI=; b=bhi+rkzgH9qboIJQhe1ydF4VQEyetFFigqcnNxs4SOP6NIHiT8ukDa7xiJgpklAnEH lbuvLnIBQ6YEzvAWGqf4zvJdHeWQ/qi8n9ttaRQnGL3XyknJJcyI0RzRomU5CO5Xhq78 MX76qWd96DlahP84jnUWDcrGKe7xT66xWxnp4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=30iIGANBiAS67JsMhsP1gYBaS77UGV5Jbt2dsEM8FzI=; b=QM+9mjQbdSLNQau7owp4vETRVx+xXsqwdskLaAcnS99Pq/Qf1wGMz6YnW4I4+dG0rQ zifag/00plZvrJeL765AwmW7U5J12vq63Ksrb5tzgWzmhDtrgSmvUQFrj1yM93SfvkAu 2SDLTGozvHC2ZPWpRLiFLL+LQQ9Ve+tXo+q60LZQadkTrKQ1Y0p2dlXhbE1sasfSo348 h8zDKlevAvNG2hfk7gKnClofzHBYRpo6BTOs2Jz4Nunmm4OKnca0nGtxRzQOAz/SYDbY eNR+k1uY/vRKq6n+Dn/ARWPDCm0VwXEUxlciKQ5FpAsVLwS/q42ckVPZQ//KhojTszo0 fQDw== X-Gm-Message-State: AJIora/i8rRvEWhPCHwVX1GmnvVH485Lq780wq6fI8nGgt4Ytu13AIXR 8oSWHNwU2EH/apDw3V2SBkHhLQti1/Rp17ri X-Google-Smtp-Source: AGRyM1v49w/dOoMb5eyqPRkT1ahSxXSaoS4jDp7yH/20VAB8IRTYimKVaK3AIZfoCYLEWTyGnHvrZw== X-Received: by 2002:ac8:584d:0:b0:31e:e631:ddc2 with SMTP id h13-20020ac8584d000000b0031ee631ddc2mr12038413qth.617.1659316111576; Sun, 31 Jul 2022 18:08:31 -0700 (PDT) Received: from bill-the-cat.lan (cpe-65-184-195-139.ec.res.rr.com. [65.184.195.139]) by smtp.gmail.com with ESMTPSA id bj3-20020a05620a190300b006b5ee4de4fbsm2056095qkb.37.2022.07.31.18.08.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Jul 2022 18:08:31 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: Alexey Brodkin , Eugeniy Paltsev Subject: [PATCH 2/8] arc: Move SYS_LITTLE_ENDIAN / SYS_BIG_ENDIAN selection to Kconfig Date: Sun, 31 Jul 2022 21:08:23 -0400 Message-Id: <20220801010829.3177443-2-trini@konsulko.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220801010829.3177443-1-trini@konsulko.com> References: <20220801010829.3177443-1-trini@konsulko.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean We can determine which of these we need given CPU_BIG_ENDIAN being enabled or not, so move that logic to Kconfig from config.mk. Cc: Alexey Brodkin Cc: Eugeniy Paltsev Signed-off-by: Tom Rini --- This is not a size neutral patch as apparently before we were not fully populating SYS_BIG_ENDIAN to all of the codebase, so testing this on nsim_700be or nsim_hs38be would be a good idea. --- README | 4 ---- arch/Kconfig | 2 ++ arch/arc/config.mk | 6 ------ 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/README b/README index ebfdced4a725..ff0534137716 100644 --- a/README +++ b/README @@ -351,10 +351,6 @@ The following options need to be configured: clocks to the sysclock, ddrclock and usbclock. - Generic CPU options: - CONFIG_SYS_BIG_ENDIAN, CONFIG_SYS_LITTLE_ENDIAN - - Defines the endianess of the CPU. Implementation of those - values is arch specific. CONFIG_SYS_FSL_DDR Freescale DDR driver in use. This type of DDR controller is diff --git a/arch/Kconfig b/arch/Kconfig index 6495e780fec9..c4dc47dccb43 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -53,6 +53,8 @@ config ARC select SUPPORT_OF_CONTROL select SYS_CACHE_SHIFT_7 select TIMER + select SYS_BIG_ENDIAN if CPU_BIG_ENDIAN + select SYS_LITTLE_ENDIAN if !CPU_BIG_ENDIAN config ARM bool "ARM architecture" diff --git a/arch/arc/config.mk b/arch/arc/config.mk index 118472b2d0ba..2b70945ac342 100644 --- a/arch/arc/config.mk +++ b/arch/arc/config.mk @@ -2,12 +2,6 @@ # # Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved. -ifndef CONFIG_CPU_BIG_ENDIAN -CONFIG_SYS_LITTLE_ENDIAN = 1 -else -CONFIG_SYS_BIG_ENDIAN = 1 -endif - ifdef CONFIG_SYS_LITTLE_ENDIAN KBUILD_LDFLAGS += -EL PLATFORM_CPPFLAGS += -mlittle-endian -- 2.25.1