]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mtd: rawnand: fsmc: Reset NAND timings on resume()
authorLinus Walleij <linus.walleij@linaro.org>
Sat, 26 Jan 2019 13:10:55 +0000 (14:10 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Tue, 5 Feb 2019 15:56:12 +0000 (16:56 +0100)
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>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/fsmc_nand.c

index 325b4414dcccdaae2064dfe4416a6e5b39fb812e..9dc0e5b648b1809368f32e0ac7039f73cee3350f 100644 (file)
@@ -1185,6 +1185,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;