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>
This commit is contained in:
Felix Singer 2021-04-19 12:32:58 +02:00 committed by Michael Niewöhner
parent 0a6cf23ce7
commit 2a3689f0e4
1 changed files with 2 additions and 5 deletions

View File

@ -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)