summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/pm.c
diff options
context:
space:
mode:
authorScott Williams <scwilliams@nvidia.com>2011-08-01 19:22:02 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:47:00 -0800
commitc523674f102ad0c56224b626412664da7dd49eac (patch)
tree92de8e4600c6e8d62a3b17c62bdf783348400b54 /arch/arm/mach-tegra/pm.c
parentdc5482ee2f76e9d282c461b002deb5051d98f1cb (diff)
ARM: tegra: power: Put power functions under CONFIG_PM_SLEEP
Place additional functions that are invoked only by code under CONFIG_PM_SLEEP conditionals under CONFIG_PM_SLEEP conditionals also. Change-Id: I224ae07b9031038474b922422422a4feafcd94f1 Signed-off-by: Scott Williams <scwilliams@nvidia.com> Rebase-Id: R65b81ec60f59ae981fd668ad8354b14b8b4c83b9
Diffstat (limited to 'arch/arm/mach-tegra/pm.c')
-rw-r--r--arch/arm/mach-tegra/pm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/mach-tegra/pm.c b/arch/arm/mach-tegra/pm.c
index be1188444389..0ede19eb1631 100644
--- a/arch/arm/mach-tegra/pm.c
+++ b/arch/arm/mach-tegra/pm.c
@@ -87,6 +87,8 @@ struct suspend_context {
};
#ifdef CONFIG_PM_SLEEP
+phys_addr_t tegra_pgd_phys; /* pgd used by hotplug & LP2 bootup */
+static pgd_t *tegra_pgd;
static DEFINE_SPINLOCK(tegra_lp2_lock);
static cpumask_t tegra_in_lp2;
static cpumask_t *iram_cpu_lp2_mask;
@@ -150,10 +152,9 @@ struct suspend_context tegra_sctx;
#define MC_SECURITY_SIZE 0x70
#define MC_SECURITY_CFG2 0x7c
+#ifdef CONFIG_PM_SLEEP
phys_addr_t tegra_pgd_phys; /* pgd used by hotplug & LP2 bootup */
static pgd_t *tegra_pgd;
-
-#ifdef CONFIG_PM_SLEEP
static int tegra_last_pclk;
#endif
static struct clk *tegra_pclk;
@@ -195,6 +196,7 @@ static unsigned long
#define tegra_cluster_switch_time(flags, id) do {} while(0)
#endif
+#ifdef CONFIG_PM_SLEEP
unsigned long tegra_cpu_power_good_time(void)
{
if (WARN_ON_ONCE(!pdata))
@@ -240,7 +242,6 @@ static int create_suspend_pgtable(void)
return 0;
}
-#ifdef CONFIG_PM_SLEEP
/* ensures that sufficient time is passed for a register write to
* serialize into the 32KHz domain */
static void pmc_32kwritel(u32 val, unsigned long offs)
@@ -799,6 +800,7 @@ void __init tegra_init_suspend(struct tegra_suspend_platform_data *plat)
preset_lpj = loops_per_jiffy;
+#ifdef CONFIG_PM_SLEEP
if (create_suspend_pgtable() < 0) {
pr_err("%s: Memory allocation failed -- LP0/LP1/LP2 unavailable\n",
__func__);
@@ -806,8 +808,6 @@ void __init tegra_init_suspend(struct tegra_suspend_platform_data *plat)
goto fail;
}
-#ifdef CONFIG_PM_SLEEP
-
if ((tegra_get_chipid() == TEGRA_CHIPID_TEGRA3) &&
(tegra_get_revision() == TEGRA_REVISION_A01) &&
(plat->suspend_mode == TEGRA_SUSPEND_LP0)) {