mtd: pxa3xx_nand: Gate/ungate the NAND clock in suspend/resume paths
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Tue Jan 12 15:59:06 PST 2016
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=d55d31a6b8f65bb13e1912043a66295cc928967c
Commit: d55d31a6b8f65bb13e1912043a66295cc928967c
Parent: f3028c840867d2235886a6a5c97865fc9d91bafd
Author: Ezequiel García <ezequiel at vanguardiasur.com.ar>
AuthorDate: Wed Nov 4 13:13:46 2015 -0300
Committer: Brian Norris <computersforpeace at gmail.com>
CommitDate: Mon Nov 16 15:03:32 2015 -0800
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 at vanguardiasur.com.ar>
Acked-by: Robert Jarzmik <robert.jarzmik at free.fr>
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
drivers/mtd/nand/pxa3xx_nand.c | 6 ++++++
1 file changed, 6 insertions(+)
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);
More information about the linux-mtd-cvs
mailing list