NVIDIA DRIVE OS Linux API Reference

5.1.3.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
QSPIFLASH Access

Detailed Description

Declares the APIs for Quickboot accessing QSPIFLASH.

Data Structures

struct  QspiAsyncIOStatus
 Holds the QSPI Asynchronous transfer descriptor. More...
 
struct  QspiFlashInfo
 QSPI flash info. More...
 
struct  QspiFlashDevice
 Holds the QSPI Flash device context. More...
 

Macros

#define QSPI_FLASH_MAX_INSTANCES   1
 Defines the number of flash chips. More...
 
#define QSPI_READ_ASYNC_PAGE_SIZE   (256 * KB)
 Defines the maximum page size for asynchronous transfer. More...
 
#define QSPI_READ_ASYNC_PAGE_SIZE_LZF   (256 * KB)
 Defines the maximum page size for asynchronous transfer for LZF stream decompression. More...
 
#define QSPI_FLASH_CMD_REMS   0x90U
 Defines Flash Commands. More...
 
#define QSPI_FLASH_CMD_RDID   0x9FU
 
#define QSPI_FLASH_CMD_RES   0xABU
 
#define QSPI_FLASH_CMD_RSFDP   0x5AU
 
#define QSPIFLASH_DDR_QUAD_READ_COMMAND   0xeeU
 
#define QSPIFLASH_SDR_QUAD_READ_COMMAND   0xecU
 
#define QSPI_FLASH_WRITE_COMMAND   0x12U
 
#define QSPI_FLASH_SECTOR_ERASE_COMMAND   0xDCU
 
#define QSPI_FLASH_SUB_SECTOR_ERASE_COMMAND   0x21U
 
#define QSPI_FLASH_QUAD_ENABLE   0x02
 
#define QSPI_FLASH_QUAD_DISABLE   0x0
 
#define QSPI_FLASH_WEL_ENABLE   0x02
 
#define QSPI_FLASH_WEL_DISABLE   0x00
 
#define QSPI_FLASH_PROGRAM_ERR   (1 << 6)
 
#define QSPI_FLASH_ERASE_ERR   (1 << 5)
 
#define QSPI_FLASH_WIP_ENABLE   0x01
 
#define QSPI_FLASH_WIP_ENABLE   0x01
 
#define QSPI_FLASH_WIP_WAIT_TIME   1000
 
#define QSPI_FLASH_CMD_RDSR1   0x5
 
#define QSPI_FLASH_CMD_RDCR   0x35
 
#define QSPI_FLASH_CMD_MODE_RESET   0xFF
 
#define QSPI_FLASH_CMD_WRR   0x1
 
#define QSPI_FLASH_CMD_WRAR   0x71
 
#define QSPI_FLASH_CMD_CLEAR_STATUS   0x82
 
#define QSPI_FLASH_CMD_WRITE_ENABLE   0x06
 
#define QSPI_FLASH_CMD_WRITE_DISABLE   0x04
 
#define QSPI_FLASH_CMD_WRAR_CR1V   0x800002
 
#define QSPI_DEFAULT_DUMMY_CYCLES   0
 
#define QSPI_FLASH_NUM_OF_TRANSFERS   3
 
#define QSPI_FLASH_COMMAND_WIDTH   1
 
#define QSPI_FLASH_ADDRESS_WIDTH   4
 
#define QSPI_FLASH_QSPI_FLASH_DATA_TRANSFER   2
 
#define QSPI_FLASH_MAX_TRANSFER_SIZE(_a)   QSPI_FLASH_SIZE(_a)
 
#define QSPI_FLASH_CMD_MODE_VAL   0x0
 
#define QSPI_FLASH_ADDR_DATA_MODE_VAL   0x0
 
#define QSPI_FLASH_CLEAR_STATUS_WAIT_TIME   100
 
#define QSPI_FLASH_WRITE_ENABLE_WAIT_TIME   100
 
#define QSPI_FLASH_WE_RETRY_COUNT   100
 
#define PAGE_WRITE_SIZE   256
 
#define MANUFACTURE_ID_SPANSION   0x01U
 Manufacturer ID. More...
 
#define MANUFACTURE_ID_WINBOND   0xEFU
 
#define MANUFACTURE_ID_MICRON   0x20U
 
#define MANUFACTURE_ID_MACRONIX   0xC2U
 
#define DEVICE_ID_LEN   3U
 
#define FLAG_PAGE512   0x01U
 Bit definitions of flag in vendor_info. More...
 
#define FLAG_QPI   0x02U
 
#define FLAG_QUAD   0x04U
 
#define FLAG_BULK   0x08U
 
#define FLAG_PAGE_SIZE_512   0x10U
 
#define FLAG_DDR   0x20U
 
#define FLAG_UNIFORM   0x40U
 
#define FLAG_PAGE512_FIXED   0x80U
 
#define QSPI_FLASH_SIZE(_a)   ((1 << (_a)->pFlashInfo->SectorSize) * (1 << (_a)->pFlashInfo->SectorCnt))
 Macro definitions. More...
 
