diff options
author | Hung-Te Lin <hungte@chromium.org> | 2022-09-06 14:32:05 +0800 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-09-07 09:20:25 +0000 |
commit | a01f8bc450d782c9b0859c8caaaa3df87fe5a854 (patch) | |
tree | b6f301ea3e7d09e256489c7c3f5918211ff9473c /src/mainboard/google/kukui/mainboard.c | |
parent | 70f30afa89b725aa8655bed881f823408ac54453 (diff) |
soc/mediatek: a common implementation to register BL31 reset
The implementations of register_reset_to_bl31() are the same for
MedaiTek platforms, so we extract them to soc/common/bl31.c.
BUG=None
TEST=build pass
Change-Id: I297ea2e18a6d7e92236cf415844b166523616bdf
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67359
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'src/mainboard/google/kukui/mainboard.c')
-rw-r--r-- | src/mainboard/google/kukui/mainboard.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/mainboard/google/kukui/mainboard.c b/src/mainboard/google/kukui/mainboard.c index 9357b67468..a0ce67400a 100644 --- a/src/mainboard/google/kukui/mainboard.c +++ b/src/mainboard/google/kukui/mainboard.c @@ -1,7 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include <assert.h> -#include <bl31.h> #include <boardid.h> #include <bootmode.h> #include <cbfs.h> @@ -12,6 +11,7 @@ #include <edid.h> #include <framebuffer_info.h> #include <gpio.h> +#include <soc/bl31.h> #include <soc/ddp.h> #include <soc/dsi.h> #include <soc/gpio.h> @@ -24,8 +24,6 @@ #include "gpio.h" #include "panel.h" -#include <arm-trusted-firmware/include/export/plat/mediatek/common/plat_params_exp.h> - static void configure_emmc(void) { const gpio_t emmc_pin[] = { @@ -181,17 +179,6 @@ static bool configure_display(void) return true; } -static void register_reset_to_bl31(void) -{ - static struct bl_aux_param_gpio param_reset = { - .h = { .type = BL_AUX_PARAM_MTK_RESET_GPIO }, - .gpio = { .polarity = ARM_TF_GPIO_LEVEL_HIGH }, - }; - - param_reset.gpio.index = GPIO_RESET.id; - register_bl31_aux_param(¶m_reset.h); -} - static void mainboard_init(struct device *dev) { if (display_init_required()) { @@ -211,7 +198,8 @@ static void mainboard_init(struct device *dev) printk(BIOS_ERR, "SPM initialization failed, suspend/resume may fail.\n"); - register_reset_to_bl31(); + if (CONFIG(ARM64_USE_ARM_TRUSTED_FIRMWARE)) + register_reset_to_bl31(GPIO_RESET.id, true); } static void mainboard_enable(struct device *dev) |