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 EE811C4332F for ; Thu, 20 Oct 2022 12:24:04 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8738884C7D; Thu, 20 Oct 2022 14:24:01 +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="uwqz1Img"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 91DE884C60; Thu, 20 Oct 2022 14:23:58 +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 F14D984EC6 for ; Thu, 20 Oct 2022 14:23:54 +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=rogerq@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 7FA6DB8274D; Thu, 20 Oct 2022 12:23:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF203C433D6; Thu, 20 Oct 2022 12:23:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666268633; bh=053SZdl/s13Y4VzBTUd9CgYr6HaGsvHTM8csuWLXqQI=; h=Date:From:Subject:To:Cc:References:In-Reply-To:From; b=uwqz1Img967OMcM7fvatWqqvY72rmFkhMEIt8MgKG1QLITYr7FwXRmjFYMeQUDREb mKpiShK8LYjt5XVpwvwlt9GWQOi8jtWqdQfR5C7A2XxcHUndXFq0lLuFW91r+7RlWV 2VyobtlnFjUm3oX5HMfZ/cLwsh9E638ASyMqEHarj8CThcGpx2xFRS8QC22OVg5NgU g56GXJbTBcBNTbTnBx09AppuImJMiJ6yd4cMWijuZkvFVRyQzsJK5AH13uUE67y4QZ 8U2w2rjL/6pshP4QHcESh36/wAw5mS0DnAIiyquMficyDfPv0GzNsDHP52S4+cyJBn ndwbfR/nH/hqg== Message-ID: <6ac9e035-93ce-3272-13af-01fa77824d31@kernel.org> Date: Thu, 20 Oct 2022 15:23:42 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 From: Roger Quadros Subject: Re: [u-boot][PATCH v2 2/4] scripts: Makefile.spl: Enable memory drivers to be built for SPL To: Tom Rini Cc: sjg@chromium.org, u-boot@lists.denx.de, praneeth@ti.com, kishon@ti.com, Patrick Delaunay , Patrice Chotard 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> Content-Language: en-US In-Reply-To: <20221019125425.GH2020586@bill-the-cat> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 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) += disk/ >>>> endif >>>> >>>> libs-y += drivers/ >>>> +libs-y += drivers/memory/ >>>> libs-$(CONFIG_SPL_USB_GADGET) += drivers/usb/dwc3/ >>>> libs-$(CONFIG_SPL_USB_GADGET) += drivers/usb/cdns3/ >>>> libs-y += 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 CONFIG_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? >> >> That's right. I'll fix it up. Will wait for your comments on the rest >> of the series before re-spin. > > Everything else is fine, I was about to merge it (with a > %s/DM_MEMORY/MEMORY) when I saw the stm32 platforms increasing in size > and dug in. > cheers, -roger