summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/pm.c
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@nvidia.com>2011-06-13 18:42:01 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:46:45 -0800
commit3c152b307286a4a32d2daeb3ca5e2caed646f795 (patch)
tree81dbc8f20b191e25affd2699ac21a3e7d6c4e268 /arch/arm/mach-tegra/pm.c
parentc188c850738cc5415652a63a5815cd1734026229 (diff)
HACK: allow tegra3 compile without SMP
Rebase-Id: R2f09e8a42a4fe3622924aa66acb13af0bb124e98
Diffstat (limited to 'arch/arm/mach-tegra/pm.c')
-rw-r--r--arch/arm/mach-tegra/pm.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/pm.c b/arch/arm/mach-tegra/pm.c
index e2da73c03fd3..b3bbe569bf17 100644
--- a/arch/arm/mach-tegra/pm.c
+++ b/arch/arm/mach-tegra/pm.c
@@ -309,6 +309,7 @@ static int create_suspend_pgtable(void)
return 0;
}
+#ifdef CONFIG_SMP
static int tegra_reset_sleeping_cpu(int cpu)
{
int ret = 0;
@@ -342,6 +343,16 @@ static void tegra_wake_reset_cpu(int cpu)
/* unhalt the cpu */
flowctrl_writel(0, FLOW_CTRL_HALT_CPU(1));
}
+#else
+static int tegra_reset_sleeping_cpu(int cpu)
+{
+ return 0;
+}
+
+static void tegra_wake_reset_cpu(int cpu)
+{
+}
+#endif
#ifdef CONFIG_PM_SLEEP
/*
@@ -461,6 +472,7 @@ static void suspend_cpu_complex(void)
}
}
+#ifdef CONFIG_SMP
int tegra_reset_other_cpus(int cpu)
{
int i;
@@ -485,7 +497,14 @@ int tegra_reset_other_cpus(int cpu)
return 0;
}
+#else
+int tegra_reset_other_cpus(int cpu)
+{
+ return 0;
+}
+#endif
+#ifdef CONFIG_SMP
void tegra_idle_lp2_last(unsigned int flags)
{
u32 reg;
@@ -559,6 +578,11 @@ void tegra_idle_lp2_last(unsigned int flags)
}
#endif
}
+#else
+void tegra_idle_lp2_last(unsigned int flags)
+{
+}
+#endif
void tegra_idle_lp2(void)
{
@@ -577,9 +601,11 @@ void tegra_idle_lp2(void)
cpu_pm_enter();
+#ifdef CONFIG_SMP
if (last_cpu)
tegra_idle_lp2_last(0);
else
+#endif
tegra_sleep_wfi(PLAT_PHYS_OFFSET - PAGE_OFFSET);
cpu_pm_exit();
@@ -668,6 +694,7 @@ static void tegra_pm_set(enum tegra_suspend_mode mode)
reg &= ~TEGRA_POWER_EFFECT_LP0;
switch (mode) {
+#ifdef CONFIG_SMP
case TEGRA_SUSPEND_LP0:
/*
* lp0 boots through the AVP, which then resumes the AVP to
@@ -700,6 +727,7 @@ static void tegra_pm_set(enum tegra_suspend_mode mode)
writel(virt_to_phys(tegra_resume), evp_reset);
rate = clk_get_rate(tegra_pclk);
break;
+#endif
default:
BUG();
}