summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8d2a0f7)
raw | patch | inline | side by side (parent: 8d2a0f7)
author | Philip, Avinash <avinashphilip@ti.com> | |
Mon, 27 Feb 2012 06:00:40 +0000 (11:30 +0530) | ||
committer | Philip, Avinash <avinashphilip@ti.com> | |
Thu, 8 Mar 2012 11:56:23 +0000 (17:26 +0530) |
This patch adds Callback functions to support low power transitions by
adding
1. pm_runtime API's to handle GPMC power transitions
2. GPMC save/restore context.
Signed-off-by: Philip, Avinash <avinashphilip@ti.com>
adding
1. pm_runtime API's to handle GPMC power transitions
2. GPMC save/restore context.
Signed-off-by: Philip, Avinash <avinashphilip@ti.com>
index c12b286734e3a0e69e65edd6b634814d676a5195..0207a66df2f42b421efed16e574e672a80382707 100644 (file)
}
gpmc_nand_device.dev.platform_data = gpmc_nand_data;
+ gpmc_nand_data->ctrlr_suspend = gpmc_suspend;
+ gpmc_nand_data->ctrlr_resume = gpmc_resume;
printk(KERN_INFO "Registering NAND on CS%d\n", gpmc_nand_data->cs);
index 50940c02566abf08cf2802a5e631fc2f1a07f304..c58a3361e236d4612bbf406a6eeb176009f46ce5 100644 (file)
}
}
+struct device *gpmc_dev;
+
static int __devinit gpmc_probe(struct platform_device *pdev)
{
u32 l;
/* XXX: This should go away with HWMOD & runtime PM adaptation */
gpmc_clk_init(&pdev->dev);
+ gpmc_dev = &pdev->dev;
+
gpmc = devm_kzalloc(&pdev->dev, sizeof(struct gpmc), GFP_KERNEL);
if (!gpmc)
return -ENOMEM;
module_platform_driver(gpmc_driver);
+int gpmc_suspend(void)
+{
+ omap3_gpmc_save_context();
+ pm_runtime_put_sync(gpmc_dev);
+ return 0;
+}
+
+int gpmc_resume(void)
+{
+ pm_runtime_get_sync(gpmc_dev);
+ omap3_gpmc_restore_context();
+ return 0;
+}
+
#ifdef CONFIG_ARCH_OMAP3
static struct omap3_gpmc_regs gpmc_context;
index 506b3a19c001f1d043ad47c4cd1488bf397a94c2..2b81fc6c04c97326baaf8c7b6dc90832cbaf03d6 100644 (file)
int gpmc_enable_hwecc(int ecc, int cs, int mode, int dev_width, int ecc_size);
int gpmc_calculate_ecc(int ecc, int cs, const u_char *dat, u_char *ecc_code);
+int gpmc_suspend(void);
+int gpmc_resume(void);
#endif
index 1bcff1da24a1b59ebd995d2c2fd8023f7b3b9f7f..9212a2e693e4df0380a5c3ff45d736789b53a60a 100644 (file)
int devsize;
enum omap_ecc ecc_opt;
bool elm_used;
+ int (*ctrlr_suspend) (void);
+ int (*ctrlr_resume) (void);
};
/* minimum size for IO mapping */