From: NeilBrown <neil@brown.name>
To: Marek Vasut <marek.vasut@gmail.com>,
Boris Brezillon <boris.brezillon@bootlin.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
Richard Weinberger <richard@nod.at>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH/RFC] mtd: spi-nor: honour max_message_size for spi-nor writes.
Date: Thu, 10 May 2018 21:57:20 +1000 [thread overview]
Message-ID: <87mux7afkv.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <cb612906-3d52-66cd-fbbc-7872bd2d9a92@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2081 bytes --]
On Thu, May 10 2018, Marek Vasut wrote:
> On 05/10/2018 12:28 AM, NeilBrown wrote:
>> On Wed, May 09 2018, Boris Brezillon wrote:
>>
>>> On Fri, 27 Apr 2018 16:18:05 +1000
>>> NeilBrown <neil@brown.name> wrote:
>>>
>>>> Hi,
>>>> I've labeled this an RFC because I'm really not sure about removing the
>>>> error path from spi_nor_write() -- maybe that really matters. But on
>>>> my hardware, performing multiple small spi writes to the flash seems
>>>> to work.
>>>>
>>>> The spi driver is drivers/staging/mt7621-spi. Possibly this needs to
>>>> use DMA instead of a FIFO (assuming the hardware can) - or maybe
>>>> drivers/spi/spi-mt65xx.c can be made to work on this hardware, though
>>>> that is for an ARM SOC and mt7621 is a MIPS SOC.
>>>>
>>>> I note that openwrt has similar patches:
>>>> target/linux/generic/pending-4.14/450-mtd-spi-nor-allow-NOR-driver-to-write-fewer-bytes-th.patch
>>>>
>>>> They also change the spi driver to do a short write, rather
>>>> than change m25p80 to request a short write.
>>>>
>>>> Is there something horribly wrong with this?
>>>
>>> Marek, any opinion on this patch?
>>>
>>
>> Hi,
>> thanks for following up.
>> I have since found that I don't need this patch, though maybe others
>> still do(??).
>> My hardware can only send 36 bytes and receive 32 in a single
>> transaction. However I can run a sequence of transactions
>> to process a whole message no matter how large that message is. As
>> long as I keep chip-select asserted, all the slave device sees is that
>> the clock period isn't quite constant, and the slave shouldn't care
>> much about that.
>> When reading from flash, I found that handling large messages with
>> multiple hardware transactions was 50% faster than breaking the
>> read down into lots of 32 byte messages.
>>
>> So, I won't object if this patch is forgotten. Thanks for
>> your time anyway.
>
> Nice, which hardware is that ?
Mediatek MT7621 SOC (particularly in the gnubee.org NAS platform).
Thanks,
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2018-05-10 11:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-27 6:18 [PATCH/RFC] mtd: spi-nor: honour max_message_size for spi-nor writes NeilBrown
2018-05-09 14:02 ` Boris Brezillon
2018-05-09 22:28 ` NeilBrown
2018-05-10 10:21 ` Marek Vasut
2018-05-10 11:57 ` NeilBrown [this message]
2018-05-10 12:27 ` Marek Vasut
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=87mux7afkv.fsf@notabene.neil.brown.name \
--to=neil@brown.name \
--cc=boris.brezillon@bootlin.com \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=richard@nod.at \
/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).