[coreboot-gerrit] Change in coreboot[master]: soc/intel/cannonlake: Add PM methods to power gate SD card controller

Vaibhav Shankar (Code Review) gerrit at coreboot.org
Fri Nov 17 03:04:12 CET 2017


Vaibhav Shankar has uploaded this change for review. ( https://review.coreboot.org/22487


Change subject: soc/intel/cannonlake: Add PM methods to power gate SD card controller
......................................................................

soc/intel/cannonlake: Add PM methods to power gate SD card controller

When system enters S0ix, system fails to power gate SD card
controller.

This patch implements PM methods put the SD card controller
in D3 during S0ix entry.

TEST=Suspend and resume using 'echo freeze > /sys/power/state'.
The System should not be blocked by sd card controller.

Change-Id: I9a9fe14fb6cd3b76ee95c565b3359cdae1a3c445
Signed-off-by: Vaibhav Shankar <vaibhav.shankar at intel.com>
---
M src/soc/intel/cannonlake/acpi/scs.asl
1 file changed, 23 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/87/22487/1

diff --git a/src/soc/intel/cannonlake/acpi/scs.asl b/src/soc/intel/cannonlake/acpi/scs.asl
index ed695fd..7620cb7 100644
--- a/src/soc/intel/cannonlake/acpi/scs.asl
+++ b/src/soc/intel/cannonlake/acpi/scs.asl
@@ -40,5 +40,28 @@
 	{
 		Name (_ADR, 0x00140005)
 
+		OperationRegion(SDPC, PCI_Config, 0x00, 0x100)
+		Field(SDPC, WordAcc, NoLock, Preserve)
+		{
+			Offset(0x84),  /* PMCSR - Power Management
+					  Control and Status */
+			PMCR,32,
+			Offset(0xA2),  /* Device Power Gate config */
+			, 2,
+			PGEN, 1 /* PGE - PG Enable */
+		}
+
+		Method(_PS0, 0, Serialized)
+		{
+			Store(0, PGEN) /* Disable PG */
+			And(PMCR, 0xFFFFFFFC, PMCR) /* Power State D0 */
+		}
+
+		Method(_PS3, 0, Serialized)
+		{
+
+			Store(1, PGEN) /* Enable PG */
+			Or(PMCR, 0x3, PMCR) /* Power State D3 */
+		}
 	} /* Device (SDXC) */
 }

-- 
To view, visit https://review.coreboot.org/22487
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9a9fe14fb6cd3b76ee95c565b3359cdae1a3c445
Gerrit-Change-Number: 22487
Gerrit-PatchSet: 1
Gerrit-Owner: Vaibhav Shankar <vaibhav.shankar at intel.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20171117/b831bad8/attachment.html>


More information about the coreboot-gerrit mailing list