xref: /rk3399_ARM-atf/plat/rpi/common/include/rpi_shared.h (revision 795aefe5e80494018c731cea69e2284140f4abbb)
14f2b9848SAndre Przywara /*
24f2b9848SAndre Przywara  * Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved.
34f2b9848SAndre Przywara  *
44f2b9848SAndre Przywara  * SPDX-License-Identifier: BSD-3-Clause
54f2b9848SAndre Przywara  */
64f2b9848SAndre Przywara 
74f2b9848SAndre Przywara #ifndef RPI_SHARED_H
84f2b9848SAndre Przywara #define RPI_SHARED_H
94f2b9848SAndre Przywara 
104f2b9848SAndre Przywara #include <stdint.h>
114f2b9848SAndre Przywara 
124f2b9848SAndre Przywara /*******************************************************************************
134f2b9848SAndre Przywara  * Function and variable prototypes
144f2b9848SAndre Przywara  ******************************************************************************/
154f2b9848SAndre Przywara 
164f2b9848SAndre Przywara /* Utility functions */
17*795aefe5SAndre Przywara void rpi3_console_init(void);
184f2b9848SAndre Przywara void rpi3_setup_page_tables(uintptr_t total_base, size_t total_size,
194f2b9848SAndre Przywara 			    uintptr_t code_start, uintptr_t code_limit,
204f2b9848SAndre Przywara 			    uintptr_t rodata_start, uintptr_t rodata_limit
214f2b9848SAndre Przywara #if USE_COHERENT_MEM
224f2b9848SAndre Przywara 			    , uintptr_t coh_start, uintptr_t coh_limit
234f2b9848SAndre Przywara #endif
244f2b9848SAndre Przywara 			    );
254f2b9848SAndre Przywara 
264f2b9848SAndre Przywara /* Optional functions required in the Raspberry Pi 3 port */
274f2b9848SAndre Przywara unsigned int plat_rpi3_calc_core_pos(u_register_t mpidr);
284f2b9848SAndre Przywara 
294f2b9848SAndre Przywara /* BL2 utility functions */
304f2b9848SAndre Przywara uint32_t rpi3_get_spsr_for_bl32_entry(void);
314f2b9848SAndre Przywara uint32_t rpi3_get_spsr_for_bl33_entry(void);
324f2b9848SAndre Przywara 
334f2b9848SAndre Przywara /* IO storage utility functions */
344f2b9848SAndre Przywara void plat_rpi3_io_setup(void);
354f2b9848SAndre Przywara 
364f2b9848SAndre Przywara /* VideoCore firmware commands */
374f2b9848SAndre Przywara int rpi3_vc_hardware_get_board_revision(uint32_t *revision);
384f2b9848SAndre Przywara 
394f2b9848SAndre Przywara #endif /* RPI3_PRIVATE_H */
40