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 7B9A9C19F2D for ; Tue, 9 Aug 2022 13:17:26 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A23F584A11; Tue, 9 Aug 2022 15:17:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.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=kernel.org header.i=@kernel.org header.b="kg6uWkRP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6DAEE84A3F; Tue, 9 Aug 2022 15:17:21 +0200 (CEST) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0F9C584A1A for ; Tue, 9 Aug 2022 15:17:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kabel@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A98ECB8118F; Tue, 9 Aug 2022 13:17:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E13BC433B5; Tue, 9 Aug 2022 13:16:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660051032; bh=Zjd5sj+KwkyfyyegkOm7/DkHhyYo2hHon7awRO4S7I4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=kg6uWkRP2eToBbDt6uJSejNy733eVVOYMvvGIoUboT+H7LJqub2id8cyLf7ZR/TdD XWiGD+JPlCPeU2C/bwOYrZPPWBHy8Y3UY4FlX7bYERVdhr1zFLU7jAH3lSWfjL6L9U 17SFZ5Qw8ykVuJpdTY7+T9iKTzpE0Rdx30KPehKoGM2uPohkxwXybeB15zF2sP6eUy HQ/flDzxNAIvsy5baNHOXFdfvgZ2XMu+TKb2KDzk+k4SKI/sSzDa4n0e7vxOlJhwYa RRyrA2sKt/Iou9DlGgY567Loelx50YCzVpMr2ONOQTPk0eeJPKXf/1Y6ZDW98QiiCC 5FsZYWfOlcbXw== Date: Tue, 9 Aug 2022 15:16:35 +0200 From: Marek =?UTF-8?B?QmVow7pu?= To: Marek Vasut Cc: Pali =?UTF-8?B?Um9ow6Fy?= , Philip Oberfichtner , u-boot@lists.denx.de, Christoph Niedermaier , Stefano Babic , Marcel Ziswiler , Peng Fan , u-boot@dh-electronics.com Subject: Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig Message-ID: <20220809151635.01f9a943@thinkpad> In-Reply-To: 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> <4c124a1f-28cb-a805-ac6f-fd50ae2ee00e@denx.de> <20220809113224.4mvygsubvtb5wd7a@pali> X-Mailer: Claws Mail 3.19.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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, 9 Aug 2022 13:38:32 +0200 Marek Vasut wrote: > On 8/9/22 13:32, Pali Roh=C3=A1r wrote: > > On Tuesday 09 August 2022 13:27:38 Marek Vasut wrote: =20 > >> On 8/9/22 13:21, Pali Roh=C3=A1r wrote: > >> > >> (reducing the CC list) > >> =20 > >>> On Tuesday 09 August 2022 13:16:41 Marek Vasut wrote: =20 > >>>> On 8/9/22 12:58, Pali Roh=C3=A1r wrote: =20 > >>>>> On Tuesday 09 August 2022 12:07:00 Philip Oberfichtner wrote: =20 > >>>>>> This converts CONFIG_SYS_L2_PL310 to Kconfig. =20 > >>>>> ... =20 > >>>>>> 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 fl= ag 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 */ =20 > >>>>> > >>>>> This option is required for mvebu SoC and is not user (de)-selectab= le. > >>>>> 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 enabl= e it > >>>>> for mvebu SoCs like it was before this change. It can be done e.g. = by > >>>>> "select" Kconfig keyword in mvebu Kconfig file. =20 > >>>> > >>>> Should it rather be 'default y if MVEBU' in that new PL310 Kconfig o= ption ? =20 > >>> > >>> 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 s= ome > >>> 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 dec= ide > >>> that it is required for CONFIG_MVEBU. Just symbol CONFIG_MVEBU can > >>> decide that it requires CONFIG_SYS_L2_PL310 symbol (and not in opposi= te > >>> direction). =20 > >> > >> So why should the user be unable to deselect L2CC support on MVEBU ? > >> I can very well disable L2CC support on MX6 and the platform works wit= hout > >> it just fine. Maybe the MVEBU needs to be fixed to support the same in= stead > >> ? =20 > >=20 > > Well, I'm not sure, currently it is non-deselectable option. Maybe it is > > a bug... but at least change which is doing kconfig conversion should > > not change behavior. =20 >=20 > I agree -- I think your proposal to make this non-user-configurable is=20 > changing the behavior, see: >=20 > Before -- you could comment the entry in include/configs/board.h out to=20 > deselect an option. > After -- you can flip Kconfig switch to deselect an option. I don't think we should consider changing sources as something that end-user should be expected to do if they want to enable/disable something. Marek