From d4b6ac19b0a6619ebe645875282643cc50cf7a3e Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Sun, 25 Jun 2017 20:24:05 -0700 Subject: soc/intel/skylake: storage: Add 2ms delay before exiting D3 For the skylake/kabylake generation of PCH there is an ACPI workaround for emmc/sd power state that involves disabling and re-enabling dynamic clock gating after enabling power to the controller, before setting the power state to D0. Under certain conditions we have observed that the controller is not powered and ready by the time the kernel attempts to read the PME control and status register and so the system will hang while attempting to read PCI config register 0x84. To ensure that the controller is ready add a 2ms delay after re-enabling dynamic clock gating and before setting the power state to D0. This issue has been observed on eMMC, but the same workaround exists for the SD card interface so the same delay is added there. BUG=b:35587084 BRANCH=eve TEST=manual stress testing of D0<>D3 transition across many devices shows no hard hang after 2 days. Change-Id: If0f0323cf5437c54c907c332937b5de9dda2d8f6 Signed-off-by: Duncan Laurie Reviewed-on: https://review.coreboot.org/20363 Tested-by: build bot (Jenkins) Reviewed-by: Subrata Banik Reviewed-by: Paul Menzel Reviewed-by: Furquan Shaikh --- src/soc/intel/skylake/acpi/scs.asl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/soc') diff --git a/src/soc/intel/skylake/acpi/scs.asl b/src/soc/intel/skylake/acpi/scs.asl index 1f89689fb7..c2f50cce9b 100644 --- a/src/soc/intel/skylake/acpi/scs.asl +++ b/src/soc/intel/skylake/acpi/scs.asl @@ -85,6 +85,7 @@ Device (EMMC) /* Set bits 31, 6, 2, 0 */ ^^PCRO (PID_SCS, 0x600, 0x80000045) + Sleep (2) /* Set Power State to D0 */ Store (Zero, Local0) @@ -139,6 +140,7 @@ Device (SDXC) /* Set bits 31, 6, 2, 0 */ ^^PCRO (PID_SCS, 0x600, 0x00000185) + Sleep (2) /* Set Power State to D0 */ Store (Zero, Local0) -- cgit v1.2.3