xref: /rk3399_ARM-atf/plat/st/common/include/stm32mp_common.h (revision c9d75b3cf98c7f2a78d3f916bcf9e2b3a2c55967)
1 /*
2  * Copyright (C) 2018-2019, STMicroelectronics - All Rights Reserved
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef STM32MP_COMMON_H
8 #define STM32MP_COMMON_H
9 
10 /* Functions to save and get boot context address given by ROM code */
11 void stm32mp1_save_boot_ctx_address(uintptr_t address);
12 uintptr_t stm32mp1_get_boot_ctx_address(void);
13 
14 /*
15  * Platform util functions for the GPIO driver
16  * @bank: Target GPIO bank ID as per DT bindings
17  *
18  * Platform shall implement these functions to provide to stm32_gpio
19  * driver the resource reference for a target GPIO bank. That are
20  * memory mapped interface base address, interface offset (see below)
21  * and clock identifier.
22  *
23  * stm32_get_gpio_bank_offset() returns a bank offset that is used to
24  * check DT configuration matches platform implementation of the banks
25  * description.
26  */
27 uintptr_t stm32_get_gpio_bank_base(unsigned int bank);
28 unsigned long stm32_get_gpio_bank_clock(unsigned int bank);
29 uint32_t stm32_get_gpio_bank_offset(unsigned int bank);
30 
31 /* Initialise the IO layer and register platform IO devices */
32 void stm32mp1_io_setup(void);
33 
34 #endif /* STM32MP_COMMON_H */
35