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 DF8F9C38A2D for ; Wed, 26 Oct 2022 13:54:01 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8109985054; Wed, 26 Oct 2022 15:53:59 +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="gOy1R3M8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 08D7985057; Wed, 26 Oct 2022 15:53:57 +0200 (CEST) Received: from mail-qv1-xf2a.google.com (mail-qv1-xf2a.google.com [IPv6:2607:f8b0:4864:20::f2a]) (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 1D8178504A for ; Wed, 26 Oct 2022 15:53:54 +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-qv1-xf2a.google.com with SMTP id n18so6125504qvt.11 for ; Wed, 26 Oct 2022 06:53:54 -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=iBAflh3ZlBTMYXf4YzCgtRL9hflyLDdT1BBy1pcpNlc=; b=gOy1R3M89qKYVckiO6VmyVCgyg07Dm1XnLKKWYYJbk4FKDPyPVHU/OoS9LNZaUyTB+ Nh2sYcCFAZHhVk28KJ8xXTrpx2lPVHsKqF2Od3hgNHpb59s6dRt7pi9CLlPLI+sKqK3H ERzIyUeu25BwAr2PVM1kiTpy3s++iAiV0//Rc= 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=iBAflh3ZlBTMYXf4YzCgtRL9hflyLDdT1BBy1pcpNlc=; b=jThKGQOFVUgSAGv7iKnS3NO1PMYUKfnOwxtWuKK8aP9f/KkD+9lkDaJyeWG2PRPbTh QsNc2mWzz0S+RDLhoFFqaBMG3ULfxJAEo/kAckt9kAZUBOvEvznBmypH69Woh9QPVlHg +/QRIqFSAh0k7JNN3SKnt4lDSoN3kgEZx79EE7r31LAA1XmbnHhXpWMZHOvz/b3Vhcw9 eI+UJFECwJxuGzelDrk+zxaYkXvSVmzES08aXY2bgIczaktO1KVLnm9s8pazHbcO/5HS GXdN5sc9jXmbLmqRsm4V/cJRM67juKFTbWkLHnE42IcMVDV+uHBcOcB7kA0FGXO/gwmU thRg== X-Gm-Message-State: ACrzQf0wXJWaPcM0ir8jCRdNQGD+I4tWMfnqGE8tdv9Ve+YsCtPMNepd COsGOsy51H+wDksXjuzCOcqCmg== X-Google-Smtp-Source: AMsMyM5n1Xljq12Ycg85DicceGuEgcKNYf2pwmjnlyrrc4NjSL9U37LvsCAifdmkUjnfeF0zxBap9g== X-Received: by 2002:a05:6214:ccf:b0:4bb:9846:b834 with SMTP id 15-20020a0562140ccf00b004bb9846b834mr1654587qvx.101.1666792432951; Wed, 26 Oct 2022 06:53:52 -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 x6-20020a05620a448600b006b9c9b7db8bsm4108341qkp.82.2022.10.26.06.53.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 06:53:52 -0700 (PDT) Date: Wed, 26 Oct 2022 09:53:50 -0400 From: Tom Rini To: Simon Glass Cc: Roger Quadros , 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: <20221026135350.GS2020586@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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="SVtJikI1dhzjPNnQ" Content-Disposition: inline In-Reply-To: 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 --SVtJikI1dhzjPNnQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 25, 2022 at 05:35:29PM -0600, 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 gat= e 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 > Perhaps we can look at my Kconfig series so it can become > CONFIG(MEMORY) and we can drop all the SPL_TPL_ stuff in Makefiles? I think that was the part I had some reservations about, but we should re-visit that idea as I wasn't disagreeing (I believe) with making the logic easier, but I think that we need to re-evaluate how we manage the SPL/TPL/full U-Boot idea. --=20 Tom --SVtJikI1dhzjPNnQ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmNZO+4ACgkQFHw5/5Y0 tywIEgv+OHh/wadFHtHD5leD0406vEvPEHheYeIL7+dve2zFkgOncITiR/1amfIe ouoiAYudbHEwBJ3g0suNlP95JnYsl63uiJCyJRDFRas7MjQ9EaJOyoGG9wgtiawb phxTvQZHtlWJXPxdOzmxlht9EIhZResPbumZ+7ijnwyfEyWkiEf4RGQzpEBEMmg4 PRID+7FX1ukERleRndhmVTPUsdzK/DSc6uWfFuQTxjqg0B5eGR3iKKj2VffbVzQB aN3EjP29ldGwET3nQPClUWwyVDMi3yY9u8hC6ykxD/0clIAsvjbixduQ2DoJEcz5 Bp02y8JWCCOcZnnxEtX3fkWm3LuPUoXqHsR4QFum0Ye8N7/T6R00kd5Z9hBK8yWB MPTQHHTkR8HI6QJvBilUtZLJbPjuVz4F2RZtc0xtw0Qi9PbWd4SyCusENZBZEgax i8JgGbctNkspqmtE82yJ6tYoXGtjOTx0zLwbsyySNbgNiarpcAbJKOzq+kmUHpv1 PSNgDapI =W2WT -----END PGP SIGNATURE----- --SVtJikI1dhzjPNnQ--