summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/pm.h
diff options
context:
space:
mode:
authorScott Williams <scwilliams@nvidia.com>2011-02-01 12:52:39 -0800
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:42:19 -0800
commit2d7a9f1881b0ebb2e5d094542a38e44b525f7655 (patch)
treec43212f22769f569b6b7fd805e73c6978a18424c /arch/arm/mach-tegra/pm.h
parent8a16d8c8087f32b165c4afea39a5d992abb429c1 (diff)
arm: tegra: Add run-time cluster switch debug control
Allow run-time control of cluster switch debug messages so they can be enabled for debuggability and disabled for performance measurement. Original-Change-Id: Id2bd85d6a9d3a57430a20d93b51ce5b59fe53c71 Reviewed-on: http://git-master/r/17927 Tested-by: Scott Williams <scwilliams@nvidia.com> Reviewed-by: Aleksandr Frid <afrid@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Original-Change-Id: Ia57424eee01276d82af7aab37d2f3d0525acc379 Rebase-Id: Rb7054dcdd910d9f1b82edb485856e868a47c5034
Diffstat (limited to 'arch/arm/mach-tegra/pm.h')
-rw-r--r--arch/arm/mach-tegra/pm.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/pm.h b/arch/arm/mach-tegra/pm.h
index eb4e24e6be81..e333cc476408 100644
--- a/arch/arm/mach-tegra/pm.h
+++ b/arch/arm/mach-tegra/pm.h
@@ -70,7 +70,8 @@ extern void (*tegra_deep_sleep)(int);
void tegra_idle_lp2_last(unsigned int flags);
#ifdef CONFIG_ARCH_TEGRA_2x_SOC
-#define INSTRUMENT_CLUSTER_SWITCH 0 /* Must be zero for 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 */
static inline int tegra_cluster_control(unsigned int us, unsigned int flags)
{ return -EPERM; }
#define tegra_cluster_switch_prolog(flags) do {} while(0)
@@ -80,7 +81,8 @@ static inline unsigned int is_lp_cluster(void)
static inline unsigned long tegra_get_lpcpu_max_rate(void)
{ return 0; }
#else
-#define INSTRUMENT_CLUSTER_SWITCH 1 /* Should be zero for shipping code */
+#define INSTRUMENT_CLUSTER_SWITCH 1 /* Should be zero for shipping code */
+#define DEBUG_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);
@@ -88,6 +90,13 @@ unsigned int is_lp_cluster(void);
unsigned long tegra_get_lpcpu_max_rate(void);
#endif
+#if DEBUG_CLUSTER_SWITCH
+extern unsigned int tegra_cluster_debug;
+#define DEBUG_CLUSTER(x) do { if (tegra_cluster_debug) printk x; } while (0)
+#else
+#define DEBUG_CLUSTER(x) do { } while (0)
+#endif
+
#define FLOW_CTRL_HALT_CPU(cpu) (IO_ADDRESS(TEGRA_FLOW_CTRL_BASE) + \
((cpu) == 0 ? 0x8 : (0x18 + 8 * ((cpu) - 1))))
#define FLOW_CTRL_CPU_CSR(cpu) (IO_ADDRESS(TEGRA_FLOW_CTRL_BASE) + \