mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 01:24:27 +00:00
fix(stm32mp1): remove unnecessary assert on GPIO_BANK_A value
Remove assert for unexpected value of the define GPIO_BANK_A. This check is not required as GPIO_BANK_A = 0, it can be limited to have bank <= GPIO_BANK_K as bank is unsigned int. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Change-Id: I0345d56f106fcacd6a6f93281c2d9279980cd152
This commit is contained in:
parent
e04a9ef5ea
commit
5c457689b2
1 changed files with 6 additions and 6 deletions
|
@ -115,14 +115,14 @@ void configure_mmu(void)
|
|||
uintptr_t stm32_get_gpio_bank_base(unsigned int bank)
|
||||
{
|
||||
#if STM32MP13
|
||||
assert((GPIO_BANK_A == 0) && (bank <= GPIO_BANK_I));
|
||||
assert(bank <= GPIO_BANK_I);
|
||||
#endif
|
||||
#if STM32MP15
|
||||
if (bank == GPIO_BANK_Z) {
|
||||
return GPIOZ_BASE;
|
||||
}
|
||||
|
||||
assert((GPIO_BANK_A == 0) && (bank <= GPIO_BANK_K));
|
||||
assert(bank <= GPIO_BANK_K);
|
||||
#endif
|
||||
|
||||
return GPIOA_BASE + (bank * GPIO_BANK_OFFSET);
|
||||
|
@ -131,14 +131,14 @@ uintptr_t stm32_get_gpio_bank_base(unsigned int bank)
|
|||
uint32_t stm32_get_gpio_bank_offset(unsigned int bank)
|
||||
{
|
||||
#if STM32MP13
|
||||
assert((GPIO_BANK_A == 0) && (bank <= GPIO_BANK_I));
|
||||
assert(bank <= GPIO_BANK_I);
|
||||
#endif
|
||||
#if STM32MP15
|
||||
if (bank == GPIO_BANK_Z) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
assert((GPIO_BANK_A == 0) && (bank <= GPIO_BANK_K));
|
||||
assert(bank <= GPIO_BANK_K);
|
||||
#endif
|
||||
|
||||
return bank * GPIO_BANK_OFFSET;
|
||||
|
@ -161,14 +161,14 @@ bool stm32_gpio_is_secure_at_reset(unsigned int bank)
|
|||
unsigned long stm32_get_gpio_bank_clock(unsigned int bank)
|
||||
{
|
||||
#if STM32MP13
|
||||
assert((GPIO_BANK_A == 0) && (bank <= GPIO_BANK_I));
|
||||
assert(bank <= GPIO_BANK_I);
|
||||
#endif
|
||||
#if STM32MP15
|
||||
if (bank == GPIO_BANK_Z) {
|
||||
return GPIOZ;
|
||||
}
|
||||
|
||||
assert((GPIO_BANK_A == 0) && (bank <= GPIO_BANK_K));
|
||||
assert(bank <= GPIO_BANK_K);
|
||||
#endif
|
||||
|
||||
return GPIOA + (bank - GPIO_BANK_A);
|
||||
|
|
Loading…
Add table
Reference in a new issue