Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
964df136
Commit
964df136
authored
Feb 24, 2021
by
André Przywara
Committed by
TrustedFirmware Code Review
Feb 24, 2021
Browse files
Merge "allwinner: Allow conditional compilation of SCPI and native PSCI ops" into integration
parents
3243cbf0
b23ab8eb
Changes
2
Hide whitespace changes
Inline
Side-by-side
plat/allwinner/common/allwinner-common.mk
View file @
964df136
#
# Copyright (c) 2017-201
9
, ARM Limited and Contributors. All rights reserved.
# Copyright (c) 2017-20
2
1, ARM Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
...
...
@@ -20,8 +20,6 @@ PLAT_BL_COMMON_SOURCES := drivers/ti/uart/${ARCH}/16550_console.S \
${AW_PLAT}
/common/sunxi_common.c
BL31_SOURCES
+=
drivers/allwinner/axp/common.c
\
drivers/allwinner/sunxi_msgbox.c
\
drivers/arm/css/scpi/css_scpi.c
\
${GICV2_SOURCES}
\
drivers/delay_timer/delay_timer.c
\
drivers/delay_timer/generic_delay_timer.c
\
...
...
@@ -29,14 +27,40 @@ BL31_SOURCES += drivers/allwinner/axp/common.c \
plat/common/plat_gicv2.c
\
plat/common/plat_psci_common.c
\
${AW_PLAT}
/common/sunxi_bl31_setup.c
\
${AW_PLAT}
/common/sunxi_cpu_ops.c
\
${AW_PLAT}
/common/sunxi_native_pm.c
\
${AW_PLAT}
/common/sunxi_pm.c
\
${AW_PLAT}
/common/sunxi_scpi_pm.c
\
${AW_PLAT}
/
${PLAT}
/sunxi_power.c
\
${AW_PLAT}
/common/sunxi_security.c
\
${AW_PLAT}
/common/sunxi_topology.c
# By default, attempt to use SCPI to the ARISC management processor. If SCPI
# is not enabled or SCP firmware is not loaded, fall back to a simpler native
# implementation that does not support CPU or system suspend.
#
# If SCP firmware will always be present (or absent), the unused implementation
# can be compiled out.
SUNXI_PSCI_USE_NATIVE
?=
1
SUNXI_PSCI_USE_SCPI
?=
1
$(eval
$(call
assert_boolean,SUNXI_PSCI_USE_NATIVE))
$(eval
$(call
assert_boolean,SUNXI_PSCI_USE_SCPI))
$(eval
$(call
add_define,SUNXI_PSCI_USE_NATIVE))
$(eval
$(call
add_define,SUNXI_PSCI_USE_SCPI))
ifeq
(${SUNXI_PSCI_USE_NATIVE}${SUNXI_PSCI_USE_SCPI},00)
$(error
"At least one of SCPI or native PSCI ops must be enabled"
)
endif
ifeq
(${SUNXI_PSCI_USE_NATIVE},1)
BL31_SOURCES
+=
${AW_PLAT}
/common/sunxi_cpu_ops.c
\
${AW_PLAT}
/common/sunxi_native_pm.c
endif
ifeq
(${SUNXI_PSCI_USE_SCPI},1)
BL31_SOURCES
+=
drivers/allwinner/sunxi_msgbox.c
\
drivers/arm/css/scpi/css_scpi.c
\
${AW_PLAT}
/common/sunxi_scpi_pm.c
endif
# The bootloader is guaranteed to only run on CPU 0 by the boot ROM.
COLD_BOOT_SINGLE_CPU
:=
1
...
...
plat/allwinner/common/include/sunxi_private.h
View file @
964df136
...
...
@@ -16,8 +16,21 @@ void sunxi_cpu_power_off_others(void);
void
sunxi_cpu_power_off_self
(
void
);
void
sunxi_power_down
(
void
);
#if SUNXI_PSCI_USE_NATIVE
void
sunxi_set_native_psci_ops
(
const
plat_psci_ops_t
**
psci_ops
);
#else
static
inline
void
sunxi_set_native_psci_ops
(
const
plat_psci_ops_t
**
psci_ops
)
{
}
#endif
#if SUNXI_PSCI_USE_SCPI
int
sunxi_set_scpi_psci_ops
(
const
plat_psci_ops_t
**
psci_ops
);
#else
static
inline
int
sunxi_set_scpi_psci_ops
(
const
plat_psci_ops_t
**
psci_ops
)
{
return
-
1
;
}
#endif
int
sunxi_validate_ns_entrypoint
(
uintptr_t
ns_entrypoint
);
int
sunxi_pmic_setup
(
uint16_t
socid
,
const
void
*
fdt
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment