Skip to content

Commit 7da3d33

Browse files
committed
soc: intel: Added support for sys_poweroff on adl and atom
Added support for sys_poweroff on ADL and ATOM socs based on acpi_poweroff. Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
1 parent df7f9a4 commit 7da3d33

File tree

5 files changed

+21
-0
lines changed

5 files changed

+21
-0
lines changed

soc/intel/alder_lake/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ zephyr_cc_option(-march=goldmont)
1010
zephyr_library_sources(cpu.c)
1111
zephyr_library_sources(../common/soc_gpio.c)
1212

13+
zephyr_library_sources_ifdef(CONFIG_POWEROFF ../common/power.c)
14+
1315
set(SOC_LINKER_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/linker.ld CACHE INTERNAL "")

soc/intel/alder_lake/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ config SOC_ALDER_LAKE
99
select PCIE_MSI
1010
select DYNAMIC_INTERRUPTS
1111
select X86_MMU
12+
select HAS_POWEROFF if ACPI_POWEROFF

soc/intel/atom/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33

44
zephyr_include_directories(.)
55

6+
zephyr_library_sources_ifdef(CONFIG_POWEROFF ../common/power.c)
67
set(SOC_LINKER_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/linker.ld CACHE INTERNAL "")

soc/intel/atom/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
config SOC_ATOM
55
select X86
66
select CPU_ATOM
7+
select HAS_POWEROFF if ACPI_POWEROFF
78
imply X86_MMU
89
select ARCH_HAS_RESERVED_PAGE_FRAMES

soc/intel/common/power.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*
2+
* Copyright (c) 2025 Intel Corporation.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <zephyr/sys/poweroff.h>
8+
#include <zephyr/acpi/acpi.h>
9+
10+
void z_sys_poweroff(void)
11+
{
12+
#if defined(CONFIG_ACPI_POWEROFF)
13+
acpi_poweroff();
14+
#endif
15+
CODE_UNREACHABLE;
16+
}

0 commit comments

Comments
 (0)