summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/gpmc.c
diff options
context:
space:
mode:
authoravinash philip <avinashphilip@ti.com>2013-06-12 16:30:56 +0530
committerEvan Wilson <evan@oliodevices.com>2014-11-29 14:44:34 -0800
commit74bf31540478f9473104885b123f9d505a77dc16 (patch)
treeae12ac892ff5dfb45752ce4a4febd488010c54af /arch/arm/mach-omap2/gpmc.c
parenteaf1871a1fcfa62d1bda2b6720b1e891ab811fe1 (diff)
downloadolio-linux-3.10-74bf31540478f9473104885b123f9d505a77dc16.tar.xz
olio-linux-3.10-74bf31540478f9473104885b123f9d505a77dc16.zip
ARM: OMAP2+: gpmc: Converts GPMC driver to pm_runtime capable
Support for pm_runtime add to GPMC driver. Signed-off-by: Philip Avinash <avinashphilip@ti.com> Signed-off-by: Pekon Gupta <pekon@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/gpmc.c')
-rw-r--r--arch/arm/mach-omap2/gpmc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 21b96360443..bac18b3ebbf 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -30,6 +30,7 @@
#include <linux/of_mtd.h>
#include <linux/of_device.h>
#include <linux/mtd/nand.h>
+#include <linux/pm_runtime.h>
#include <linux/platform_data/mtd-nand-omap2.h>
@@ -1608,7 +1609,8 @@ static int gpmc_probe(struct platform_device *pdev)
return PTR_ERR(gpmc_l3_clk);
}
- clk_prepare_enable(gpmc_l3_clk);
+ pm_runtime_enable(&pdev->dev);
+ pm_runtime_get_sync(&pdev->dev);
gpmc_dev = &pdev->dev;
@@ -1648,7 +1650,7 @@ static int gpmc_probe(struct platform_device *pdev)
rc = gpmc_probe_dt(pdev);
if (rc < 0) {
- clk_disable_unprepare(gpmc_l3_clk);
+ pm_runtime_put_sync(&pdev->dev);
clk_put(gpmc_l3_clk);
dev_err(gpmc_dev, "failed to probe DT parameters\n");
return rc;
@@ -1661,6 +1663,8 @@ static int gpmc_remove(struct platform_device *pdev)
{
gpmc_free_irq();
gpmc_mem_exit();
+ pm_runtime_put_sync(&pdev->dev);
+ pm_runtime_disable(&pdev->dev);
gpmc_dev = NULL;
return 0;
}