Lines Matching +full:inside +full:- +full:secure
1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 2006-2008 Nokia Corporation
13 * Richard Woodruff <r-woodruff2@ti.com>
41 #include "cm-regbits-34xx.h"
42 #include "prm-regbits-34xx.h"
46 #include "omap-secure.h"
96 * FIXME: This function should be called before entering off-mode after
97 * OMAP3 secure services have been accessed. Currently it is only called
98 * once during boot sequence, but this works as we are not using secure
109 * otherwise the WFI executed inside the ROM code in omap3_save_secure_ram_context()
212 /* Enable IO-PAD and IO-CHAIN wakeups */ in omap_sram_idle()
278 * In off-mode resume path above, omap3_core_restore_context in omap_sram_idle()
280 * this to non-off mode resume paths so we don't do it twice. in omap_sram_idle()
308 pwrst->saved_state = pwrdm_read_next_pwrst(pwrst->pwrdm); in omap3_pm_suspend()
311 if (omap_set_pwrdm_state(pwrst->pwrdm, pwrst->next_state)) in omap3_pm_suspend()
313 if (pwrdm_clear_all_prev_pwrst(pwrst->pwrdm)) in omap3_pm_suspend()
324 state = pwrdm_read_prev_pwrst(pwrst->pwrdm); in omap3_pm_suspend()
325 if (state > pwrst->next_state) { in omap3_pm_suspend()
327 pwrst->pwrdm->name, pwrst->next_state); in omap3_pm_suspend()
328 ret = -1; in omap3_pm_suspend()
330 omap_set_pwrdm_state(pwrst->pwrdm, pwrst->saved_state); in omap3_pm_suspend()
362 pwrst->pwrdm == core_pwrdm && in omap3_pm_off_mode_enable()
364 pwrst->next_state = PWRDM_POWER_RET; in omap3_pm_off_mode_enable()
368 pwrst->next_state = state; in omap3_pm_off_mode_enable()
370 omap_set_pwrdm_state(pwrst->pwrdm, pwrst->next_state); in omap3_pm_off_mode_enable()
379 if (pwrst->pwrdm == pwrdm) in omap3_pm_get_suspend_state()
380 return pwrst->next_state; in omap3_pm_get_suspend_state()
382 return -EINVAL; in omap3_pm_get_suspend_state()
390 if (pwrst->pwrdm == pwrdm) { in omap3_pm_set_suspend_state()
391 pwrst->next_state = state; in omap3_pm_set_suspend_state()
395 return -EINVAL; in omap3_pm_set_suspend_state()
402 if (!pwrdm->pwrsts) in pwrdms_setup()
407 return -ENOMEM; in pwrdms_setup()
408 pwrst->pwrdm = pwrdm; in pwrdms_setup()
411 pwrst->next_state = PWRDM_POWER_OFF; in pwrdms_setup()
413 pwrst->next_state = PWRDM_POWER_RET; in pwrdms_setup()
415 list_add(&pwrst->node, &pwrst_list); in pwrdms_setup()
420 return omap_set_pwrdm_state(pwrst->pwrdm, pwrst->next_state); in pwrdms_setup()
427 * - omap3_do_wfi for erratum i581 WA,
452 np = of_find_compatible_node(NULL, NULL, "ti,twl4030-power-idle"); in omap3_pm_check_pmic()
454 np = of_find_compatible_node(NULL, NULL, "ti,twl4030-power-idle-osc-off"); in omap3_pm_check_pmic()
510 ret = -EINVAL; in omap3_pm_init()
541 * Domain-OFF/OSWR Wakeup". This wakeup dependency is not a in omap3_pm_init()
547 * self-test using their loopback tests; if that fails, those in omap3_pm_init()
551 * XXX Technically this workaround is only needed if off-mode in omap3_pm_init()
562 pr_err("Memory allocation failed when allocating for secure sram context\n"); in omap3_pm_init()
576 list_del(&pwrst->node); in omap3_pm_init()