Lines Matching refs:cmdheader
314 HBA_CMD_HEADER *cmdheader = (HBA_CMD_HEADER *)(phys_2_virt(port->clb)); in port_rebase() local
317 cmdheader[i].prdtl = 8; // 8 prdt entries per command table in port_rebase()
320 … cmdheader[i].ctba = virt_2_phys((ahci_port_base_vaddr + (40 << 10) + (portno << 13) + (i << 8))); in port_rebase()
322 memset((void *)phys_2_virt(cmdheader[i].ctba), 0, 256); in port_rebase()
348 HBA_CMD_HEADER *cmdheader = (HBA_CMD_HEADER *)phys_2_virt(port->clb); in ahci_read() local
349 cmdheader += slot; in ahci_read()
350 cmdheader->cfl = sizeof(FIS_REG_H2D) / sizeof(uint32_t); // Command FIS size in ahci_read()
351 cmdheader->w = 0; // Read from device in ahci_read()
352 cmdheader->prdtl = (uint16_t)((count - 1) >> 4) + 1; // PRDT entries count in ahci_read()
354 HBA_CMD_TBL *cmdtbl = (HBA_CMD_TBL *)phys_2_virt(cmdheader->ctba); in ahci_read()
355 memset(cmdtbl, 0, sizeof(HBA_CMD_TBL) + (cmdheader->prdtl - 1) * sizeof(HBA_PRDT_ENTRY)); in ahci_read()
359 for (i = 0; i < cmdheader->prdtl - 1; ++i) in ahci_read()
442 HBA_CMD_HEADER *cmdheader = (HBA_CMD_HEADER *)phys_2_virt(port->clb); in ahci_write() local
444 cmdheader += slot; in ahci_write()
445 cmdheader->cfl = sizeof(FIS_REG_H2D) / sizeof(uint32_t); // Command FIS size in ahci_write()
446 cmdheader->w = 1; in ahci_write()
447 cmdheader->c = 1; in ahci_write()
448 cmdheader->p = 1; in ahci_write()
449 cmdheader->prdtl = (uint16_t)((count - 1) >> 4) + 1; // PRDT entries count in ahci_write()
451 HBA_CMD_TBL *cmdtbl = (HBA_CMD_TBL *)phys_2_virt(cmdheader->ctba); in ahci_write()
452 memset(cmdtbl, 0, sizeof(HBA_CMD_TBL) + (cmdheader->prdtl - 1) * sizeof(HBA_PRDT_ENTRY)); in ahci_write()
455 for (i = 0; i < cmdheader->prdtl - 1; ++i) in ahci_write()