From: Esben Haabendal <esben@geanix.com>
To: linux-mtd@lists.infradead.org,
Sascha Hauer <s.hauer@pengutronix.de>, Han Xu <han.xu@nxp.com>,
Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Richard Weinberger <richard@nod.at>,
Boris Brezillon <boris.brezillon@collabora.com>,
Vignesh Raghavendra <vigneshr@ti.com>,
stable@vger.kernel.org
Subject: [PATCH v2 2/2] mtd: rawnand: gpmi: Restore nfc timing setup after suspend/resume
Date: Fri, 17 Jan 2020 21:05:37 +0100 [thread overview]
Message-ID: <20200117200537.9279-3-esben@geanix.com> (raw)
In-Reply-To: <20200117200537.9279-1-esben@geanix.com>
As we reset the GPMI block at resume, the timing parameters setup by a
previous exec_op is lost. Rewriting GPMI timing registers on first exec_op
after resume fixes the problem.
Fixes: ef347c0cfd61 ("mtd: rawnand: gpmi: Implement exec_op")
Cc: stable@vger.kernel.org
Signed-off-by: Esben Haabendal <esben@geanix.com>
---
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
index 879df8402446..b9d5d55a5edb 100644
--- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
@@ -2727,6 +2727,10 @@ static int gpmi_pm_resume(struct device *dev)
return ret;
}
+ /* Set flag to get timing setup restored for next exec_op */
+ if (this->hw.clk_rate)
+ this->hw.must_apply_timings = true;
+
/* re-init the BCH registers */
ret = bch_set_geometry(this);
if (ret) {
--
2.25.0
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2020-01-17 20:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-17 20:05 [PATCH v2 0/2] mtd: rawnand: gpmi: Suspend/resume fixes Esben Haabendal
2020-01-17 20:05 ` [PATCH v2 1/2] mtd: rawnand: gpmi: Fix suspend/resume problem Esben Haabendal
2020-01-17 21:30 ` Han Xu
2020-01-17 21:47 ` Miquel Raynal
2020-01-17 20:05 ` Esben Haabendal [this message]
2020-01-17 21:30 ` [PATCH v2 2/2] mtd: rawnand: gpmi: Restore nfc timing setup after suspend/resume Han Xu
2020-01-17 21:47 ` 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=20200117200537.9279-3-esben@geanix.com \
--to=esben@geanix.com \
--cc=boris.brezillon@collabora.com \
--cc=han.xu@nxp.com \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=s.hauer@pengutronix.de \
--cc=stable@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).