aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/google/gru/mainboard.c
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2019-05-28 21:01:37 -0700
committerJulius Werner <jwerner@chromium.org>2019-09-14 05:01:16 +0000
commitb3f24b4884fe9fe0589629fbe929ebddfdc683c2 (patch)
treee2db80dac53be5f6dc1277713e5d5c5eff85f0a9 /src/mainboard/google/gru/mainboard.c
parent8b93689a358b0a65a334cc3adf6141e79fab032f (diff)
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 <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34676 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Diffstat (limited to 'src/mainboard/google/gru/mainboard.c')
-rw-r--r--src/mainboard/google/gru/mainboard.c46
1 files changed, 24 insertions, 22 deletions
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 <assert.h>
+#include <bl31.h>
#include <boardid.h>
#include <console/console.h>
#include <device/mmio.h>
@@ -23,7 +24,6 @@
#include <device/i2c_simple.h>
#include <ec/google/chromeec/ec.h>
#include <gpio.h>
-#include <soc/bl31_plat_params.h>
#include <soc/clock.h>
#include <soc/display.h>
#include <soc/grf.h>
@@ -35,6 +35,8 @@
#include "board.h"
+#include <arm-trusted-firmware/include/export/plat/rockchip/common/plat_params_exp.h>
+
/*
* 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(&param_apio.h);
+ register_bl31_aux_param(&param_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(&param_p15_en.h);
+ register_bl31_aux_param(&param_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(&param_p18_audio_en.h);
+ register_bl31_aux_param(&param_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(&param_p30_en.h);
+ register_bl31_aux_param(&param_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(&param_reset.h);
+ register_bl31_aux_param(&param_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(&param_poweroff.h);
+ register_bl31_aux_param(&param_poweroff.h);
}
static void configure_sdmmc(void)