diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/soc/intel/jasperlake/chip.h | 1 | ||||
-rw-r--r-- | src/soc/intel/jasperlake/fsp_params.c | 20 |
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) { |