xref: /rk3399_ARM-atf/plat/rpi/common/include/rpi_shared.h (revision 4f2b984852556afc3543d90150c46be4aaadbc75)
1*4f2b9848SAndre Przywara /*
2*4f2b9848SAndre Przywara  * Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved.
3*4f2b9848SAndre Przywara  *
4*4f2b9848SAndre Przywara  * SPDX-License-Identifier: BSD-3-Clause
5*4f2b9848SAndre Przywara  */
6*4f2b9848SAndre Przywara 
7*4f2b9848SAndre Przywara #ifndef RPI_SHARED_H
8*4f2b9848SAndre Przywara #define RPI_SHARED_H
9*4f2b9848SAndre Przywara 
10*4f2b9848SAndre Przywara #include <stdint.h>
11*4f2b9848SAndre Przywara 
12*4f2b9848SAndre Przywara /*******************************************************************************
13*4f2b9848SAndre Przywara  * Function and variable prototypes
14*4f2b9848SAndre Przywara  ******************************************************************************/
15*4f2b9848SAndre Przywara 
16*4f2b9848SAndre Przywara /* Utility functions */
17*4f2b9848SAndre Przywara void rpi3_console_init(void);
18*4f2b9848SAndre Przywara void rpi3_setup_page_tables(uintptr_t total_base, size_t total_size,
19*4f2b9848SAndre Przywara 			    uintptr_t code_start, uintptr_t code_limit,
20*4f2b9848SAndre Przywara 			    uintptr_t rodata_start, uintptr_t rodata_limit
21*4f2b9848SAndre Przywara #if USE_COHERENT_MEM
22*4f2b9848SAndre Przywara 			    , uintptr_t coh_start, uintptr_t coh_limit
23*4f2b9848SAndre Przywara #endif
24*4f2b9848SAndre Przywara 			    );
25*4f2b9848SAndre Przywara 
26*4f2b9848SAndre Przywara /* Optional functions required in the Raspberry Pi 3 port */
27*4f2b9848SAndre Przywara unsigned int plat_rpi3_calc_core_pos(u_register_t mpidr);
28*4f2b9848SAndre Przywara 
29*4f2b9848SAndre Przywara /* BL2 utility functions */
30*4f2b9848SAndre Przywara uint32_t rpi3_get_spsr_for_bl32_entry(void);
31*4f2b9848SAndre Przywara uint32_t rpi3_get_spsr_for_bl33_entry(void);
32*4f2b9848SAndre Przywara 
33*4f2b9848SAndre Przywara /* IO storage utility functions */
34*4f2b9848SAndre Przywara void plat_rpi3_io_setup(void);
35*4f2b9848SAndre Przywara 
36*4f2b9848SAndre Przywara /* VideoCore firmware commands */
37*4f2b9848SAndre Przywara int rpi3_vc_hardware_get_board_revision(uint32_t *revision);
38*4f2b9848SAndre Przywara 
39*4f2b9848SAndre Przywara #endif /* RPI3_PRIVATE_H */
40