mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-29 16:48:59 +00:00
stm32mp1: move stm32_get_gpio_bank_clock() to private file
GPIOx clocks are specific to each STM32MP platforms. This change moves function stm32_get_gpio_bank_clock() from stm32mp common source files to platform private stm32mp1_private.c source file. Change-Id: I9616c0d3fe4d10af715d6f2d1550c13ab62c829a Signed-off-by: Yann Gautier <yann.gautier@st.com>
This commit is contained in:
parent
dd98aec87c
commit
8f282dae74
2 changed files with 13 additions and 11 deletions
|
@ -98,17 +98,6 @@ uintptr_t stm32_get_gpio_bank_base(unsigned int bank)
|
||||||
return GPIOA_BASE + (bank * GPIO_BANK_OFFSET);
|
return GPIOA_BASE + (bank * GPIO_BANK_OFFSET);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long stm32_get_gpio_bank_clock(unsigned int bank)
|
|
||||||
{
|
|
||||||
if (bank == GPIO_BANK_Z) {
|
|
||||||
return GPIOZ;
|
|
||||||
}
|
|
||||||
|
|
||||||
assert(GPIO_BANK_A == 0 && bank <= GPIO_BANK_K);
|
|
||||||
|
|
||||||
return GPIOA + (bank - GPIO_BANK_A);
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t stm32_get_gpio_bank_offset(unsigned int bank)
|
uint32_t stm32_get_gpio_bank_offset(unsigned int bank)
|
||||||
{
|
{
|
||||||
if (bank == GPIO_BANK_Z) {
|
if (bank == GPIO_BANK_Z) {
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
#include <platform_def.h>
|
#include <platform_def.h>
|
||||||
|
|
||||||
#include <lib/xlat_tables/xlat_tables_v2.h>
|
#include <lib/xlat_tables/xlat_tables_v2.h>
|
||||||
|
@ -53,3 +55,14 @@ void configure_mmu(void)
|
||||||
|
|
||||||
enable_mmu_svc_mon(0);
|
enable_mmu_svc_mon(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned long stm32_get_gpio_bank_clock(unsigned int bank)
|
||||||
|
{
|
||||||
|
if (bank == GPIO_BANK_Z) {
|
||||||
|
return GPIOZ;
|
||||||
|
}
|
||||||
|
|
||||||
|
assert(GPIO_BANK_A == 0 && bank <= GPIO_BANK_K);
|
||||||
|
|
||||||
|
return GPIOA + (bank - GPIO_BANK_A);
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue