Carlo Caione | 4948832 | 2019-08-24 17:28:23 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
Carlo Caione | 56e9863 | 2019-08-28 10:14:46 +0100 | [diff] [blame] | 7 | #ifndef AML_PRIVATE_H |
| 8 | #define AML_PRIVATE_H |
Carlo Caione | 4948832 | 2019-08-24 17:28:23 +0100 | [diff] [blame] | 9 | |
| 10 | #include <stddef.h> |
| 11 | #include <stdint.h> |
| 12 | |
| 13 | /* Utility functions */ |
Carlo Caione | 1afdfb0 | 2019-08-24 18:47:06 +0100 | [diff] [blame] | 14 | unsigned int plat_calc_core_pos(u_register_t mpidr); |
Carlo Caione | bf2d626 | 2019-08-25 18:09:03 +0100 | [diff] [blame] | 15 | void aml_console_init(void); |
| 16 | void aml_setup_page_tables(void); |
Carlo Caione | 4948832 | 2019-08-24 17:28:23 +0100 | [diff] [blame] | 17 | |
| 18 | /* MHU functions */ |
Carlo Caione | 9c85f25 | 2019-08-28 09:46:18 +0100 | [diff] [blame] | 19 | void aml_mhu_secure_message_start(void); |
| 20 | void aml_mhu_secure_message_send(uint32_t msg); |
| 21 | uint32_t aml_mhu_secure_message_wait(void); |
| 22 | void aml_mhu_secure_message_end(void); |
| 23 | void aml_mhu_secure_init(void); |
Carlo Caione | 4948832 | 2019-08-24 17:28:23 +0100 | [diff] [blame] | 24 | |
| 25 | /* SCPI functions */ |
Carlo Caione | 7bb8302 | 2019-08-28 10:08:24 +0100 | [diff] [blame] | 26 | void aml_scpi_set_css_power_state(u_register_t mpidr, uint32_t cpu_state, |
| 27 | uint32_t cluster_state, uint32_t css_state); |
| 28 | uint32_t aml_scpi_sys_power_state(uint64_t system_state); |
| 29 | void aml_scpi_jtag_set_state(uint32_t state, uint8_t select); |
| 30 | uint32_t aml_scpi_efuse_read(void *dst, uint32_t base, uint32_t size); |
| 31 | void aml_scpi_unknown_thermal(uint32_t arg0, uint32_t arg1, |
| 32 | uint32_t arg2, uint32_t arg3); |
| 33 | void aml_scpi_upload_scp_fw(uintptr_t addr, size_t size, int send); |
Carlo Caione | f7c4f9b | 2019-09-16 12:13:49 +0100 | [diff] [blame] | 34 | uint32_t aml_scpi_get_chip_id(uint8_t *obuff, uint32_t osize); |
Carlo Caione | 4948832 | 2019-08-24 17:28:23 +0100 | [diff] [blame] | 35 | |
| 36 | /* Peripherals */ |
Carlo Caione | 68aa5ee | 2019-08-25 18:09:59 +0100 | [diff] [blame] | 37 | void aml_thermal_unknown(void); |
Carlo Caione | bed1897 | 2019-08-25 17:26:27 +0100 | [diff] [blame] | 38 | uint64_t aml_efuse_read(void *dst, uint32_t offset, uint32_t size); |
| 39 | uint64_t aml_efuse_user_max(void); |
Carlo Caione | 4948832 | 2019-08-24 17:28:23 +0100 | [diff] [blame] | 40 | |
Carlo Caione | 56e9863 | 2019-08-28 10:14:46 +0100 | [diff] [blame] | 41 | #endif /* AML_PRIVATE_H */ |