/* SPDX-License-Identifier: GPL-2.0-only */ #include #include #include #include void register_reset_to_bl31(int gpio_index, bool active_high) { static struct bl_aux_param_gpio param_reset = { .h = { .type = BL_AUX_PARAM_MTK_RESET_GPIO }, }; if (active_high) param_reset.gpio.polarity = ARM_TF_GPIO_LEVEL_HIGH; else param_reset.gpio.polarity = ARM_TF_GPIO_LEVEL_LOW; param_reset.gpio.index = gpio_index; register_bl31_aux_param(¶m_reset.h); }