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 15BA9C433FE for ; Thu, 20 Oct 2022 12:30:02 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 44F8784F9B; Thu, 20 Oct 2022 14:29: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="pSQwmLvu"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 29C6F84F9D; Thu, 20 Oct 2022 14:29:57 +0200 (CEST) Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) (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 4697C84F9A for ; Thu, 20 Oct 2022 14:29: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-qk1-x733.google.com with SMTP id o22so12618381qkl.8 for ; Thu, 20 Oct 2022 05:29: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=4u3+QIh0XByl3XLtfTO1yGIM4+FUz7oHOkoEOQ+FpME=; b=pSQwmLvuA4eptUFTO6OLiZrezw+omH4QTV7wu7ztun/JTLwRqA5FjG3f7N8XYhCv50 crPViJtBBuJJ9VYFLW4I1M4L6Mdxru6juZDkcGmRoGhIklvRs8W4rNxQSnFwd5TpSdV/ z72eb2eScha1ZcST6imd/vWr6OPDNuiuhbwK8= 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=4u3+QIh0XByl3XLtfTO1yGIM4+FUz7oHOkoEOQ+FpME=; b=hJTs9K9RIsuJ5q7jDLEJMOyMkWYuwdXIqXJarXDRwqoyVHxZ1KfD6LKj5mmphu3onz UGs8Tilld35jD5cSnN3A29bA8x+hu9+89Ea+Bvq7oFg2vgov2huB9FD6iVDNrCEbWPcD 6IEovxeTui9lxlhtSrZh0xmf1tq9hQoDrzriQ4nwPoYGBb8Y0qIMCZDdvrFCr7Y4VOdD 8ngtJigQtlBPlTE/LuIFW8hRXoN52wq6sVJ7OXR/0o8DgYzgl+MixDH9PblJUmNJSNDA Ar6iq0EPM8Kwnv4iMuWROZHqgBDfMZMYS9CAZqxMmzCgkLzXhm1Qtt/+V7nE73OEGUDC +iCQ== X-Gm-Message-State: ACrzQf2eItkJ+O+y2/JJf3Vaht4gRZBftjU4caV6kzpEeM1FOd4t54Mi SkiISIb7YA4F7c5xpzyfTds8Rg== X-Google-Smtp-Source: AMsMyM4gfHXFFbamc4HujyGFHSb8iiH8zuBo8eKvaPJzs7hwSypsXy1lPWKvPwN7yQuyQL28Z90Z1w== X-Received: by 2002:a05:620a:2409:b0:6ec:5319:156a with SMTP id d9-20020a05620a240900b006ec5319156amr8880526qkn.587.1666268992965; Thu, 20 Oct 2022 05:29:52 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-6da6-ebf4-33cc-5bbb.res6.spectrum.com. [2603:6081:7b00:6400:6da6:ebf4:33cc:5bbb]) by smtp.gmail.com with ESMTPSA id i8-20020a05620a074800b006cea2984c9bsm6930886qki.100.2022.10.20.05.29.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 05:29:52 -0700 (PDT) Date: Thu, 20 Oct 2022 08:29:50 -0400 From: Tom Rini To: Roger Quadros Cc: sjg@chromium.org, 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: <20221020122950.GN2020586@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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Q2l42ZpTeLjzDHJr" Content-Disposition: inline In-Reply-To: <6ac9e035-93ce-3272-13af-01fa77824d31@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 --Q2l42ZpTeLjzDHJr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 20, 2022 at 03:23:42PM +0300, Roger Quadros wrote: > Hi Tom, >=20 > 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 > >>>> =20 > >>>> 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, wh= ich > >>> is not what's intended. We need an SPL_MEMORY symbol and then gate the > >>> directory on that. > >>> >=20 > I have a question about how CONFIG_SPL_MEMORY works together with CONFIG_= MEMORY. >=20 > Do we use CONFIG_SPL_MEMORY only to gate the drivers/memory directory inc= lusion? > Then continue to use CONFIG_MEMORY and others to enable/disable driver > build for both non-SPL and SPL case? >=20 > 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 Tom --Q2l42ZpTeLjzDHJr Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmNRPzgACgkQFHw5/5Y0 tyxVTwwAlyerLDbrDNXzzDbg8GH3tdBN68MieTSzFVqOuEOM0dRRoOMo3kZWojAb sL030i5MVyzQ5AnBClyrRNbaCrdopHghxi6pa59A0Y0jJfuhuHNsT18xEQZ8sJp2 yjmmHckLb1zjTNA6xsOS/HC5+DcY2BS2Tfk+tSQ9JZ1MyoEKK2yxwH7qYJj3pyBu 3bukBuJcUdWL1iRWUJlvs1Ocli0pjxbMcMi1vbJ9e9j2kCJxHyn0n19LYwbGu0AH NARwJrnESQBszhMTaplz07ERyvt3iRVazyRJAGjMdlF0WeN9Y4wtWph3M+zKitpj Doft+oLK2+PpN0hcZCg+vu78FTtaqAaiLh+0z+P8U0ag2mKkOfxn6/Rg/PoVwsT4 LK0ij+Ef3un7YN4u5zdspH2t4J8RMzS2bm1eEq5MVss5U0li8lCqYtvMvm6Ce/KW KmVtc8q9N81CcpynSd4YbeY8ZlQ2u6Uk7dykFeGgz3VinEqXlkmIJlZ59jfPYe03 bmhi4q/F =78PN -----END PGP SIGNATURE----- --Q2l42ZpTeLjzDHJr--