summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
authorFelix Singer <felixsinger@posteo.net>2021-04-19 12:32:58 +0200
committerMichael Niewöhner <foss@mniewoehner.de>2021-04-20 19:13:02 +0000
commit2a3689f0e4f7727fe75c2bf16532d4d1330a3f74 (patch)
tree0e1ec84bc53e03bab59bd41512ea937321c59909 /src/soc/intel
parent0a6cf23ce7898a6bf831e23336a09483419e6e95 (diff)
soc/intel/cannonlake: Deduplicate function declaration
Move the function declaration of parse_devicetree() out of the if-else preprocessor condition. Change-Id: I6974554711e4cc2bb944bff14fc057ef6945c888 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/52502 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/cannonlake/fsp_params.c7
1 files 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)