cpuidle44xx.c (a01353cf1896ea5b8a7bbc5e2b2d38feed8b7aaa) cpuidle44xx.c (a282e5ef2954e0bc2740c0c8c278f777933cc4fb)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * OMAP4+ CPU idle Routines
4 *
5 * Copyright (C) 2011-2013 Texas Instruments, Inc.
6 * Santosh Shilimkar <santosh.shilimkar@ti.com>
7 * Rajendra Nayak <rnayak@ti.com>
8 */

--- 91 unchanged lines hidden (view full) ---

100 raw_spin_lock_irqsave(&mpu_lock, flag);
101 cx->mpu_state_vote++;
102 if (cx->mpu_state_vote == num_online_cpus()) {
103 pwrdm_set_logic_retst(mpu_pd, cx->mpu_logic_state);
104 omap_set_pwrdm_state(mpu_pd, cx->mpu_state);
105 }
106 raw_spin_unlock_irqrestore(&mpu_lock, flag);
107
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * OMAP4+ CPU idle Routines
4 *
5 * Copyright (C) 2011-2013 Texas Instruments, Inc.
6 * Santosh Shilimkar <santosh.shilimkar@ti.com>
7 * Rajendra Nayak <rnayak@ti.com>
8 */

--- 91 unchanged lines hidden (view full) ---

100 raw_spin_lock_irqsave(&mpu_lock, flag);
101 cx->mpu_state_vote++;
102 if (cx->mpu_state_vote == num_online_cpus()) {
103 pwrdm_set_logic_retst(mpu_pd, cx->mpu_logic_state);
104 omap_set_pwrdm_state(mpu_pd, cx->mpu_state);
105 }
106 raw_spin_unlock_irqrestore(&mpu_lock, flag);
107
108 ct_cpuidle_enter();
109 omap4_enter_lowpower(dev->cpu, cx->cpu_state);
110 ct_cpuidle_exit();
108 omap4_enter_lowpower(dev->cpu, cx->cpu_state, true);
111
112 raw_spin_lock_irqsave(&mpu_lock, flag);
113 if (cx->mpu_state_vote == num_online_cpus())
114 omap_set_pwrdm_state(mpu_pd, PWRDM_POWER_ON);
115 cx->mpu_state_vote--;
116 raw_spin_unlock_irqrestore(&mpu_lock, flag);
117
118 return index;

--- 62 unchanged lines hidden (view full) ---

181 cx = state_ptr + index;
182 pwrdm_set_logic_retst(mpu_pd, cx->mpu_logic_state);
183 omap_set_pwrdm_state(mpu_pd, cx->mpu_state);
184 mpuss_can_lose_context = 0;
185 }
186 }
187 }
188
109
110 raw_spin_lock_irqsave(&mpu_lock, flag);
111 if (cx->mpu_state_vote == num_online_cpus())
112 omap_set_pwrdm_state(mpu_pd, PWRDM_POWER_ON);
113 cx->mpu_state_vote--;
114 raw_spin_unlock_irqrestore(&mpu_lock, flag);
115
116 return index;

--- 62 unchanged lines hidden (view full) ---

179 cx = state_ptr + index;
180 pwrdm_set_logic_retst(mpu_pd, cx->mpu_logic_state);
181 omap_set_pwrdm_state(mpu_pd, cx->mpu_state);
182 mpuss_can_lose_context = 0;
183 }
184 }
185 }
186
189 ct_cpuidle_enter();
190 omap4_enter_lowpower(dev->cpu, cx->cpu_state);
187 omap4_enter_lowpower(dev->cpu, cx->cpu_state, true);
191 cpu_done[dev->cpu] = true;
188 cpu_done[dev->cpu] = true;
192 ct_cpuidle_exit();
193
194 /* Wakeup CPU1 only if it is not offlined */
195 if (dev->cpu == 0 && cpumask_test_cpu(1, cpu_online_mask)) {
196
197 if (IS_PM44XX_ERRATUM(PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD) &&
198 mpuss_can_lose_context)
199 gic_dist_disable();
200

--- 134 unchanged lines hidden ---
189
190 /* Wakeup CPU1 only if it is not offlined */
191 if (dev->cpu == 0 && cpumask_test_cpu(1, cpu_online_mask)) {
192
193 if (IS_PM44XX_ERRATUM(PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD) &&
194 mpuss_can_lose_context)
195 gic_dist_disable();
196

--- 134 unchanged lines hidden ---