ARM: OMAP2: Drop the concept of certain power domains not being able to lose context.
authorRuss Dill <Russ.Dill@ti.com>
Fri, 2 Nov 2018 10:28:09 +0000 (15:58 +0530)
committerTero Kristo <t-kristo@ti.com>
Tue, 6 Nov 2018 13:03:47 +0000 (15:03 +0200)
It isn't much of a win, and with hibernation, everything loses context.

Signed-off-by: Russ Dill <Russ.Dill@ti.com>
[j-keerthy@ti.com] ported to 4.14
Signed-off-by: Keerthy <j-keerthy@ti.com>
arch/arm/mach-omap2/powerdomain.c
arch/arm/mach-omap2/powerdomain.h

index 1a0f69c0a37638ce10985aea2f027a11bb371ba8..5c4dbad4a949372f2de9545523a4fd7059b5b1db 100644 (file)
@@ -1186,47 +1186,6 @@ int pwrdm_get_context_loss_count(struct powerdomain *pwrdm)
        return count;
 }
 
-/**
- * pwrdm_can_ever_lose_context - can this powerdomain ever lose context?
- * @pwrdm: struct powerdomain *
- *
- * Given a struct powerdomain * @pwrdm, returns 1 if the powerdomain
- * can lose either memory or logic context or if @pwrdm is invalid, or
- * returns 0 otherwise.  This function is not concerned with how the
- * powerdomain registers are programmed (i.e., to go off or not); it's
- * concerned with whether it's ever possible for this powerdomain to
- * go off while some other part of the chip is active.  This function
- * assumes that every powerdomain can go to either ON or INACTIVE.
- */
-bool pwrdm_can_ever_lose_context(struct powerdomain *pwrdm)
-{
-       int i;
-
-       if (!pwrdm) {
-               pr_debug("powerdomain: %s: invalid powerdomain pointer\n",
-                        __func__);
-               return 1;
-       }
-
-       if (pwrdm->pwrsts & PWRSTS_OFF)
-               return 1;
-
-       if (pwrdm->pwrsts & PWRSTS_RET) {
-               if (pwrdm->pwrsts_logic_ret & PWRSTS_OFF)
-                       return 1;
-
-               for (i = 0; i < pwrdm->banks; i++)
-                       if (pwrdm->pwrsts_mem_ret[i] & PWRSTS_OFF)
-                               return 1;
-       }
-
-       for (i = 0; i < pwrdm->banks; i++)
-               if (pwrdm->pwrsts_mem_on[i] & PWRSTS_OFF)
-                       return 1;
-
-       return 0;
-}
-
 /**
  * pwrdm_save_context - save powerdomain registers
  *
index 9a907fb14044ea8f05a2ca412fc890b4f0707706..a5bdc28a9eecd6f01affc82857921e6d0ed9d271 100644 (file)
@@ -247,7 +247,6 @@ int pwrdm_state_switch(struct powerdomain *pwrdm);
 int pwrdm_pre_transition(struct powerdomain *pwrdm);
 int pwrdm_post_transition(struct powerdomain *pwrdm);
 int pwrdm_get_context_loss_count(struct powerdomain *pwrdm);
-bool pwrdm_can_ever_lose_context(struct powerdomain *pwrdm);
 
 extern int omap_set_pwrdm_state(struct powerdomain *pwrdm, u8 state);