All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2 v2] mtd: rawnand: fsmc: Reset NAND timings on resume()
@ 2019-01-26 13:10 Linus Walleij
  2019-01-26 13:10 ` [PATCH 2/2 v2] mtd: rawnand: fsmc: Disable NAND on remove() Linus Walleij
  2019-01-28 10:02 ` [PATCH 1/2 v2] mtd: rawnand: fsmc: Reset NAND timings on resume() Miquel Raynal
  0 siblings, 2 replies; 3+ messages in thread
From: Linus Walleij @ 2019-01-26 13:10 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, linux-mtd
  Cc: Linus Walleij, Miquel Raynal

When we go through a suspend/resume cycle the NAND
timings and other settings may have been lost so reset
the chip to bring it up in a known working state.

The FSMC only supports single CS chips so we only need
to call nand_reset(chip, 0).

Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ChangeLog v1->v2:
- Update commit message.
---
 drivers/mtd/nand/raw/fsmc_nand.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/nand/raw/fsmc_nand.c b/drivers/mtd/nand/raw/fsmc_nand.c
index c9149a37f8f0..4050843dd35e 100644
--- a/drivers/mtd/nand/raw/fsmc_nand.c
+++ b/drivers/mtd/nand/raw/fsmc_nand.c
@@ -1164,6 +1164,7 @@ static int fsmc_nand_resume(struct device *dev)
 		clk_prepare_enable(host->clk);
 		if (host->dev_timings)
 			fsmc_nand_setup(host, host->dev_timings);
+		nand_reset(&host->nand, 0);
 	}
 
 	return 0;
-- 
2.20.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-28 10:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-26 13:10 [PATCH 1/2 v2] mtd: rawnand: fsmc: Reset NAND timings on resume() Linus Walleij
2019-01-26 13:10 ` [PATCH 2/2 v2] mtd: rawnand: fsmc: Disable NAND on remove() Linus Walleij
2019-01-28 10:02 ` [PATCH 1/2 v2] mtd: rawnand: fsmc: Reset NAND timings on resume() Miquel Raynal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.