summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/pm.h
diff options
context:
space:
mode:
authorScott Williams <scwilliams@nvidia.com>2011-07-21 14:09:24 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:46:51 -0800
commit5590df0d264c0c03b9fd1839c6790c5c10e79db8 (patch)
tree08cd75646f4c8842026471a6b341bb8d815b966d /arch/arm/mach-tegra/pm.h
parent8142ecb1c47f4e19262141d07884ebd652943c3b (diff)
ARM: tegra3: Cluster Switch and LP0 require PM_SLEEP
Change-Id: If3d4fa59cf6d7cd8692f6e5b59414a923abcfd0d Signed-off-by: Scott Williams <scwilliams@nvidia.com> DW: Split into logical changes Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com> Rebase-Id: Rec3560499e4c64fd76a873689691cbae59f7602b
Diffstat (limited to 'arch/arm/mach-tegra/pm.h')
-rw-r--r--arch/arm/mach-tegra/pm.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/pm.h b/arch/arm/mach-tegra/pm.h
index cb9c9fc306e6..926e85183715 100644
--- a/arch/arm/mach-tegra/pm.h
+++ b/arch/arm/mach-tegra/pm.h
@@ -126,9 +126,24 @@ void tegra2_lp0_suspend_init(void);
#define INSTRUMENT_CLUSTER_SWITCH 1 /* Should be zero for shipping code */
#define DEBUG_CLUSTER_SWITCH 1 /* Should be zero for shipping code */
#define PARAMETERIZE_CLUSTER_SWITCH 1 /* Should be zero for shipping code */
+
+#ifdef CONFIG_PM_SLEEP
int tegra_cluster_control(unsigned int us, unsigned int flags);
void tegra_cluster_switch_prolog(unsigned int flags);
void tegra_cluster_switch_epilog(unsigned int flags);
+void tegra_lp0_suspend_mc(void);
+void tegra_lp0_resume_mc(void);
+#else
+static inline int tegra_cluster_control(unsigned int us, unsigned int flags)
+{
+ return -EPERM;
+}
+static inline void tegra_cluster_switch_prolog(unsigned int flags) {}
+static inline void tegra_cluster_switch_epilog(unsigned int flags) {}
+static inline void tegra_lp0_suspend_mc(void) {}
+static inline void tegra_lp0_resume_mc(void) {}
+#endif
+
static inline bool is_g_cluster_present(void)
{
u32 fuse_sku = readl(FUSE_SKU_DIRECT_CONFIG);
@@ -142,8 +157,6 @@ static inline unsigned int is_lp_cluster(void)
reg = readl(FLOW_CTRL_CLUSTER_CONTROL);
return (reg & 1); /* 0 == G, 1 == LP*/
}
-void tegra_lp0_suspend_mc(void);
-void tegra_lp0_resume_mc(void);
#endif
static inline void tegra_lp0_suspend_init(void)