Lines Matching +full:per +full:- +full:context
1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 2006-2008 Nokia Corporation
13 * Richard Woodruff <r-woodruff2@ti.com>
42 #include "cm-regbits-34xx.h"
43 #include "prm-regbits-34xx.h"
47 #include "omap-secure.h"
82 /* Save the Interrupt controller context */ in omap3_core_save_context()
84 /* Save the system control module context, padconf already save above*/ in omap3_core_save_context()
90 /* Restore the control module context, padconf restored by h/w */ in omap3_core_restore_context()
92 /* Restore the interrupt controller context */ in omap3_core_restore_context()
97 * FIXME: This function should be called before entering off-mode after
197 /* No need to save context */ in omap_sram_idle()
213 /* Enable IO-PAD and IO-CHAIN wakeups */ in omap_sram_idle()
219 /* PER */ in omap_sram_idle()
252 * omap3_arm_context is the location where some ARM context in omap_sram_idle()
286 * In off-mode resume path above, omap3_core_restore_context in omap_sram_idle()
288 * this to non-off mode resume paths so we don't do it twice. in omap_sram_idle()
295 /* PER */ in omap_sram_idle()
316 pwrst->saved_state = pwrdm_read_next_pwrst(pwrst->pwrdm); in omap3_pm_suspend()
319 if (omap_set_pwrdm_state(pwrst->pwrdm, pwrst->next_state)) in omap3_pm_suspend()
321 if (pwrdm_clear_all_prev_pwrst(pwrst->pwrdm)) in omap3_pm_suspend()
332 state = pwrdm_read_prev_pwrst(pwrst->pwrdm); in omap3_pm_suspend()
333 if (state > pwrst->next_state) { in omap3_pm_suspend()
335 pwrst->pwrdm->name, pwrst->next_state); in omap3_pm_suspend()
336 ret = -1; in omap3_pm_suspend()
338 omap_set_pwrdm_state(pwrst->pwrdm, pwrst->saved_state); in omap3_pm_suspend()
370 pwrst->pwrdm == core_pwrdm && in omap3_pm_off_mode_enable()
372 pwrst->next_state = PWRDM_POWER_RET; in omap3_pm_off_mode_enable()
376 pwrst->next_state = state; in omap3_pm_off_mode_enable()
378 omap_set_pwrdm_state(pwrst->pwrdm, pwrst->next_state); in omap3_pm_off_mode_enable()
387 if (pwrst->pwrdm == pwrdm) in omap3_pm_get_suspend_state()
388 return pwrst->next_state; in omap3_pm_get_suspend_state()
390 return -EINVAL; in omap3_pm_get_suspend_state()
398 if (pwrst->pwrdm == pwrdm) { in omap3_pm_set_suspend_state()
399 pwrst->next_state = state; in omap3_pm_set_suspend_state()
403 return -EINVAL; in omap3_pm_set_suspend_state()
410 if (!pwrdm->pwrsts) in pwrdms_setup()
415 return -ENOMEM; in pwrdms_setup()
416 pwrst->pwrdm = pwrdm; in pwrdms_setup()
419 pwrst->next_state = PWRDM_POWER_OFF; in pwrdms_setup()
421 pwrst->next_state = PWRDM_POWER_RET; in pwrdms_setup()
423 list_add(&pwrst->node, &pwrst_list); in pwrdms_setup()
428 return omap_set_pwrdm_state(pwrst->pwrdm, pwrst->next_state); in pwrdms_setup()
435 * - omap3_do_wfi for erratum i581 WA,
460 np = of_find_compatible_node(NULL, NULL, "ti,twl4030-power-idle"); in omap3_pm_check_pmic()
462 np = of_find_compatible_node(NULL, NULL, "ti,twl4030-power-idle-osc-off"); in omap3_pm_check_pmic()
518 ret = -EINVAL; in omap3_pm_init()
537 * RTA is disabled during initialization as per erratum i608 in omap3_pm_init()
546 * not correctly reset when the PER powerdomain comes back in omap3_pm_init()
548 * See OMAP36xx Erratum i582 "PER Domain reset issue after in omap3_pm_init()
549 * Domain-OFF/OSWR Wakeup". This wakeup dependency is not a in omap3_pm_init()
550 * complete workaround. The kernel must also prevent the PER in omap3_pm_init()
552 * powerdomain is not going to OSWR/OFF. And if PER last in omap3_pm_init()
555 * self-test using their loopback tests; if that fails, those in omap3_pm_init()
556 * devices are unusable until the PER/CORE can complete a transition in omap3_pm_init()
559 * XXX Technically this workaround is only needed if off-mode in omap3_pm_init()
570 pr_err("Memory allocation failed when allocating for secure sram context\n"); in omap3_pm_init()
584 list_del(&pwrst->node); in omap3_pm_init()