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>
This commit is contained in:
Ezequiel García 2015-11-04 13:13:46 -03:00 committed by Brian Norris
parent f3028c8408
commit d55d31a6b8
1 changed files with 6 additions and 0 deletions

View File

@ -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);