From e7fb7ce06577d88a193c8553b2d94c12eb256c58 Mon Sep 17 00:00:00 2001 From: Divya Chellap Date: Tue, 19 Dec 2017 20:16:50 +0530 Subject: soc/intel/skylake: Add PcieRpClkSrcNumber UPD configuartion support New UPD PcieRpClkSrcNumber introduced in FSP V2.9.2 to configure clock source number of PCIe root ports. This UPD array is set to clock source number(0-6) for all the enabled PCIe root ports, invalid(0x1F) is set for disabled PCIe root ports. BUG=b:70252901 BRANCH=None TEST= Perform the following 1. Build and boot soraka 2. Verify PCIe devices list using lspci command 3. Perform Basic Assurance Test(BAT) on soraka Change-Id: I95ca0d893338100b7e4d7d0b76c076ed7e2b040e Signed-off-by: Divya Chellap Reviewed-on: https://review.coreboot.org/22947 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Subrata Banik Reviewed-by: Furquan Shaikh --- src/soc/intel/skylake/chip.h | 5 +++++ src/soc/intel/skylake/chip_fsp20.c | 13 +++++++++++++ 2 files changed, 18 insertions(+) (limited to 'src/soc/intel') diff --git a/src/soc/intel/skylake/chip.h b/src/soc/intel/skylake/chip.h index 813974909a06..00088b9aad64 100644 --- a/src/soc/intel/skylake/chip.h +++ b/src/soc/intel/skylake/chip.h @@ -199,6 +199,11 @@ struct soc_intel_skylake_config { */ u8 PcieRpClkReqNumber[CONFIG_MAX_ROOT_PORTS]; + /* + * Clk source number for Root Port + */ + u8 PcieRpClkSrcNumber[CONFIG_MAX_ROOT_PORTS]; + /* * Enable/Disable AER (Advanced Error Reporting) for Root Port * 0: Disable AER diff --git a/src/soc/intel/skylake/chip_fsp20.c b/src/soc/intel/skylake/chip_fsp20.c index 96c3b608afec..24a239e3b5c8 100644 --- a/src/soc/intel/skylake/chip_fsp20.c +++ b/src/soc/intel/skylake/chip_fsp20.c @@ -166,6 +166,19 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *supd) memcpy(params->PcieRpLtrEnable, config->PcieRpLtrEnable, sizeof(params->PcieRpLtrEnable)); + /* + * PcieRpClkSrcNumber UPD is set to clock source number(0-6) for + * all the enabled PCIe root ports, invalid(0x1F) is set for + * disabled PCIe root ports. + */ + for (i = 0; i < CONFIG_MAX_ROOT_PORTS; i++) { + if (config->PcieRpClkReqSupport[i]) + params->PcieRpClkSrcNumber[i] = + config->PcieRpClkSrcNumber[i]; + else + params->PcieRpClkSrcNumber[i] = 0x1F; + } + /* disable Legacy PME */ memset(params->PcieRpPmSci, 0, sizeof(params->PcieRpPmSci)); -- cgit v1.2.3