Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/48143 )
Change subject: mb/kontron/mal10: Use mainboard_ops driver for GPIO configuration ......................................................................
mb/kontron/mal10: Use mainboard_ops driver for GPIO configuration
`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 felixsinger@posteo.net Change-Id: Ia01091938ac113cb5cf95f046609a1ebf3620806 Reviewed-on: https://review.coreboot.org/c/coreboot/+/48143 Reviewed-by: Maxim Polyakov max.senia.poliak@gmail.com Reviewed-by: Angel Pons th3fanbus@gmail.com Reviewed-by: Michael Niewöhner foss@mniewoehner.de Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/mainboard/kontron/mal10/ramstage.c 1 file changed, 9 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, but someone else must approve Maxim Polyakov: Looks good to me, approved Michael Niewöhner: Looks good to me, approved
diff --git a/src/mainboard/kontron/mal10/ramstage.c b/src/mainboard/kontron/mal10/ramstage.c index 3d259d8..f03006a 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 <device/device.h> #include <soc/ramstage.h> #include <carrier/gpio.h>
-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 @@ silconfig->IoApicDeviceNumber = 0x1F; silconfig->IoApicFunctionNumber = 0; } + +struct chip_operations mainboard_ops = { + .init = init_mainboard, +};