summaryrefslogtreecommitdiff
path: root/src/mainboard/asus
diff options
context:
space:
mode:
authorTimothy Pearson <tpearson@raptorengineeringinc.com>2015-12-06 00:47:17 -0600
committerMartin Roth <martinroth@google.com>2015-12-07 17:06:31 +0100
commit369b561315ca68d0cdedc38208105a513c7139b5 (patch)
treed279a5635d400368cc5913c0ca9c75acdd70a042 /src/mainboard/asus
parent9f656c0316640959c0ef4ce0e099849468fe515a (diff)
downloadcoreboot-369b561315ca68d0cdedc38208105a513c7139b5.tar.xz
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@raptorengineeringinc.com> Reviewed-on: https://review.coreboot.org/12651 Tested-by: build bot (Jenkins) Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/mainboard/asus')
-rw-r--r--src/mainboard/asus/kgpe-d16/bootblock.c8
1 files changed, 6 insertions, 2 deletions
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 <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
+}