aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/skylake
diff options
context:
space:
mode:
authorFelix Singer <felixsinger@posteo.net>2020-07-29 19:57:25 +0200
committerMichael Niewöhner <c0d3z3r0@review.coreboot.org>2020-07-29 20:45:29 +0000
commit0901d03085e091a26fdc00da09a1e8e0b05adf86 (patch)
tree8513085e64129afa84ad9a8f4c16e9e73eb92923 /src/soc/intel/skylake
parent3c0486913fea834336ebd6bf98f326aa4ba6e5c8 (diff)
soc/intel/skylake: Enable SATA depending on devicetree configuration
Currently SATA gets enabled by the option EnableSata, but this duplicates the devicetree on/off options. Therefore use the on/off options for the enablement of the SATA controller. I checked all corresponding mainboards if the devicetree configuration matches the EnableSata setting. Change-Id: I217dcb7178f29bbdeada54bdb774166126b47a5a Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/43843 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Michael Niewöhner
Diffstat (limited to 'src/soc/intel/skylake')
-rw-r--r--src/soc/intel/skylake/chip.c5
-rw-r--r--src/soc/intel/skylake/chip.h1
2 files changed, 3 insertions, 3 deletions
diff --git a/src/soc/intel/skylake/chip.c b/src/soc/intel/skylake/chip.c
index f14a163772..3a9dd5cf44 100644
--- a/src/soc/intel/skylake/chip.c
+++ b/src/soc/intel/skylake/chip.c
@@ -166,8 +166,9 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *supd)
}
}
- params->SataEnable = config->EnableSata;
- if (config->EnableSata) {
+ dev = pcidev_path_on_root(PCH_DEVFN_SATA);
+ params->SataEnable = dev ? dev->enabled : 0;
+ if (params->SataEnable) {
memcpy(params->SataPortsEnable, config->SataPortsEnable,
sizeof(params->SataPortsEnable));
memcpy(params->SataPortsDevSlp, config->SataPortsDevSlp,
diff --git a/src/soc/intel/skylake/chip.h b/src/soc/intel/skylake/chip.h
index 054584051a..a9c69cf301 100644
--- a/src/soc/intel/skylake/chip.h
+++ b/src/soc/intel/skylake/chip.h
@@ -143,7 +143,6 @@ struct soc_intel_skylake_config {
u8 LanClkReqNumber;
/* SATA related */
- u8 EnableSata;
enum {
/* Documentation and header files of Skylake FSP disagree on
the values, Kaby Lake FSP (KabylakeFsp0001 on github) uses