summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/pm.h
diff options
context:
space:
mode:
authorScott Williams <scwilliams@nvidia.com>2011-08-23 14:23:18 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:48:31 -0800
commit0963b9265afa0854cd4c6a24d20e661ed4c8ba88 (patch)
tree1c5829db3a7aea9f9f13b77255a5e3a595542e75 /arch/arm/mach-tegra/pm.h
parent451ef25cf77c68982cc8085218da472cea2a4f25 (diff)
ARM: tegra: Use CONFIG_TERGA_CLUSTER_CONTROL for cluster control
Change-Id: I07c389092132e52e2bdd3deab22c10f8e1e6035c Signed-off-by: Scott Williams <scwilliams@nvidia.com> Reviewed-on: http://git-master/r/48798 Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com> Reviewed-by: Daniel Willemsen <dwillemsen@nvidia.com> Rebase-Id: R1e0c9acc87c81f9d0dc394c09d6a7b8b94c48d3f
Diffstat (limited to 'arch/arm/mach-tegra/pm.h')
-rw-r--r--arch/arm/mach-tegra/pm.h52
1 files changed, 27 insertions, 25 deletions
diff --git a/arch/arm/mach-tegra/pm.h b/arch/arm/mach-tegra/pm.h
index af03188c9e1d..d375a1c595e9 100644
--- a/arch/arm/mach-tegra/pm.h
+++ b/arch/arm/mach-tegra/pm.h
@@ -91,35 +91,20 @@ extern void (*tegra_deep_sleep)(int);
unsigned int tegra_idle_lp2_last(unsigned int us, unsigned int flags);
#if defined(CONFIG_PM_SLEEP) && !defined(CONFIG_ARCH_TEGRA_2x_SOC)
-#define INSTRUMENT_CLUSTER_SWITCH 1 /* Should be zero for shipping code */
-#define DEBUG_CLUSTER_SWITCH 0 /* Should be zero for shipping code */
-#define PARAMETERIZE_CLUSTER_SWITCH 1 /* Should be zero for shipping code */
-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);
void tegra_lp0_cpu_mode(bool enter);
#else
-static inline int tegra_cluster_control(unsigned int us, unsigned int flags)
-#define INSTRUMENT_CLUSTER_SWITCH 0 /* Must be zero for ARCH_TEGRA_2x_SOC */
-#define DEBUG_CLUSTER_SWITCH 0 /* Must be zero for ARCH_TEGRA_2x_SOC */
-#define PARAMETERIZE_CLUSTER_SWITCH 0 /* Must be zero for ARCH_TEGRA_2x_SOC */
-{
- 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) {}
static inline void tegra_lp0_cpu_mode(bool enter) {}
#endif
-#ifdef CONFIG_ARCH_TEGRA_2x_SOC
-static inline bool is_g_cluster_present(void) { return true; }
-static inline unsigned int is_lp_cluster(void) { return 0; }
-void tegra2_lp0_suspend_init(void);
-#else
+#ifdef CONFIG_TEGRA_CLUSTER_CONTROL
+#define INSTRUMENT_CLUSTER_SWITCH 1 /* Should be zero for shipping code */
+#define DEBUG_CLUSTER_SWITCH 0 /* Should be zero for shipping code */
+#define PARAMETERIZE_CLUSTER_SWITCH 1 /* Should be zero for shipping code */
+
static inline bool is_g_cluster_present(void)
{
u32 fuse_sku = readl(FUSE_SKU_DIRECT_CONFIG);
@@ -133,16 +118,26 @@ static inline unsigned int is_lp_cluster(void)
reg = readl(FLOW_CTRL_CLUSTER_CONTROL);
return (reg & 1); /* 0 == G, 1 == LP*/
}
-#endif
+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);
+#else
+#define INSTRUMENT_CLUSTER_SWITCH 0 /* Must be zero for ARCH_TEGRA_2x_SOC */
+#define DEBUG_CLUSTER_SWITCH 0 /* Must be zero for ARCH_TEGRA_2x_SOC */
+#define PARAMETERIZE_CLUSTER_SWITCH 0 /* Must be zero for ARCH_TEGRA_2x_SOC */
-static inline void tegra_lp0_suspend_init(void)
+static inline bool is_g_cluster_present(void) { return true; }
+static inline unsigned int is_lp_cluster(void) { return 0; }
+static inline int tegra_cluster_control(unsigned int us, unsigned int flags)
{
-#ifdef CONFIG_ARCH_TEGRA_2x_SOC
- tegra2_lp0_suspend_init();
-#endif
+ return -EPERM;
}
+static inline void tegra_cluster_switch_prolog(unsigned int flags) {}
+static inline void tegra_cluster_switch_epilog(unsigned int flags) {}
+#endif
#ifdef CONFIG_ARCH_TEGRA_2x_SOC
+void tegra2_lp0_suspend_init(void);
void tegra2_lp2_set_trigger(unsigned long cycles);
unsigned long tegra2_lp2_timer_remain(void);
#endif
@@ -151,6 +146,13 @@ void tegra3_lp2_set_trigger(unsigned long cycles);
unsigned long tegra3_lp2_timer_remain(void);
#endif
+static inline void tegra_lp0_suspend_init(void)
+{
+#ifdef CONFIG_ARCH_TEGRA_2x_SOC
+ tegra2_lp0_suspend_init();
+#endif
+}
+
static inline void tegra_lp2_set_trigger(unsigned long cycles)
{
#ifdef CONFIG_ARCH_TEGRA_2x_SOC