From: Felipe Balbi <balbi@ti.com>
To: Mark Brown <broonie@kernel.org>
Cc: Felipe Balbi <balbi@ti.com>, Sourav Poddar <sourav.poddar@ti.com>,
spi-devel-general@lists.sourceforge.net, grant.likely@linaro.org,
rnayak@ti.com, linux-omap@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCHv2] drivers: spi: Add qspi flash controller
Date: Tue, 2 Jul 2013 18:19:47 +0300 [thread overview]
Message-ID: <20130702151947.GD7013@arwen.pp.htv.fi> (raw)
In-Reply-To: <20130702110432.GJ27646@sirena.org.uk>
[-- Attachment #1: Type: text/plain, Size: 1730 bytes --]
On Tue, Jul 02, 2013 at 12:04:32PM +0100, Mark Brown wrote:
> On Tue, Jul 02, 2013 at 01:43:38PM +0300, Felipe Balbi wrote:
> > On Tue, Jul 02, 2013 at 11:17:18AM +0100, Mark Brown wrote:
>
> > > + /* setup command reg */
> > > + qspi->cmd = 0;
> > > + qspi->cmd |= QSPI_WLEN(8);
>
> > Sourav hardcodes wordlenght to 8-bits, and yet he enables 8, 16 and
> > 32-bits per word.
>
> Yeah, that's what I noticed (well first off I noticed that there were no
> constraints on bits per word at all).
>
> > > + qspi->cmd |= QSPI_EN_CS(0);
>
> > he's also hardcoding the chipselect line which should be take from
> > m->spi->chip_select
>
> This one *can* be OK if the driver only accepts one chip select (though
> obviously supporting more is better). I'd really only done a fairly
this controller has 6 chip selects IIRC
> high level review for framework stuff so hadn't got that far yet.
>
> One thing I really want to get round to doing with the SPI core is
> providing an easy to pick up GPIO chip select as standard
that should be fairly simple I guess. Just lack of time, I'm assuming ?
Complex will be to support up to 128-bits per word as this particular
controller supports. In fact, this controller is, IMO, overly flexible.
You can do 1, 2, 3, 4, 5, 6, ... , 128 bits per word.
The only problem is that the DATA registers which give you access to the
shift register, aren't mapped to consecutive offsets, but that should
still be ok since we will, anyway, be using readl/writel for each
register. Still, for platforms which can provide writeq/readq (not sure
if that's already supported on ARM) we could save a few cycles, no ?
anyway... it is what it is.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-07-02 15:19 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-02 8:56 [PATCHv2] drivers: spi: Add qspi flash controller Sourav Poddar
2013-07-02 9:24 ` Felipe Balbi
[not found] ` <20130702092458.GI3352-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2013-07-02 10:00 ` Sourav Poddar
2013-07-02 10:16 ` Felipe Balbi
[not found] ` <20130702101608.GO3352-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2013-07-02 10:23 ` Sourav Poddar
2013-07-02 10:31 ` Felipe Balbi
[not found] ` <20130702103122.GP3352-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2013-07-02 10:39 ` Sourav Poddar
2013-07-02 9:32 ` Mark Brown
2013-07-02 9:44 ` Felipe Balbi
2013-07-02 10:17 ` Mark Brown
[not found] ` <20130702101718.GE27646-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-07-02 10:26 ` Sourav Poddar
2013-07-02 10:43 ` Felipe Balbi
2013-07-02 11:04 ` Mark Brown
2013-07-02 15:19 ` Felipe Balbi [this message]
2013-07-02 15:49 ` Mark Brown
[not found] ` <1372755399-21769-1-git-send-email-sourav.poddar-l0cyMroinI0@public.gmane.org>
2013-07-02 10:57 ` Sekhar Nori
[not found] ` <51D2B220.1010501-l0cyMroinI0@public.gmane.org>
2013-07-02 10:59 ` Sourav Poddar
2013-07-02 15:58 ` Felipe Balbi
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=20130702151947.GD7013@arwen.pp.htv.fi \
--to=balbi@ti.com \
--cc=broonie@kernel.org \
--cc=grant.likely@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=rnayak@ti.com \
--cc=sourav.poddar@ti.com \
--cc=spi-devel-general@lists.sourceforge.net \
/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