public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@bootlin.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3] spi: Add support for the Aspeed ast2500 SPI controllers
Date: Wed, 10 Oct 2018 09:32:55 +0200	[thread overview]
Message-ID: <20181010093255.17130d10@bbrezillon> (raw)
In-Reply-To: <CAMty3ZDF3EaHs5fy8Z-eT1JebjzUYY5vJeo1a=VVaeec6YmuvQ@mail.gmail.com>

Hi Cédric,

On Wed, 10 Oct 2018 11:46:56 +0530
Jagan Teki <jagan@amarulasolutions.com> wrote:

> On Mon, Oct 8, 2018 at 11:32 AM Cédric Le Goater <clg@kaod.org> wrote:
> >
> > On 10/4/18 5:57 PM, Jagan Teki wrote:  
> > > On Fri, Sep 28, 2018 at 5:20 PM Cédric Le Goater <clg@kaod.org> wrote:  
> > >>
> > >> Hello Simon,
> > >>
> > >>
> > >> The Aspeed AST2500 FMC controller can handle SPI flash and NOR flash memory,
> > >> and the Aspeed AST2500 SPI Flash Controllers only SPI. If there is some
> > >> misunderstanding on this driver, it might come from the fact it is closer
> > >> to a SPI-NOR driver like we have in Linux, than a generic SPI driver.
> > >> The stm32 SPI driver is somewhat similar.
> > >>
> > >> Should we move it under drivers/mtd/spi/ maybe ?  
> > >
> > > Seems with new spi-mem in Linux flash memory driver rely on spi-mem
> > > instead of mtd/spi-nor. So I think you can handle this via new
> > > spi-mem. have you send any patches to Linux?  
> >
> > No, not yet. The patchset is sent  :
> >
> >         https://patchwork.ozlabs.org/cover/933293/
> >
> > is not using spimem. I was not aware of that change in the spi-nor layer
> > at the time. I will take a look.  

Indeed, if you have some time to convert the Linux aspeed driver to
the spi-mem interface that would be appreciated.

> 
> Yes, but for newly added drivers. added spi-mem guys, may be they can comment.

Jagan, what's the plan for the spi-nor layer in u-boot? I mean, spi-mem
is just the controller side of things, but it requires spi-mem drivers
to support specific SPI memories. We added the spi-nand driver, but
AFAICT, the spi-nor driver does not exist yet. There's the spi-flash
layer already, but IIUC you were trying to replace it by a spi-nor
framework.

I see 2 options here:

1/ copy the spi-nor framework from linux and adjust it to make it work
   in uboot
2/ create a spi-nor driver which interfaces directly with the spi-mem
   layer

I know I usually recommend going for #1, but it might be a bit
different this time around since I'm trying to get rid of the
spi_nor interface in Linux (the one that allows people to implement
spi-nor controller drivers) in favor of a native spi-mem driver. So
I think it's worth considering option #2.

  reply	other threads:[~2018-10-10  7:32 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-10 14:16 [U-Boot] [PATCH 0/3] Support for the Aspeed ast2500 FMC/SPI controllers Cédric Le Goater
2018-09-10 14:16 ` [U-Boot] [PATCH 1/3] aspeed: ast2500: Add AHB clock Cédric Le Goater
2018-09-11  7:35   ` Joel Stanley
2018-09-11 16:42     ` Maxim Sloyko
2018-09-11 17:43       ` Cédric Le Goater
2018-09-11 22:39         ` Joel Stanley
2018-09-27 13:41   ` Simon Glass
2018-09-10 14:16 ` [U-Boot] [PATCH 2/3] spi: Add support for the Aspeed ast2500 SPI controllers Cédric Le Goater
2018-09-11 22:38   ` Joel Stanley
2018-09-12  6:03     ` Cédric Le Goater
2018-09-27 13:41   ` Simon Glass
2018-09-28 11:42     ` Cédric Le Goater
2018-10-02 11:22       ` Simon Glass
2018-10-08  6:29         ` Cédric Le Goater
2018-10-04 15:57       ` Jagan Teki
2018-10-08  6:02         ` Cédric Le Goater
2018-10-10  6:16           ` Jagan Teki
2018-10-10  7:32             ` Boris Brezillon [this message]
2018-10-10 12:02               ` Cédric Le Goater
2019-01-25 17:28                 ` Cédric Le Goater
2019-01-25 18:00                   ` Boris Brezillon
2019-01-26 10:42                     ` Vignesh R
2018-09-10 14:16 ` [U-Boot] [PATCH 3/3] aspeed: Add SPI support to the ast2500 Eval Board Cédric Le Goater
2018-09-12  9:28   ` Joel Stanley
2018-09-20 14:53   ` Jagan Teki
2018-09-20 15:56     ` Cédric Le Goater

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=20181010093255.17130d10@bbrezillon \
    --to=boris.brezillon@bootlin.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