southbridge/amd/sb700: Do drive detection even in AHCI mode
SeaBIOS AHCI drive detection randomly fails for drives present on the secondary channel of each AHCI SATA BAR. Forcing native drive detection in AHCI mode resolves this issue. Change-Id: I34eb1d5d3f2f8aefb749a4eeb911c1373d184938 Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com> Reviewed-on: http://review.coreboot.org/11997 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
parent
795ee1a6cd
commit
398540f568
1 changed files with 53 additions and 46 deletions
|
@ -297,7 +297,6 @@ static void sata_init(struct device *dev)
|
|||
if (port_count > max_port_count)
|
||||
port_count = max_port_count;
|
||||
|
||||
if (!sata_ahci_mode) {
|
||||
/* RPR7.7 SATA drive detection. */
|
||||
/* Use BAR5+0x128,BAR0 for Primary Slave */
|
||||
/* Use BAR5+0x1A8,BAR0 for Primary Slave */
|
||||
|
@ -346,18 +345,26 @@ static void sata_init(struct device *dev)
|
|||
if (!sata_drive_detect(i, current_bar))
|
||||
break;
|
||||
}
|
||||
if (sata_ahci_mode)
|
||||
printk(BIOS_DEBUG, "AHCI device %d is %sready after %i tries\n",
|
||||
i,
|
||||
(j == 10) ? "not " : "",
|
||||
(j == 10) ? j : j + 1);
|
||||
else
|
||||
printk(BIOS_DEBUG, "%s %s device is %sready after %i tries\n",
|
||||
(i / 2) ? "Secondary" : "Primary",
|
||||
(i % 2 ) ? "Slave" : "Master",
|
||||
(j == 10) ? "not " : "",
|
||||
(j == 10) ? j : j + 1);
|
||||
} else {
|
||||
if (sata_ahci_mode)
|
||||
printk(BIOS_DEBUG, "No AHCI SATA drive on Slot%i\n", i);
|
||||
else
|
||||
printk(BIOS_DEBUG, "No %s %s SATA drive on Slot%i\n",
|
||||
(i / 2) ? "Secondary" : "Primary",
|
||||
(i % 2 ) ? "Slave" : "Master", i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Below is CIM InitSataLateFar */
|
||||
/* Enable interrupts from the HBA */
|
||||
|
|
Loading…
Reference in a new issue