#define QSPI_FLASH_SECTOR_SIZE(_a)   (1 << (_a)->pFlashInfo->SectorSize)
 
#define QSPI_FLASH_SECTORS(_a)   (1 << (_a)->pFlashInfo->SectorCnt)
 
#define QSPI_FLASH_SUB_SECTOR_SIZE(_a)   (1 << (_a)->pFlashInfo->SubSectorSize)
 
#define QSPI_FLASH_SUB_SECTORS(_a)   ((_a)->pFlashInfo->SubSectorCnt)
 
#define QSPI_FLASH_SUB_SECTOR_LOC   0
 

Typedefs

typedef struct QspiAsyncIOStatus QspiAsyncIOStatus_t
 Holds the QSPI Asynchronous transfer descriptor. More...
 
typedef struct QspiFlashInfo QspiFlashInfo_t
 QSPI flash info. More...
 
typedef struct QspiFlashDevice QspiFlashDevice
 Holds the QSPI Flash device context. More...
 

Enumerations

enum  QspiXferStatus_t {
  COMPLETED,
  ONGOING
}
 Defines the QSPI Transfer status, where completed = 0. More...
 

Functions

NvError QbQspiInit (void)
 Performs QSPI flash driver initialization. More...
 

Variables

struct QspiFlashInfo QbFlashInfoList []
 
QspiFlashDeviceps_QspiFlash [QSPI_FLASH_MAX_INSTANCES]
 

Macro Definition Documentation

#define DEVICE_ID_LEN   3U

Definition at line 105 of file qspi_flash.h.

#define FLAG_BULK   0x08U

Definition at line 111 of file qspi_flash.h.

#define FLAG_DDR   0x20U

Definition at line 113 of file qspi_flash.h.

#define FLAG_PAGE512   0x01U

Bit definitions of flag in vendor_info.

Definition at line 108 of file qspi_flash.h.

#define FLAG_PAGE512_FIXED   0x80U

Definition at line 115 of file qspi_flash.h.

#define FLAG_PAGE_SIZE_512   0x10U

Definition at line 112 of file qspi_flash.h.

#define FLAG_QPI   0x02U

Definition at line 109 of file qspi_flash.h.

#define FLAG_QUAD   0x04U

Definition at line 110 of file qspi_flash.h.

#define FLAG_UNIFORM   0x40U

Definition at line 114 of file qspi_flash.h.

#define MANUFACTURE_ID_MACRONIX   0xC2U

Definition at line 104 of file qspi_flash.h.

#define MANUFACTURE_ID_MICRON   0x20U

Definition at line 103 of file qspi_flash.h.

#define MANUFACTURE_ID_SPANSION   0x01U

Manufacturer ID.

Definition at line 101 of file qspi_flash.h.

#define MANUFACTURE_ID_WINBOND   0xEFU

Definition at line 102 of file qspi_flash.h.

#define PAGE_WRITE_SIZE   256

Definition at line 98 of file qspi_flash.h.

#define QSPI_DEFAULT_DUMMY_CYCLES   0

Definition at line 81 of file qspi_flash.h.

#define QSPI_FLASH_ADDR_DATA_MODE_VAL   0x0

Definition at line 93 of file qspi_flash.h.

#define QSPI_FLASH_ADDRESS_WIDTH   4

Definition at line 85 of file qspi_flash.h.

#define QSPI_FLASH_CLEAR_STATUS_WAIT_TIME   100

Definition at line 94 of file qspi_flash.h.

#define QSPI_FLASH_CMD_CLEAR_STATUS   0x82

Definition at line 76 of file qspi_flash.h.

#define QSPI_FLASH_CMD_MODE_RESET   0xFF

Definition at line 73 of file qspi_flash.h.

#define QSPI_FLASH_CMD_MODE_VAL   0x0

Definition at line 92 of file qspi_flash.h.

#define QSPI_FLASH_CMD_RDCR   0x35

Definition at line 72 of file qspi_flash.h.

#define QSPI_FLASH_CMD_RDID   0x9FU

Definition at line 51 of file qspi_flash.h.

#define QSPI_FLASH_CMD_RDSR1   0x5

Definition at line 71 of file qspi_flash.h.

#define QSPI_FLASH_CMD_REMS   0x90U

Defines Flash Commands.

Definition at line 50 of file qspi_flash.h.

#define QSPI_FLASH_CMD_RES   0xABU

Definition at line 52 of file qspi_flash.h.

#define QSPI_FLASH_CMD_RSFDP   0x5AU

Definition at line 53 of file qspi_flash.h.

#define QSPI_FLASH_CMD_WRAR   0x71

Definition at line 75 of file qspi_flash.h.

#define QSPI_FLASH_CMD_WRAR_CR1V   0x800002

Definition at line 79 of file qspi_flash.h.

#define QSPI_FLASH_CMD_WRITE_DISABLE   0x04

Definition at line 78 of file qspi_flash.h.

