try to activate link and spin up the device
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22280 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -94,6 +94,7 @@ typedef struct {
|
|||||||
enum {
|
enum {
|
||||||
PORT_CMD_ICC_ACTIVE = (1 << 28), // Interface Communication control
|
PORT_CMD_ICC_ACTIVE = (1 << 28), // Interface Communication control
|
||||||
PORT_CMD_ICC_SLUMBER = (6 << 28), // Interface Communication control
|
PORT_CMD_ICC_SLUMBER = (6 << 28), // Interface Communication control
|
||||||
|
PORT_CMD_ICC_MASK = (0xf<<28), // Interface Communication control
|
||||||
PORT_CMD_CR = (1 << 15), // Command List Running (DMA active)
|
PORT_CMD_CR = (1 << 15), // Command List Running (DMA active)
|
||||||
PORT_CMD_FR = (1 << 14), // FIS Receive Running
|
PORT_CMD_FR = (1 << 14), // FIS Receive Running
|
||||||
PORT_CMD_FER = (1 << 4), // FIS Receive Enable
|
PORT_CMD_FER = (1 << 4), // FIS Receive Enable
|
||||||
|
|||||||
@@ -68,6 +68,12 @@ AHCIPort::Init()
|
|||||||
|
|
||||||
// clear error bits
|
// clear error bits
|
||||||
fRegs->serr = fRegs->serr;
|
fRegs->serr = fRegs->serr;
|
||||||
|
|
||||||
|
// spin up device
|
||||||
|
fRegs->cmd |= PORT_CMD_SUD;
|
||||||
|
|
||||||
|
// activate link
|
||||||
|
fRegs->cmd = (fRegs->cmd & ~PORT_CMD_ICC_MASK) | PORT_CMD_ICC_ACTIVE;
|
||||||
|
|
||||||
// enable FIS receive
|
// enable FIS receive
|
||||||
fRegs->cmd |= PORT_CMD_FER;
|
fRegs->cmd |= PORT_CMD_FER;
|
||||||
@@ -135,7 +141,7 @@ void
|
|||||||
AHCIPort::Interrupt()
|
AHCIPort::Interrupt()
|
||||||
{
|
{
|
||||||
uint32 is = fRegs->is;
|
uint32 is = fRegs->is;
|
||||||
TRACE("AHCIPort::Interrupt port %d, status %#08x\n", fIndex, is);
|
TRACE("AHCIPort::Interrupt port %d, status %#08lx\n", fIndex, is);
|
||||||
|
|
||||||
// clear interrupts
|
// clear interrupts
|
||||||
fRegs->is = is;
|
fRegs->is = is;
|
||||||
|
|||||||
Reference in New Issue
Block a user