diff --git a/scripts/coreboot-gpio.sh b/scripts/coreboot-gpio.sh index 208ae48..0f69bc7 100755 --- a/scripts/coreboot-gpio.sh +++ b/scripts/coreboot-gpio.sh @@ -11,15 +11,9 @@ fi cat <<"EOF" /* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef MAINBOARD_GPIO_H -#define MAINBOARD_GPIO_H - -#include +#include #include -#ifndef __ACPI__ - -/* Pad configuration in ramstage. */ static const struct pad_config gpio_table[] = { EOF @@ -108,7 +102,8 @@ done cat <<"EOF" }; -#endif - -#endif +void mainboard_configure_gpios(void) +{ + gpio_configure_pads(gpio_table, ARRAY_SIZE(gpio_table)); +} EOF diff --git a/scripts/generate.sh b/scripts/generate.sh index 77d2e1a..6b8d2e3 100755 --- a/scripts/generate.sh +++ b/scripts/generate.sh @@ -56,7 +56,7 @@ cargo build --release sudo target/release/coreboot-collector > "${MODEL_DIR}/coreboot-collector.txt" popd -"${SCRIPT_DIR}/coreboot-gpio.sh" "${MODEL_DIR}/coreboot-collector.txt" > "${MODEL_DIR}/gpio.h" +"${SCRIPT_DIR}/coreboot-gpio.sh" "${MODEL_DIR}/coreboot-collector.txt" > "${MODEL_DIR}/gpio.c" "${SCRIPT_DIR}/coreboot-hda.sh" "${MODEL_DIR}/coreboot-collector.txt" > "${MODEL_DIR}/hda_verb.c" if [ -n "${BIOS_IMAGE}" ]