From adac6f40f25eb5914ca4a915ffcff170bc3d50fc Mon Sep 17 00:00:00 2001 From: Zheng Bao Date: Fri, 29 Jan 2021 18:10:00 +0800 Subject: mb/amd/majolica: Add an empty bootblock function to handle GPIO Change-Id: I35da3812a424ea1beef86d043a756a87e6afdaa3 Signed-off-by: Zheng Bao Reviewed-on: https://review.coreboot.org/c/coreboot/+/50117 Reviewed-by: Felix Held Reviewed-by: Marshall Dawson Tested-by: build bot (Jenkins) --- src/mainboard/amd/majolica/Makefile.inc | 1 + src/mainboard/amd/majolica/bootblock.c | 2 ++ src/mainboard/amd/majolica/early_gpio.c | 14 ++++++++++++++ src/mainboard/amd/majolica/gpio.h | 8 ++++++++ 4 files changed, 25 insertions(+) create mode 100644 src/mainboard/amd/majolica/early_gpio.c create mode 100644 src/mainboard/amd/majolica/gpio.h (limited to 'src/mainboard') diff --git a/src/mainboard/amd/majolica/Makefile.inc b/src/mainboard/amd/majolica/Makefile.inc index ef2e12578b..a1a6b8a295 100644 --- a/src/mainboard/amd/majolica/Makefile.inc +++ b/src/mainboard/amd/majolica/Makefile.inc @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only bootblock-y += bootblock.c +bootblock-y += early_gpio.c APCB_SOURCES = $(MAINBOARD_BLOBS_DIR)/APCB_CZN_D4_Updatable.bin APCB_SOURCES_68 = $(MAINBOARD_BLOBS_DIR)/APCB_CZN_D4_Updatable_68.bin diff --git a/src/mainboard/amd/majolica/bootblock.c b/src/mainboard/amd/majolica/bootblock.c index ccd8ec1b40..f768f3f778 100644 --- a/src/mainboard/amd/majolica/bootblock.c +++ b/src/mainboard/amd/majolica/bootblock.c @@ -1,7 +1,9 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include +#include "gpio.h" void bootblock_mainboard_early_init(void) { + mainboard_program_early_gpios(); } diff --git a/src/mainboard/amd/majolica/early_gpio.c b/src/mainboard/amd/majolica/early_gpio.c new file mode 100644 index 0000000000..916d67976d --- /dev/null +++ b/src/mainboard/amd/majolica/early_gpio.c @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include +#include "gpio.h" + +/* GPIO pins used by coreboot should be initialized in bootblock */ + +static const struct soc_amd_gpio gpio_set_stage_reset[] = { +}; + +void mainboard_program_early_gpios(void) +{ + program_gpios(gpio_set_stage_reset, ARRAY_SIZE(gpio_set_stage_reset)); +} diff --git a/src/mainboard/amd/majolica/gpio.h b/src/mainboard/amd/majolica/gpio.h new file mode 100644 index 0000000000..2143368b2b --- /dev/null +++ b/src/mainboard/amd/majolica/gpio.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef MAINBOARD_GPIO_H +#define MAINBOARD_GPIO_H + +void mainboard_program_early_gpios(void); /* bootblock GPIO configuration */ + +#endif /* MAINBOARD_GPIO_H */ -- cgit v1.2.3