mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Cyrille Pitchen <cyrille.pitchen@atmel.com>
To: Marek Vasut <marex@denx.de>
Cc: <nicolas.ferre@atmel.com>, <broonie@kernel.org>,
	<linux-spi@vger.kernel.org>, <dwmw2@infradead.org>,
	<computersforpeace@gmail.com>, <zajec5@gmail.com>,
	<beanhuo@micron.com>, <juhosg@openwrt.org>,
	<shijie.huang@intel.com>, <ben@decadent.org.uk>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<devicetree@vger.kernel.org>, <robh+dt@kernel.org>,
	<pawel.moll@arm.com>, <mark.rutland@arm.com>,
	<ijc+devicetree@hellion.org.uk>, <galak@codeaurora.org>,
	<linux-mtd@lists.infradead.org>
Subject: Re: [PATCH 4/7] Documentation: mtd: add a DT property to set the latency code of Spansion memory
Date: Mon, 20 Jul 2015 11:23:39 +0200	[thread overview]
Message-ID: <55ACBE1B.6050507@atmel.com> (raw)
In-Reply-To: <201507161944.20523.marex@denx.de>

Hi Marek,

Le 16/07/2015 19:44, Marek Vasut a écrit :
> On Thursday, July 16, 2015 at 05:27:51 PM, Cyrille Pitchen wrote:
> 
> Hi!
> 
>> Both the SPI controller and the NOR flash memory need to agree on the
>> number of dummy cycles to use for Fast Read commands. For Spansion
>> memories, this number of dummy cycles is not given directly but through a
>> so called "latency code".
>> The latency code can be found into the memory datasheet and depends on the
>> SPI clock frequency, the Fast Read op code and the Single/Dual Data Rate
>> mode.
> 
> Shouldn't you be able to derive the latency code from the above information,
> which you already know then ?
Yes I agree with you; this could have been done adding static tables inside the
driver instead of creating a new DT property dedicated to Spansion memories.

When I wrote this patch, I had a close look at the s25fl512s datasheet but only
overviewed few datasheets for other Spansion QSPI flash memories. So I don't
know whether a single latency code table could be shared among all Spansion
memories or many tables should be added to support different memory models.

That's why I've chosen to add a dedicated DT property to support Spansion
memories as it avoids to add tables to guess the proper latency code to be
used. I thought it would be more flexible.

Maybe I will remove the support of Spansion QSPI memories from this series for
now. Their support can still be implemented later.

Anyway, thanks for your review :)

> 
> Best regards,
> Marek Vasut
> 

Best Regards,

Cyrille

  reply	other threads:[~2015-07-20  9:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-16 15:27 [PATCH 0/7] add driver for Atmel QSPI controller Cyrille Pitchen
2015-07-16 15:27 ` [PATCH 1/7] Documentation: mtd: add a DT property to set the number of dummy cycles Cyrille Pitchen
2015-07-16 15:27 ` [PATCH 2/7] mtd: spi-nor: notify (Q)SPI controller about protocol change Cyrille Pitchen
2015-07-16 15:27 ` [PATCH 3/7] mtd: spi-nor: allow to tune the number of dummy cycles Cyrille Pitchen
2015-07-16 15:27 ` [PATCH 4/7] Documentation: mtd: add a DT property to set the latency code of Spansion memory Cyrille Pitchen
2015-07-16 17:44   ` Marek Vasut
2015-07-20  9:23     ` Cyrille Pitchen [this message]
2015-07-20 19:29       ` Marek Vasut
2015-07-16 15:27 ` [PATCH 5/7] mtd: spi-nor: allow the set the latency code on Spansion memories Cyrille Pitchen
2015-07-16 15:27 ` [PATCH 6/7] Documentation: atmel-quadspi: add binding file for Atmel QSPI driver Cyrille Pitchen
2015-07-17 11:44   ` Sergei Shtylyov
2015-07-20  8:54     ` Cyrille Pitchen
2015-07-16 15:27 ` [PATCH 7/7] mtd: atmel-quadspi: add driver for Atmel QSPI controller Cyrille Pitchen
2015-07-17  9:04   ` Paul Bolle
2015-07-20  8:55     ` 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=55ACBE1B.6050507@atmel.com \
    --to=cyrille.pitchen@atmel.com \
    --cc=beanhuo@micron.com \
    --cc=ben@decadent.org.uk \
    --cc=broonie@kernel.org \
    --cc=computersforpeace@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dwmw2@infradead.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=juhosg@openwrt.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=mark.rutland@arm.com \
    --cc=nicolas.ferre@atmel.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=shijie.huang@intel.com \
    --cc=zajec5@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome