From 83e0b97dc567c145bff21cd8a816b92924d09092 Mon Sep 17 00:00:00 2001 From: Felix Singer Date: Mon, 30 Nov 2020 08:48:24 +0100 Subject: mb/kontron/mal10: Use mainboard_ops driver for GPIO configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `mainboard_silicon_init_params()` should *only* be used for configuring FSP options which can not be configured anywhere else. Therefore, use the init phase from the mainboard_ops driver for configuring the GPIOs. Signed-off-by: Felix Singer Change-Id: Ia01091938ac113cb5cf95f046609a1ebf3620806 Reviewed-on: https://review.coreboot.org/c/coreboot/+/48143 Reviewed-by: Maxim Polyakov Reviewed-by: Angel Pons Reviewed-by: Michael Niewöhner Tested-by: build bot (Jenkins) --- src/mainboard/kontron/mal10/ramstage.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/mainboard/kontron/mal10') diff --git a/src/mainboard/kontron/mal10/ramstage.c b/src/mainboard/kontron/mal10/ramstage.c index 3d259d8ea7..f03006ad85 100644 --- a/src/mainboard/kontron/mal10/ramstage.c +++ b/src/mainboard/kontron/mal10/ramstage.c @@ -1,12 +1,16 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#include #include #include -void mainboard_silicon_init_params(FSP_S_CONFIG *silconfig) +static void init_mainboard(void *chip_info) { carrier_gpio_configure(); +} +void mainboard_silicon_init_params(FSP_S_CONFIG *silconfig) +{ /* * CPU Power Management Configuration correspond to the BIOS Setup menu settings * in the AMI UEFI v112. @@ -44,3 +48,7 @@ void mainboard_silicon_init_params(FSP_S_CONFIG *silconfig) silconfig->IoApicDeviceNumber = 0x1F; silconfig->IoApicFunctionNumber = 0; } + +struct chip_operations mainboard_ops = { + .init = init_mainboard, +}; -- cgit v1.2.3