Put the interface into partial mode for AHCI via software ?
Posted: Mon Sep 03, 2012 8:11 am
According to AHCI spec, software can initiate interface power management state transitions if the link layer is currently in the L_IDLE state. After reading involved document I summarize the steps as below trying to put the interface into the Partial state.
* In this configuration CAP.SSC = PSC = 1 and I set PxSCTL.IPM = 0(no interface restrictions)
My question is: Do I check if device support this interface power management state transition in this case ?
Thanks !
- - issue read/write commands to device first
- - after commands completed while loop to check if PxCMD.ICC = 0 or not
- (... wait until PxCMD.ICC = 0 and this means the HBA is ready to to accept a new interface command...)
- - set PxCMD.ICC = 2(2 indicates "Partial" state)
- - wait for PxCMD.ICC back to "0" (spec said HBA will update this back to idle finally...)
- - while loop to check if PxSSTS.IPM = 2 (where 2 means: current interface is in Partial state)
* In this configuration CAP.SSC = PSC = 1 and I set PxSCTL.IPM = 0(no interface restrictions)
My question is: Do I check if device support this interface power management state transition in this case ?
Thanks !