[coreboot-gerrit] New patch to review for coreboot: southbridge/amd/sb700: Add option for last power state after failure

Timothy Pearson (tpearson@raptorengineeringinc.com) gerrit at coreboot.org
Sat Oct 24 05:36:39 CEST 2015


Timothy Pearson (tpearson at raptorengineeringinc.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/12175

-gerrit

commit be3aa56ecbf6695a985cdfc88413351fe3f4571f
Author: Timothy Pearson <tpearson at raptorengineeringinc.com>
Date:   Fri Oct 23 22:16:55 2015 -0500

    southbridge/amd/sb700: Add option for last power state after failure
    
    Change-Id: Ieb27bd51dfd45dd15d24a576865d38180a07444e
    Signed-off-by: Timothy Pearson <tpearson at raptorengineeringinc.com>
---
 src/southbridge/amd/sb700/sm.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/southbridge/amd/sb700/sm.c b/src/southbridge/amd/sb700/sm.c
index 16958a2..5d4ddce 100644
--- a/src/southbridge/amd/sb700/sm.c
+++ b/src/southbridge/amd/sb700/sm.c
@@ -2,6 +2,7 @@
  * This file is part of the coreboot project.
  *
  * Copyright (C) 2010 Advanced Micro Devices, Inc.
+ * Copyright (C) 2015 Timothy Pearson <tpearson at raptorengineeringinc.com>, Raptor Engineering
  *
  * 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
@@ -132,9 +133,10 @@ static void sm_init(device_t dev)
 	get_option(&on, "power_on_after_fail");
 	byte = pm_ioread(0x74);
 	byte &= ~0x03;
-	if (on) {
-		byte |= 2;
-	}
+	if (on == 1)
+		byte |= 0x1;	/* Force power on */
+	else if (on == 2)
+		byte |= 0x2;	/* Use last power state */
 	byte |= 1 << 2;
 	pm_iowrite(0x74, byte);
 	printk(BIOS_INFO, "set power %s after power fail\n", on ? "on" : "off");



More information about the coreboot-gerrit mailing list