Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
psci.h
Go to the documentation of this file.
1/*
2 * Copyright 2020 Carlo Caione <ccaione@baylibre.com>
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
12
13#ifndef ZEPHYR_INCLUDE_DRIVERS_PM_CPU_OPS_PSCI_H_
14#define ZEPHYR_INCLUDE_DRIVERS_PM_CPU_OPS_PSCI_H_
15
16#include <zephyr/types.h>
17#include <zephyr/arch/arm64/arm-smccc.h>
18#include <stddef.h>
19#include <zephyr/device.h>
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25/* PSCI version decoding (independent of PSCI version) */
26
28#define PSCI_VERSION_MAJOR_SHIFT 16
29#define PSCI_VERSION_MINOR_MASK \
30 ((1U << PSCI_VERSION_MAJOR_SHIFT) - 1)
31#define PSCI_VERSION_MAJOR_MASK ~PSCI_VERSION_MINOR_MASK
33
39#define PSCI_VERSION_MAJOR(ver) \
40 (((ver) & PSCI_VERSION_MAJOR_MASK) >> PSCI_VERSION_MAJOR_SHIFT)
41
46#define PSCI_VERSION_MINOR(ver) \
47 ((ver) & PSCI_VERSION_MINOR_MASK)
48
59
70
72
73#ifdef __cplusplus
74}
75#endif
76
77#endif /* ZEPHYR_INCLUDE_DRIVERS_PM_CPU_OPS_PSCI_H_ */
state
Definition parser_state.h:29
uint32_t psci_version(void)
Get the PSCI firmware version.
int psci_cpu_suspend(uint32_t state, uintptr_t entry_point)
Function to call PSCI CPU_SUSPEND.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINTPTR_TYPE__ uintptr_t
Definition stdint.h:105