diff options
author | Ezequiel GarcĂa <ezequiel@vanguardiasur.com.ar> | 2015-11-04 16:13:46 (GMT) |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2015-11-16 23:03:32 (GMT) |
commit | d55d31a6b8f65bb13e1912043a66295cc928967c (patch) | |
tree | 49be8c781a091e70a3707a873f8e9da7e069963d /drivers/mtd/nand/pxa3xx_nand.c | |
parent | f3028c840867d2235886a6a5c97865fc9d91bafd (diff) | |
download | linux-d55d31a6b8f65bb13e1912043a66295cc928967c.tar.xz |
mtd: pxa3xx_nand: Gate/ungate the NAND clock in suspend/resume paths
The NAND clock can be disabled on suspend and enabled on resume.
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/nand/pxa3xx_nand.c')
-rw-r--r-- | drivers/mtd/nand/pxa3xx_nand.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index 2f337ea..2bb9732 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c @@ -1936,12 +1936,18 @@ static int pxa3xx_nand_suspend(struct device *dev) return -EAGAIN; } + clk_disable(info->clk); return 0; } static int pxa3xx_nand_resume(struct device *dev) { struct pxa3xx_nand_info *info = dev_get_drvdata(dev); + int ret; + + ret = clk_enable(info->clk); + if (ret < 0) + return ret; /* We don't want to handle interrupt without calling mtd routine */ disable_int(info, NDCR_INT_MASK); |