summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/pm.h
diff options
context:
space:
mode:
authorScott Williams <scwilliams@nvidia.com>2011-07-21 15:46:01 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:46:57 -0800
commit2e88451007965ee5d5b20d86faa0238795657157 (patch)
tree534d99b41435d6fd7b176c0fccbce40c71e388bc /arch/arm/mach-tegra/pm.h
parentf68659188e7e7db84db6499813ea7a0f050d5d62 (diff)
ARM: tegra: power: Clean up cluster control definitions
Reduce the complexity of the cluster control compile-time conditionals. Also disable DEBUG_CLUSTER_SWITCH because it invokes clock code that takes a mutex when taking of a mutex is disallowed. Change-Id: I9b614d4b0189fbb01d0b7f8af7053c7586d9515b Signed-off-by: Scott Williams <scwilliams@nvidia.com> Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com> Rebase-Id: R412820dc2fd9f0c9cc7b1e3ad7ead7e2e68a0ff3
Diffstat (limited to 'arch/arm/mach-tegra/pm.h')
-rw-r--r--arch/arm/mach-tegra/pm.h34
1 files changed, 11 insertions, 23 deletions
diff --git a/arch/arm/mach-tegra/pm.h b/arch/arm/mach-tegra/pm.h
index fb6bef9acb49..d31c4834d93c 100644
--- a/arch/arm/mach-tegra/pm.h
+++ b/arch/arm/mach-tegra/pm.h
@@ -93,30 +93,10 @@ extern void (*tegra_deep_sleep)(int);
unsigned int tegra_idle_lp2_last(unsigned int us, unsigned int flags);
-#ifdef CONFIG_ARCH_TEGRA_2x_SOC
-
-#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 int tegra_cluster_control(unsigned int us, unsigned int flags)
-{ return -EPERM; }
-#define tegra_cluster_switch_prolog(flags) do {} while(0)
-#define tegra_cluster_switch_epilog(flags) do {} while(0)
-static inline bool is_g_cluster_present(void)
-{ return true; }
-static inline unsigned int is_lp_cluster(void)
-{ return 0; }
-#define tegra_lp0_suspend_mc() do {} while(0)
-#define tegra_lp0_resume_mc() do {} while(0)
-void tegra2_lp0_suspend_init(void);
-
-#else
-
+#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 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 */
-
-#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);
@@ -124,6 +104,9 @@ 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)
+#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;
}
@@ -133,6 +116,11 @@ static inline void tegra_lp0_suspend_mc(void) {}
static inline void tegra_lp0_resume_mc(void) {}
#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
static inline bool is_g_cluster_present(void)
{
u32 fuse_sku = readl(FUSE_SKU_DIRECT_CONFIG);
@@ -184,7 +172,7 @@ static inline unsigned long tegra_lp2_timer_remain(void)
#endif
}
-#if DEBUG_CLUSTER_SWITCH
+#if DEBUG_CLUSTER_SWITCH && 0 /* !!!FIXME!!! THIS IS BROKEN */
extern unsigned int tegra_cluster_debug;
#define DEBUG_CLUSTER(x) do { if (tegra_cluster_debug) printk x; } while (0)
#else