OpenSSD Cosmos+ Platform Firmware  0.0.2
The firmware of Cosmos+ OpenSSD Platform for TOSHIBA nand flash module.
host_lld.c
Go to the documentation of this file.
1
2// host_lld.c for Cosmos+ OpenSSD
3// Copyright (c) 2016 Hanyang University ENC Lab.
4// Contributed by Yong Ho Song <yhsong@enc.hanyang.ac.kr>
5// Youngjin Jo <yjjo@enc.hanyang.ac.kr>
6// Sangjin Lee <sjlee@enc.hanyang.ac.kr>
7// Jaewook Kwak <jwkwak@enc.hanyang.ac.kr>
8//
9// This file is part of Cosmos+ OpenSSD.
10//
11// Cosmos+ OpenSSD is free software; you can redistribute it and/or modify
12// it under the terms of the GNU General Public License as published by
13// the Free Software Foundation; either version 3, or (at your option)
14// any later version.
15//
16// Cosmos+ OpenSSD is distributed in the hope that it will be useful,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19// See the GNU General Public License for more details.
20//
21// You should have received a copy of the GNU General Public License
22// along with Cosmos+ OpenSSD; see the file COPYING.
23// If not, see <http://www.gnu.org/licenses/>.
25
27// Company: ENC Lab. <http://enc.hanyang.ac.kr>
28// Engineer: Sangjin Lee <sjlee@enc.hanyang.ac.kr>
29// Jaewook Kwak <jwkwak@enc.hanyang.ac.kr>
30//
31// Project Name: Cosmos+ OpenSSD
32// Design Name: Cosmos+ Firmware
33// Module Name: NVMe Low Level Driver
34// File Name: host_lld.c
35//
36// Version: v1.1.0
37//
38// Description:
39// - defines functions to control the NVMe controller
41
43// Revision History:
44//
45// * v1.1.0
46// - DMA partial done check functions are added
47// - DMA assist status is added to support DMA partial done check functions
48//
49// * v1.0.0
50// - First draft
52
53#include "stdio.h"
54#include "xil_exception.h"
55#include "xil_printf.h"
56#include "debug.h"
57#include "io_access.h"
58
59#include "nvme.h"
60#include "host_lld.h"
61
65
67{
68 DEV_IRQ_REG devReg;
69
70 devReg.dword = 0;
71 devReg.pcieLink = 1;
72 devReg.busMaster = 1;
73 devReg.pcieIrq = 1;
74 devReg.pcieMsi = 1;
75 devReg.pcieMsix = 1;
76 devReg.nvmeCcEn = 1;
77 devReg.nvmeCcShn = 1;
78 devReg.mAxiWriteErr = 1;
79 devReg.pcieMreqErr = 1;
80 devReg.pcieCpldErr = 1;
81 devReg.pcieCpldLenErr = 1;
82
84}
85
87{
88 DEV_IRQ_REG devReg;
89 // Xil_ExceptionDisable();
90
93 // xil_printf("IRQ: 0x%X\r\n", devReg.dword);
94
95 if (devReg.pcieLink == 1)
96 {
97 PCIE_STATUS_REG pcieReg;
99 xil_printf("PCIe Link: %d\r\n", pcieReg.pcieLinkUp);
100 // set_link_width(0) //you can choose pcie lane width 0,2,4,8 mini board -> maximum 4, cosmos+ board ->
101 // maximum 8
102 if (pcieReg.pcieLinkUp == 0)
104 }
105
106 if (devReg.busMaster == 1)
107 {
108 PCIE_FUNC_REG pcieReg;
110 xil_printf("PCIe Bus Master: %d\r\n", pcieReg.busMaster);
111 }
112
113 if (devReg.pcieIrq == 1)
114 {
115 PCIE_FUNC_REG pcieReg;
117 xil_printf("PCIe IRQ Disable: %d\r\n", pcieReg.irqDisable);
118 }
119
120 if (devReg.pcieMsi == 1)
121 {
122 PCIE_FUNC_REG pcieReg;
124 xil_printf("PCIe MSI Enable: %d, 0x%x\r\n", pcieReg.msiEnable, pcieReg.msiVecNum);
125 }
126
127 if (devReg.pcieMsix == 1)
128 {
129 PCIE_FUNC_REG pcieReg;
131 xil_printf("PCIe MSI-X Enable: %d\r\n", pcieReg.msixEnable);
132 }
133
134 if (devReg.nvmeCcEn == 1)
135 {
136 NVME_STATUS_REG nvmeReg;
138 xil_printf("NVME CC.EN: %d\r\n", nvmeReg.ccEn);
139
140 if (nvmeReg.ccEn == 1)
142 else
144 }
145
146 if (devReg.nvmeCcShn == 1)
147 {
148 NVME_STATUS_REG nvmeReg;
150 xil_printf("NVME CC.SHN: %d\r\n", nvmeReg.ccShn);
151 if (nvmeReg.ccShn == 1)
153 }
154
155 if (devReg.mAxiWriteErr == 1)
156 {
157 xil_printf("mAxiWriteErr\r\n");
158 }
159
160 if (devReg.pcieMreqErr == 1)
161 {
162 xil_printf("pcieMreqErr\r\n");
163 }
164
165 if (devReg.pcieCpldErr == 1)
166 {
167 xil_printf("pcieCpldErr\r\n");
168 }
169
170 if (devReg.pcieCpldLenErr == 1)
171 {
172 xil_printf("pcieCpldLenErr\r\n");
173 }
174 // Xil_ExceptionEnable();
175}
176
177unsigned int check_nvme_cc_en()
178{
179 NVME_STATUS_REG nvmeReg;
180
182
183 return (unsigned int)nvmeReg.ccEn;
184}
185
186void pcie_async_reset(unsigned int rstCnt)
187{
188 NVME_STATUS_REG nvmeReg;
189
190 nvmeReg.rstCnt = rstCnt;
191 xil_printf("rstCnt= %X \r\n", rstCnt);
193}
194
195void set_link_width(unsigned int linkNum)
196{
197 NVME_STATUS_REG nvmeReg;
198
199 nvmeReg.linkNum = linkNum;
200 nvmeReg.linkEn = 1;
201 xil_printf("linkNum= %X \r\n", linkNum);
203}
204
205void set_nvme_csts_rdy(unsigned int rdy)
206{
207 NVME_STATUS_REG nvmeReg;
208
210 nvmeReg.cstsRdy = rdy;
211
213}
214
215void set_nvme_csts_shst(unsigned int shst)
216{
217 NVME_STATUS_REG nvmeReg;
218
220 nvmeReg.cstsShst = shst;
221
223}
224
225void set_nvme_admin_queue(unsigned int sqValid, unsigned int cqValid, unsigned int cqIrqEn)
226{
228
230 nvmeReg.sqValid = sqValid;
231 nvmeReg.cqValid = cqValid;
232 nvmeReg.cqIrqEn = cqIrqEn;
233
235}
236
237unsigned int get_nvme_cmd(unsigned short *qID, unsigned short *cmdSlotTag, unsigned int *cmdSeqNum,
238 unsigned int *cmdDword)
239{
240 NVME_CMD_FIFO_REG nvmeReg;
241
243
244 if (nvmeReg.cmdValid == 1)
245 {
246 unsigned int addr;
247 unsigned int idx;
248 *qID = nvmeReg.qID;
249 *cmdSlotTag = nvmeReg.cmdSlotTag;
250 *cmdSeqNum = nvmeReg.cmdSeqNum;
251 // xil_printf("nvmeReg.cmdSlotTag = 0x%X\r\n", nvmeReg.cmdSlotTag);
252 addr = NVME_CMD_SRAM_ADDR + (nvmeReg.cmdSlotTag * 64);
253 for (idx = 0; idx < 16; idx++)
254 *(cmdDword + idx) = IO_READ32(addr + (idx * 4));
255 }
256
257 return (unsigned int)nvmeReg.cmdValid;
258}
259
260void set_auto_nvme_cpl(unsigned int cmdSlotTag, unsigned int specific, unsigned int statusFieldWord)
261{
262 NVME_CPL_FIFO_REG nvmeReg;
263
264 nvmeReg.specific = specific;
265 nvmeReg.cmdSlotTag = cmdSlotTag;
266 nvmeReg.statusFieldWord = statusFieldWord;
267 nvmeReg.cplType = AUTO_CPL_TYPE;
268
269 // IO_WRITE32(NVME_CPL_FIFO_REG_ADDR, nvmeReg.dword[0]);
270 IO_WRITE32((NVME_CPL_FIFO_REG_ADDR + 4), nvmeReg.dword[1]);
271 IO_WRITE32((NVME_CPL_FIFO_REG_ADDR + 8), nvmeReg.dword[2]);
272}
273
274void set_nvme_slot_release(unsigned int cmdSlotTag)
275{
276 NVME_CPL_FIFO_REG nvmeReg;
277
278 nvmeReg.cmdSlotTag = cmdSlotTag;
280
281 // IO_WRITE32(NVME_CPL_FIFO_REG_ADDR, nvmeReg.dword[0]);
282 // IO_WRITE32((NVME_CPL_FIFO_REG_ADDR + 4), nvmeReg.dword[1]);
283 IO_WRITE32((NVME_CPL_FIFO_REG_ADDR + 8), nvmeReg.dword[2]);
284}
285
286void set_nvme_cpl(unsigned int sqId, unsigned int cid, unsigned int specific, unsigned int statusFieldWord)
287{
288 NVME_CPL_FIFO_REG nvmeReg;
289
290 nvmeReg.cid = cid;
291 nvmeReg.sqId = sqId;
292 nvmeReg.specific = specific;
293 nvmeReg.statusFieldWord = statusFieldWord;
294 nvmeReg.cplType = ONLY_CPL_TYPE;
295
297 IO_WRITE32((NVME_CPL_FIFO_REG_ADDR + 4), nvmeReg.dword[1]);
298 IO_WRITE32((NVME_CPL_FIFO_REG_ADDR + 8), nvmeReg.dword[2]);
299}
300
301void set_io_sq(unsigned int ioSqIdx, unsigned int valid, unsigned int cqVector, unsigned int qSzie,
302 unsigned int pcieBaseAddrL, unsigned int pcieBaseAddrH)
303{
304 NVME_IO_SQ_SET_REG nvmeReg;
305 unsigned int addr;
306
307 nvmeReg.valid = valid;
308 nvmeReg.cqVector = cqVector;
309 nvmeReg.sqSize = qSzie;
310 nvmeReg.pcieBaseAddrL = pcieBaseAddrL;
311 nvmeReg.pcieBaseAddrH = pcieBaseAddrH;
312
313 addr = NVME_IO_SQ_SET_REG_ADDR + (ioSqIdx * 8);
314 IO_WRITE32(addr, nvmeReg.dword[0]);
315 IO_WRITE32((addr + 4), nvmeReg.dword[1]);
316}
317
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)
320{
321 NVME_IO_CQ_SET_REG nvmeReg;
322 unsigned int addr;
323
324 nvmeReg.valid = valid;
325 nvmeReg.irqEn = irqEn;
326 nvmeReg.irqVector = irqVector;
327 nvmeReg.cqSize = qSzie;
328 nvmeReg.pcieBaseAddrL = pcieBaseAddrL;
329 nvmeReg.pcieBaseAddrH = pcieBaseAddrH;
330
331 addr = NVME_IO_CQ_SET_REG_ADDR + (ioCqIdx * 8);
332 IO_WRITE32(addr, nvmeReg.dword[0]);
333 IO_WRITE32((addr + 4), nvmeReg.dword[1]);
334}
335
336void set_direct_tx_dma(unsigned int devAddr, unsigned int pcieAddrH, unsigned int pcieAddrL, unsigned int len)
337{
338 HOST_DMA_CMD_FIFO_REG hostDmaReg;
339
340 ASSERT((len <= 0x1000) && ((pcieAddrL & 0x3) == 0)); // modified
341
342 hostDmaReg.devAddr = devAddr;
343 hostDmaReg.pcieAddrL = pcieAddrL;
344 hostDmaReg.pcieAddrH = pcieAddrH;
345
346 hostDmaReg.dword[3] = 0;
347 hostDmaReg.dmaType = HOST_DMA_DIRECT_TYPE;
349 hostDmaReg.dmaLen = len;
350
352 IO_WRITE32((HOST_DMA_CMD_FIFO_REG_ADDR + 4), hostDmaReg.dword[1]);
353 IO_WRITE32((HOST_DMA_CMD_FIFO_REG_ADDR + 8), hostDmaReg.dword[2]);
354 IO_WRITE32((HOST_DMA_CMD_FIFO_REG_ADDR + 12), hostDmaReg.dword[3]);
355 IO_WRITE32((HOST_DMA_CMD_FIFO_REG_ADDR + 16), hostDmaReg.dword[4]); // slot_modified
356
359}
360
361void set_direct_rx_dma(unsigned int devAddr, unsigned int pcieAddrH, unsigned int pcieAddrL, unsigned int len)
362{
363 HOST_DMA_CMD_FIFO_REG hostDmaReg;
364
365 ASSERT((len <= 0x1000) && ((pcieAddrL & 0x3) == 0)); // modified
366
367 hostDmaReg.devAddr = devAddr;
368 hostDmaReg.pcieAddrH = pcieAddrH;
369 hostDmaReg.pcieAddrL = pcieAddrL;
370
371 hostDmaReg.dword[3] = 0;
372 hostDmaReg.dmaType = HOST_DMA_DIRECT_TYPE;
374 hostDmaReg.dmaLen = len;
375
377 IO_WRITE32((HOST_DMA_CMD_FIFO_REG_ADDR + 4), hostDmaReg.dword[1]);
378 IO_WRITE32((HOST_DMA_CMD_FIFO_REG_ADDR + 8), hostDmaReg.dword[2]);
379 IO_WRITE32((HOST_DMA_CMD_FIFO_REG_ADDR + 12), hostDmaReg.dword[3]);
380 IO_WRITE32((HOST_DMA_CMD_FIFO_REG_ADDR + 16), hostDmaReg.dword[4]); // slot_modified
383}
384
385void set_auto_tx_dma(unsigned int cmdSlotTag, unsigned int cmd4KBOffset, unsigned int devAddr,
386 unsigned int autoCompletion)
387{
388 HOST_DMA_CMD_FIFO_REG hostDmaReg;
389 unsigned char tempTail;
390
391 ASSERT(cmd4KBOffset < 256);
392
396
397 hostDmaReg.devAddr = devAddr;
398
399 hostDmaReg.dword[3] = 0;
400 hostDmaReg.dmaType = HOST_DMA_AUTO_TYPE;
402 hostDmaReg.cmd4KBOffset = cmd4KBOffset;
403 hostDmaReg.cmdSlotTag = cmdSlotTag;
404 hostDmaReg.autoCompletion = autoCompletion;
405
407 // IO_WRITE32((HOST_DMA_CMD_FIFO_REG_ADDR + 4), hostDmaReg.dword[1]);
408 // IO_WRITE32((HOST_DMA_CMD_FIFO_REG_ADDR + 8), hostDmaReg.dword[2]);
409 IO_WRITE32((HOST_DMA_CMD_FIFO_REG_ADDR + 12), hostDmaReg.dword[3]);
410 IO_WRITE32((HOST_DMA_CMD_FIFO_REG_ADDR + 16), hostDmaReg.dword[4]); // slot_modified
411
413 if (tempTail > g_hostDmaStatus.fifoTail.autoDmaTx)
415
417}
418
419void set_auto_rx_dma(unsigned int cmdSlotTag, unsigned int cmd4KBOffset, unsigned int devAddr,
420 unsigned int autoCompletion)
421{
422 HOST_DMA_CMD_FIFO_REG hostDmaReg;
423 unsigned char tempTail;
424
425 ASSERT(cmd4KBOffset < 256);
426
430
431 hostDmaReg.devAddr = devAddr;
432
433 hostDmaReg.dword[3] = 0;
434 hostDmaReg.dmaType = HOST_DMA_AUTO_TYPE;
436 hostDmaReg.cmd4KBOffset = cmd4KBOffset;
437 hostDmaReg.cmdSlotTag = cmdSlotTag;
438 hostDmaReg.autoCompletion = autoCompletion;
439
441 // IO_WRITE32((HOST_DMA_CMD_FIFO_REG_ADDR + 4), hostDmaReg.dword[1]);
442 // IO_WRITE32((HOST_DMA_CMD_FIFO_REG_ADDR + 8), hostDmaReg.dword[2]);
443 IO_WRITE32((HOST_DMA_CMD_FIFO_REG_ADDR + 12), hostDmaReg.dword[3]);
444 IO_WRITE32((HOST_DMA_CMD_FIFO_REG_ADDR + 16), hostDmaReg.dword[4]); // slot_modified
445
447 if (tempTail > g_hostDmaStatus.fifoTail.autoDmaRx)
449
451}
452
454{
456 {
458 }
459}
460
462{
464 {
466 }
467}
468
470{
472 {
474 }
475}
476
478{
480 {
482 }
483}
484
485unsigned int check_auto_tx_dma_partial_done(unsigned int tailIndex, unsigned int tailAssistIndex)
486{
487 // xil_printf("check_auto_tx_dma_partial_done \r\n");
488
490
492 return 1;
493
494 if (g_hostDmaStatus.fifoHead.autoDmaTx < tailIndex)
495 {
496 if (g_hostDmaStatus.fifoTail.autoDmaTx < tailIndex)
497 {
499 return 1;
500 else if (g_hostDmaAssistStatus.autoDmaTxOverFlowCnt != (tailAssistIndex + 1))
501 return 1;
502 }
503 else if (g_hostDmaAssistStatus.autoDmaTxOverFlowCnt != tailAssistIndex)
504 return 1;
505 }
506 else if (g_hostDmaStatus.fifoHead.autoDmaTx == tailIndex)
507 return 1;
508 else
509 {
510 if (g_hostDmaStatus.fifoTail.autoDmaTx < tailIndex)
511 return 1;
512 else
513 {
515 return 1;
516 else if (g_hostDmaAssistStatus.autoDmaTxOverFlowCnt != tailAssistIndex)
517 return 1;
518 }
519 }
520
521 return 0;
522}
523
524unsigned int check_auto_rx_dma_partial_done(unsigned int tailIndex, unsigned int tailAssistIndex)
525{
526 // xil_printf("check_auto_rx_dma_partial_done \r\n");
527
529
531 return 1;
532
533 if (g_hostDmaStatus.fifoHead.autoDmaRx < tailIndex)
534 {
535 if (g_hostDmaStatus.fifoTail.autoDmaRx < tailIndex)
536 {
538 return 1;
539 else if (g_hostDmaAssistStatus.autoDmaRxOverFlowCnt != (tailAssistIndex + 1))
540 return 1;
541 }
542 else if (g_hostDmaAssistStatus.autoDmaRxOverFlowCnt != tailAssistIndex)
543 return 1;
544 }
545 else if (g_hostDmaStatus.fifoHead.autoDmaRx == tailIndex)
546 return 1;
547 else
548 {
549 if (g_hostDmaStatus.fifoTail.autoDmaRx < tailIndex)
550 return 1;
551 else
552 {
554 return 1;
555 else if (g_hostDmaAssistStatus.autoDmaRxOverFlowCnt != tailAssistIndex)
556 return 1;
557 }
558 }
559
560 return 0;
561}
#define ASSERT(cond,...)
Definition: debug.h:96
void set_nvme_admin_queue(unsigned int sqValid, unsigned int cqValid, unsigned int cqIrqEn)
Definition: host_lld.c:225
HOST_DMA_STATUS g_hostDmaStatus
Definition: host_lld.c:63
unsigned int check_nvme_cc_en()
Definition: host_lld.c:177
void set_auto_rx_dma(unsigned int cmdSlotTag, unsigned int cmd4KBOffset, unsigned int devAddr, unsigned int autoCompletion)
Definition: host_lld.c:419
void set_link_width(unsigned int linkNum)
Definition: host_lld.c:195
NVME_CONTEXT g_nvmeTask
Definition: nvme_main.c:71
void dev_irq_init()
Definition: host_lld.c:66
void set_direct_rx_dma(unsigned int devAddr, unsigned int pcieAddrH, unsigned int pcieAddrL, unsigned int len)
Definition: host_lld.c:361
void set_nvme_csts_shst(unsigned int shst)
Definition: host_lld.c:215
void set_nvme_csts_rdy(unsigned int rdy)
Definition: host_lld.c:205
void check_direct_rx_dma_done()
Definition: host_lld.c:461
unsigned int check_auto_rx_dma_partial_done(unsigned int tailIndex, unsigned int tailAssistIndex)
Definition: host_lld.c:524
void set_auto_tx_dma(unsigned int cmdSlotTag, unsigned int cmd4KBOffset, unsigned int devAddr, unsigned int autoCompletion)
Definition: host_lld.c:385
void set_auto_nvme_cpl(unsigned int cmdSlotTag, unsigned int specific, unsigned int statusFieldWord)
Definition: host_lld.c:260
void pcie_async_reset(unsigned int rstCnt)
Definition: host_lld.c:186
void set_nvme_cpl(unsigned int sqId, unsigned int cid, unsigned int specific, unsigned int statusFieldWord)
Definition: host_lld.c:286
void check_direct_tx_dma_done()
Definition: host_lld.c:453
void check_auto_rx_dma_done()
Definition: host_lld.c:477
unsigned int check_auto_tx_dma_partial_done(unsigned int tailIndex, unsigned int tailAssistIndex)
Definition: host_lld.c:485
void check_auto_tx_dma_done()
Definition: host_lld.c:469
void set_nvme_slot_release(unsigned int cmdSlotTag)
Definition: host_lld.c:274
HOST_DMA_ASSIST_STATUS g_hostDmaAssistStatus
Definition: host_lld.c:64
unsigned int get_nvme_cmd(unsigned short *qID, unsigned short *cmdSlotTag, unsigned int *cmdSeqNum, unsigned int *cmdDword)
Definition: host_lld.c:237
void dev_irq_handler()
Definition: host_lld.c:86
void set_io_sq(unsigned int ioSqIdx, unsigned int valid, unsigned int cqVector, unsigned int qSzie, unsigned int pcieBaseAddrL, unsigned int pcieBaseAddrH)
Definition: host_lld.c:301
void set_direct_tx_dma(unsigned int devAddr, unsigned int pcieAddrH, unsigned int pcieAddrL, unsigned int len)
Definition: host_lld.c:336
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)
Definition: host_lld.c:318
#define AUTO_CPL_TYPE
Definition: host_lld.h:85
#define DEV_IRQ_MASK_REG_ADDR
Definition: host_lld.h:59
#define NVME_IO_SQ_SET_REG_ADDR
Definition: host_lld.h:69
#define PCIE_STATUS_REG_ADDR
Definition: host_lld.h:63
#define NVME_STATUS_REG_ADDR
Definition: host_lld.h:66
#define HOST_DMA_AUTO_TYPE
Definition: host_lld.h:79
#define HOST_DMA_DIRECT_TYPE
Definition: host_lld.h:78
#define DEV_IRQ_STATUS_REG_ADDR
Definition: host_lld.h:61
#define NVME_IO_CQ_SET_REG_ADDR
Definition: host_lld.h:70
#define NVME_CPL_FIFO_REG_ADDR
Definition: host_lld.h:73
#define PCIE_FUNC_REG_ADDR
Definition: host_lld.h:64
#define NVME_ADMIN_QUEUE_SET_REG_ADDR
Definition: host_lld.h:68
#define HOST_DMA_RX_DIRECTION
Definition: host_lld.h:82
#define CMD_SLOT_RELEASE_TYPE
Definition: host_lld.h:86
#define NVME_CMD_FIFO_REG_ADDR
Definition: host_lld.h:72
#define HOST_DMA_CMD_FIFO_REG_ADDR
Definition: host_lld.h:74
#define ONLY_CPL_TYPE
Definition: host_lld.h:84
#define HOST_DMA_TX_DIRECTION
Definition: host_lld.h:81
#define NVME_CMD_SRAM_ADDR
Definition: host_lld.h:76
#define HOST_DMA_FIFO_CNT_REG_ADDR
Definition: host_lld.h:67
#define DEV_IRQ_CLEAR_REG_ADDR
Definition: host_lld.h:60
#define IO_WRITE32(addr, val)
Definition: io_access.h:50
#define IO_READ32(addr)
Definition: io_access.h:51
#define NVME_TASK_RESET
Definition: nvme.h:199
#define NVME_TASK_WAIT_CC_EN
Definition: nvme.h:195
#define NVME_TASK_SHUTDOWN
Definition: nvme.h:197
unsigned int busMaster
Definition: host_lld.h:99
unsigned int dword
Definition: host_lld.h:95
unsigned int pcieCpldErr
Definition: host_lld.h:108
unsigned int pcieLink
Definition: host_lld.h:98
unsigned int nvmeCcEn
Definition: host_lld.h:103
unsigned int nvmeCcShn
Definition: host_lld.h:104
unsigned int pcieMreqErr
Definition: host_lld.h:107
unsigned int mAxiWriteErr
Definition: host_lld.h:105
unsigned int pcieMsix
Definition: host_lld.h:102
unsigned int pcieIrq
Definition: host_lld.h:100
unsigned int pcieMsi
Definition: host_lld.h:101
unsigned int pcieCpldLenErr
Definition: host_lld.h:109
unsigned int autoDmaRxOverFlowCnt
Definition: host_lld.h:340
unsigned int autoDmaTxOverFlowCnt
Definition: host_lld.h:339
unsigned int pcieAddrH
Definition: host_lld.h:303
unsigned int devAddr
Definition: host_lld.h:302
unsigned int pcieAddrL
Definition: host_lld.h:304
unsigned int cmdSlotTag
Definition: host_lld.h:314
unsigned int dmaLen
Definition: host_lld.h:307
unsigned int cmd4KBOffset
Definition: host_lld.h:309
unsigned int autoCompletion
Definition: host_lld.h:308
unsigned int dword[5]
Definition: host_lld.h:299
unsigned int dmaType
Definition: host_lld.h:312
unsigned int dmaDirection
Definition: host_lld.h:311
unsigned int dword
Definition: host_lld.h:283
unsigned char directDmaRx
Definition: host_lld.h:286
unsigned char autoDmaRx
Definition: host_lld.h:288
unsigned char autoDmaTx
Definition: host_lld.h:289
unsigned char directDmaTx
Definition: host_lld.h:287
unsigned int directDmaRxCnt
Definition: host_lld.h:332
HOST_DMA_FIFO_CNT_REG fifoHead
Definition: host_lld.h:329
unsigned int autoDmaRxCnt
Definition: host_lld.h:334
HOST_DMA_FIFO_CNT_REG fifoTail
Definition: host_lld.h:330
unsigned int directDmaTxCnt
Definition: host_lld.h:331
unsigned int autoDmaTxCnt
Definition: host_lld.h:333
unsigned int cqIrqEn
Definition: host_lld.h:235
unsigned int cqValid
Definition: host_lld.h:233
unsigned int sqValid
Definition: host_lld.h:234
unsigned int qID
Definition: host_lld.h:176
unsigned int cmdSeqNum
Definition: host_lld.h:180
unsigned int dword
Definition: host_lld.h:173
unsigned int cmdValid
Definition: host_lld.h:182
unsigned int cmdSlotTag
Definition: host_lld.h:178
unsigned short cplType
Definition: host_lld.h:206
unsigned short cmdSlotTag
Definition: host_lld.h:204
unsigned int specific
Definition: host_lld.h:202
unsigned int sqId
Definition: host_lld.h:198
unsigned int dword[3]
Definition: host_lld.h:192
unsigned short statusFieldWord
Definition: host_lld.h:210
unsigned int cid
Definition: host_lld.h:197
unsigned int irqEn
Definition: host_lld.h:271
unsigned int irqVector
Definition: host_lld.h:270
unsigned int pcieBaseAddrL
Definition: host_lld.h:267
unsigned int valid
Definition: host_lld.h:269
unsigned int pcieBaseAddrH
Definition: host_lld.h:268
unsigned int cqSize
Definition: host_lld.h:273
unsigned int dword[2]
Definition: host_lld.h:264
unsigned int sqSize
Definition: host_lld.h:254
unsigned int pcieBaseAddrH
Definition: host_lld.h:250
unsigned int cqVector
Definition: host_lld.h:252
unsigned int dword[2]
Definition: host_lld.h:246
unsigned int valid
Definition: host_lld.h:251
unsigned int pcieBaseAddrL
Definition: host_lld.h:249
unsigned int linkNum
Definition: host_lld.h:161
unsigned int ccEn
Definition: host_lld.h:155
unsigned int cstsRdy
Definition: host_lld.h:158
unsigned int cstsShst
Definition: host_lld.h:159
unsigned int ccShn
Definition: host_lld.h:156
unsigned int linkEn
Definition: host_lld.h:162
unsigned int rstCnt
Definition: host_lld.h:160
unsigned int dword
Definition: host_lld.h:152
unsigned int status
Definition: nvme.h:959
unsigned int busMaster
Definition: host_lld.h:137
unsigned int irqDisable
Definition: host_lld.h:140
unsigned int msiVecNum
Definition: host_lld.h:141
unsigned int dword
Definition: host_lld.h:134
unsigned int msixEnable
Definition: host_lld.h:139
unsigned int msiEnable
Definition: host_lld.h:138
unsigned int dword
Definition: host_lld.h:119
unsigned int pcieLinkUp
Definition: host_lld.h:124