aboutsummaryrefslogtreecommitdiff
path: root/src/southbridge/amd/amd8111/amd8111_early_smbus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/southbridge/amd/amd8111/amd8111_early_smbus.c')
-rw-r--r--src/southbridge/amd/amd8111/amd8111_early_smbus.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/southbridge/amd/amd8111/amd8111_early_smbus.c b/src/southbridge/amd/amd8111/amd8111_early_smbus.c
index 8ad3589e63..c8996784de 100644
--- a/src/southbridge/amd/amd8111/amd8111_early_smbus.c
+++ b/src/southbridge/amd/amd8111/amd8111_early_smbus.c
@@ -5,17 +5,25 @@
static void enable_smbus(void)
{
device_t dev;
+ uint8_t enable;
+
dev = pci_locate_device(PCI_ID(0x1022, 0x746b), 0);
if (dev == PCI_DEV_INVALID) {
die("SMBUS controller not found\r\n");
}
- uint8_t enable;
- print_spew("SMBus controller enabled\r\n");
+
pci_write_config32(dev, 0x58, SMBUS_IO_BASE | 1);
enable = pci_read_config8(dev, 0x41);
pci_write_config8(dev, 0x41, enable | (1 << 7));
+
+ /* check that we can see the smbus controller I/O. */
+ if (inw(SMBUS_IO_BASE)==0xFF){
+ die("SMBUS controller I/O not found\n");
+ }
+
/* clear any lingering errors, so the transaction will run */
outw(inw(SMBUS_IO_BASE + SMBGSTATUS), SMBUS_IO_BASE + SMBGSTATUS);
+ print_spew("SMBus controller enabled\r\n");
}
static int smbus_recv_byte(unsigned device)