sunxi_private.h 1.28 KB
Newer Older
1
/*
2
 * Copyright (c) 2017-2021, ARM Limited and Contributors. All rights reserved.
3
4
5
6
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

7
8
#ifndef SUNXI_PRIVATE_H
#define SUNXI_PRIVATE_H
9

10
11
#include <lib/psci/psci.h>

12
void sunxi_configure_mmu_el3(int flags);
13

14
void sunxi_cpu_on(u_register_t mpidr);
15
16
void sunxi_cpu_power_off_others(void);
void sunxi_cpu_power_off_self(void);
17
void sunxi_power_down(void);
18

19
#if SUNXI_PSCI_USE_NATIVE
20
void sunxi_set_native_psci_ops(const plat_psci_ops_t **psci_ops);
21
22
23
24
25
26
#else
static inline void sunxi_set_native_psci_ops(const plat_psci_ops_t **psci_ops)
{
}
#endif
#if SUNXI_PSCI_USE_SCPI
27
int sunxi_set_scpi_psci_ops(const plat_psci_ops_t **psci_ops);
28
29
30
31
32
33
#else
static inline int sunxi_set_scpi_psci_ops(const plat_psci_ops_t **psci_ops)
{
	return -1;
}
#endif
34
35
int sunxi_validate_ns_entrypoint(uintptr_t ns_entrypoint);

36
int sunxi_pmic_setup(uint16_t socid, const void *fdt);
Andre Przywara's avatar
Andre Przywara committed
37
38
void sunxi_security_setup(void);

39
uint16_t sunxi_read_soc_id(void);
40
void sunxi_set_gpio_out(char port, int pin, bool level_high);
41
int sunxi_init_platform_r_twi(uint16_t socid, bool use_rsb);
42
void sunxi_execute_arisc_code(uint32_t *code, size_t size, uint16_t param);
43

44
45
46
47
48
49
50
51
#ifdef SUNXI_BL31_IN_DRAM
void sunxi_prepare_dtb(void *fdt);
#else
static inline void sunxi_prepare_dtb(void *fdt)
{
}
#endif

52
#endif /* SUNXI_PRIVATE_H */