99 xil_printf(
"PCIe Link: %d\r\n", pcieReg.
pcieLinkUp);
110 xil_printf(
"PCIe Bus Master: %d\r\n", pcieReg.
busMaster);
117 xil_printf(
"PCIe IRQ Disable: %d\r\n", pcieReg.
irqDisable);
131 xil_printf(
"PCIe MSI-X Enable: %d\r\n", pcieReg.
msixEnable);
138 xil_printf(
"NVME CC.EN: %d\r\n", nvmeReg.
ccEn);
140 if (nvmeReg.
ccEn == 1)
150 xil_printf(
"NVME CC.SHN: %d\r\n", nvmeReg.
ccShn);
151 if (nvmeReg.
ccShn == 1)
157 xil_printf(
"mAxiWriteErr\r\n");
162 xil_printf(
"pcieMreqErr\r\n");
167 xil_printf(
"pcieCpldErr\r\n");
172 xil_printf(
"pcieCpldLenErr\r\n");
183 return (
unsigned int)nvmeReg.
ccEn;
191 xil_printf(
"rstCnt= %X \r\n", rstCnt);
201 xil_printf(
"linkNum= %X \r\n", linkNum);
237unsigned int get_nvme_cmd(
unsigned short *qID,
unsigned short *cmdSlotTag,
unsigned int *cmdSeqNum,
238 unsigned int *cmdDword)
253 for (idx = 0; idx < 16; idx++)
254 *(cmdDword + idx) =
IO_READ32(addr + (idx * 4));
257 return (
unsigned int)nvmeReg.
cmdValid;
260void set_auto_nvme_cpl(
unsigned int cmdSlotTag,
unsigned int specific,
unsigned int statusFieldWord)
286void set_nvme_cpl(
unsigned int sqId,
unsigned int cid,
unsigned int specific,
unsigned int statusFieldWord)
301void set_io_sq(
unsigned int ioSqIdx,
unsigned int valid,
unsigned int cqVector,
unsigned int qSzie,
302 unsigned int pcieBaseAddrL,
unsigned int pcieBaseAddrH)
307 nvmeReg.
valid = valid;
318void set_io_cq(
unsigned int ioCqIdx,
unsigned int valid,
unsigned int irqEn,
unsigned int irqVector,
319 unsigned int qSzie,
unsigned int pcieBaseAddrL,
unsigned int pcieBaseAddrH)
324 nvmeReg.
valid = valid;
325 nvmeReg.
irqEn = irqEn;
336void set_direct_tx_dma(
unsigned int devAddr,
unsigned int pcieAddrH,
unsigned int pcieAddrL,
unsigned int len)
340 ASSERT((len <= 0x1000) && ((pcieAddrL & 0x3) == 0));
346 hostDmaReg.
dword[3] = 0;
361void set_direct_rx_dma(
unsigned int devAddr,
unsigned int pcieAddrH,
unsigned int pcieAddrL,
unsigned int len)
365 ASSERT((len <= 0x1000) && ((pcieAddrL & 0x3) == 0));
371 hostDmaReg.
dword[3] = 0;
385void set_auto_tx_dma(
unsigned int cmdSlotTag,
unsigned int cmd4KBOffset,
unsigned int devAddr,
386 unsigned int autoCompletion)
389 unsigned char tempTail;
391 ASSERT(cmd4KBOffset < 256);
399 hostDmaReg.
dword[3] = 0;
419void set_auto_rx_dma(
unsigned int cmdSlotTag,
unsigned int cmd4KBOffset,
unsigned int devAddr,
420 unsigned int autoCompletion)
423 unsigned char tempTail;
425 ASSERT(cmd4KBOffset < 256);
433 hostDmaReg.
dword[3] = 0;
void set_nvme_admin_queue(unsigned int sqValid, unsigned int cqValid, unsigned int cqIrqEn)
HOST_DMA_STATUS g_hostDmaStatus
unsigned int check_nvme_cc_en()
void set_auto_rx_dma(unsigned int cmdSlotTag, unsigned int cmd4KBOffset, unsigned int devAddr, unsigned int autoCompletion)
void set_link_width(unsigned int linkNum)
void set_direct_rx_dma(unsigned int devAddr, unsigned int pcieAddrH, unsigned int pcieAddrL, unsigned int len)
void set_nvme_csts_shst(unsigned int shst)
void set_nvme_csts_rdy(unsigned int rdy)
void check_direct_rx_dma_done()
unsigned int check_auto_rx_dma_partial_done(unsigned int tailIndex, unsigned int tailAssistIndex)
void set_auto_tx_dma(unsigned int cmdSlotTag, unsigned int cmd4KBOffset, unsigned int devAddr, unsigned int autoCompletion)
void set_auto_nvme_cpl(unsigned int cmdSlotTag, unsigned int specific, unsigned int statusFieldWord)
void pcie_async_reset(unsigned int rstCnt)
void set_nvme_cpl(unsigned int sqId, unsigned int cid, unsigned int specific, unsigned int statusFieldWord)
void check_direct_tx_dma_done()
void check_auto_rx_dma_done()
unsigned int check_auto_tx_dma_partial_done(unsigned int tailIndex, unsigned int tailAssistIndex)
void check_auto_tx_dma_done()
void set_nvme_slot_release(unsigned int cmdSlotTag)
HOST_DMA_ASSIST_STATUS g_hostDmaAssistStatus
unsigned int get_nvme_cmd(unsigned short *qID, unsigned short *cmdSlotTag, unsigned int *cmdSeqNum, unsigned int *cmdDword)
void set_io_sq(unsigned int ioSqIdx, unsigned int valid, unsigned int cqVector, unsigned int qSzie, unsigned int pcieBaseAddrL, unsigned int pcieBaseAddrH)
void set_direct_tx_dma(unsigned int devAddr, unsigned int pcieAddrH, unsigned int pcieAddrL, unsigned int len)
void set_io_cq(unsigned int ioCqIdx, unsigned int valid, unsigned int irqEn, unsigned int irqVector, unsigned int qSzie, unsigned int pcieBaseAddrL, unsigned int pcieBaseAddrH)
#define DEV_IRQ_MASK_REG_ADDR
#define NVME_IO_SQ_SET_REG_ADDR
#define PCIE_STATUS_REG_ADDR
#define NVME_STATUS_REG_ADDR
#define HOST_DMA_AUTO_TYPE
#define HOST_DMA_DIRECT_TYPE
#define DEV_IRQ_STATUS_REG_ADDR
#define NVME_IO_CQ_SET_REG_ADDR
#define NVME_CPL_FIFO_REG_ADDR
#define PCIE_FUNC_REG_ADDR
#define NVME_ADMIN_QUEUE_SET_REG_ADDR
#define HOST_DMA_RX_DIRECTION
#define CMD_SLOT_RELEASE_TYPE
#define NVME_CMD_FIFO_REG_ADDR
#define HOST_DMA_CMD_FIFO_REG_ADDR
#define HOST_DMA_TX_DIRECTION
#define NVME_CMD_SRAM_ADDR
#define HOST_DMA_FIFO_CNT_REG_ADDR
#define DEV_IRQ_CLEAR_REG_ADDR
#define IO_WRITE32(addr, val)
#define NVME_TASK_WAIT_CC_EN
#define NVME_TASK_SHUTDOWN
unsigned int mAxiWriteErr
unsigned int pcieCpldLenErr
unsigned int autoDmaRxOverFlowCnt
unsigned int autoDmaTxOverFlowCnt
unsigned int cmd4KBOffset
unsigned int autoCompletion
unsigned int dmaDirection
unsigned char directDmaRx
unsigned char directDmaTx
unsigned int directDmaRxCnt
HOST_DMA_FIFO_CNT_REG fifoHead
unsigned int autoDmaRxCnt
HOST_DMA_FIFO_CNT_REG fifoTail
unsigned int directDmaTxCnt
unsigned int autoDmaTxCnt
unsigned short cmdSlotTag
unsigned short statusFieldWord
unsigned int pcieBaseAddrL
unsigned int pcieBaseAddrH
unsigned int pcieBaseAddrH
unsigned int pcieBaseAddrL