diff options
author | MAULIK V VAGHELA <maulik.v.vaghela@intel.com> | 2022-03-07 18:39:17 +0530 |
---|---|---|
committer | Nick Vaccaro <nvaccaro@google.com> | 2022-03-15 18:10:41 +0000 |
commit | 215a97ee1c4cd87b266d63e32bf0b379e18fe849 (patch) | |
tree | c6ef1cae5509d9328198e9b468b55ad3e5d53791 /src/soc/intel/alderlake/fsp_params.c | |
parent | 6207a3967e0efeb0b52e24bc82b16e53085b6b9b (diff) |
soc/intel/adl/chip.h: Convert all camel case variables to snake case
coreboot chip.h files mainly contains variable which allows board to
fill platform configuration through devicetree.
Since many of this configuration involves FSP UPDs, variable names were
in camel case which aligned with UPD naming convention.
By default coreboot follow snake case variable naming, so cleaning up
file to align all variable names as per coreboot convention.
During renaming process, this patch also removes unused variables
listed below:
-> SataEnable // Checked in SoC code based on PCI dev enabled status
-> ITbtConnectTopologyTimeoutInMs // SoC always passes 0, so not used
Note: Since separating out changes into smaller CL might break the
compilation for the patch set, this is being pushed as a single big CL.
BUG=None
BRANCH=firmware-brya-14505.B
TEST=All boards using ADL SoC compiles with the CL.
Change-Id: Ieda567a89ec9287e3d988d489f3b3769dffcf9e0
Signed-off-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62645
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Diffstat (limited to 'src/soc/intel/alderlake/fsp_params.c')
-rw-r--r-- | src/soc/intel/alderlake/fsp_params.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/src/soc/intel/alderlake/fsp_params.c b/src/soc/intel/alderlake/fsp_params.c index b4e833bf55..90ecf86d05 100644 --- a/src/soc/intel/alderlake/fsp_params.c +++ b/src/soc/intel/alderlake/fsp_params.c @@ -337,16 +337,16 @@ static void fill_fsps_lpss_params(FSP_S_CONFIG *s_cfg, const struct soc_intel_alderlake_config *config) { for (int i = 0; i < CONFIG_SOC_INTEL_I2C_DEV_MAX; i++) - s_cfg->SerialIoI2cMode[i] = config->SerialIoI2cMode[i]; + s_cfg->SerialIoI2cMode[i] = config->serial_io_i2c_mode[i]; for (int i = 0; i < CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX; i++) { - s_cfg->SerialIoSpiMode[i] = config->SerialIoGSpiMode[i]; - s_cfg->SerialIoSpiCsMode[i] = config->SerialIoGSpiCsMode[i]; - s_cfg->SerialIoSpiCsState[i] = config->SerialIoGSpiCsState[i]; + s_cfg->SerialIoSpiMode[i] = config->serial_io_gspi_mode[i]; + s_cfg->SerialIoSpiCsMode[i] = config->serial_io_gspi_cs_mode[i]; + s_cfg->SerialIoSpiCsState[i] = config->serial_io_gspi_cs_state[i]; } for (int i = 0; i < CONFIG_SOC_INTEL_UART_DEV_MAX; i++) - s_cfg->SerialIoUartMode[i] = config->SerialIoUartMode[i]; + s_cfg->SerialIoUartMode[i] = config->serial_io_uart_mode[i]; } static void fill_fsps_cpu_params(FSP_S_CONFIG *s_cfg, @@ -393,7 +393,7 @@ static void fill_fsps_tcss_params(FSP_S_CONFIG *s_cfg, DEV_PTR(tcss_usb3_port4), }; - s_cfg->TcssAuxOri = config->TcssAuxOri; + s_cfg->TcssAuxOri = config->tcss_aux_ori; /* Explicitly clear this field to avoid using defaults */ memset(s_cfg->IomTypeCPortPadCfg, 0, sizeof(s_cfg->IomTypeCPortPadCfg)); @@ -406,8 +406,8 @@ static void fill_fsps_tcss_params(FSP_S_CONFIG *s_cfg, s_cfg->ITbtConnectTopologyTimeoutInMs = 0; /* D3Hot and D3Cold for TCSS */ - s_cfg->D3HotEnable = !config->TcssD3HotDisable; - s_cfg->D3ColdEnable = !config->TcssD3ColdDisable; + s_cfg->D3HotEnable = !config->tcss_d3_hot_disable; + s_cfg->D3ColdEnable = !config->tcss_d3_cold_disable; s_cfg->UsbTcPortEn = 0; for (int i = 0; i < MAX_TYPE_C_PORTS; i++) { @@ -497,11 +497,11 @@ static void fill_fsps_sata_params(FSP_S_CONFIG *s_cfg, /* SATA */ s_cfg->SataEnable = is_devfn_enabled(PCH_DEVFN_SATA); if (s_cfg->SataEnable) { - s_cfg->SataMode = config->SataMode; - s_cfg->SataSalpSupport = config->SataSalpSupport; - memcpy(s_cfg->SataPortsEnable, config->SataPortsEnable, + s_cfg->SataMode = config->sata_mode; + s_cfg->SataSalpSupport = config->sata_salp_support; + memcpy(s_cfg->SataPortsEnable, config->sata_ports_enable, sizeof(s_cfg->SataPortsEnable)); - memcpy(s_cfg->SataPortsDevSlp, config->SataPortsDevSlp, + memcpy(s_cfg->SataPortsDevSlp, config->sata_ports_dev_slp, sizeof(s_cfg->SataPortsDevSlp)); } @@ -511,17 +511,17 @@ static void fill_fsps_sata_params(FSP_S_CONFIG *s_cfg, * Boards not needing the optimizers explicitly disables them by setting * these disable variables to 1 in devicetree overrides. */ - s_cfg->SataPwrOptEnable = !(config->SataPwrOptimizeDisable); + s_cfg->SataPwrOptEnable = !(config->sata_pwr_optimize_disable); /* * Enable DEVSLP Idle Timeout settings DmVal and DitoVal. * SataPortsDmVal is the DITO multiplier. Default is 15. * SataPortsDitoVal is the DEVSLP Idle Timeout (DITO), Default is 625ms. * The default values can be changed from devicetree. */ - for (size_t i = 0; i < ARRAY_SIZE(config->SataPortsEnableDitoConfig); i++) { - if (config->SataPortsEnableDitoConfig[i]) { - s_cfg->SataPortsDmVal[i] = config->SataPortsDmVal[i]; - s_cfg->SataPortsDitoVal[i] = config->SataPortsDitoVal[i]; + for (size_t i = 0; i < ARRAY_SIZE(config->sata_ports_enable_dito_config); i++) { + if (config->sata_ports_enable_dito_config[i]) { + s_cfg->SataPortsDmVal[i] = config->sata_ports_dm_val[i]; + s_cfg->SataPortsDitoVal[i] = config->sata_ports_dito_val[i]; } } } @@ -548,8 +548,8 @@ static void fill_fsps_cnvi_params(FSP_S_CONFIG *s_cfg, { /* CNVi */ s_cfg->CnviMode = is_devfn_enabled(PCH_DEVFN_CNVI_WIFI); - s_cfg->CnviBtCore = config->CnviBtCore; - s_cfg->CnviBtAudioOffload = config->CnviBtAudioOffload; + s_cfg->CnviBtCore = config->cnvi_bt_core; + s_cfg->CnviBtAudioOffload = config->cnvi_bt_audio_offload; /* Assert if CNVi BT is enabled without CNVi being enabled. */ assert(s_cfg->CnviMode || !s_cfg->CnviBtCore); /* Assert if CNVi BT offload is enabled without CNVi BT being enabled. */ @@ -611,7 +611,7 @@ static void fill_fsps_storage_params(FSP_S_CONFIG *s_cfg, s_cfg->ScsEmmcHs400Enabled = config->emmc_enable_hs400_mode; #endif /* Enable Hybrid storage auto detection */ - s_cfg->HybridStorageMode = config->HybridStorageMode; + s_cfg->HybridStorageMode = config->hybrid_storage_mode; } static void fill_fsps_pcie_params(FSP_S_CONFIG *s_cfg, @@ -663,7 +663,7 @@ static void fill_fsps_misc_power_params(FSP_S_CONFIG *s_cfg, * Boards not needing the optimizers explicitly disables them by setting * these disable variables to 1 in devicetree overrides. */ - s_cfg->PchPwrOptEnable = !(config->DmiPwrOptimizeDisable); + s_cfg->PchPwrOptEnable = !(config->dmi_power_optimize_disable); s_cfg->PmSupport = 1; s_cfg->Hwp = 1; s_cfg->Cx = 1; @@ -712,10 +712,10 @@ static void fill_fsps_misc_power_params(FSP_S_CONFIG *s_cfg, power_cycle_duration); /* Set PsysPmax if it is available from DT */ - if (config->PsysPmax) { - printk(BIOS_DEBUG, "PsysPmax = %dW\n", config->PsysPmax); + if (config->platform_pmax) { + printk(BIOS_DEBUG, "PsysPmax = %dW\n", config->platform_pmax); /* PsysPmax is in unit of 1/8 Watt */ - s_cfg->PsysPmax = config->PsysPmax * 8; + s_cfg->PsysPmax = config->platform_pmax * 8; } } @@ -776,19 +776,19 @@ static void fill_fsps_fivr_rfi_params(FSP_S_CONFIG *s_cfg, const struct soc_intel_alderlake_config *config) { /* transform from Hz to 100 KHz */ - s_cfg->FivrRfiFrequency = config->FivrRfiFrequency / (100 * KHz); - s_cfg->FivrSpreadSpectrum = config->FivrSpreadSpectrum; + s_cfg->FivrRfiFrequency = config->fivr_rfi_frequency / (100 * KHz); + s_cfg->FivrSpreadSpectrum = config->fivr_spread_spectrum; } static void fill_fsps_acoustic_params(FSP_S_CONFIG *s_cfg, const struct soc_intel_alderlake_config *config) { - s_cfg->AcousticNoiseMitigation = config->AcousticNoiseMitigation; + s_cfg->AcousticNoiseMitigation = config->acoustic_noise_mitigation; if (s_cfg->AcousticNoiseMitigation) { for (int i = 0; i < NUM_VR_DOMAINS; i++) { - s_cfg->FastPkgCRampDisable[i] = config->FastPkgCRampDisable[i]; - s_cfg->SlowSlewRate[i] = config->SlowSlewRate[i]; + s_cfg->FastPkgCRampDisable[i] = config->fast_pkg_c_ramp_disable[i]; + s_cfg->SlowSlewRate[i] = config->slow_slew_rate[i]; } } } |