aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand
diff options
context:
space:
mode:
authorShiraz Hashim <shiraz.hashim@st.com>2012-03-14 02:17:13 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-03-26 19:59:14 -0400
commitf63acb75c5d8a9eb7cc5548e3e778d2a00bf3bae (patch)
tree486914cbf8798771b705ed9eff00e85b39f8644b /drivers/mtd/nand
parent467e6e7be2e26fd5bbaabd849717d37de99df8f1 (diff)
mtd: fsmc_nand: add pm callbacks to support hibernation
Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r--drivers/mtd/nand/fsmc_nand.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c
index 91f5b3404c7..a5099607d20 100644
--- a/drivers/mtd/nand/fsmc_nand.c
+++ b/drivers/mtd/nand/fsmc_nand.c
@@ -382,7 +382,7 @@ static void fsmc_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
382 * This routine initializes timing parameters related to NAND memory access in 382 * This routine initializes timing parameters related to NAND memory access in
383 * FSMC registers 383 * FSMC registers
384 */ 384 */
385static void __init fsmc_nand_setup(struct fsmc_regs *regs, uint32_t bank, 385static void fsmc_nand_setup(struct fsmc_regs *regs, uint32_t bank,
386 uint32_t busw) 386 uint32_t busw)
387{ 387{
388 uint32_t value = FSMC_DEVTYPE_NAND | FSMC_ENABLE | FSMC_WAITON; 388 uint32_t value = FSMC_DEVTYPE_NAND | FSMC_ENABLE | FSMC_WAITON;
@@ -976,15 +976,15 @@ static int fsmc_nand_suspend(struct device *dev)
976static int fsmc_nand_resume(struct device *dev) 976static int fsmc_nand_resume(struct device *dev)
977{ 977{
978 struct fsmc_nand_data *host = dev_get_drvdata(dev); 978 struct fsmc_nand_data *host = dev_get_drvdata(dev);
979 if (host) 979 if (host) {
980 clk_enable(host->clk); 980 clk_enable(host->clk);
981 fsmc_nand_setup(host->regs_va, host->bank,
982 host->nand.options & NAND_BUSWIDTH_16);
983 }
981 return 0; 984 return 0;
982} 985}
983 986
984static const struct dev_pm_ops fsmc_nand_pm_ops = { 987static SIMPLE_DEV_PM_OPS(fsmc_nand_pm_ops, fsmc_nand_suspend, fsmc_nand_resume);
985 .suspend = fsmc_nand_suspend,
986 .resume = fsmc_nand_resume,
987};
988#endif 988#endif
989 989
990static struct platform_driver fsmc_nand_driver = { 990static struct platform_driver fsmc_nand_driver = {