summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/powerdomain.h
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2011-03-07 19:28:15 -0700
committerPaul Walmsley <paul@pwsan.com>2011-03-07 19:28:15 -0700
commit694606c4ef54f596bfb2a7c1d4de8ac0e096a636 (patch)
treedf003728c856b381a58b5aa27d74d1457b99babd /arch/arm/mach-omap2/powerdomain.h
parent4cb49fec12e219ec174e04157f71c00f63eb4ce4 (diff)
downloadlinux-694606c4ef54f596bfb2a7c1d4de8ac0e096a636.tar.bz2
OMAP2+: powerdomain: add pwrdm_can_ever_lose_context()
Some drivers wish to know whether the device that they control can ever lose context, for example, when the device's enclosing powerdomain loses power. They can use this information to determine whether it is necessary to save and restore device context, or whether it can be skipped. Implement the powerdomain portion of this by adding the function pwrdm_can_ever_lose_context(). This is not for use directly from driver code, but instead is intended to be called from driver-subarch integration code (i.e., arch/arm/*omap* code). Currently, the result from this function should be passed into the driver code via struct platform_data, but at some point this should be part of some common or OMAP-specific device code. While here, update file copyrights. Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/powerdomain.h')
-rw-r--r--arch/arm/mach-omap2/powerdomain.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/arch/arm/mach-omap2/powerdomain.h b/arch/arm/mach-omap2/powerdomain.h
index c66431edfeb7..af4f23c73c7a 100644
--- a/arch/arm/mach-omap2/powerdomain.h
+++ b/arch/arm/mach-omap2/powerdomain.h
@@ -2,7 +2,7 @@
* OMAP2/3/4 powerdomain control
*
* Copyright (C) 2007-2008, 2010 Texas Instruments, Inc.
- * Copyright (C) 2007-2010 Nokia Corporation
+ * Copyright (C) 2007-2011 Nokia Corporation
*
* Paul Walmsley
*
@@ -34,17 +34,14 @@
/* Powerdomain allowable state bitfields */
#define PWRSTS_ON (1 << PWRDM_POWER_ON)
+#define PWRSTS_INACTIVE (1 << PWRDM_POWER_INACTIVE)
+#define PWRSTS_RET (1 << PWRDM_POWER_RET)
#define PWRSTS_OFF (1 << PWRDM_POWER_OFF)
-#define PWRSTS_OFF_ON ((1 << PWRDM_POWER_OFF) | \
- (1 << PWRDM_POWER_ON))
-#define PWRSTS_OFF_RET ((1 << PWRDM_POWER_OFF) | \
- (1 << PWRDM_POWER_RET))
-
-#define PWRSTS_RET_ON ((1 << PWRDM_POWER_RET) | \
- (1 << PWRDM_POWER_ON))
-
-#define PWRSTS_OFF_RET_ON (PWRSTS_OFF_RET | (1 << PWRDM_POWER_ON))
+#define PWRSTS_OFF_ON (PWRSTS_OFF | PWRSTS_ON)
+#define PWRSTS_OFF_RET (PWRSTS_OFF | PWRSTS_RET)
+#define PWRSTS_RET_ON (PWRSTS_RET | PWRSTS_ON)
+#define PWRSTS_OFF_RET_ON (PWRSTS_OFF_RET | PWRSTS_ON)
/* Powerdomain flags */
@@ -212,6 +209,7 @@ int pwrdm_pre_transition(void);
int pwrdm_post_transition(void);
int pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm);
u32 pwrdm_get_context_loss_count(struct powerdomain *pwrdm);
+bool pwrdm_can_ever_lose_context(struct powerdomain *pwrdm);
extern void omap2xxx_powerdomains_init(void);
extern void omap3xxx_powerdomains_init(void);