From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Dario Binacchi <dario.binacchi@amarulasolutions.com>,
linux-kernel@vger.kernel.org
Cc: Miquel Raynal <miquel.raynal@bootlin.com>,
Michael Trimarchi <michael@amarulasolutions.com>,
Sascha Hauer <s.hauer@pengutronix.de>, Han Xu <han.xu@nxp.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
linux-mtd@lists.infradead.org
Subject: Re: [PATCH 3/4] mtd: rawnand: gpmi: validate controller clock rate
Date: Sun, 23 Jan 2022 16:39:41 +0100 [thread overview]
Message-ID: <20220123153941.673301-1-miquel.raynal@bootlin.com> (raw)
In-Reply-To: <20220118095434.35081-4-dario.binacchi@amarulasolutions.com>
On Tue, 2022-01-18 at 09:54:33 UTC, Dario Binacchi wrote:
> What to do when the real rate of the gpmi clock is not equal to the
> required one? The solutions proposed in [1] did not lead to a conclusion
> on how to validate the clock rate, so, inspired by the document [2], I
> consider the rate correct only if not lower or equal to the rate of the
> previous edo mode. In fact, in chapter 4.16.2 (NV-DDR) of the document [2],
> it is written that "If the host selects timing mode n, then its clock
> period shall be faster than the clock period of timing mode n-1 and
> slower than or equal to the clock period of timing mode n.". I thought
> that it could therefore also be used in this case, without therefore
> having to define the valid rate ranges empirically.
>
> For example, suppose that gpmi_nfc_compute_timings() is called to set
> edo mode 5 (100MHz) but the rate returned by clk_round_rate() is 80MHz
> (edo mode 4). In this case gpmi_nfc_compute_timings() will return error,
> and will be called again to set edo mode 4, which this time will be
> successful.
>
> [1] https://lore.kernel.org/r/20210702065350.209646-5-ebiggers@kernel.org
> [2] http://www.onfi.org/-/media/client/onfi/specs/onfi_3_0_gold.pdf?la=en
>
> Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com>
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> Tested-by: Sascha Hauer <s.hauer@pengutronix.de>
> Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
next prev parent reply other threads:[~2022-01-23 15:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-18 9:54 [PATCH 0/4] Fix and improve gpmi nand on mx28 Dario Binacchi
2022-01-18 9:54 ` [PATCH 1/4] ARM: dts: imx28: reparent gpmi clock to ref_gpmi Dario Binacchi
2022-01-18 9:54 ` [PATCH 2/4] mtd: rawnand: gpmi: fix controller timings setting Dario Binacchi
2022-01-23 15:23 ` Miquel Raynal
2022-01-18 9:54 ` [PATCH 3/4] mtd: rawnand: gpmi: validate controller clock rate Dario Binacchi
2022-01-23 15:39 ` Miquel Raynal [this message]
2022-01-18 9:54 ` [PATCH 4/4] mtd: rawnand: gpmi: support fast edo timings for mx28 Dario Binacchi
2022-01-23 15:39 ` Miquel Raynal
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=20220123153941.673301-1-miquel.raynal@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=dario.binacchi@amarulasolutions.com \
--cc=han.xu@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=michael@amarulasolutions.com \
--cc=richard@nod.at \
--cc=s.hauer@pengutronix.de \
--cc=vigneshr@ti.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
all inboxes | Powered by JetHome®