public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Roger Quadros <rogerq@kernel.org>
To: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>,
	U-Boot Mailing List <u-boot@lists.denx.de>
Subject: Re: [u-boot][PATCH 1/3] scripts: Makefile.spl: Enable memory drivers to be built for SPL
Date: Sat, 1 Oct 2022 11:37:44 +0300	[thread overview]
Message-ID: <e68a9c1f-99f2-e863-3e1e-40610649f720@kernel.org> (raw)
In-Reply-To: <CAPnjgZ3PzSp=WGoCURB_c2jXPEVD5Hz+byWSuDxr_MR=MUHcUA@mail.gmail.com>

Hi,

On 01/10/2022 02:48, Simon Glass wrote:
> Hi,
> 
> On Fri, 30 Sept 2022 at 14:18, Roger Quadros <rogerq@kernel.org> 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 <rogerq@kernel.org> wrote:
>>>>>
>>>>> Simon,
>>>>>
>>>>> On 29/09/2022 21:06, Simon Glass wrote:
>>>>>> Hi Roger,
>>>>>>
>>>>>> On Thu, 29 Sept 2022 at 01:03, Roger Quadros <rogerq@kernel.org> wrote:
>>>>>>>
>>>>>>> Hi Simon,
>>>>>>>
>>>>>>> On 28/09/2022 19:27, Simon Glass wrote:
>>>>>>>> Hi Roger,
>>>>>>>>
>>>>>>>> On Wed, 28 Sept 2022 at 06:12, Roger Quadros <rogerq@kernel.org> wrote:
>>>>>>>>>
>>>>>>>>> We will need ti-gpmc driver for SPL. Allow memory drivers
>>>>>>>>> do be built for SPL.
>>>>>>>>>
>>>>>>>>> Signed-off-by: Roger Quadros <rogerq@kernel.org>
>>>>>>>>> ---
>>>>>>>>>  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

  reply	other threads:[~2022-10-01  8:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-28 12:11 [u-boot][PATCH 0/3] Introduce TI GPMC memory controller driver Roger Quadros
2022-09-28 12:11 ` [u-boot][PATCH 1/3] scripts: Makefile.spl: Enable memory drivers to be built for SPL Roger Quadros
2022-09-28 16:27   ` Simon Glass
2022-09-29  7:02     ` Roger Quadros
2022-09-29 17:51       ` Tom Rini
2022-09-29 18:06       ` Simon Glass
2022-09-30 12:47         ` Roger Quadros
2022-09-30 13:28           ` Simon Glass
2022-09-30 14:00             ` Tom Rini
2022-09-30 20:17               ` Roger Quadros
2022-09-30 23:48                 ` Simon Glass
2022-10-01  8:37                   ` Roger Quadros [this message]
2022-10-03  1:10                     ` Simon Glass
2022-09-28 12:11 ` [u-boot][PATCH 2/3] dt/bindings: memory: Add bindings for TI GPMC driver Roger Quadros
2022-09-28 12:11 ` [u-boot][PATCH 3/3] memory: Add " Roger Quadros
2022-09-29 17:51 ` [u-boot][PATCH 0/3] Introduce TI GPMC memory controller driver Tom Rini
2022-09-30 12:42   ` Roger Quadros
2022-09-30 12:44     ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e68a9c1f-99f2-e863-3e1e-40610649f720@kernel.org \
    --to=rogerq@kernel.org \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox