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 28133C433FE for ; Sat, 1 Oct 2022 08:38:02 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 777AC84A16; Sat, 1 Oct 2022 10:38:00 +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="uvgz5b/T"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 071D884BE0; Sat, 1 Oct 2022 10:37:59 +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 CD69F84949 for ; Sat, 1 Oct 2022 10:37:49 +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 24827B80B27; Sat, 1 Oct 2022 08:37:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 15D13C433C1; Sat, 1 Oct 2022 08:37:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664613467; bh=8zMqQ6YtOAtioIuU6PkfomF+ChbjpQULrf4ZmvVWSLA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=uvgz5b/T+xzNCPX/Udka7fri8357oVyG1fyGa7+ync+3lX436I1d1cVfgv7WhHhOD Uglm+DYPYyb/2NoNfaHRZQyG6IF/cz26yAsziQ5S+WZSraJS1MXG9cNHSBgVaiwjeG /yjrBfb2P3UHLU30mhzdV/srDCmr9jV08Yek3LljRPgG0i6V7CtWFDEYBDTlXPbBhT fMSpG8McZ3bKQrksK3v/wgp+C9G5ndQwGmaLCRwExDOu0ciikSfMqhateJTEK3tFfy jWElcfgxSDx/w4z4pkbdvOUv59oKIVUcJYK4XH6dOtyZb7NuBO1SvDO2nAGnnpzPWH j1ID7mvGVwOsA== Message-ID: Date: Sat, 1 Oct 2022 11:37:44 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [u-boot][PATCH 1/3] scripts: Makefile.spl: Enable memory drivers to be built for SPL Content-Language: en-US To: Simon Glass Cc: Tom Rini , U-Boot Mailing List References: <20220928121149.1724-1-rogerq@kernel.org> <20220928121149.1724-2-rogerq@kernel.org> <33934f40-f11a-9384-e6fe-968a5a48f0bb@kernel.org> <5f73e765-803d-0ee4-60be-f2a7996f054c@kernel.org> <20220930140020.GR3044094@bill-the-cat> <9d76a7c9-f891-96d6-44dc-d19ae8560d2a@kernel.org> From: Roger Quadros In-Reply-To: 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, On 01/10/2022 02:48, Simon Glass wrote: > Hi, > > On Fri, 30 Sept 2022 at 14:18, Roger Quadros wrote: >> >> On 30/09/2022 17:00, Tom Rini wrote: >>> On Fri, Sep 30, 2022 at 07:28:51AM -0600, Simon Glass wrote: >>>> Hi Roger, >>>> >>>> On Fri, 30 Sept 2022 at 06:47, Roger Quadros wrote: >>>>> >>>>> Simon, >>>>> >>>>> On 29/09/2022 21:06, Simon Glass wrote: >>>>>> Hi Roger, >>>>>> >>>>>> On Thu, 29 Sept 2022 at 01:03, Roger Quadros wrote: >>>>>>> >>>>>>> Hi Simon, >>>>>>> >>>>>>> On 28/09/2022 19:27, Simon Glass wrote: >>>>>>>> Hi Roger, >>>>>>>> >>>>>>>> On Wed, 28 Sept 2022 at 06:12, 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(+) >>>>>>>> >>>>>>>> Please can you use the existing drivers/ram directory? >>>>>>> >>>>>>> The ti-gpmc driver is not actually a RAM only controller. Although it can support SRAM. >>>>>>> It is a more general purpose controller that can support different peripherals. >>>>>>> It is similar to the drivers already existing in the divers/memory directory. >>>>>>> >>>>>>> I was just trying to keep the file layout similar to that in the Linux kernel. >>>>>>> >>>>>>> Do you still see a problem with it? >>>>>> >>>>>> Well in this case perhaps the RAM device would be a child of this one? >>>>> >>>>> That's right. >>>>>> >>>>>> But there is no uclass for your new device. One of the drivers in that >>>>>> dir uses UCLASS_NOP and your one seems to use UCLASS_SIMPLE_BUS >>>>>> >>>>>> So let's add a uclass for it and describe exactly what it is for. >>>>> >>>>> Why isn't UCLASS_SIMPLE_BUS sufficient? >>>>> By itself, the GPMC driver doesn't offer any usable functionality. >>>>> It just configures the bus interface and then populates the children. >>>> >>>> That's OK, but in that case it should go in drivers/bus and perhaps >>>> drivers/memory should go away? >>> >>> No, drivers/memory/stm32-fmc2-ebi.c is there and is the equivalent (more >>> or less) of drivers/memory/stm32-fmc2-ebi.c in the linux kernel. So >>> maybe a question is, are we talking about the equivalent of >>> drivers/memory/omap-gpmc.c here? Or something else? >>> >> >> Yes, I just picked up that file and adapted it for u-boot. >> As GPMC is not only for OMAP devices anymore I renamed it to ti-gpmc.c. >> If it helps we can retain the kernel naming. > > In the fullness of time all driver/xxx directories should have a > uclass associated with them. So in this case, do we want to use > UCLASS_BUS and put it in drivers/bus or add a UCLASS_MEMORY and put it > in drivers/memory? I'd opt for UCLASS_MEMORY. cheers, -roger