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 B8E70C19F2D for ; Tue, 9 Aug 2022 17:37:20 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 340FD84A80; Tue, 9 Aug 2022 19:37:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=nwl.cc Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 6CC1684A41; Tue, 9 Aug 2022 16:32:30 +0200 (CEST) Received: from orbyte.nwl.cc (orbyte.nwl.cc [IPv6:2001:41d0:e:133a::1]) (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 DD5AF84A69 for ; Tue, 9 Aug 2022 16:32:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=nwl.cc Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=n0-1@orbyte.nwl.cc Received: from n0-1 by orbyte.nwl.cc with local (Exim 4.94.2) (envelope-from ) id 1oLQH7-0001Zn-Vz; Tue, 09 Aug 2022 16:32:06 +0200 Date: Tue, 9 Aug 2022 16:32:05 +0200 From: Phil Sutter To: Pali =?utf-8?B?Um9ow6Fy?= Cc: Marek Vasut , Philip Oberfichtner , u-boot@lists.denx.de, Christoph Niedermaier , Stefano Babic , Adam Ford , Anatolij Gustschin , Andreas Geisreiter , "Andrew F. Davis" , Baruch Siach , Bharat Gooty , Breno Lima , Chin-Liang See , Chris Packham , Dalon Westergreen , Dennis Gilmore , Dinh Nguyen , Eric =?utf-8?Q?B=C3=A9nard?= , Eric Nelson , Fabio Estevam , Francesco Montefoschi , Heiko Schocher , Holger Brunck , Huan 'Kitty' Wang , Humberto Naves , Ian Ray , Jaehoon Chung , Jagan Teki , Jim Liu , Luka Kovacic , Luka Perkov , Lukasz Majewski , Marcel Ziswiler , Marek =?utf-8?B?QmVow7pu?= , Mario Six , Markus Niebel , Martyn Welch , Matthias Winker , Michal Simek , Niel Fourie , Nikita Kiryanov , Otavio Salvador , Patrick Delaunay , Pavel Machek , =?utf-8?B?UGF3ZcWC?= Anikiel , Peng Fan , Raffaele RECALCATI , Rayagonda Kokatanur , Rick Chen , Rui Miguel Silva , Silvio Fricke , Simon Glass , Simone CIANNI , Soeren Moch , Stanley Chu , Stefan Roese , Stephan Gerhold , Thomas Huth , Tim Harvey , Troy Kisky , Wolfgang Grandegger , Wolfgang Wallner , u-boot@dh-electronics.com Subject: Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig Message-ID: Mail-Followup-To: Phil Sutter , Pali =?utf-8?B?Um9ow6Fy?= , Marek Vasut , Philip Oberfichtner , u-boot@lists.denx.de, Christoph Niedermaier , Stefano Babic , Adam Ford , Anatolij Gustschin , Andreas Geisreiter , "Andrew F. Davis" , Baruch Siach , Bharat Gooty , Breno Lima , Chin-Liang See , Chris Packham , Dalon Westergreen , Dennis Gilmore , Dinh Nguyen , Eric =?utf-8?Q?B=C3=A9nard?= , Eric Nelson , Fabio Estevam , Francesco Montefoschi , Heiko Schocher , Holger Brunck , Huan 'Kitty' Wang , Humberto Naves , Ian Ray , Jaehoon Chung , Jagan Teki , Jim Liu , Luka Kovacic , Luka Perkov , Lukasz Majewski , Marcel Ziswiler , Marek =?utf-8?B?QmVow7pu?= , Mario Six , Markus Niebel , Martyn Welch , Matthias Winker , Michal Simek , Niel Fourie , Nikita Kiryanov , Otavio Salvador , Patrick Delaunay , Pavel Machek , =?utf-8?B?UGF3ZcWC?= Anikiel , Peng Fan , Raffaele RECALCATI , Rayagonda Kokatanur , Rick Chen , Rui Miguel Silva , Silvio Fricke , Simon Glass , Simone CIANNI , Soeren Moch , Stanley Chu , Stefan Roese , Stephan Gerhold , Thomas Huth , Tim Harvey , Troy Kisky , Wolfgang Grandegger , Wolfgang Wallner , u-boot@dh-electronics.com References: <20220809100703.3101047-1-pro@denx.de> <20220809100703.3101047-2-pro@denx.de> <20220809105813.aa4vjcyiqm3mnqx4@pali> <41f76858-38d9-284b-1b54-b511f3b3cd67@denx.de> <20220809112151.jhrytuxraqcahzh5@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220809112151.jhrytuxraqcahzh5@pali> X-Mailman-Approved-At: Tue, 09 Aug 2022 19:37:16 +0200 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 On Tue, Aug 09, 2022 at 01:21:51PM +0200, Pali Rohár wrote: > On Tuesday 09 August 2022 13:16:41 Marek Vasut wrote: > > On 8/9/22 12:58, Pali Rohár wrote: > > > On Tuesday 09 August 2022 12:07:00 Philip Oberfichtner wrote: > > > > This converts CONFIG_SYS_L2_PL310 to Kconfig. > > > ... > > > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > > > > index 949ebb46ba..dde06bdd96 100644 > > > > --- a/arch/arm/Kconfig > > > > +++ b/arch/arm/Kconfig > > > > @@ -488,6 +488,10 @@ config TPL_SYS_THUMB_BUILD > > > > density. For ARM architectures that support Thumb2 this flag will > > > > result in Thumb2 code generated by GCC. > > > > +config SYS_L2_PL310 > > > > + bool "ARM PL310 L2 cache controller" > > > > + help > > > > + Enable support for ARM PL310 L2 cache controller in U-Boot > > > > config SYS_L2CACHE_OFF > > > > bool "L2cache off" > > > > diff --git a/arch/arm/mach-mvebu/include/mach/config.h b/arch/arm/mach-mvebu/include/mach/config.h > > > > index 4add0d9e10..0bba0a4cf9 100644 > > > > --- a/arch/arm/mach-mvebu/include/mach/config.h > > > > +++ b/arch/arm/mach-mvebu/include/mach/config.h > > > > @@ -25,8 +25,6 @@ > > > > #define MV88F78X60 /* for the DDR training bin_hdr code */ > > > > #endif > > > > -#define CONFIG_SYS_L2_PL310 > > > > - > > > > #define MV_UART_CONSOLE_BASE MVEBU_UART0_BASE > > > > /* Needed for SPI NOR booting in SPL */ > > > > > > This option is required for mvebu SoC and is not user (de)-selectable. > > > So please do not define it in each individual mvebu board. It would make > > > it harder to introduce a new mvebu board into U-Boot. Instead enable it > > > for mvebu SoCs like it was before this change. It can be done e.g. by > > > "select" Kconfig keyword in mvebu Kconfig file. > > > > Should it rather be 'default y if MVEBU' in that new PL310 Kconfig option ? > > No, because this is just default value of this option and still allows > end-user to de-select this option. > > "select" is IIRC the only way how to force Kconfig to always enable some > symbol without any option for end-user to disable it. > > At least I do not know a way how CONFIG_SYS_L2_PL310 symbol could decide > that it is required for CONFIG_MVEBU. Just symbol CONFIG_MVEBU can > decide that it requires CONFIG_SYS_L2_PL310 symbol (and not in opposite > direction). That's correct. If this really is to be controlled from PL310 Kconfig file, one could introduce a hidden (i.e., no prompt) symbol depending on CONFIG_MVEBU and selecting CONFIG_SYS_L2_PL310. Something like this might also work: | config MVEBU_REQUIRE_SYS_L2_PL310 | select SYS_L2_PL310 if MVEBU Cheers, Phil