From: computersforpeace@gmail.com (Brian Norris)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V1 3/5] mtd: m25p80: add the quad-read support
Date: Fri, 23 Aug 2013 04:46:52 -0700 [thread overview]
Message-ID: <52174BAC.3070901@gmail.com> (raw)
In-Reply-To: <20130823094141.GE25263@sirena.org.uk>
On 08/23/2013 02:41 AM, Mark Brown wrote:
> On Fri, Aug 23, 2013 at 01:58:05AM +0200, Marek Vasut wrote:
>>> I was actually thinking something more generic than that - putting the
>>> property at the SPI generic bindings level. Though if all flashes with
>>> this dual/quad read functionality have the prefix m25p the above would
>>> work also, at the minute this does seem to be mostly used by flash (I
>>> bet someone's got some DSPs or something though).
>
>> Ah! So you mean the SPI controller would provide information that it can do
>> dual/quad transfers? But then, the additional pins can only be wired to certain
>> chips (controller by certain CS lines).
>
> No, not exactly - I just meant that the property on the child node
> should be one that's consistent over all chips and could hopefully be
> implemented in the SPI core as part of instantiating the device in DT.
> Which probably just means stripping or changing the vendor prefix.
(Now that I've been pointed to the support merged into the SPI tree...)
Aren't the following new DT properties (for the SPI slave) sufficient?
spi-rx-nbits
spi-tx-nbits
We can leave the detection of which flash chips support which modes to
software (m25p80.c) where it belongs, IMO.
They're already in the following commit:
commit f477b7fb13df2b843997559ff34e87d054ba6538
Author: wangyuhang <wangyuhang2014@gmail.com>
Date: Sun Aug 11 18:15:17 2013 +0800
spi: DUAL and QUAD support
fix the previous patch some mistake below:
1. DT in slave node, use "spi-tx-nbits = <1/2/4>" in place of using
"spi-tx-dual, spi-tx-quad" directly, same to rx. So correct the
previous way to get the property in @of_register_spi_devices().
2. Change the value of transfer bit macro(SPI_NBITS_SINGLE, SPI_NBITS_DUAL
SPI_NBITS_QUAD) to 0x01, 0x02 and 0x04 to match the actual wires.
3. Add the following check
(1)keep the tx_nbits and rx_nbits in spi_transfer is not beyond the
single, dual and quad.
(2)keep tx_nbits and rx_nbits are contained by @spi_device->mode
example: if @spi_device->mode = DUAL, then tx/rx_nbits can not be set
to QUAD(SPI_NBITS_QUAD)
(3)if "@spi_device->mode & SPI_3WIRE", then tx/rx_nbits should be in
single(SPI_NBITS_SINGLE)
Signed-off-by: wangyuhang <wangyuhang2014@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Brian
next prev parent reply other threads:[~2013-08-23 11:46 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-19 4:09 [PATCH V1 0/5] Add the Quadspi driver for vf610-twr Huang Shijie
2013-08-19 4:09 ` [PATCH V1 1/5] mtd: m25p80: move the spi-nor commands to a header Huang Shijie
2013-08-19 4:10 ` [PATCH V1 2/5] mtd: m25p80: add support for Spansion s25fl128s chip Huang Shijie
2013-08-19 4:10 ` [PATCH V1 3/5] mtd: m25p80: add the quad-read support Huang Shijie
2013-08-22 19:34 ` Brian Norris
2013-08-22 19:55 ` Mark Brown
2013-08-22 20:29 ` Marek Vasut
2013-08-22 23:36 ` Mark Brown
2013-08-22 23:58 ` Marek Vasut
2013-08-23 9:41 ` Mark Brown
2013-08-23 10:42 ` Marek Vasut
2013-08-23 11:46 ` Brian Norris [this message]
2013-08-23 11:53 ` Brian Norris
2013-08-23 12:01 ` Mark Brown
2013-08-23 13:20 ` yuhang wang
2013-08-23 6:26 ` Huang Shijie
2013-08-23 11:23 ` Brian Norris
2013-08-23 11:27 ` Sourav Poddar
2013-08-23 11:30 ` Mark Brown
2013-08-23 9:05 ` yuhang wang
2013-08-23 9:25 ` Huang Shijie
2013-08-23 9:57 ` Sourav Poddar
2013-08-24 2:45 ` Huang Shijie
2013-08-23 15:59 ` Sourav Poddar
2013-08-23 13:59 ` yuhang wang
2013-08-24 3:01 ` Huang Shijie
2013-08-19 4:10 ` [PATCH V1 4/5] spi: Add Freescale QuadSpi driver Huang Shijie
2013-08-22 19:21 ` Brian Norris
2013-08-23 2:14 ` Huang Shijie
2013-08-23 6:59 ` Huang Shijie
2013-08-23 16:44 ` Mark Brown
2013-08-24 7:11 ` Brian Norris
2013-08-24 13:42 ` Huang Shijie
2013-08-19 4:10 ` [PATCH V1 5/5] ARM: dts: vf610-twr: Add SPI NOR support Huang Shijie
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=52174BAC.3070901@gmail.com \
--to=computersforpeace@gmail.com \
--cc=linux-arm-kernel@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;
as well as URLs for NNTP newsgroup(s).