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 DBBFCC433FE for ; Wed, 26 Oct 2022 13:52:37 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id ADBAB85054; Wed, 26 Oct 2022 15:52:35 +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="Iavrskig"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2368985057; Wed, 26 Oct 2022 15:52:33 +0200 (CEST) Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) (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 B614C8504A for ; Wed, 26 Oct 2022 15:52:29 +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-qk1-x731.google.com with SMTP id b25so10514070qkk.7 for ; Wed, 26 Oct 2022 06:52:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=BygJSIq91h1D0C127WCeSOQrEwCkvjg0r7Eckf2Uh1A=; b=IavrskigQVsEgJMabTwxA7sQI7iQaGgXyam1T1mbn/9ZHPn52nt8l87IhzB5orVr98 0Np07W13bfqefABsprW8Y/AVFiiCuO4JrECvxHK0KsXRPgRYlqGavBMtlru2Ml5b2Jt3 GXf+16An+ZPPppr9DOKC88Z9hU7jjH+wB3330= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=BygJSIq91h1D0C127WCeSOQrEwCkvjg0r7Eckf2Uh1A=; b=l+rGDDkdHcG/w/R7xXg7onecLK+UevCWZ6kIB9kKyOMIBSfbNNiIZiJOZcak2BkkP4 r5YWepR903+8rDjSFbxiYhUGHZ429EkzM+wH6TjeEauDMHmx+J3T0ai10FB2dHFmgwrO aseaOQszwJd68Sa+/jLhEBaUQR/jem+EYgtK20ZT+tY30c8qmX4mvsC2sdjUHw+9C0Xg T2T7NpqgssuQZFgNTUTPWfcj3FOLrealBQWlf0YehCQOCSmqJI+aJFWzLd7eL8YqA20O g3qm63aKGu1dpMIwKQ/UdWRcuywAU9DtD4vb+QY+0GgqRdkPz5LyIKRFSOKj4NlWTrEf xj9A== X-Gm-Message-State: ACrzQf3ZzevsmXWZQgq2A+T1TjpCHRa7vuX0Rj4bgZK5swUDTRlc3shE RcEUqLGhUZrpmmoWKGcDGuypOA== X-Google-Smtp-Source: AMsMyM5/erEcXO3PVFUDu7C3NvP9zGhE9yrZ0SRJeiYdubZ6hwUA9S7JBYdAJt5l5wbeYpm4E3Q3zQ== X-Received: by 2002:a05:620a:66a:b0:6ee:83d0:7896 with SMTP id a10-20020a05620a066a00b006ee83d07896mr31021434qkh.81.1666792348524; Wed, 26 Oct 2022 06:52:28 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-0125-cbbc-0c8f-48fb.res6.spectrum.com. [2603:6081:7b00:6400:125:cbbc:c8f:48fb]) by smtp.gmail.com with ESMTPSA id h12-20020a05620a400c00b006e702033b15sm4089020qko.66.2022.10.26.06.52.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 06:52:27 -0700 (PDT) Date: Wed, 26 Oct 2022 09:52:25 -0400 From: Tom Rini To: Roger Quadros Cc: Simon Glass , u-boot@lists.denx.de, praneeth@ti.com, kishon@ti.com, Patrick Delaunay , Patrice Chotard Subject: Re: [u-boot][PATCH v2 2/4] scripts: Makefile.spl: Enable memory drivers to be built for SPL Message-ID: <20221026135225.GR2020586@bill-the-cat> References: <20221006132400.5628-1-rogerq@kernel.org> <20221006132400.5628-3-rogerq@kernel.org> <20221018174025.GA2412547@bill-the-cat> <2a378fe3-d8f6-3b60-eeb9-f511921fb831@kernel.org> <20221019125425.GH2020586@bill-the-cat> <6ac9e035-93ce-3272-13af-01fa77824d31@kernel.org> <20221020122950.GN2020586@bill-the-cat> <6fc5dd24-6ac7-b7e0-faab-d9fd30a1e413@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="WUixXfIWnZStrfw7" Content-Disposition: inline In-Reply-To: <6fc5dd24-6ac7-b7e0-faab-d9fd30a1e413@kernel.org> X-Clacks-Overhead: GNU Terry Pratchett 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 --WUixXfIWnZStrfw7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 26, 2022 at 01:41:12PM +0300, Roger Quadros wrote: > Tom, >=20 > On 26/10/2022 02:35, Simon Glass wrote: > > Hi Tom, > >=20 > > On Thu, 20 Oct 2022 at 06:29, Tom Rini wrote: > >> > >> On Thu, Oct 20, 2022 at 03:23:42PM +0300, Roger Quadros wrote: > >>> Hi Tom, > >>> > >>> On 19/10/2022 15:54, Tom Rini wrote: > >>>> On Wed, Oct 19, 2022 at 11:17:35AM +0300, Roger Quadros wrote: > >>>>> > >>>>> > >>>>> On 18/10/2022 20:40, Tom Rini wrote: > >>>>>> On Thu, Oct 06, 2022 at 04:23:58PM +0300, Roger Quadros wrote: > >>>>>>> We will need ti-gpmc driver for SPL. Allow memory drivers > >>>>>>> do be built for SPL. > >>>>>>> > >>>>>>> Signed-off-by: Roger Quadros > >>>>>>> --- > >>>>>>> scripts/Makefile.spl | 1 + > >>>>>>> 1 file changed, 1 insertion(+) > >>>>>>> > >>>>>>> diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl > >>>>>>> index 3bafeb4fe9..110076b22f 100644 > >>>>>>> --- a/scripts/Makefile.spl > >>>>>>> +++ b/scripts/Makefile.spl > >>>>>>> @@ -114,6 +114,7 @@ libs-$(CONFIG_PARTITIONS) +=3D disk/ > >>>>>>> endif > >>>>>>> > >>>>>>> libs-y +=3D drivers/ > >>>>>>> +libs-y +=3D drivers/memory/ > >>>>>>> libs-$(CONFIG_SPL_USB_GADGET) +=3D drivers/usb/dwc3/ > >>>>>>> libs-$(CONFIG_SPL_USB_GADGET) +=3D drivers/usb/cdns3/ > >>>>>>> libs-y +=3D dts/ > >>>>>> > >>>>>> This ends up being the wrong approach as it then pulls in > >>>>>> drivers/memory/stm32-fmc2-ebi.o on all of those platforms, in SPL,= which > >>>>>> is not what's intended. We need an SPL_MEMORY symbol and then gate= the > >>>>>> directory on that. > >>>>>> > >>> > >>> I have a question about how CONFIG_SPL_MEMORY works together with CON= FIG_MEMORY. > >>> > >>> Do we use CONFIG_SPL_MEMORY only to gate the drivers/memory directory= inclusion? > >>> Then continue to use CONFIG_MEMORY and others to enable/disable driver > >>> build for both non-SPL and SPL case? > >>> > >>> So drivers/memory/Makefile remains as it is? > >> > >> Well, for consistency code should use IS_ENABLED(MEMORY) which will be > >> true for CONFIG_MEMORY or CONFIG_SPL_MEMORY. > >=20 > > nit: CONFIG_IS_ENABLED(MEMORY) >=20 > CONFIG_IS_ENABLED* is used in code but not by any Makefile. > My question was on what basis do we gate drivers/memory inclusion in buil= d from Makefile. >=20 > Can CONFIG_MEMORY and CONFIG_SPL_MEMORY co-exist or that should never hap= pen? What we have for now in your patch is fine and we can tweak slightly if needed if other cases arise. --=20 Tom --WUixXfIWnZStrfw7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmNZO5kACgkQFHw5/5Y0 tyyV5wv+OFpeBFl1U2JKpHK3ZufGMkez706C6xk0Ev72OgNF8Wg7LvjZyrDo1/pV DZnkSKgY5yNYTkaOoBnqW2fiuIWfKHO4VBwHx2miCbcMR5dy0oZTQ4tkNNIDh2rt C50mER2w4w2voyOgt07ZGqsal3CYby+J77VT5MK4Wdkw/njmwlv7U3mU+RsjvTMy crTx66bKXd27wyH+eBnc+qYrZWkw9l0F3sXto1ygCylsJEp340oF9O42RevX6e4L 0mNyStmM1ugxCf/YlprhbqJCcynVFvqa3UlhZTqa3XPe/ji7YV4Z76V6sM37ZDif HmmVDzq6aUq7mHJ+AMSaNeZ37ddSIYppsu9rJd4e+UrnyhZkMmh7tF7RX5/tyChI T8PFzyaod3G+ZcEJ0g7HHTmyJ+lrOoq7DpWCNFvLyiBQhtmJQUSLt0U7b6Bn8vAi S8h85Qorsi+y9wgK9x4YiDyfYrjY+TgIQV1WUaE1hF9SfZ9rELLdBQrQA0Ptpp2s 0AbumLK4 =SEbH -----END PGP SIGNATURE----- --WUixXfIWnZStrfw7--