[coreboot-gerrit] Patch set updated for coreboot: mainboard/asus/kgpe-d16: Use I/O PCI access in bootblock

Timothy Pearson (tpearson@raptorengineeringinc.com) gerrit at coreboot.org
Sun Dec 6 07:54:47 CET 2015


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

-gerrit

commit 4d5b3935d68ff166c010dfae970c55c38fb2a663
Author: Timothy Pearson <tpearson at raptorengineeringinc.com>
Date:   Sun Dec 6 00:47:17 2015 -0600

    mainboard/asus/kgpe-d16: Use I/O PCI access in bootblock
    
    The existing code incorrectly used standard PCI access
    calls in the bootblock.  Use the I/O PCI access calls
    as the normal PCI access mechanisms have not yet been
    set up.
    
    Also ensure the recovery jumper GPIO has been set to
    input mode before reading it.
    
    Change-Id: Id626d01526427004b2404e4d9b44d7c987d172d1
    Signed-off-by: Timothy Pearson <tpearson at raptorengineeringinc.com>
---
 src/mainboard/asus/kgpe-d16/bootblock.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/mainboard/asus/kgpe-d16/bootblock.c b/src/mainboard/asus/kgpe-d16/bootblock.c
index 0289f08..6f2c0a1 100644
--- a/src/mainboard/asus/kgpe-d16/bootblock.c
+++ b/src/mainboard/asus/kgpe-d16/bootblock.c
@@ -15,6 +15,7 @@
  * GNU General Public License for more details.
  */
 
+#include <arch/io.h>
 #include <pc80/mc146818rtc.h>
 
 void bootblock_mainboard_init(void)
@@ -27,7 +28,10 @@ void bootblock_mainboard_init(void)
 	bootblock_southbridge_init();
 
 	/* Recovery jumper is connected to SP5100 GPIO61, and clears the GPIO when placed in the Recovery position */
-	recovery_enabled = (!(pci_read_config8(PCI_DEV(0, 0x14, 0), 0x57) & 0x1));
+	byte = pci_io_read_config8(PCI_DEV(0, 0x14, 0), 0x56);
+	byte |= 0x1 << 4;	/*  Set GPIO61 to input mode */
+	pci_io_write_config8(PCI_DEV(0, 0x14, 0), 0x56, byte);
+	recovery_enabled = (!(pci_io_read_config8(PCI_DEV(0, 0x14, 0), 0x57) & 0x1));
 	if (recovery_enabled) {
 #if CONFIG_USE_OPTION_TABLE
 		/* Clear NVRAM checksum */
@@ -45,4 +49,4 @@ void bootblock_mainboard_init(void)
 		 */
 #endif
 	}
-}
\ No newline at end of file
+}



More information about the coreboot-gerrit mailing list