Antonio Nino Diaz | ae6779e | 2017-11-06 14:49:04 +0000 | [diff] [blame] | 1 | /* |
Andre Przywara | 93de78c | 2019-07-09 14:29:24 +0100 | [diff] [blame] | 2 | * Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved. |
Antonio Nino Diaz | ae6779e | 2017-11-06 14:49:04 +0000 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
Andre Przywara | 4ea3bd3 | 2019-07-09 14:32:11 +0100 | [diff] [blame] | 7 | #ifndef RPI_SHARED_H |
| 8 | #define RPI_SHARED_H |
Antonio Nino Diaz | ae6779e | 2017-11-06 14:49:04 +0000 | [diff] [blame] | 9 | |
Antonio Nino Diaz | 4b32e62 | 2018-08-16 16:52:57 +0100 | [diff] [blame] | 10 | #include <stdint.h> |
Antonio Nino Diaz | ae6779e | 2017-11-06 14:49:04 +0000 | [diff] [blame] | 11 | |
| 12 | /******************************************************************************* |
| 13 | * Function and variable prototypes |
| 14 | ******************************************************************************/ |
| 15 | |
| 16 | /* Utility functions */ |
Andre Przywara | faf8618 | 2019-08-04 10:46:21 +0100 | [diff] [blame^] | 17 | void rpi3_console_init(unsigned int base_clk_rate); |
Antonio Nino Diaz | ae6779e | 2017-11-06 14:49:04 +0000 | [diff] [blame] | 18 | void rpi3_setup_page_tables(uintptr_t total_base, size_t total_size, |
| 19 | uintptr_t code_start, uintptr_t code_limit, |
| 20 | uintptr_t rodata_start, uintptr_t rodata_limit |
| 21 | #if USE_COHERENT_MEM |
| 22 | , uintptr_t coh_start, uintptr_t coh_limit |
| 23 | #endif |
| 24 | ); |
| 25 | |
| 26 | /* Optional functions required in the Raspberry Pi 3 port */ |
| 27 | unsigned int plat_rpi3_calc_core_pos(u_register_t mpidr); |
| 28 | |
| 29 | /* BL2 utility functions */ |
| 30 | uint32_t rpi3_get_spsr_for_bl32_entry(void); |
| 31 | uint32_t rpi3_get_spsr_for_bl33_entry(void); |
| 32 | |
| 33 | /* IO storage utility functions */ |
| 34 | void plat_rpi3_io_setup(void); |
| 35 | |
Antonio Nino Diaz | ecf3471 | 2018-07-12 13:38:53 +0100 | [diff] [blame] | 36 | /* VideoCore firmware commands */ |
| 37 | int rpi3_vc_hardware_get_board_revision(uint32_t *revision); |
| 38 | |
Antonio Nino Diaz | 5eb8837 | 2018-11-08 10:20:19 +0000 | [diff] [blame] | 39 | #endif /* RPI3_PRIVATE_H */ |