summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Williams <scwilliams@nvidia.com>2011-07-21 12:24:05 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:46:56 -0800
commit5b5f0382c47f1b697761e8406530ea7abf8f6455 (patch)
tree1296d3c89f59eb6773fd07302542aeeb5ff7eba2
parent36c09236df8fbe389ebbe58395e808c31b098013 (diff)
ARM: tegra: power: Consolidate power management flags
Consolidate all of the power management control flags in one header and adjust the values of the software flags so that they do not conflict with the values of the hardware flags. Change-Id: I7971d274946d84dcc50bd9d9e0190091ebbefa2e Signed-off-by: Scott Williams <scwilliams@nvidia.com> Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com> Rebase-Id: R29d2420a74f977c16f73b1abd9ca7470695a53f4
-rw-r--r--arch/arm/mach-tegra/pm.h8
-rw-r--r--arch/arm/mach-tegra/sleep.h11
-rw-r--r--arch/arm/mach-tegra/sysfs-cluster.c3
-rw-r--r--arch/arm/mach-tegra/tegra3_clocks.c1
4 files changed, 14 insertions, 9 deletions
diff --git a/arch/arm/mach-tegra/pm.h b/arch/arm/mach-tegra/pm.h
index d6771e4b41b3..fb6bef9acb49 100644
--- a/arch/arm/mach-tegra/pm.h
+++ b/arch/arm/mach-tegra/pm.h
@@ -53,14 +53,6 @@ bool tegra_set_cpu_in_lp2(int cpu);
int tegra_suspend_dram(enum tegra_suspend_mode mode);
-#define TEGRA_POWER_SDRAM_SELFREFRESH 0x400 /* SDRAM is in self-refresh */
-
-#define TEGRA_POWER_CLUSTER_G 0x1000 /* G CPU */
-#define TEGRA_POWER_CLUSTER_LP 0x2000 /* LP CPU */
-#define TEGRA_POWER_CLUSTER_MASK 0x3000
-#define TEGRA_POWER_CLUSTER_IMMEDIATE 0x4000 /* Immediate wake */
-#define TEGRA_POWER_CLUSTER_FORCE 0x8000 /* Force switch */
-
#define FLOW_CTRL_CLUSTER_CONTROL \
(IO_ADDRESS(TEGRA_FLOW_CTRL_BASE) + 0x2c)
#define FLOW_CTRL_CPU_CSR_IMMEDIATE_WAKE (1<<3)
diff --git a/arch/arm/mach-tegra/sleep.h b/arch/arm/mach-tegra/sleep.h
index 30fc2e5e245c..49de287da2c3 100644
--- a/arch/arm/mach-tegra/sleep.h
+++ b/arch/arm/mach-tegra/sleep.h
@@ -25,6 +25,15 @@
#include <mach/iomap.h>
+#define TEGRA_POWER_SDRAM_SELFREFRESH (1 << 26) /* SDRAM is in self-refresh */
+#define TEGRA_POWER_HOTPLUG_SHUTDOWN (1 << 27) /* Hotplug shutdown */
+#define TEGRA_POWER_CLUSTER_G (1 << 28) /* G CPU */
+#define TEGRA_POWER_CLUSTER_LP (1 << 29) /* LP CPU */
+#define TEGRA_POWER_CLUSTER_MASK (TEGRA_POWER_CLUSTER_G | \
+ TEGRA_POWER_CLUSTER_LP)
+#define TEGRA_POWER_CLUSTER_IMMEDIATE (1 << 30) /* Immediate wake */
+#define TEGRA_POWER_CLUSTER_FORCE (1 << 31) /* Force switch */
+
#define TEGRA_IRAM_CODE_AREA (TEGRA_IRAM_BASE + SZ_4K)
/* PMC_SCRATCH37-39 and 41 are used for tegra_pen_lock in Tegra2 idle */
@@ -35,9 +44,11 @@
/* PMC_SCRATCH41 stores the reset vector of the CPU after LP0 and LP1 */
#define PMC_SCRATCH41 0x140
+#ifdef CONFIG_ARCH_TEGRA_2x_SOC
#define CPU_RESETTABLE 2
#define CPU_RESETTABLE_SOON 1
#define CPU_NOT_RESETTABLE 0
+#endif
#define FLOW_CTRL_HALT_CPU0_EVENTS 0x0
#define FLOW_CTRL_WAITEVENT (2 << 29)
diff --git a/arch/arm/mach-tegra/sysfs-cluster.c b/arch/arm/mach-tegra/sysfs-cluster.c
index a642bcdfb9f8..03234d635c61 100644
--- a/arch/arm/mach-tegra/sysfs-cluster.c
+++ b/arch/arm/mach-tegra/sysfs-cluster.c
@@ -87,8 +87,9 @@
#include <linux/clk.h>
#include <mach/iomap.h>
-#include "pm.h"
#include "clock.h"
+#include "sleep.h"
+#include "pm.h"
#define SYSFS_CLUSTER_PRINTS 1 /* Nonzero: enable status prints */
#define SYSFS_CLUSTER_TRACE_PRINTS 0 /* Nonzero: enable trace prints */
diff --git a/arch/arm/mach-tegra/tegra3_clocks.c b/arch/arm/mach-tegra/tegra3_clocks.c
index a221654f7de3..bb431e6dccdc 100644
--- a/arch/arm/mach-tegra/tegra3_clocks.c
+++ b/arch/arm/mach-tegra/tegra3_clocks.c
@@ -38,6 +38,7 @@
#include "fuse.h"
#include "dvfs.h"
#include "pm.h"
+#include "sleep.h"
#define RST_DEVICES_L 0x004
#define RST_DEVICES_H 0x008