From b3f24b4884fe9fe0589629fbe929ebddfdc683c2 Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Tue, 28 May 2019 21:01:37 -0700 Subject: arm64: Uprev Arm TF and adjust to BL31 parameter changes This patch uprevs the Arm Trusted Firmware submodule to the new upstream master (commit 42cdeb930). Arm Trusted Firmware unified a bunch of stuff related to BL31 handoff parameters across platforms which involved changing a few names around. This patch syncs coreboot back up with that. They also made header changes that now allow us to directly include all the headers we need (in a safer and cleaner way than before), so we can get rid of some structure definitions that were duplicated. Since the version of entry point info parameters we have been using has been deprecated in Trusted Firmware, this patch switches to the new version 2 parameter format. NOTE: This may or may not stop Cavium from booting with the current pinned Trusted Firmware blob. Cavium maintainers are still evaluating whether to fix that later or drop the platform entirely. Tested on GOOGLE_KEVIN (rk3399). Change-Id: I0ed32bce5585ce191736f0ff2e5a94a9d2b2cc28 Signed-off-by: Julius Werner Reviewed-on: https://review.coreboot.org/c/coreboot/+/34676 Tested-by: build bot (Jenkins) Reviewed-by: Hung-Te Lin --- src/mainboard/google/gru/mainboard.c | 46 +++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 22 deletions(-) (limited to 'src/mainboard/google') diff --git a/src/mainboard/google/gru/mainboard.c b/src/mainboard/google/gru/mainboard.c index 19f4ecca55..4ebe143dea 100644 --- a/src/mainboard/google/gru/mainboard.c +++ b/src/mainboard/google/gru/mainboard.c @@ -15,6 +15,7 @@ */ #include +#include #include #include #include @@ -23,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -35,6 +35,8 @@ #include "board.h" +#include + /* * We have to drive the stronger pull-up within 1 second of powering up the * touchpad to prevent its firmware from falling into recovery. Not on @@ -71,9 +73,9 @@ static void configure_emmc(void) static void register_apio_suspend(void) { - static struct bl31_apio_param param_apio = { + static struct bl_aux_param_rk_apio param_apio = { .h = { - .type = PARAM_SUSPEND_APIO, + .type = BL_AUX_PARAM_RK_SUSPEND_APIO, }, .apio = { .apio1 = 1, @@ -83,7 +85,7 @@ static void register_apio_suspend(void) .apio5 = 1, }, }; - register_bl31_param(¶m_apio.h); + register_bl31_aux_param(¶m_apio.h); } static void register_gpio_suspend(void) @@ -98,34 +100,34 @@ static void register_gpio_suspend(void) * so we skip them. */ if (!CONFIG(GRU_BASEBOARD_SCARLET)) { - static struct bl31_gpio_param param_p15_en = { - .h = { .type = PARAM_SUSPEND_GPIO }, - .gpio = { .polarity = BL31_GPIO_LEVEL_LOW }, + static struct bl_aux_param_gpio param_p15_en = { + .h = { .type = BL_AUX_PARAM_RK_SUSPEND_GPIO }, + .gpio = { .polarity = ARM_TF_GPIO_LEVEL_LOW }, }; param_p15_en.gpio.index = GPIO_P15V_EN.raw; - register_bl31_param(¶m_p15_en.h); + register_bl31_aux_param(¶m_p15_en.h); - static struct bl31_gpio_param param_p18_audio_en = { - .h = { .type = PARAM_SUSPEND_GPIO }, - .gpio = { .polarity = BL31_GPIO_LEVEL_LOW }, + static struct bl_aux_param_gpio param_p18_audio_en = { + .h = { .type = BL_AUX_PARAM_RK_SUSPEND_GPIO }, + .gpio = { .polarity = ARM_TF_GPIO_LEVEL_LOW }, }; param_p18_audio_en.gpio.index = GPIO_P18V_AUDIO_PWREN.raw; - register_bl31_param(¶m_p18_audio_en.h); + register_bl31_aux_param(¶m_p18_audio_en.h); } - static struct bl31_gpio_param param_p30_en = { - .h = { .type = PARAM_SUSPEND_GPIO }, - .gpio = { .polarity = BL31_GPIO_LEVEL_LOW }, + static struct bl_aux_param_gpio param_p30_en = { + .h = { .type = BL_AUX_PARAM_RK_SUSPEND_GPIO }, + .gpio = { .polarity = ARM_TF_GPIO_LEVEL_LOW }, }; param_p30_en.gpio.index = GPIO_P30V_EN.raw; - register_bl31_param(¶m_p30_en.h); + register_bl31_aux_param(¶m_p30_en.h); } static void register_reset_to_bl31(void) { - static struct bl31_gpio_param param_reset = { + static struct bl_aux_param_gpio param_reset = { .h = { - .type = PARAM_RESET, + .type = BL_AUX_PARAM_RK_RESET_GPIO, }, .gpio = { .polarity = 1, @@ -135,14 +137,14 @@ static void register_reset_to_bl31(void) /* gru/kevin reset pin: gpio0b3 */ param_reset.gpio.index = GPIO_RESET.raw, - register_bl31_param(¶m_reset.h); + register_bl31_aux_param(¶m_reset.h); } static void register_poweroff_to_bl31(void) { - static struct bl31_gpio_param param_poweroff = { + static struct bl_aux_param_gpio param_poweroff = { .h = { - .type = PARAM_POWEROFF, + .type = BL_AUX_PARAM_RK_POWEROFF_GPIO, }, .gpio = { .polarity = 1, @@ -156,7 +158,7 @@ static void register_poweroff_to_bl31(void) */ param_poweroff.gpio.index = GPIO_POWEROFF.raw, - register_bl31_param(¶m_poweroff.h); + register_bl31_aux_param(¶m_poweroff.h); } static void configure_sdmmc(void) -- cgit v1.2.3