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 92148C19F2D for ; Tue, 9 Aug 2022 10:08:41 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A6528849D8; Tue, 9 Aug 2022 12:08:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1660039719; bh=iaY0G+2s0QCu8943aOdsnvNzcmF3il1hWBudlOJz4Wg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=E1jJufS1KMW59EJOwAoAZ7hVFu9E3X/SZq8H1NcgqxIAXBr0l1bkmTbNib+cmcCY5 0h5yiXKz0KLHsXQ5r3acdlUzkzuxG7Ue1SRQ0UyG/s7ew+3fdJpwWiItj5sRGbZsF1 kABOcvd1fxElaq8wFSi8dsKX3uD7zZEpTu2TkA527gl4Hs+jpi2sNfrb0l8rU9X69C z30f9B72nMEIgzPaYLVLNafuibJ8t+Z4ng7Zn2jgkRPEd4H596VWarxBXm28Cf/YPE Trs3IEiAkYcbuu1yeQLLm7i+Tw6GQ7niK03K8nXA93TYjBCUus/VIiXjsXUy0N0Lb8 /3YJMzxpAt9jA== Received: by phobos.denx.de (Postfix, from userid 109) id A89D2849BA; Tue, 9 Aug 2022 12:08:36 +0200 (CEST) Received: from xpert.denx.de (unknown [62.91.23.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6F691849D0 for ; Tue, 9 Aug 2022 12:08:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=pro@denx.de Received: by xpert.denx.de (Postfix, from userid 535) id D12FA3E0389; Tue, 9 Aug 2022 12:08:33 +0200 (CEST) From: Philip Oberfichtner To: u-boot@lists.denx.de Cc: Christoph Niedermaier , Stefano Babic , Marek Vasut , Philip Oberfichtner , Bharat Gooty , Dzmitry Sankouski , Rayagonda Kokatanur , Sean Anderson , Stefan Roese , Tom Rini Subject: [PATCH v3 2/3] ARM: cache: Allow SPL to build cache-pl310.c Date: Tue, 9 Aug 2022 12:07:01 +0200 Message-Id: <20220809100703.3101047-3-pro@denx.de> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220809100703.3101047-1-pro@denx.de> References: <20220809100703.3101047-1-pro@denx.de> 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 Introduce the new Kconfig symbol CONFIG_SPL_SYS_L2_PL310 to allow the SPL to build cache-pl310.c. Before this commit, the SPL could enable the PL310 L2 cache [1], but the cache maintenance functions from cache-pl310.c were only useable for non-SPL builds. After enabling the cache one must be able to flush it, too. Thus this commit allows cache-pl310.c to be included in the SPL build. [1] See for example arch/arm/mach-imx/cache.c: v7_outer_cache_enable() Signed-off-by: Philip Oberfichtner --- Changes in v3: - Introduce CONFIG_SPL_SYS_L2_PL310 arch/arm/Kconfig | 5 +++++ arch/arm/lib/Makefile | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index dde06bdd96..0bc03c921a 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -493,6 +493,11 @@ config SYS_L2_PL310 help Enable support for ARM PL310 L2 cache controller in U-Boot +config SPL_SYS_L2_PL310 + bool "ARM PL310 L2 cache controller in SPL" + help + Enable support for ARM PL310 L2 cache controller in SPL + config SYS_L2CACHE_OFF bool "L2cache off" help diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index c603fe61bc..d137b4bf0f 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -33,7 +33,6 @@ obj-$(CONFIG_OF_LIBFDT) += bootm-fdt.o obj-$(CONFIG_CMD_BOOTI) += bootm.o image.o obj-$(CONFIG_CMD_BOOTM) += bootm.o obj-$(CONFIG_CMD_BOOTZ) += bootm.o zimage.o -obj-$(CONFIG_SYS_L2_PL310) += cache-pl310.o else obj-$(CONFIG_$(SPL_TPL_)FRAMEWORK) += spl.o obj-$(CONFIG_SPL_FRAMEWORK) += zimage.o @@ -46,6 +45,7 @@ else obj-$(CONFIG_$(SPL_TPL_)USE_ARCH_MEMSET) += memset.o obj-$(CONFIG_$(SPL_TPL_)USE_ARCH_MEMCPY) += memcpy.o endif +obj-$(CONFIG_$(SPL_TPL_)SYS_L2_PL310) += cache-pl310.o obj-$(CONFIG_$(SPL_TPL_)SEMIHOSTING) += semihosting.o ifneq ($(filter y,$(CONFIG_SAVE_PREV_BL_INITRAMFS_START_ADDR) $(CONFIG_SAVE_PREV_BL_FDT_ADDR)),) -- 2.37.1