All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Suchanek <hramrach@gmail.com>
To: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Cc: "Brian Norris" <computersforpeace@gmail.com>,
	"MTD Maling List" <linux-mtd@lists.infradead.org>,
	"Marek Vašut" <marex@denx.de>,
	"Boris Brezillon" <boris.brezillon@free-electrons.com>,
	nicolas.ferre@atmel.com,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 7/9] mtd: m25p80: add support of dual and quad spi protocols to all commands
Date: Thu, 23 Jun 2016 22:35:45 +0200	[thread overview]
Message-ID: <CAOMqctSuP6E55mJ7QrqASRQUpxSy=ZR-b7VPF=0vcw45B6S+Yg@mail.gmail.com> (raw)
In-Reply-To: <0a3b22ec3bc41c26536f3acc8acfd98f9b3207ed.1466440540.git.cyrille.pitchen@atmel.com>

Hello,

this patch is kind of awesome.

I have a few practical concerns however.

On 20 June 2016 at 18:50, Cyrille Pitchen <cyrille.pitchen@atmel.com> wrote:
> Before this patch, m25p80_read() supported few SPI protocols:
> - regular SPI 1-1-1
> - SPI Dual Output 1-1-2
> - SPI Quad Output 1-1-4
> On the other hand, all other m25p80_*() hooks only supported SPI 1-1-1.

Under typical use my estimate is that huge majority of data is
transferred in _read() seconded by _write().

As I understand it the n-n-n means how many bits you transfer in
parallel when sending command-address-data.

In _read() the command and data overhead is negligible when you can
read kilobytes at once. So difference between 1-1-4 and 4-4-4 is not
meaningful performance-wise. Are there flash chips that support one
but not the other?

For _write() the benefits are even harder to assess. You can
presumably write at n-n-4 or n-n-2 if your controller and flash
supports it transferring the page faster. And then spend possibly
large amount of time waiting for the flash to get ready again. If the
programming time is fixed transferring the page faster may or may not
have benefits. It may at least free the bus for other devices to use.

The _reg_ stuff is probably negligible altogether,

Lastly the faster transfers of address bytes seem to be achieved with
increasingly longer command codes given how much the maximum command
length increased. So even in a page write where the address is a few %
of the transfer the benefit of these extra modes is dubious.

Overall I wonder how much it is worthwhile to complicate the code to
get all these modes in every single function.

Thanks

Michal

  reply	other threads:[~2016-06-23 20:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-20 16:49 [PATCH 0/9] mtd: spi-nor: parse SFDP tables as defined by JESD216B Cyrille Pitchen
2016-06-20 16:50 ` [PATCH 1/9] mtd: spi-nor: improve macronix_quad_enable() Cyrille Pitchen
2016-06-20 16:50 ` [PATCH 2/9] mtd: spi-nor: add an alternative method to support memory >16MiB Cyrille Pitchen
2016-06-20 16:50 ` [PATCH 3/9] Documentation: atmel-quadspi: add binding file for Atmel QSPI driver Cyrille Pitchen
2016-06-20 16:50 ` [PATCH 4/9] mtd: atmel-quadspi: add driver for Atmel QSPI controller Cyrille Pitchen
2016-06-20 16:50 ` [PATCH 5/9] mtd: spi-nor: add support of SPI protocols like SPI 1-2-2 and SPI 1-4-4 Cyrille Pitchen
2016-06-20 16:50 ` [PATCH 6/9] mtd: spi-nor: remove unused set_quad_mode() function Cyrille Pitchen
2016-06-20 16:50 ` [PATCH 7/9] mtd: m25p80: add support of dual and quad spi protocols to all commands Cyrille Pitchen
2016-06-23 20:35   ` Michal Suchanek [this message]
2016-06-23 20:46     ` Marek Vasut
2016-06-23 21:58       ` Michal Suchanek
2016-06-23 22:14         ` Marek Vasut
2016-06-23 22:43           ` Michal Suchanek
2016-06-23 22:50             ` Marek Vasut
2016-06-23 23:04               ` Michal Suchanek
2016-06-27  9:52     ` Cyrille Pitchen
2016-06-27 12:37       ` Cyrille Pitchen
2016-06-28  7:57         ` Krzeminski, Marcin (Nokia - PL/Wroclaw)
2016-06-28  7:57           ` Krzeminski, Marcin (Nokia - PL/Wroclaw)
2016-06-20 16:50 ` [PATCH 8/9] mtd: spi-nor: parse Serial Flash Discoverable Parameters (SFDP) tables Cyrille Pitchen
2016-06-20 16:50 ` [PATCH 9/9] mtd: spi-nor: parse SFDP 4-byte Address Instruction Table Cyrille Pitchen

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='CAOMqctSuP6E55mJ7QrqASRQUpxSy=ZR-b7VPF=0vcw45B6S+Yg@mail.gmail.com' \
    --to=hramrach@gmail.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=computersforpeace@gmail.com \
    --cc=cyrille.pitchen@atmel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marex@denx.de \
    --cc=nicolas.ferre@atmel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.