allwinner: call PMIC setup code

As the ATF may need to do some power initialization on Allwinner
platform with AXP PMICs, call the PMIC setup code in BL31.

Stub of PMIC setup code is added, to prevent undefined reference.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
This commit is contained in:
Icenowy Zheng 2018-07-21 20:41:12 +08:00
parent 7e4d562077
commit 7c26b6ecea
6 changed files with 38 additions and 0 deletions

View File

@ -93,6 +93,8 @@ void bl31_platform_setup(void)
sunxi_security_setup();
sunxi_pmic_setup();
INFO("BL31: Platform setup done\n");
}

View File

@ -13,6 +13,8 @@ void sunxi_cpu_on(unsigned int cluster, unsigned int core);
void sunxi_disable_secondary_cpus(unsigned int primary_cpu);
uint16_t sunxi_read_soc_id(void);
void sunxi_pmic_setup(void);
void sunxi_security_setup(void);
#endif /* __SUNXI_PRIVATE_H__ */

View File

@ -30,6 +30,7 @@ BL31_SOURCES += drivers/arm/gic/common/gic_common.c \
${AW_PLAT}/common/sunxi_bl31_setup.c \
${AW_PLAT}/common/sunxi_cpu_ops.c \
${AW_PLAT}/common/sunxi_pm.c \
${AW_PLAT}/sun50i_a64/sunxi_power.c \
${AW_PLAT}/common/sunxi_security.c \
${AW_PLAT}/common/sunxi_topology.c

View File

@ -0,0 +1,16 @@
/*
* Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2018, Icenowy Zheng <icenowy@aosc.io>
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <debug.h>
int sunxi_pmic_setup(void)
{
/* STUB */
NOTICE("BL31: STUB PMIC setup code called\n");
return 0;
}

View File

@ -30,6 +30,7 @@ BL31_SOURCES += drivers/arm/gic/common/gic_common.c \
${AW_PLAT}/common/sunxi_bl31_setup.c \
${AW_PLAT}/common/sunxi_cpu_ops.c \
${AW_PLAT}/common/sunxi_pm.c \
${AW_PLAT}/sun50i_h6/sunxi_power.c \
${AW_PLAT}/common/sunxi_security.c \
${AW_PLAT}/common/sunxi_topology.c

View File

@ -0,0 +1,16 @@
/*
* Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2018, Icenowy Zheng <icenowy@aosc.io>
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <debug.h>
int sunxi_pmic_setup(void)
{
/* STUB */
NOTICE("BL31: STUB PMIC setup code called\n");
return 0;
}