From 369b561315ca68d0cdedc38208105a513c7139b5 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 6 Dec 2015 00:47:17 -0600 Subject: 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 Reviewed-on: https://review.coreboot.org/12651 Tested-by: build bot (Jenkins) Reviewed-by: Felix Held --- src/mainboard/asus/kgpe-d16/bootblock.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/mainboard') diff --git a/src/mainboard/asus/kgpe-d16/bootblock.c b/src/mainboard/asus/kgpe-d16/bootblock.c index 0289f0897e..6f2c0a142d 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 #include 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 +} -- cgit v1.2.3