From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: linux-mtd@lists.infradead.org,
Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>,
linux-kernel@vger.kernel.org, Marek Vasut <marek.vasut@gmail.com>,
Brian Norris <computersforpeace@gmail.com>,
Richard Weinberger <richard@nod.at>,
David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH v3] mtd: nand: denali: fix setup_data_interface to meet tCCS delay
Date: Thu, 5 Oct 2017 09:23:54 +0200 [thread overview]
Message-ID: <20171005092354.302ddb98@bbrezillon> (raw)
In-Reply-To: <1506694377-8531-1-git-send-email-yamada.masahiro@socionext.com>
On Fri, 29 Sep 2017 23:12:57 +0900
Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
> The WE_2_RE register specifies the number of clock cycles inserted
> between the rising edge of #WE and the falling edge of #RE.
>
> The current setup_data_interface implementation takes care of tWHR,
> but tCCS is missing. Wait for max(tCSS, tWHR) to meet the spec.
>
> With setup_data_interface() properly programmed, the Denali NAND
> controller can observe the timing, so NAND_WAIT_TCCS flag is unneeded.
> Clarify this in the comment block.
Applied.
Thanks,
Boris
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
> Changes in v3:
> - Remove comment abount NAND_WAIT_TWHR because 1/2 seems NACK
>
> Changes in v2:
> - newly added
>
> drivers/mtd/nand/denali.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
> index 0b268ec..5124f8a 100644
> --- a/drivers/mtd/nand/denali.c
> +++ b/drivers/mtd/nand/denali.c
> @@ -1004,8 +1004,14 @@ static int denali_setup_data_interface(struct mtd_info *mtd, int chipnr,
> tmp |= FIELD_PREP(RE_2_RE__VALUE, re_2_re);
> iowrite32(tmp, denali->reg + RE_2_RE);
>
> - /* tWHR -> WE_2_RE */
> - we_2_re = DIV_ROUND_UP(timings->tWHR_min, t_clk);
> + /*
> + * tCCS, tWHR -> WE_2_RE
> + *
> + * With WE_2_RE properly set, the Denali controller automatically takes
> + * care of the delay; the driver need not set NAND_WAIT_TCCS.
> + */
> + we_2_re = DIV_ROUND_UP(max(timings->tCCS_min, timings->tWHR_min),
> + t_clk);
> we_2_re = min_t(int, we_2_re, TWHR2_AND_WE_2_RE__WE_2_RE);
>
> tmp = ioread32(denali->reg + TWHR2_AND_WE_2_RE);
prev parent reply other threads:[~2017-10-05 7:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-29 14:12 [PATCH v3] mtd: nand: denali: fix setup_data_interface to meet tCCS delay Masahiro Yamada
2017-10-05 7:23 ` Boris Brezillon [this message]
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=20171005092354.302ddb98@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=cyrille.pitchen@wedev4u.fr \
--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 \
--cc=yamada.masahiro@socionext.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;
as well as URLs for NNTP newsgroup(s).