summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonak Kanabar <ronak.kanabar@intel.com>2020-05-04 17:54:48 +0530
committerPatrick Georgi <pgeorgi@google.com>2020-05-12 20:06:37 +0000
commit7f9bca73286c393a919112133d50a767500cfa95 (patch)
tree334bc69b2cbccaea07a21a710a4ff82516feb38d
parent727fe925649cadc2803e56b8d5ddb070ddc36a43 (diff)
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>
-rw-r--r--src/soc/intel/jasperlake/chip.h1
-rw-r--r--src/soc/intel/jasperlake/fsp_params.c20
2 files changed, 20 insertions, 1 deletions
diff --git a/src/soc/intel/jasperlake/chip.h b/src/soc/intel/jasperlake/chip.h
index 548d0ee2d1..7a6a7fd0dd 100644
--- a/src/soc/intel/jasperlake/chip.h
+++ b/src/soc/intel/jasperlake/chip.h
@@ -83,7 +83,6 @@ struct soc_intel_jasperlake_config {
uint16_t usb3_wake_enable_bitmap;
/* SATA related */
- uint8_t SataEnable;
uint8_t SataMode;
uint8_t SataSalpSupport;
uint8_t SataPortsEnable[8];
diff --git a/src/soc/intel/jasperlake/fsp_params.c b/src/soc/intel/jasperlake/fsp_params.c
index d9e8261de7..45162f91f2 100644
--- a/src/soc/intel/jasperlake/fsp_params.c
+++ b/src/soc/intel/jasperlake/fsp_params.c
@@ -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 */
dev = pcidev_path_on_root(PCH_DEVFN_SDCARD);
if (!dev) {