From patchwork Tue Aug 22 07:51:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 715710 Delivered-To: patch@linaro.org Received: by 2002:adf:f747:0:b0:317:ecd7:513f with SMTP id z7csp129855wrp; Tue, 22 Aug 2023 00:51:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEi01WibhXk0/Tys+Pi2IixKSRXNXnvMOnQcoHT60TsPrtgEqQbOg11TB1W6OEagLWomsB6 X-Received: by 2002:a5d:6a4a:0:b0:31a:e6bf:9032 with SMTP id t10-20020a5d6a4a000000b0031ae6bf9032mr6526881wrw.4.1692690696202; Tue, 22 Aug 2023 00:51:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692690696; cv=none; d=google.com; s=arc-20160816; b=YzIXzpiepExQ66mcN2ol46KNfIyjQBCQyIK52J48ZMFEUKcvjw1lLdnGbQACmT3J3h EdzThUd6BlKtr+KnnnxHeFaa4ZDpACIlv4x7n5ZDSc+Gfn+qz/ZUwKFJj2P4BcSW8cO9 UEukIe5xaqgq9dR/ugeDMPkprdH3UrbUu+TifBKsOgu1jhf7iYHa74BQBETfCjVV8HQ3 8aefpANoDc7+Wqv/KuyLLRBrnK8jPCGnlCRObRk8nLzCPddT51UP/0qTsUxM8jC9rbvP H05Nb8CwKJoQ4c08ZQon6Yd9nsyBLbHaaCTlnbuJ2uVE9ZF/pq8ojbglNYPfIUPJrf2A I2dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=41ni+KuFoavetSf8sVaar/XY9NyEYCqc2d/ZuqRCiZ4=; fh=7+R6EKKgh5qr4GvfRdNdL0psE2tK3ai05+VUFLfi8gs=; b=QEZjsjYiuWlkRhOIlNIS4d/NPOeZUl5naBd7qQgXUzH6ehRzGJiP7VcFmpanhVPXmV BfYFLk3LYKjEsDLkHT6syLxySYisBuHP7kYJrXxDVMbniw30Nxl/dTkMqlSTGMuvkpIQ JRJ+HmyZB65Az3U3g9pIjeZBddTyr7w34WjL/IemdoEKBSQHGbH0KECAJ2OzVmfDcXkg rlOZXvnZoHYgsuEfGM2mFbQUoKcv40dkCl13tAag19qowcSYu/++D0vBTXe/9yTkAqLk rWMjM2IMMJ8IJ70nIi94l2UbTL/0cljnMBZWnDBZfZX/YvqTJHUQEC4ye4dqA7Jycx1h GQ6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f749PVd6; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id e4-20020adffd04000000b003174f6bc4c3si605856wrr.718.2023.08.22.00.51.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Aug 2023 00:51:36 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f749PVd6; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1696E8641E; Tue, 22 Aug 2023 09:51:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="f749PVd6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2B6E78641E; Tue, 22 Aug 2023 09:51:28 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) (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 5805B86415 for ; Tue, 22 Aug 2023 09:51:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bhupesh.sharma@linaro.org Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1bd9b4f8e0eso26282805ad.1 for ; Tue, 22 Aug 2023 00:51:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692690683; x=1693295483; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=41ni+KuFoavetSf8sVaar/XY9NyEYCqc2d/ZuqRCiZ4=; b=f749PVd6RX8Iu4/MoBTN/xNGd+m4//GUCS7kGBqGKkHbpQGJgnLEaVEUU2OzgT/P5I dDa92EA5Cxx05RUBHvxhgeZr+caKYUzg9KGe9KWSKAa9QZ2vMDmDjzyBGo+Ms3z54FHZ zpiBCWnjB+HpEd08TpjEG3ooC8gAIZ2UWbjaCvFjws+SGXSZr33hnKE2HjpJSKe91xOU OwdrL2JjQ+qVtkxnuTu80d+DsLOM48SQTOnNa2idKK9pGmbOnjh19/5klfIeoLsl4b3A /2K7VIrxhBGIY6rOrgLIOQsRRNSzFyCXpH5xlcK3jjV5eM765vHWMWcmk9vGmWh7BTFo bCbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692690683; x=1693295483; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=41ni+KuFoavetSf8sVaar/XY9NyEYCqc2d/ZuqRCiZ4=; b=cP55rN9QOATuifwkkpgt/O/L+Y74AgVUOyKhRwDyXEUyo34VHTfxITx0STPns2r+6M WQOTODZOahW8xDqfTtVMuJIkq9Q8jGbHGskV8kgwkGc5jKo6VjzFG8zZ+c0a73hAArQz GbZ9UtUeDldV1CK68OZl7E5JSoZ+oeI+roxyVLIA1WSkTdbL++Xie0WKgZ+QOx5CnN19 b1u2ziYeOUfa4P0bjj6fnHRFPZkelc6eGkus0jK+EcseEaTa6H7xOa0yE7hnheH077oP 5IP7vYAgXITczH8aObKahDuziucx3ICjXi3CwK61JisJDhmKjGRcG3zyqfMheNyFlBzl 5iBA== X-Gm-Message-State: AOJu0YyWB0BT2ONol1RLwEqDfotBKfNrslr/QG1xCkvqf2WcKvg1p7q+ wq2xbjiy2lA1CUBbtjuOSwYdm3nmkzWJgXWbJzs= X-Received: by 2002:a17:902:cec2:b0:1bb:35b6:448f with SMTP id d2-20020a170902cec200b001bb35b6448fmr7120557plg.15.1692690683330; Tue, 22 Aug 2023 00:51:23 -0700 (PDT) Received: from localhost.localdomain ([2401:4900:1f3b:3924:9d49:2d2a:63e6:8974]) by smtp.gmail.com with ESMTPSA id ix21-20020a170902f81500b001bb8895848bsm8422199plb.71.2023.08.22.00.51.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Aug 2023 00:51:23 -0700 (PDT) From: Bhupesh Sharma To: u-boot@lists.denx.de Cc: sjg@chromium.org, trini@konsulko.com, bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, Patrice Chotard , Patrick Delaunay Subject: [PATCH v2 1/2] arm: stm32mp: Really fix compilation issue when SYS_DCACHE_OFF and/or SYS_DCACHE_SYS are enabled Date: Tue, 22 Aug 2023 13:21:11 +0530 Message-Id: <20230822075112.717992-2-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230822075112.717992-1-bhupesh.sharma@linaro.org> References: <20230822075112.717992-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean While 23e20b2fa6 ("arm: stm32mp: Fix compilation issue when SYS_DCACHE_OFF and/or SYS_DCACHE_SYS are enabled") tried fixing this issue, fix it really by adding #if checks for SYS_ICACHE_OFF and SYS_DCACHE_OFF. Cc: Patrice Chotard Cc: Patrick Delaunay Signed-off-by: Bhupesh Sharma Reviewed-by: Patrice Chotard Reviewed-by: Patrick Delaunay --- arch/arm/mach-stm32mp/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c index e2f67fc423..8ed065b389 100644 --- a/arch/arm/mach-stm32mp/cpu.c +++ b/arch/arm/mach-stm32mp/cpu.c @@ -90,10 +90,10 @@ static void early_enable_caches(void) if (CONFIG_IS_ENABLED(SYS_DCACHE_OFF)) return; - if (!(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))) { +#if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF)) gd->arch.tlb_size = PGTABLE_SIZE; gd->arch.tlb_addr = (unsigned long)&early_tlb; - } +#endif /* enable MMU (default configuration) */ dcache_enable();