aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/gpmc.c
diff options
context:
space:
mode:
authoravinash philip <avinashphilip@ti.com>2013-06-12 07:00:56 -0400
committerTony Lindgren <tony@atomide.com>2013-06-12 12:56:30 -0400
commitb3f5525c55ce5cb67af06f04dbbf28358da23a2c (patch)
treefb08ef866e02d919b1ef6139d63c041134218fc7 /arch/arm/mach-omap2/gpmc.c
parentf34f37160c2960a763ed05d1e13b2ea75a48d0fb (diff)
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 21b963604430..bac18b3ebbfb 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -30,6 +30,7 @@
30#include <linux/of_mtd.h> 30#include <linux/of_mtd.h>
31#include <linux/of_device.h> 31#include <linux/of_device.h>
32#include <linux/mtd/nand.h> 32#include <linux/mtd/nand.h>
33#include <linux/pm_runtime.h>
33 34
34#include <linux/platform_data/mtd-nand-omap2.h> 35#include <linux/platform_data/mtd-nand-omap2.h>
35 36
@@ -1608,7 +1609,8 @@ static int gpmc_probe(struct platform_device *pdev)
1608 return PTR_ERR(gpmc_l3_clk); 1609 return PTR_ERR(gpmc_l3_clk);
1609 } 1610 }
1610 1611
1611 clk_prepare_enable(gpmc_l3_clk); 1612 pm_runtime_enable(&pdev->dev);
1613 pm_runtime_get_sync(&pdev->dev);
1612 1614
1613 gpmc_dev = &pdev->dev; 1615 gpmc_dev = &pdev->dev;
1614 1616
@@ -1648,7 +1650,7 @@ static int gpmc_probe(struct platform_device *pdev)
1648 1650
1649 rc = gpmc_probe_dt(pdev); 1651 rc = gpmc_probe_dt(pdev);
1650 if (rc < 0) { 1652 if (rc < 0) {
1651 clk_disable_unprepare(gpmc_l3_clk); 1653 pm_runtime_put_sync(&pdev->dev);
1652 clk_put(gpmc_l3_clk); 1654 clk_put(gpmc_l3_clk);
1653 dev_err(gpmc_dev, "failed to probe DT parameters\n"); 1655 dev_err(gpmc_dev, "failed to probe DT parameters\n");
1654 return rc; 1656 return rc;
@@ -1661,6 +1663,8 @@ static int gpmc_remove(struct platform_device *pdev)
1661{ 1663{
1662 gpmc_free_irq(); 1664 gpmc_free_irq();
1663 gpmc_mem_exit(); 1665 gpmc_mem_exit();
1666 pm_runtime_put_sync(&pdev->dev);
1667 pm_runtime_disable(&pdev->dev);
1664 gpmc_dev = NULL; 1668 gpmc_dev = NULL;
1665 return 0; 1669 return 0;
1666} 1670}