mirror of https://gitee.com/openkylin/linux.git
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:
parent
f3028c8408
commit
d55d31a6b8
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue