From c523674f102ad0c56224b626412664da7dd49eac Mon Sep 17 00:00:00 2001 From: Scott Williams Date: Mon, 1 Aug 2011 19:22:02 -0700 Subject: 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 Rebase-Id: R65b81ec60f59ae981fd668ad8354b14b8b4c83b9 --- arch/arm/mach-tegra/pm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'arch/arm/mach-tegra/pm.c') 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)) { -- cgit v1.2.3