summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/powerdomain.h
diff options
context:
space:
mode:
authorRuss Dill <Russ.Dill@ti.com>2018-05-16 18:17:00 +0300
committerTony Lindgren <tony@atomide.com>2018-05-18 16:56:26 +0300
commit485995b09b76f20daaf39d11797f4b88cc5f6fa6 (patch)
tree82bf7f88b0a1e119713b6b141cf0ea2792be2239 /arch/arm/mach-omap2/powerdomain.h
parent9bcfb76b6354ae2b0dee064ccfb05926ba131b1b (diff)
downloadlinux-485995b09b76f20daaf39d11797f4b88cc5f6fa6.tar.xz
ARM: OMAP2+: Add functions to save and restore powerdomain context
The powerdomain control registers are stored in the WKUP powerdomain on AM33XX/AM43XX, which is lost on RTC-only suspend and also hibernate. This adds context save and restore functions for those registers. Sometimes the powerdomain state does not need to change, perhaps we only need to change memory retention states, so make sure the restored state is different from the current state before we wait for a transition. Signed-off-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Dave Gerlach <d-gerlach@ti.com> Signed-off-by: Russ Dill <Russ.Dill@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/powerdomain.h')
-rw-r--r--arch/arm/mach-omap2/powerdomain.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/powerdomain.h b/arch/arm/mach-omap2/powerdomain.h
index 28a796ce07d7..9a907fb14044 100644
--- a/arch/arm/mach-omap2/powerdomain.h
+++ b/arch/arm/mach-omap2/powerdomain.h
@@ -144,6 +144,7 @@ struct powerdomain {
s64 timer;
s64 state_timer[PWRDM_MAX_PWRSTS];
#endif
+ u32 context;
};
/**
@@ -198,6 +199,8 @@ struct pwrdm_ops {
int (*pwrdm_set_lowpwrstchange)(struct powerdomain *pwrdm);
int (*pwrdm_wait_transition)(struct powerdomain *pwrdm);
int (*pwrdm_has_voltdm)(void);
+ void (*pwrdm_save_context)(struct powerdomain *pwrdm);
+ void (*pwrdm_restore_context)(struct powerdomain *pwrdm);
};
int pwrdm_register_platform_funcs(struct pwrdm_ops *custom_funcs);
@@ -273,4 +276,8 @@ extern struct powerdomain gfx_omap2_pwrdm;
extern void pwrdm_lock(struct powerdomain *pwrdm);
extern void pwrdm_unlock(struct powerdomain *pwrdm);
+extern void pwrdms_save_context(void);
+extern void pwrdms_restore_context(void);
+
+extern void pwrdms_lost_power(void);
#endif