Lines Matching refs:ahci

222 AHCI_Dump(AHCI *ahci)
224 volatile AHCIHostControl *hc = ahci->hc;
234 AHCI_DumpPort(AHCI *ahci, int port)
236 volatile AHCIPort *p = ahci->port[port];
254 AHCI_IssueCommand(AHCI *ahci, int port, SGArray *sga, void *cfis, int len)
257 volatile AHCICommandList *cl = ahci->clst[port];
258 volatile AHCICommandTable *ct = ahci->ctbl[port][0];
259 volatile AHCIPort *p = ahci->port[port];
285 AHCI_WaitPort(AHCI *ahci, int port)
287 volatile AHCIPort *p = ahci->port[port];
299 AHCI_IdentifyPort(AHCI *ahci, int port)
301 volatile AHCIPort *p = ahci->port[port];
318 AHCI_IssueCommand(ahci, port, &sga, &fis, sizeof(fis));
320 AHCI_WaitPort(ahci, port);
324 AHCI_DumpPort(ahci, port);
332 AHCI_ResetPort(AHCI *ahci, int port)
334 volatile AHCIPort *p = ahci->port[port];
379 AHCI_IdentifyPort(ahci, port);
383 AHCI_Reset(AHCI *ahci)
386 volatile AHCIHostControl *hc = ahci->hc;
388 AHCI_Dump(ahci);
402 AHCI_Dump(ahci);
407 if (ahci->port[port] != 0) {
408 AHCI_ResetPort(ahci, port);
421 AHCI *ahci = (AHCI *)PAlloc_AllocPage();
440 memcpy(&ahci->dev, &dev, sizeof(dev));
446 ahci->hc = (AHCIHostControl *)hc;
480 ahci->port[p] = (AHCIPort *)(uintptr_t)(dev.bars[AHCI_ABAR].base +
483 ahci->port[p] = 0;
490 volatile AHCIPort *port = ahci->port[p];
495 ahci->ctbl[p][c] = (AHCICommandTable *)PAlloc_AllocPage();
496 memset(ahci->ctbl[p][c], 0, sizeof(AHCICommandTable));
498 ahci->clst[p]->cmds[c].ctba = (uint64_t)ahci->ctbl[p][c];
501 ahci->clst[p] = (AHCICommandList *)PAlloc_AllocPage();
502 memset(ahci->clst[p], 0, sizeof(AHCICommandList));
504 port->clba = (uint64_t)ahci->clst[p];
506 ahci->rfis[p] = (AHCIRecvFIS *)PAlloc_AllocPage();
507 memset(ahci->rfis[p], 0, sizeof(AHCIRecvFIS));
509 port->fb = (uint64_t)ahci->rfis[p];
514 AHCI_Reset(ahci);