pm: introduce HAS_PM
Add a new Kconfig option that has to be selected by SoCs providing PM hooks. This option will be now required to enable CONFIG_PM. Before this change, CONFIG_PM could always be enabled, regardless of SoC providing any kind of low-power support. Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
This commit is contained in:
parent
26bf349ab1
commit
3d2194f11e
|
@ -9,5 +9,6 @@ config SOC_SERIES_MEC1501X
|
|||
select CPU_CORTEX_M4
|
||||
select CPU_CORTEX_M_HAS_DWT
|
||||
select SOC_FAMILY_MEC
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for Microchip MEC Cortex-M4 MCU series
|
||||
|
|
|
@ -12,5 +12,6 @@ config SOC_SERIES_MEC172X
|
|||
select CPU_HAS_ARM_MPU
|
||||
select SOC_FAMILY_MEC
|
||||
select HAS_SWO
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for Microchip MEC Cortex-M4F MCU series
|
||||
|
|
|
@ -29,7 +29,7 @@ config ARCH_HAS_CUSTOM_BUSY_WAIT
|
|||
default y if !QEMU_TARGET
|
||||
|
||||
config PM
|
||||
default y if SYS_CLOCK_EXISTS && MULTITHREADING
|
||||
default y if SYS_CLOCK_EXISTS && MULTITHREADING && HAS_PM
|
||||
|
||||
config BUILD_OUTPUT_HEX
|
||||
default y
|
||||
|
|
|
@ -12,5 +12,6 @@ config SOC_SERIES_NRF51X
|
|||
select XIP
|
||||
select HAS_NRFX
|
||||
select HAS_SEGGER_RTT if ZEPHYR_SEGGER_MODULE
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for NRF51 MCU series
|
||||
|
|
|
@ -15,5 +15,6 @@ config SOC_SERIES_NRF52X
|
|||
select HAS_NORDIC_DRIVERS
|
||||
select HAS_SEGGER_RTT if ZEPHYR_SEGGER_MODULE
|
||||
select HAS_SWO
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for NRF52 MCU series
|
||||
|
|
|
@ -9,6 +9,7 @@ config SOC_NRF5340_CPUAPP
|
|||
select CPU_HAS_NRF_IDAU
|
||||
select CPU_HAS_FPU
|
||||
select ARMV8_M_DSP
|
||||
select HAS_PM
|
||||
|
||||
config SOC_NRF5340_CPUNET
|
||||
bool
|
||||
|
|
|
@ -16,5 +16,6 @@ config SOC_SERIES_NRF91X
|
|||
select XIP
|
||||
select HAS_NRFX
|
||||
select HAS_SEGGER_RTT if ZEPHYR_SEGGER_MODULE
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for NRF91 MCU series
|
||||
|
|
|
@ -12,5 +12,6 @@ config SOC_SERIES_NPCX7
|
|||
select CPU_HAS_ARM_MPU
|
||||
select SOC_FAMILY_NPCX
|
||||
select CPU_HAS_CUSTOM_FIXED_SOC_MPU_REGIONS
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for Nuvoton NPCX7 series
|
||||
|
|
|
@ -11,5 +11,6 @@ config SOC_SERIES_NPCX9
|
|||
select CPU_HAS_FPU
|
||||
select CPU_HAS_ARM_MPU
|
||||
select SOC_FAMILY_NPCX
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for Nuvoton NPCX9 series
|
||||
|
|
|
@ -8,5 +8,6 @@ config SOC_SERIES_IMX_RT
|
|||
select ARM
|
||||
select SOC_FAMILY_IMX
|
||||
select CLOCK_CONTROL
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for i.MX RT MCU series
|
||||
|
|
|
@ -10,5 +10,6 @@ config SOC_SERIES_IMX_RT5XX
|
|||
select CPU_CORTEX_M_HAS_DWT
|
||||
select SOC_FAMILY_IMX
|
||||
select CLOCK_CONTROL
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for i.MX RT5XX Series MCU series
|
||||
|
|
|
@ -12,5 +12,6 @@ config SOC_SERIES_IMX_RT6XX
|
|||
select CLOCK_CONTROL
|
||||
select CODE_DATA_RELOCATION_SRAM if FLASH_MCUX_FLEXSPI_XIP
|
||||
select PLATFORM_SPECIFIC_INIT
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for i.MX RT6XX Series MCU series
|
||||
|
|
|
@ -32,5 +32,6 @@ config SOC_SERIES_KINETIS_KE1XF
|
|||
select HAS_MCUX_PWT
|
||||
select HAS_MCUX_RCM
|
||||
select PLATFORM_SPECIFIC_INIT
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for Kinetis KE1xF MCU series
|
||||
|
|
|
@ -12,5 +12,6 @@ config SOC_SERIES_EFM32HG
|
|||
select HAS_SILABS_GECKO
|
||||
select SOC_GECKO_CMU
|
||||
select SOC_GECKO_GPIO
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for EFM32 Happy Gecko MCU series
|
||||
|
|
|
@ -17,5 +17,6 @@ config SOC_SERIES_EFM32JG12B
|
|||
select SOC_GECKO_EMU
|
||||
select SOC_GECKO_GPIO
|
||||
select SOC_GECKO_TRNG
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for EFM32 JadeGecko MCU series
|
||||
|
|
|
@ -20,5 +20,6 @@ config SOC_SERIES_EFM32PG12B
|
|||
select SOC_GECKO_GPIO
|
||||
select SOC_GECKO_TRNG
|
||||
select SOC_GECKO_ADC
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for EFM32 PearlGecko MCU series
|
||||
|
|
|
@ -18,5 +18,6 @@ config SOC_SERIES_EFM32PG1B
|
|||
select SOC_GECKO_CMU
|
||||
select SOC_GECKO_EMU
|
||||
select SOC_GECKO_GPIO
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for EFM32 PearlGecko MCU series
|
||||
|
|
|
@ -14,5 +14,6 @@ config SOC_SERIES_EFM32WG
|
|||
select HAS_SILABS_GECKO
|
||||
select SOC_GECKO_CMU
|
||||
select SOC_GECKO_GPIO
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for EFM32 WonderGecko MCU series
|
||||
|
|
|
@ -17,5 +17,6 @@ config SOC_SERIES_EFR32BG13P
|
|||
select SOC_GECKO_CMU
|
||||
select SOC_GECKO_EMU
|
||||
select SOC_GECKO_GPIO
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for EFR32BG13P Blue Gecko MCU series
|
||||
|
|
|
@ -20,5 +20,6 @@ config SOC_SERIES_EFR32BG22
|
|||
select SOC_GECKO_CORE
|
||||
select SOC_GECKO_DEV_INIT
|
||||
select SOC_GECKO_SE
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for EFR32BG22 Blue Gecko MCU series
|
||||
|
|
|
@ -20,5 +20,6 @@ config SOC_SERIES_EFR32BG27
|
|||
select SOC_GECKO_CORE
|
||||
select SOC_GECKO_DEV_INIT
|
||||
select SOC_GECKO_SE
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for EFR32BG27 Blue Gecko MCU series
|
||||
|
|
|
@ -18,5 +18,6 @@ config SOC_SERIES_EFR32FG13P
|
|||
select SOC_GECKO_CMU
|
||||
select SOC_GECKO_GPIO
|
||||
select SOC_GECKO_HAS_ERRATA_RTCC_E201
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for EFR32 FlexGecko MCU series
|
||||
|
|
|
@ -18,5 +18,6 @@ config SOC_SERIES_EFR32FG1P
|
|||
select SOC_GECKO_CMU
|
||||
select SOC_GECKO_GPIO
|
||||
select SOC_GECKO_HAS_ERRATA_RTCC_E201
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for EFR32 FlexGecko MCU series
|
||||
|
|
|
@ -19,5 +19,6 @@ config SOC_SERIES_EFR32MG12P
|
|||
select SOC_GECKO_EMU
|
||||
select SOC_GECKO_GPIO
|
||||
select SOC_GECKO_TRNG
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for EFR32 Mighty Gecko MCU series
|
||||
|
|
|
@ -19,5 +19,6 @@ config SOC_SERIES_EFR32MG21
|
|||
select SOC_GECKO_EMU
|
||||
select SOC_GECKO_GPIO
|
||||
select SOC_GECKO_SE
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for EFR32MG21 Mighty Gecko MCU series
|
||||
|
|
|
@ -22,5 +22,6 @@ config SOC_SERIES_EFR32MG24
|
|||
select SOC_GECKO_GPIO
|
||||
select SOC_GECKO_DEV_INIT
|
||||
select SOC_GECKO_SE
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for EFR32MG24 Mighty Gecko MCU series
|
||||
|
|
|
@ -13,5 +13,6 @@ config SOC_SERIES_STM32G0X
|
|||
select SOC_FAMILY_STM32
|
||||
select HAS_STM32CUBE
|
||||
select CPU_CORTEX_M_HAS_SYSTICK
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for STM32G0 MCU series
|
||||
|
|
|
@ -13,5 +13,6 @@ config SOC_SERIES_STM32G4X
|
|||
select HAS_STM32CUBE
|
||||
select CPU_HAS_ARM_MPU
|
||||
select CLOCK_CONTROL_STM32_CUBE if CLOCK_CONTROL
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for STM32G4 MCU series
|
||||
|
|
|
@ -11,5 +11,6 @@ config SOC_SERIES_STM32L0X
|
|||
select SOC_FAMILY_STM32
|
||||
select HAS_STM32CUBE
|
||||
select CPU_CORTEX_M_HAS_SYSTICK
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for STM32L0 MCU series
|
||||
|
|
|
@ -14,5 +14,6 @@ config SOC_SERIES_STM32L4X
|
|||
select HAS_STM32CUBE
|
||||
select CPU_HAS_ARM_MPU
|
||||
select HAS_SWO
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for STM32L4 MCU series
|
||||
|
|
|
@ -15,5 +15,6 @@ config SOC_SERIES_STM32L5X
|
|||
select ARMV8_M_DSP
|
||||
select CPU_CORTEX_M_HAS_DWT
|
||||
select HAS_STM32CUBE
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for STM32L5 MCU series
|
||||
|
|
|
@ -15,5 +15,6 @@ config SOC_SERIES_STM32U5X
|
|||
select ARMV8_M_DSP
|
||||
select CPU_CORTEX_M_HAS_DWT
|
||||
select HAS_STM32CUBE
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for STM32U5 MCU series
|
||||
|
|
|
@ -13,5 +13,6 @@ config SOC_SERIES_STM32WBX
|
|||
select HAS_STM32CUBE
|
||||
select CPU_HAS_ARM_MPU
|
||||
select HAS_SWO
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for STM32WB MCU series
|
||||
|
|
|
@ -15,5 +15,6 @@ config SOC_SERIES_STM32WBAX
|
|||
select ARMV8_M_DSP
|
||||
select CPU_CORTEX_M_HAS_DWT
|
||||
select HAS_STM32CUBE
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for STM32WBA MCU series
|
||||
|
|
|
@ -12,5 +12,6 @@ config SOC_SERIES_STM32WLX
|
|||
select HAS_STM32CUBE
|
||||
select CPU_HAS_ARM_MPU
|
||||
select CLOCK_CONTROL_STM32_CUBE if CLOCK_CONTROL
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for STM32WL MCU series
|
||||
|
|
|
@ -15,5 +15,6 @@ config SOC_SERIES_CC13X2_CC26X2
|
|||
select HAS_CC13X2_CC26X2_SDK
|
||||
select HAS_TI_CCFG
|
||||
select HAS_SEGGER_RTT if ZEPHYR_SEGGER_MODULE
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for TI SimpleLink CC13x2 / CC26x2 SoCs
|
||||
|
|
|
@ -15,5 +15,6 @@ config SOC_SERIES_CC13X2X7_CC26X2X7
|
|||
select HAS_CC13X2X7_CC26X2X7_SDK
|
||||
select HAS_TI_CCFG if !BOOTLOADER_MCUBOOT
|
||||
select HAS_SEGGER_RTT if ZEPHYR_SEGGER_MODULE
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for TI SimpleLink CC13x2x7 / CC26x2x7 SoCs
|
||||
|
|
|
@ -14,6 +14,7 @@ config SOC_ESP32C3
|
|||
select RISCV_ISA_EXT_M
|
||||
select RISCV_ISA_EXT_C
|
||||
select RISCV_ISA_EXT_ZICSR
|
||||
select HAS_PM
|
||||
|
||||
if SOC_ESP32C3
|
||||
|
||||
|
|
|
@ -8,5 +8,6 @@ config SOC_SERIES_RISCV32_IT8XXX2
|
|||
# default in most toolchains, causing link-time errors.
|
||||
select CPU_HAS_FPU if "$(ZEPHYR_TOOLCHAIN_VARIANT)" != "zephyr" || RISCV_ISA_EXT_M
|
||||
select SOC_FAMILY_RISCV_ITE
|
||||
select HAS_PM
|
||||
help
|
||||
Enable support for ITE IT8XXX2
|
||||
|
|
|
@ -12,6 +12,7 @@ config SOC_ESP32
|
|||
select XIP if !MCUBOOT
|
||||
select HAS_ESPRESSIF_HAL
|
||||
select CPU_HAS_FPU
|
||||
select HAS_PM
|
||||
|
||||
if SOC_ESP32
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ config SOC_ESP32S2
|
|||
select XIP if !MCUBOOT
|
||||
select HAS_ESPRESSIF_HAL
|
||||
select ARCH_SUPPORTS_COREDUMP
|
||||
select HAS_PM
|
||||
|
||||
if SOC_ESP32S2
|
||||
|
||||
|
|
|
@ -11,5 +11,6 @@ config SOC_SERIES_INTEL_ACE
|
|||
select SCHED_IPI_SUPPORTED
|
||||
select DW_ICTL_ACE
|
||||
select SOC_HAS_RUNTIME_NUM_CPUS
|
||||
select HAS_PM
|
||||
help
|
||||
Intel ADSP ACE
|
||||
|
|
|
@ -10,5 +10,6 @@ config SOC_SERIES_INTEL_ADSP_CAVS
|
|||
select XTENSA_USE_CORE_CRT1
|
||||
select ATOMIC_OPERATIONS_BUILTIN if "$(ZEPHYR_TOOLCHAIN_VARIANT)" != "xcc"
|
||||
select ARCH_HAS_COHERENCE
|
||||
select HAS_PM
|
||||
help
|
||||
Intel ADSP CAVS
|
||||
|
|
|
@ -4,9 +4,15 @@
|
|||
|
||||
menu "Power Management"
|
||||
|
||||
menuconfig PM
|
||||
config HAS_PM
|
||||
bool
|
||||
help
|
||||
This option must be selected by SoCs that provide PM hooks, that is,
|
||||
calls to configure low-power states.
|
||||
|
||||
config PM
|
||||
bool "System Power Management"
|
||||
depends on SYS_CLOCK_EXISTS
|
||||
depends on SYS_CLOCK_EXISTS && HAS_PM
|
||||
help
|
||||
This option enables the board to implement extra power management
|
||||
policies whenever the kernel becomes idle. The kernel informs the
|
||||
|
|
Loading…
Reference in a new issue