Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
atf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MediaTek
atf
Commits
964df136
Commit
964df136
authored
4 years ago
by
André Przywara
Committed by
TrustedFirmware Code Review
4 years ago
Browse files
Options
Downloads
Plain Diff
Merge "allwinner: Allow conditional compilation of SCPI and native PSCI ops" into integration
parents
3243cbf0
b23ab8eb
Branches
master
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
plat/allwinner/common/allwinner-common.mk
+30
-6
30 additions, 6 deletions
plat/allwinner/common/allwinner-common.mk
plat/allwinner/common/include/sunxi_private.h
+13
-0
13 additions, 0 deletions
plat/allwinner/common/include/sunxi_private.h
with
43 additions
and
6 deletions
plat/allwinner/common/allwinner-common.mk
+
30
−
6
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
# SPDX-License-Identifier: BSD-3-Clause
#
#
...
@@ -20,8 +20,6 @@ PLAT_BL_COMMON_SOURCES := drivers/ti/uart/${ARCH}/16550_console.S \
...
@@ -20,8 +20,6 @@ PLAT_BL_COMMON_SOURCES := drivers/ti/uart/${ARCH}/16550_console.S \
${
AW_PLAT
}
/common/sunxi_common.c
${
AW_PLAT
}
/common/sunxi_common.c
BL31_SOURCES
+=
drivers/allwinner/axp/common.c
\
BL31_SOURCES
+=
drivers/allwinner/axp/common.c
\
drivers/allwinner/sunxi_msgbox.c
\
drivers/arm/css/scpi/css_scpi.c
\
${
GICV2_SOURCES
}
\
${
GICV2_SOURCES
}
\
drivers/delay_timer/delay_timer.c
\
drivers/delay_timer/delay_timer.c
\
drivers/delay_timer/generic_delay_timer.c
\
drivers/delay_timer/generic_delay_timer.c
\
...
@@ -29,14 +27,40 @@ BL31_SOURCES += drivers/allwinner/axp/common.c \
...
@@ -29,14 +27,40 @@ BL31_SOURCES += drivers/allwinner/axp/common.c \
plat/common/plat_gicv2.c
\
plat/common/plat_gicv2.c
\
plat/common/plat_psci_common.c
\
plat/common/plat_psci_common.c
\
${
AW_PLAT
}
/common/sunxi_bl31_setup.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_pm.c
\
${
AW_PLAT
}
/common/sunxi_scpi_pm.c
\
${
AW_PLAT
}
/
${
PLAT
}
/sunxi_power.c
\
${
AW_PLAT
}
/
${
PLAT
}
/sunxi_power.c
\
${
AW_PLAT
}
/common/sunxi_security.c
\
${
AW_PLAT
}
/common/sunxi_security.c
\
${
AW_PLAT
}
/common/sunxi_topology.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.
# The bootloader is guaranteed to only run on CPU 0 by the boot ROM.
COLD_BOOT_SINGLE_CPU
:=
1
COLD_BOOT_SINGLE_CPU
:=
1
...
...
This diff is collapsed.
Click to expand it.
plat/allwinner/common/include/sunxi_private.h
+
13
−
0
View file @
964df136
...
@@ -16,8 +16,21 @@ void sunxi_cpu_power_off_others(void);
...
@@ -16,8 +16,21 @@ void sunxi_cpu_power_off_others(void);
void
sunxi_cpu_power_off_self
(
void
);
void
sunxi_cpu_power_off_self
(
void
);
void
sunxi_power_down
(
void
);
void
sunxi_power_down
(
void
);
#if SUNXI_PSCI_USE_NATIVE
void
sunxi_set_native_psci_ops
(
const
plat_psci_ops_t
**
psci_ops
);
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
);
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_validate_ns_entrypoint
(
uintptr_t
ns_entrypoint
);
int
sunxi_pmic_setup
(
uint16_t
socid
,
const
void
*
fdt
);
int
sunxi_pmic_setup
(
uint16_t
socid
,
const
void
*
fdt
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment