summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/southbridge/amd/sb700/sb700_ide.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/southbridge/amd/sb700/sb700_ide.c b/src/southbridge/amd/sb700/sb700_ide.c
index 88d634bebb..4652ca2539 100644
--- a/src/southbridge/amd/sb700/sb700_ide.c
+++ b/src/southbridge/amd/sb700/sb700_ide.c
@@ -51,10 +51,13 @@ static void ide_init(struct device *dev)
/* set ide as primary, if you want to boot from IDE, you'd better set it
* in $vendor/$mainboard/devicetree.cb */
+
+
if (conf->boot_switch_sata_ide == 1) {
- byte = pci_read_config8(dev, 0xAD);
+ struct device *sm_dev = dev_find_slot(0, PCI_DEVFN(0x14, 0));
+ byte = pci_read_config8(sm_dev, 0xAD);
byte |= 1 << 4;
- pci_write_config8(dev, 0xAD, byte);
+ pci_write_config8(sm_dev, 0xAD, byte);
}
#if CONFIG_PCI_ROM_RUN == 1