Commit 8f282dae authored by Yann Gautier's avatar Yann Gautier
Browse files

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: default avatarYann Gautier <yann.gautier@st.com>
parent dd98aec8
......@@ -98,17 +98,6 @@ uintptr_t stm32_get_gpio_bank_base(unsigned int bank)
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)
{
if (bank == GPIO_BANK_Z) {
......
......@@ -4,6 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <assert.h>
#include <platform_def.h>
#include <lib/xlat_tables/xlat_tables_v2.h>
......@@ -53,3 +55,14 @@ void configure_mmu(void)
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);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment