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 13:43:38 +0300 [thread overview]
Message-ID: <20130702104338.GA5107@arwen.pp.htv.fi> (raw)
In-Reply-To: <20130702101718.GE27646@sirena.org.uk>
[-- Attachment #1: Type: text/plain, Size: 1452 bytes --]
On Tue, Jul 02, 2013 at 11:17:18AM +0100, Mark Brown wrote:
> On Tue, Jul 02, 2013 at 12:44:04PM +0300, Felipe Balbi wrote:
> > On Tue, Jul 02, 2013 at 10:32:47AM +0100, Mark Brown wrote:
>
> > > Does this hardware really support anything other than 8 bits per word?
> > > There is no code in the driver which pays any attention to the word
> > > size...
>
> > the HW has a 128-bit shift register ;-) but driver doesn't look
> > complete.
>
> That's not the issue - remember that SPI specifies big endian byte
> ordering for words on the bus so things will need to be reordered by the
> hardware for anything except 8 bits.
right, the driver is far from being complete. In fact this driver is
quite buggy, if you look here :
> +static int dra7xxx_qspi_start_transfer_one(struct spi_master *master,
> + struct spi_message *m)
> +{
> + struct dra7xxx_qspi *qspi = spi_master_get_devdata(master);
> + struct spi_device *spi = m->spi;
> + struct spi_transfer *t;
> + int status = 0;
> + int flags = 0;
> +
> + /* 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.
> + qspi->cmd |= QSPI_EN_CS(0);
he's also hardcoding the chipselect line which should be take from
m->spi->chip_select
> + qspi->cmd |= 0xfff;
and he's hardcoding the frame length to 4096 frames!!
This is all buggy.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-07-02 10:43 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 [this message]
2013-07-02 11:04 ` Mark Brown
2013-07-02 15:19 ` Felipe Balbi
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=20130702104338.GA5107@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;
as well as URLs for NNTP newsgroup(s).