summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/tegra_bb.c
diff options
context:
space:
mode:
authorPrashant Gaikwad <pgaikwad@nvidia.com>2013-07-16 14:15:32 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-14 13:33:14 -0700
commit67b800d838659791e50099869d2b40b9c41587fd (patch)
tree827a9a134b0894a881b7fff3478c0d8b69cf3fdc /arch/arm/mach-tegra/tegra_bb.c
parent616d4f4029444164a212f17bf89ebcf323e2e327 (diff)
arm: tegra: add stub runtime PM for BB
When modem is active device can not enter SoC idle state. Add stub runtime PM to notify the BB state to MC clock domain. Bug 1304124 Change-Id: I37ad5236706d9b765c5ca64b79bc6c3153e98908 Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com> Reviewed-on: http://git-master/r/241947 (cherry picked from commit 65da4905194c6ecdd91e7cd1fa7e25b68ea01f99) Reviewed-on: http://git-master/r/252266 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/tegra_bb.c')
-rw-r--r--arch/arm/mach-tegra/tegra_bb.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/tegra_bb.c b/arch/arm/mach-tegra/tegra_bb.c
index 7350232a904b..cb0b7592cd4d 100644
--- a/arch/arm/mach-tegra/tegra_bb.c
+++ b/arch/arm/mach-tegra/tegra_bb.c
@@ -30,10 +30,12 @@
#include <asm/io.h>
#include <linux/regulator/consumer.h>
#include <linux/clk.h>
+#include <linux/pm_runtime.h>
#include <mach/clk.h>
#include <mach/tegra_bb.h>
#include <mach/tegra_bbc_proxy.h>
+#include <mach/pm_domains.h>
#include <linux/platform_data/nvshm.h>
#include "clock.h"
@@ -907,6 +909,7 @@ static void tegra_bb_emc_dvfs(struct work_struct *work)
bb->prev_state = bb->state;
spin_unlock_irqrestore(&bb->lock, flags);
+ pm_runtime_get_sync(bb->dev);
/* going from 0 to high */
clk_prepare_enable(bb->emc_clk);
if (bb->emc_flags & EMC_DSR)
@@ -944,6 +947,7 @@ static void tegra_bb_emc_dvfs(struct work_struct *work)
/* reenable mem_req_soon irq */
tegra_bb_enable_mem_req_soon();
irq_set_irq_type(bb->mem_req_soon, IRQF_TRIGGER_HIGH);
+ pm_runtime_put(bb->dev);
return;
case BBC_CRASHDUMP_FLOOR:
@@ -951,6 +955,7 @@ static void tegra_bb_emc_dvfs(struct work_struct *work)
* do not store prev_state */
spin_unlock_irqrestore(&bb->lock, flags);
+ pm_runtime_get_sync(bb->dev);
pr_info("%s: bbc crash detected, set EMC to max\n", __func__);
if (bb->prev_state != BBC_SET_FLOOR)
clk_prepare_enable(bb->emc_clk);
@@ -1213,6 +1218,9 @@ static int tegra_bb_probe(struct platform_device *pdev)
platform_device_register(&bb->nvshm_device);
platform_set_drvdata(pdev, bb);
+ tegra_pd_add_device(&pdev->dev);
+ pm_runtime_enable(&pdev->dev);
+
#ifndef CONFIG_TEGRA_BASEBAND_SIMU
snprintf(bb->name, sizeof(bb->name), "tegra_bb%d", pdev->id);