power_mgmt: Do not notify deep sleep if bootloader does context restore
Some bootloaders have power management support to restoer context upon resume from deep sleep. In such cases, the OS startup code should call the notification hook. Create Kconfig flags to configure this option. Jira: 1257 Change-Id: I9f40c5fa077c2f17dc8e9f11604c3ed17e549ed5 Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
This commit is contained in:
parent
c0cd7acf34
commit
a3dc53f2a6
4 changed files with 22 additions and 1 deletions
|
@ -58,6 +58,15 @@ config SYS_POWER_DEEP_SLEEP_SUPPORTED
|
|||
help
|
||||
This option signifies that the target supports the SYS_POWER_DEEP_SLEEP
|
||||
configuration option.
|
||||
|
||||
config BOOTLOADER_CONTEXT_RESTORE_SUPPORTED
|
||||
# Hidden
|
||||
bool
|
||||
default n
|
||||
help
|
||||
This option signifies that the target has options of bootloaders
|
||||
that support context restore upon resume from deep sleep
|
||||
|
||||
#
|
||||
# End hidden PM feature configs
|
||||
#
|
||||
|
|
|
@ -200,7 +200,8 @@ __csSet:
|
|||
movl $_interrupt_stack, %esp
|
||||
addl $CONFIG_ISR_STACK_SIZE, %esp
|
||||
|
||||
#ifdef CONFIG_SYS_POWER_DEEP_SLEEP
|
||||
#if defined(CONFIG_SYS_POWER_DEEP_SLEEP) && \
|
||||
!defined(CONFIG_BOOTLOADER_CONTEXT_RESTORE)
|
||||
/*
|
||||
* Invoke _sys_soc_resume_from_deep_sleep() hook to handle resume from
|
||||
* deep sleep. It should first check whether system is recovering from
|
||||
|
|
|
@ -23,6 +23,7 @@ config SOC_SERIES_QUARK_SE
|
|||
select XIP
|
||||
select SYS_POWER_LOW_POWER_STATE_SUPPORTED
|
||||
select SYS_POWER_DEEP_SLEEP_SUPPORTED
|
||||
select BOOTLOADER_CONTEXT_RESTORE_SUPPORTED
|
||||
select HAS_QMSI
|
||||
help
|
||||
Enable support for Quark SE
|
||||
|
|
10
misc/Kconfig
10
misc/Kconfig
|
@ -397,6 +397,16 @@ config BOOTLOADER_UNKNOWN
|
|||
at build time which method is to be used. When this option is enabled
|
||||
the board may have to do extra work to ensure a proper startup.
|
||||
|
||||
config BOOTLOADER_CONTEXT_RESTORE
|
||||
bool
|
||||
prompt "Boot loader has context restore support"
|
||||
default y
|
||||
depends on SYS_POWER_DEEP_SLEEP && BOOTLOADER_CONTEXT_RESTORE_SUPPORTED
|
||||
help
|
||||
This option signifies that the target has a bootloader
|
||||
that restores CPU context upon resuming from deep sleep
|
||||
power state.
|
||||
|
||||
config REBOOT
|
||||
bool "Reboot functionality"
|
||||
default n
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue