aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrej Kruták <andrej.krutak@sysgo.com>2024-01-09 16:34:23 +0100
committerGerd Hoffmann <kraxel@redhat.com>2024-01-25 10:12:22 +0100
commit3f082f38bf0050270dc65abf256f7014f6c0c4a8 (patch)
tree22268f703fdd9b90afed30d01ab28b7e211ccdcd
parent3ae8888611e59ad82a59df7bead143662036d946 (diff)
downloadseabios-3f082f38bf0050270dc65abf256f7014f6c0c4a8.zip
seabios-3f082f38bf0050270dc65abf256f7014f6c0c4a8.tar.gz
seabios-3f082f38bf0050270dc65abf256f7014f6c0c4a8.tar.bz2
Add AHCI Power ON + ICC_ACTIVE into port setup code
Windows appears to put the AHCI port into 'Partial power management state' during reboot, the command puts it back into 'active state'. AHCI/1: link down 0x00000231 (SCR STAT register) -> AHCI/1: link up 0x00000133 Signed-off-by: Andrej Krutak andrej.krutak@sysgo.com Message-ID: <1531455205.6484.1704814463638@ox.sysgo.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r--src/hw/ahci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hw/ahci.c b/src/hw/ahci.c
index 3fa845a..4f0f640 100644
--- a/src/hw/ahci.c
+++ b/src/hw/ahci.c
@@ -444,7 +444,8 @@ static int ahci_port_setup(struct ahci_port_s *port)
ahci_port_writel(ctrl, pnr, PORT_CMD, cmd);
/* spin up */
- cmd |= PORT_CMD_SPIN_UP;
+ cmd &= ~PORT_CMD_ICC_MASK;
+ cmd |= PORT_CMD_SPIN_UP | PORT_CMD_POWER_ON | PORT_CMD_ICC_ACTIVE;
ahci_port_writel(ctrl, pnr, PORT_CMD, cmd);
u32 end = timer_calc(AHCI_LINK_TIMEOUT);
for (;;) {