soc/intel/jasperlake: Add SATA related UPDs configuration

This patch control SATA related UPDs based on the devicetree
configuration as per each board's requirement.

BUG=b:155595624
BRANCH=None
TEST=Build, boot JSLRVP, Verified UPD values from FSP log

Change-Id: I4f7e7508b8cd483508293ee3e7b760574d8f025f
Signed-off-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41029
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Aamir Bohra <aamir.bohra@intel.com>
Reviewed-by: V Sowmya <v.sowmya@intel.com>
Reviewed-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
This commit is contained in:
Ronak Kanabar 2020-05-04 17:54:48 +05:30 committed by Patrick Georgi
parent 727fe92564
commit 7f9bca7328
2 changed files with 20 additions and 1 deletions

View File

@ -83,7 +83,6 @@ struct soc_intel_jasperlake_config {
uint16_t usb3_wake_enable_bitmap; uint16_t usb3_wake_enable_bitmap;
/* SATA related */ /* SATA related */
uint8_t SataEnable;
uint8_t SataMode; uint8_t SataMode;
uint8_t SataSalpSupport; uint8_t SataSalpSupport;
uint8_t SataPortsEnable[8]; uint8_t SataPortsEnable[8];

View File

@ -148,6 +148,26 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *supd)
} }
} }
/* SATA */
dev = pcidev_path_on_root(PCH_DEVFN_SATA);
if (dev) {
params->SataEnable = dev->enabled;
params->SataMode = config->SataMode;
params->SataSalpSupport = config->SataSalpSupport;
_Static_assert(ARRAY_SIZE(params->SataPortsEnable) >=
ARRAY_SIZE(config->SataPortsEnable), "copy buffer overflow!");
memcpy(params->SataPortsEnable, config->SataPortsEnable,
sizeof(params->SataPortsEnable));
_Static_assert(ARRAY_SIZE(params->SataPortsDevSlp) >=
ARRAY_SIZE(config->SataPortsDevSlp), "copy buffer overflow!");
memcpy(params->SataPortsDevSlp, config->SataPortsDevSlp,
sizeof(params->SataPortsDevSlp));
} else {
params->SataEnable = 0;
}
/* SDCard related configuration */ /* SDCard related configuration */
dev = pcidev_path_on_root(PCH_DEVFN_SDCARD); dev = pcidev_path_on_root(PCH_DEVFN_SDCARD);
if (!dev) { if (!dev) {