| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
#ifndef SUNXI_PRIVATE_H |
| 8 |
#define SUNXI_PRIVATE_H |
| 9 |
|
| 10 |
#include <common/fdt_fixup.h> |
| 11 |
|
| 12 |
#include <lib/psci/psci.h> |
| 13 |
|
| 14 |
extern const struct psci_cpu_idle_state sunxi_idle_states[]; |
| 15 |
|
| 16 |
void sunxi_configure_mmu_el3(int flags); |
| 17 |
|
| 18 |
void sunxi_cpu_on(u_register_t mpidr); |
| 19 |
void sunxi_cpu_power_off_others(void); |
| 20 |
void sunxi_cpu_power_off_self(void); |
| 21 |
void sunxi_power_down(void); |
| 22 |
|
| 23 |
#if SUNXI_PSCI_USE_NATIVE |
| 24 |
void sunxi_set_native_psci_ops(const plat_psci_ops_t **psci_ops); |
| 25 |
#else |
| 26 |
static inline void sunxi_set_native_psci_ops(const plat_psci_ops_t **psci_ops) |
| 27 |
{ |
| 28 |
} |
| 29 |
#endif |
| 30 |
#if SUNXI_PSCI_USE_SCPI |
| 31 |
bool sunxi_psci_is_scpi(void); |
| 32 |
int sunxi_set_scpi_psci_ops(const plat_psci_ops_t **psci_ops); |
| 33 |
#else |
| 34 |
static inline bool sunxi_psci_is_scpi(void) |
| 35 |
{ |
| 36 |
return false; |
| 37 |
} |
| 38 |
static inline int sunxi_set_scpi_psci_ops(const plat_psci_ops_t **psci_ops) |
| 39 |
{ |
| 40 |
return -1; |
| 41 |
} |
| 42 |
#endif |
| 43 |
int sunxi_validate_ns_entrypoint(uintptr_t ns_entrypoint); |
| 44 |
|
| 45 |
int sunxi_pmic_setup(uint16_t socid, const void *fdt); |
| 46 |
void sunxi_security_setup(void); |
| 47 |
|
| 48 |
uint16_t sunxi_read_soc_id(void); |
| 49 |
void sunxi_set_gpio_out(char port, int pin, bool level_high); |
| 50 |
int sunxi_init_platform_r_twi(uint16_t socid, bool use_rsb); |
| 51 |
void sunxi_execute_arisc_code(uint32_t *code, size_t size, uint16_t param); |
| 52 |
|
| 53 |
#if SUNXI_AMEND_DTB |
| 54 |
void sunxi_prepare_dtb(void *fdt); |
| 55 |
#else |
| 56 |
static inline void sunxi_prepare_dtb(void *fdt) |
| 57 |
{ |
| 58 |
} |
| 59 |
#endif |
| 60 |
|
| 61 |
#ifdef PLAT_sun50i_h616 |
| 62 |
void sunxi_soc_fdt_fixup(void *dtb); |
| 63 |
#else |
| 64 |
static inline void sunxi_soc_fdt_fixup(void *dtb) |
| 65 |
{ |
| 66 |
} |
| 67 |
#endif |
| 68 |
|
| 69 |
#endif |