set GHC.AE before performing reset (should be done by BIOS already)

This commit is contained in:
Marcus Overhagen 2012-09-14 18:19:11 +02:00
parent 863a181c0b
commit 6c9f2e94e7
1 changed files with 4 additions and 0 deletions

View File

@ -266,6 +266,10 @@ AHCIController::ResetController()
uint32 saveCaps = fRegs->cap & (CAP_SMPS | CAP_SSS | CAP_SPM | CAP_EMS | CAP_SXS);
uint32 savePI = fRegs->pi;
// AHCI 1.3: Software may perform an HBA reset prior to initializing the controller
// by setting GHC.AE to 1 and then setting GHC.HR to 1 if desired.
fRegs->ghc |= GHC_AE;
FlushPostedWrites();
fRegs->ghc |= GHC_HR;
FlushPostedWrites();
if (wait_until_clear(&fRegs->ghc, GHC_HR, 1000000) < B_OK)