[coreboot-gerrit] Change in coreboot[master]: soc/intel/cannonlake: Port eMMC controller W/A from Intel Reference code

Subrata Banik (Code Review) gerrit at coreboot.org
Thu Jan 18 11:22:49 CET 2018


Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/23312


Change subject: soc/intel/cannonlake: Port eMMC controller W/A from Intel Reference code
......................................................................

soc/intel/cannonlake: Port eMMC controller W/A from Intel Reference code

Solution: To do an additional config read to the eMMC controller
after the controller has been power gated (put to D3)

Change-Id: Ieac939c9108e84ba6c7c26b1a49aaf829d8456b7
Signed-off-by: Subrata Banik <subrata.banik at intel.com>
---
M src/soc/intel/cannonlake/acpi/scs.asl
1 file changed, 16 insertions(+), 4 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/12/23312/1

diff --git a/src/soc/intel/cannonlake/acpi/scs.asl b/src/soc/intel/cannonlake/acpi/scs.asl
index e993ddb..b84bedd 100644
--- a/src/soc/intel/cannonlake/acpi/scs.asl
+++ b/src/soc/intel/cannonlake/acpi/scs.asl
@@ -1,7 +1,7 @@
 /*
  * This file is part of the coreboot project.
  *
- * Copyright (C) 2017 Intel Corporation.
+ * Copyright (C) 2017-2018 Intel Corporation.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -17,21 +17,33 @@
 	/* EMMC */
 	Device(PEMC) {
 		Name(_ADR, 0x001A0000)
+		Name (TEMP, 0)
 
 		OperationRegion(SCSR, PCI_Config, 0x00, 0x100)
 		Field(SCSR, WordAcc, NoLock, Preserve) {
-			Offset(0xA2),   // 0xA2, Device PG config
+			Offset (0x84),	/* PMECTRLSTATUS */
+			PMCR, 16,
+			Offset(0xA2),	/* PG_CONFIG */
 			, 2,
-			PGEN, 1         // [BIT2] PGE - PG Enable
+			PGEN, 1,	/* PG_ENABLE */
 		}
 
 		Method(_PS0, 0, Serialized) {
-			Stall (50) // Sleep 50 ms
+			Stall (50) // Sleep 50 us
+
 			Store(0, PGEN) // Disable PG
+
+			/* Set Power State to D0 */
+			And (PMCR, 0xFFFC, PMCR)
+			Store (PMCR, ^TEMP)
 		}
 
 		Method(_PS3, 0, Serialized) {
 			Store(1, PGEN) // Enable PG
+
+			/* Set Power State to D3 */
+			Or (PMCR, 0x0003, PMCR)
+			Store (PMCR, ^TEMP)
 		}
 	}
 

-- 
To view, visit https://review.coreboot.org/23312
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieac939c9108e84ba6c7c26b1a49aaf829d8456b7
Gerrit-Change-Number: 23312
Gerrit-PatchSet: 1
Gerrit-Owner: Subrata Banik <subrata.banik at intel.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180118/3faf3f25/attachment.html>


More information about the coreboot-gerrit mailing list