From 2a3689f0e4f7727fe75c2bf16532d4d1330a3f74 Mon Sep 17 00:00:00 2001 From: Felix Singer Date: Mon, 19 Apr 2021 12:32:58 +0200 Subject: [PATCH] soc/intel/cannonlake: Deduplicate function declaration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move the function declaration of parse_devicetree() out of the if-else preprocessor condition. Change-Id: I6974554711e4cc2bb944bff14fc057ef6945c888 Signed-off-by: Felix Singer Reviewed-on: https://review.coreboot.org/c/coreboot/+/52502 Tested-by: build bot (Jenkins) Reviewed-by: Michael Niewöhner Reviewed-by: Angel Pons --- src/soc/intel/cannonlake/fsp_params.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/soc/intel/cannonlake/fsp_params.c b/src/soc/intel/cannonlake/fsp_params.c index 57fb8c1a9d..d7772f1ee2 100644 --- a/src/soc/intel/cannonlake/fsp_params.c +++ b/src/soc/intel/cannonlake/fsp_params.c @@ -58,9 +58,9 @@ static uint8_t get_param_value(const config_t *config, uint32_t dev_offset) return PCH_SERIAL_IO_INDEX(config->SerialIoDevMode[dev_offset]); } -#if CONFIG(SOC_INTEL_COMETLAKE) static void parse_devicetree(const config_t *config, FSP_S_CONFIG *params) { +#if CONFIG(SOC_INTEL_COMETLAKE) uint32_t dev_offset = 0; uint32_t i = 0; @@ -79,14 +79,11 @@ static void parse_devicetree(const config_t *config, FSP_S_CONFIG *params) params->SerialIoUartMode[i] = get_param_value(config, dev_offset); } -} #else -static void parse_devicetree(const config_t *config, FSP_S_CONFIG *params) -{ for (int i = 0; i < ARRAY_SIZE(serial_io_dev); i++) params->SerialIoDevMode[i] = get_param_value(config, i); -} #endif +} /* Ignore LTR value for GBE devices */ static void ignore_gbe_ltr(void)