From 2a50a1f534177965651244557198ee05235f8891 Mon Sep 17 00:00:00 2001 From: Bora Guvendik Date: Mon, 19 Mar 2018 17:15:20 -0700 Subject: soc/intel/cannonlake: Clear EMMC timeout when boot source is not EMMC Clear EMMC timeout register to avoid EMMC issue according to cannonlake bios writer guide. _PS0 is not called by kernel when boot source is not EMMC but kernel still initializes emmc. Add _INI to EMMC,SD asl code to cover cases that the system doesn't boot from EMMC. BUG=b:76202699 TEST=Install OS into EMMC Change-Id: I4eef23f637f781b709696951c5bd825530cc1d11 Signed-off-by: Bora Guvendik Reviewed-on: https://review.coreboot.org/25290 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/soc/intel/cannonlake/acpi/scs.asl | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) (limited to 'src/soc/intel/cannonlake/acpi') diff --git a/src/soc/intel/cannonlake/acpi/scs.asl b/src/soc/intel/cannonlake/acpi/scs.asl index 4062e704a1..896fd77c19 100644 --- a/src/soc/intel/cannonlake/acpi/scs.asl +++ b/src/soc/intel/cannonlake/acpi/scs.asl @@ -16,6 +16,17 @@ #include Scope (\_SB.PCI0) { + + /* + * Clear register 0x1C20/0x4820 + * Arg0 - PCR Port ID + */ + Method(SCSC, 1, Serialized) + { + ^PCRA (Arg0, 0x1C20, 0x0) + ^PCRA (Arg0, 0x4820, 0x0) + } + /* EMMC */ Device(PEMC) { Name(_ADR, 0x001A0000) @@ -31,14 +42,18 @@ Scope (\_SB.PCI0) { PGEN, 1, /* PG_ENABLE */ } + Method(_INI) { + /* Clear register 0x1C20/0x4820 */ + ^^SCSC (PID_EMMC) + } + Method(_PS0, 0, Serialized) { Stall (50) // Sleep 50 us Store(0, PGEN) // Disable PG /* Clear register 0x1C20/0x4820 */ - ^^PCRA (PID_EMMC, 0x1C20, 0x0) - ^^PCRA (PID_EMMC, 0x4820, 0x0) + ^^SCSC (PID_EMMC) /* Set Power State to D0 */ And (PMCR, 0xFFFC, PMCR) @@ -80,13 +95,18 @@ Scope (\_SB.PCI0) { PGEN, 1, /* PG_ENABLE */ } + Method(_INI) + { + /* Clear register 0x1C20/0x4820 */ + ^^SCSC (PID_SDX) + } + Method (_PS0, 0, Serialized) { Store (0, PGEN) /* Disable PG */ /* Clear register 0x1C20/0x4820 */ - ^^PCRA (PID_SDX, 0x1C20, 0x0) - ^^PCRA (PID_SDX, 0x4820, 0x0) + ^^SCSC (PID_SDX) /* Set Power State to D0 */ And (PMCR, 0xFFFC, PMCR) -- cgit v1.2.3