Browse Source

drivers/stm32_gpio: register GPIO resources as secure or not

Register in the shared resources driver the secure or non-secure state
of the GPIO pins.

Change-Id: Ifda473bcbbb0af799be6587961d6641edf887605
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
pull/1979/head
Etienne Carriere 5 years ago
parent
commit
66de6f3c30
  1. 9
      drivers/st/gpio/stm32_gpio.c

9
drivers/st/gpio/stm32_gpio.c

@ -254,6 +254,15 @@ void set_gpio(uint32_t bank, uint32_t pin, uint32_t mode, uint32_t speed,
mmio_read_32(base + GPIO_AFRH_OFFSET));
stm32mp_clk_disable(clock);
if (status == DT_SECURE) {
stm32mp_register_secure_gpio(bank, pin);
set_gpio_secure_cfg(bank, pin, true);
} else {
stm32mp_register_non_secure_gpio(bank, pin);
set_gpio_secure_cfg(bank, pin, false);
}
}
void set_gpio_secure_cfg(uint32_t bank, uint32_t pin, bool secure)

Loading…
Cancel
Save