From: Lee Jones <lee.jones@linaro.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: angus.clark@st.com, Mark Brown <broonie@linaro.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
David Woodhouse <dwmw2@infradead.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 02/10] mtd: st_spi_fsm: Supply all register address and bit logic defines
Date: Mon, 18 Nov 2013 09:32:29 +0000 [thread overview]
Message-ID: <20131118093229.GB13640@lee--X1> (raw)
In-Reply-To: <CACRpkdaccxcTfKc-y7rPEH1H3yua3ubLvuvTzWnMs1rOwjiVNw@mail.gmail.com>
On Mon, 18 Nov 2013, Linus Walleij wrote:
> On Thu, Nov 14, 2013 at 3:22 PM, Lee Jones <lee.jones@linaro.org> wrote:
>
> > Here we provide the FSM's register addresses, register bit names/offsets
> > and some commands which will prove useful as we start bulk the FMS's
> > driver out with functionality.
> >
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
>
> OK...
>
> > +/*
> > + * FSM SPI Controller Registers
> > + */
> > +#define SPI_CLOCKDIV 0x0010
> > +#define SPI_MODESELECT 0x0018
> > +#define SPI_CONFIGDATA 0x0020
> (...)
>
> So what we want to know here is whether this is a general-purpose
> SPI block, or if it's a special-purpose SPI block that can only be
> used for accessing flashes.
>
> If it's the former that part should be broken out into drivers/spi
> of course...
>
> But the register map seems a bit special-purpose so it could
> very well be that this is for flash control only. So maybe you can
> spill some beans from a datasheet here?
>
> A clock divider at offset 0x10 already tells us that this is probably
> a PL022 derivate, just that we don't know how much it has
> been hacked with... does this thing contain AMBA identifiers
> at the end of the IO-region, usually at 0x0fe0 thru 0x0fff?
You've just opened a massive can of worms. Let me try to catch and put
them all back as quickly as possible.
The FSM Controller is a derivative of an SPI controller, but it's so
highly specialised that it can't do anything else but talk to Serial
Flash devices.
I've actually travelled down the route of separating the SPI
Controller parts to drivers/spi. It's possible to do that and perhaps
we could then use the generic m25p80 Serial Flash driver as the
back-end, but it would be incredibly complicated and would mean we'd
need to duplicate almost all of the m25p80 driver into the SPI
Controller. The Falcon SPI driver tried to do something similar, but
now looks broken due to some incompatible changes in m25p80. We also
want to avoid putting ourselves in that position of fragility.
There are a list of other reasons why this wouldn't work well. I have
asked the original author of this driver (whom I've spent quite a few
hours in face-to-face meetings with over the past couple of weeks) to
jot them all down so I can reply to these kinds of requests, but I
just don't have it yet.
Take my word for it for now and I'll get back to you when I can.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
next prev parent reply other threads:[~2013-11-18 9:33 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-14 14:22 [PATCH 00/10] mtd: st_spi_fsm: Add new device Lee Jones
2013-11-14 14:22 ` [PATCH 01/10] mtd: st_spi_fsm: Allocate resources and register with MTD framework Lee Jones
2013-11-14 14:22 ` [PATCH 02/10] mtd: st_spi_fsm: Supply all register address and bit logic defines Lee Jones
2013-11-18 9:15 ` Linus Walleij
2013-11-18 9:32 ` Lee Jones [this message]
2013-11-18 13:39 ` Mark Brown
2013-11-18 14:24 ` Lee Jones
2013-11-18 14:45 ` Mark Brown
2013-11-18 14:56 ` Lee Jones
2013-11-18 15:16 ` Mark Brown
2013-11-18 15:31 ` Lee Jones
2013-11-18 15:41 ` Mark Brown
2013-11-18 16:02 ` Lee Jones
2013-11-18 17:22 ` Mark Brown
2013-11-18 17:32 ` Lee Jones
2013-11-18 17:59 ` Sourav Poddar
2013-11-18 18:35 ` Mark Brown
2013-11-14 14:22 ` [PATCH 03/10] mtd: st_spi_fsm: Initialise and configure the FSM for normal working conditions Lee Jones
2013-11-14 14:22 ` [PATCH 04/10] mtd: st_spi_fsm: Supply framework for device requests Lee Jones
2013-11-14 14:22 ` [PATCH 05/10] mtd: st_spi_fsm: Supply a method to read from the FSM's FIFO Lee Jones
2013-11-14 14:22 ` [PATCH 06/10] mtd: st_spi_fsm: Supply defines for the possible flash command opcodes Lee Jones
2013-11-14 14:22 ` [PATCH 07/10] mtd: st_spi_fsm: Add support for JEDEC ID extraction Lee Jones
2013-11-14 14:22 ` [PATCH 08/10] mtd: st_spi_fsm: Provide device look-up table Lee Jones
2013-11-14 14:22 ` [PATCH 09/10] mtd: st_spi_fsm: Dynamically setup flash device based on JEDEC ID Lee Jones
2013-11-14 14:22 ` [PATCH 10/10] ARM: STi: Add support for the FSM Serial Flash Controller Lee Jones
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=20131118093229.GB13640@lee--X1 \
--to=lee.jones@linaro.org \
--cc=angus.clark@st.com \
--cc=broonie@linaro.org \
--cc=dwmw2@infradead.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
/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