diff options
Diffstat (limited to 'chip/stm32/gpio.c')
-rw-r--r-- | chip/stm32/gpio.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chip/stm32/gpio.c b/chip/stm32/gpio.c index 0c73081b42..6715e540b0 100644 --- a/chip/stm32/gpio.c +++ b/chip/stm32/gpio.c @@ -5,6 +5,7 @@ /* GPIO module for Chrome EC */ +#include "clock.h" #include "common.h" #include "console.h" #include "gpio.h" @@ -28,6 +29,9 @@ void gpio_pre_init(void) /* Required to configure external IRQ lines (SYSCFG_EXTICRn) */ STM32_RCC_APB2ENR |= 1 << 0; + /* Delay 1 APB clock cycle after the clock is enabled */ + clock_wait_bus_cycles(BUS_APB, 1); + if (!is_warm) gpio_enable_clocks(); |