Commit 377926ca authored by Anisetti Avinash Krishna's avatar Anisetti Avinash Krishna Committed by Chris Friedt
Browse files

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: default avatarAnisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
parent 5bdd670e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -10,4 +10,6 @@ zephyr_cc_option(-march=goldmont)
zephyr_library_sources(cpu.c)
zephyr_library_sources(../common/soc_gpio.c)

zephyr_library_sources_ifdef(CONFIG_POWEROFF ../common/power.c)

set(SOC_LINKER_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/linker.ld CACHE INTERNAL "")
+1 −0
Original line number Diff line number Diff line
@@ -9,3 +9,4 @@ config SOC_ALDER_LAKE
	select PCIE_MSI
	select DYNAMIC_INTERRUPTS
	select X86_MMU
	select HAS_POWEROFF if ACPI_POWEROFF
+1 −0
Original line number Diff line number Diff line
@@ -3,4 +3,5 @@

zephyr_include_directories(.)

zephyr_library_sources_ifdef(CONFIG_POWEROFF ../common/power.c)
set(SOC_LINKER_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/linker.ld CACHE INTERNAL "")
+1 −0
Original line number Diff line number Diff line
@@ -4,5 +4,6 @@
config SOC_ATOM
	select X86
	select CPU_ATOM
	select HAS_POWEROFF if ACPI_POWEROFF
	imply X86_MMU
	select ARCH_HAS_RESERVED_PAGE_FRAMES
+16 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2025 Intel Corporation.
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#include <zephyr/sys/poweroff.h>
#include <zephyr/acpi/acpi.h>

void z_sys_poweroff(void)
{
#if defined(CONFIG_ACPI_POWEROFF)
	acpi_poweroff();
#endif
	CODE_UNREACHABLE;
}