#define QSPI_FLASH_CMD_WRITE_ENABLE   0x06

Definition at line 77 of file qspi_flash.h.

#define QSPI_FLASH_CMD_WRR   0x1

Definition at line 74 of file qspi_flash.h.

#define QSPI_FLASH_COMMAND_WIDTH   1

Definition at line 84 of file qspi_flash.h.

#define QSPI_FLASH_ERASE_ERR   (1 << 5)

Definition at line 66 of file qspi_flash.h.

#define QSPI_FLASH_MAX_INSTANCES   1

Defines the number of flash chips.

Definition at line 38 of file qspi_flash.h.

#define QSPI_FLASH_MAX_TRANSFER_SIZE (   _a)    QSPI_FLASH_SIZE(_a)

Definition at line 90 of file qspi_flash.h.

#define QSPI_FLASH_NUM_OF_TRANSFERS   3

Definition at line 83 of file qspi_flash.h.

#define QSPI_FLASH_PROGRAM_ERR   (1 << 6)

Definition at line 65 of file qspi_flash.h.

#define QSPI_FLASH_QSPI_FLASH_DATA_TRANSFER   2

Definition at line 86 of file qspi_flash.h.

#define QSPI_FLASH_QUAD_DISABLE   0x0

Definition at line 62 of file qspi_flash.h.

#define QSPI_FLASH_QUAD_ENABLE   0x02

Definition at line 61 of file qspi_flash.h.

#define QSPI_FLASH_SECTOR_ERASE_COMMAND   0xDCU

Definition at line 58 of file qspi_flash.h.

#define QSPI_FLASH_SECTOR_SIZE (   _a)    (1 << (_a)->pFlashInfo->SectorSize)

Definition at line 120 of file qspi_flash.h.

#define QSPI_FLASH_SECTORS (   _a)    (1 << (_a)->pFlashInfo->SectorCnt)

Definition at line 121 of file qspi_flash.h.

#define QSPI_FLASH_SIZE (   _a)    ((1 << (_a)->pFlashInfo->SectorSize) * (1 << (_a)->pFlashInfo->SectorCnt))

Macro definitions.

Definition at line 118 of file qspi_flash.h.

#define QSPI_FLASH_SUB_SECTOR_ERASE_COMMAND   0x21U

Definition at line 59 of file qspi_flash.h.

#define QSPI_FLASH_SUB_SECTOR_LOC   0

Definition at line 124 of file qspi_flash.h.

#define QSPI_FLASH_SUB_SECTOR_SIZE (   _a)    (1 << (_a)->pFlashInfo->SubSectorSize)

Definition at line 122 of file qspi_flash.h.

#define QSPI_FLASH_SUB_SECTORS (   _a)    ((_a)->pFlashInfo->SubSectorCnt)

Definition at line 123 of file qspi_flash.h.

#define QSPI_FLASH_WE_RETRY_COUNT   100

Definition at line 96 of file qspi_flash.h.

#define QSPI_FLASH_WEL_DISABLE   0x00

Definition at line 64 of file qspi_flash.h.

#define QSPI_FLASH_WEL_ENABLE   0x02

Definition at line 63 of file qspi_flash.h.

#define QSPI_FLASH_WIP_ENABLE   0x01

Definition at line 68 of file qspi_flash.h.

#define QSPI_FLASH_WIP_ENABLE   0x01

Definition at line 68 of file qspi_flash.h.

#define QSPI_FLASH_WIP_WAIT_TIME   1000

Definition at line 69 of file qspi_flash.h.

#define QSPI_FLASH_WRITE_COMMAND   0x12U

Definition at line 57 of file qspi_flash.h.

#define QSPI_FLASH_WRITE_ENABLE_WAIT_TIME   100

Definition at line 95 of file qspi_flash.h.

#define QSPI_READ_ASYNC_PAGE_SIZE   (256 * KB)

Defines the maximum page size for asynchronous transfer.

Definition at line 42 of file qspi_flash.h.

#define QSPI_READ_ASYNC_PAGE_SIZE_LZF   (256 * KB)

Defines the maximum page size for asynchronous transfer for LZF stream decompression.

Definition at line 47 of file qspi_flash.h.

#define QSPIFLASH_DDR_QUAD_READ_COMMAND   0xeeU

Definition at line 55 of file qspi_flash.h.

#define QSPIFLASH_SDR_QUAD_READ_COMMAND   0xecU

Definition at line 56 of file qspi_flash.h.

Typedef Documentation

Holds the QSPI Asynchronous transfer descriptor.

Holds the QSPI Flash device context.

QSPI flash info.

Enumeration Type Documentation

Defines the QSPI Transfer status, where completed = 0.

Enumerator
COMPLETED 
ONGOING 

Definition at line 130 of file qspi_flash.h.

Function Documentation

NvError QbQspiInit ( void  )

Performs QSPI flash driver initialization.

The QB initialization code calls this function.

Variable Documentation

struct QspiFlashInfo QbFlashInfoList[]