qspipsu
Vitis Drivers API Documentation
xqspipsu.h File Reference

Data Structures

struct  XQspiPsu_Msg
 This typedef contains configuration information for a flash message. More...
 
struct  XQspiPsu_Config
 This typedef contains configuration information for the device. More...
 
struct  XQspiPsu
 The XQspiPsu driver instance data. More...
 

Macros

#define XQSPIPSU_H_
 < prevent circular inclusions More...
 
#define BYTES256_PER_PAGE   256U
 Definitions for Intel, STM, Winbond and Spansion Serial Flash Device geometry. More...
 
#define BYTES512_PER_PAGE   512U
 512 Bytes per Page More...
 
#define BYTES1024_PER_PAGE   1024U
 1024 Bytes per Page More...
 
#define PAGES16_PER_SECTOR   16U
 16 Pages per Sector More...
 
#define PAGES128_PER_SECTOR   128U
 128 Pages per Sector More...
 
#define PAGES256_PER_SECTOR   256U
 256 Pages per Sector More...
 
#define PAGES512_PER_SECTOR   512U
 512 Pages per Sector More...
 
#define PAGES1024_PER_SECTOR   1024U
 1024 Pages per Sector More...
 
#define NUM_OF_SECTORS2   2U
 2 Sectors More...
 
#define NUM_OF_SECTORS4   4U
 4 Sectors More...
 
#define NUM_OF_SECTORS8   8U
 8 Sector More...
 
#define NUM_OF_SECTORS16   16U
 16 Sectors More...
 
#define NUM_OF_SECTORS32   32U
 32 Sectors More...
 
#define NUM_OF_SECTORS64   64U
 64 Sectors More...
 
#define NUM_OF_SECTORS128   128U
 128 Sectors More...
 
#define NUM_OF_SECTORS256   256U
 256 Sectors More...
 
#define NUM_OF_SECTORS512   512U
 512 Sectors More...
 
#define NUM_OF_SECTORS1024   1024U
 1024 Sectors More...
 
#define NUM_OF_SECTORS2048   2048U
 2048 Sectors More...
 
#define NUM_OF_SECTORS4096   4096U
 4096 Sectors More...
 
#define NUM_OF_SECTORS8192   8192U
 8192 Sectors More...
 
#define SECTOR_SIZE_64K   0X10000U
 64K Sector More...
 
#define SECTOR_SIZE_128K   0X20000U
 128K Sector More...
 
#define SECTOR_SIZE_256K   0X40000U
 256K Sector More...
 
#define SECTOR_SIZE_512K   0X80000U
 512K Sector More...
 
#define XQSPIPSU_READMODE_DMA   0x0U
 DMA read mode. More...
 
#define XQSPIPSU_READMODE_IO   0x1U
 IO read mode. More...
 
#define XQSPIPSU_SELECT_FLASH_CS_LOWER   0x1U
 Select lower flash. More...
 
#define XQSPIPSU_SELECT_FLASH_CS_UPPER   0x2U
 Select upper flash. More...
 
#define XQSPIPSU_SELECT_FLASH_CS_BOTH   0x3U
 Select both flash. More...
 
#define XQSPIPSU_SELECT_FLASH_BUS_LOWER   0x1U
 Select lower bus flash. More...
 
#define XQSPIPSU_SELECT_FLASH_BUS_UPPER   0x2U
 Select upper bus flash. More...
 
#define XQSPIPSU_SELECT_FLASH_BUS_BOTH   0x3U
 Select both bus flash. More...
 
#define XQSPIPSU_SELECT_MODE_SPI   0x1U
 Select SPI mode. More...
 
#define XQSPIPSU_SELECT_MODE_DUALSPI   0x2U
 Select dual SPI mode. More...
 
#define XQSPIPSU_SELECT_MODE_QUADSPI   0x4U
 Select quad SPI mode. More...
 
#define XQSPIPSU_GENFIFO_CS_SETUP   0x05U
 Chip select setup in GENFIO. More...
 
#define XQSPIPSU_GENFIFO_CS_HOLD   0x04U
 Chip select hold in GENFIFO. More...
 
#define XQSPIPSU_CLK_ACTIVE_LOW_OPTION   0x2U
 Clk Active low option. More...
 
#define XQSPIPSU_CLK_PHASE_1_OPTION   0x4U
 Clk phase 1 option. More...
 
#define XQSPIPSU_MANUAL_START_OPTION   0x8U
 Manual start option. More...
 
#define XQSPIPSU_LQSPI_MODE_OPTION   0x20U
 LQSPI mode option. More...
 
#define XQSPIPSU_LQSPI_LESS_THEN_SIXTEENMB   1U
 LQSPI less Than 16 MB. More...
 
#define XQSPIPSU_GENFIFO_EXP_START   0x100U
 Genfifo start. More...
 
#define XQSPIPSU_DMA_BYTES_MAX   0x10000000U
 DMA bytes max. More...
 
#define XQSPIPSU_CLK_PRESCALE_2   0x00U
 Clock prescale 2. More...
 
#define XQSPIPSU_CLK_PRESCALE_4   0x01U
 Clock prescale 4. More...
 
#define XQSPIPSU_CLK_PRESCALE_8   0x02U
 Clock prescale 8. More...
 
#define XQSPIPSU_CLK_PRESCALE_16   0x03U
 Clock prescale 16. More...
 
#define XQSPIPSU_CLK_PRESCALE_32   0x04U
 Clock prescale 32. More...
 
#define XQSPIPSU_CLK_PRESCALE_64   0x05U
 Clock prescale 64. More...
 
#define XQSPIPSU_CLK_PRESCALE_128   0x06U
 Clock prescale 128. More...
 
#define XQSPIPSU_CLK_PRESCALE_256   0x07U
 Clock prescale 256. More...
 
#define XQSPIPSU_CR_PRESC_MAXIMUM   7U
 Prescale max. More...
 
#define XQSPIPSU_CONNECTION_MODE_SINGLE   0U
 Single mode connection. More...
 
#define XQSPIPSU_CONNECTION_MODE_STACKED   1U
 Stacked mode connection. More...
 
#define XQSPIPSU_CONNECTION_MODE_PARALLEL   2U
 Parallel mode connection. More...
 
#define XQSPIPSU_FREQ_37_5MHZ   37500000U
 Frequency 375 Mhz. More...
 
#define XQSPIPSU_FREQ_40MHZ   40000000U
 Frequency 40 Mhz. More...
 
#define XQSPIPSU_FREQ_100MHZ   100000000U
 Frequency 100 Mhz. More...
 
#define XQSPIPSU_FREQ_150MHZ   150000000U
 Frequency 150 Mhz. More...
 
#define XQSPIPSU_MSG_FLAG_STRIPE   0x1U
 Stripe Msg flag. More...
 
#define XQSPIPSU_MSG_FLAG_RX   0x2U
 Rx Msg flag. More...
 
#define XQSPIPSU_MSG_FLAG_TX   0x4U
 Tx Msg flag. More...
 
#define XQSPIPSU_MSG_FLAG_POLL   0x8U
 POLL Msg flag. More...
 
#define XQSPIPSU_RXADDR_OVER_32BIT   0x100000000U
 Rx address over 32 bit. More...
 
#define XQSPIPSU_SET_WP   1
 GQSPI configuration to toggle WP of flash. More...
 
#define XQspiPsu_Select(InstancePtr, Mask)
 select QSPI controller More...
 
#define XQspiPsu_Enable(InstancePtr)
 Enable QSPI Controller. More...
 
#define XQspiPsu_Disable(InstancePtr)
 Disable QSPI controller. More...
 
#define XQspiPsu_GetLqspiConfigReg(InstancePtr)
 Read Configuration register of LQSPI Controller. More...
 

Typedefs

typedef void(* XQspiPsu_StatusHandler )(const void *CallBackRef, u32 StatusEvent, u32 ByteCount)
 The handler data type allows the user to define a callback function to handle the asynchronous processing for the QSPIPSU device. More...
 

Functions

XQspiPsu_ConfigXQspiPsu_LookupConfig (u16 DeviceId)
 Looks up the device configuration based on the unique device ID. More...
 
s32 XQspiPsu_CfgInitialize (XQspiPsu *InstancePtr, const XQspiPsu_Config *ConfigPtr, UINTPTR EffectiveAddr)
 Initializes a specific XQspiPsu instance as such the driver is ready to use. More...
 
void XQspiPsu_Reset (XQspiPsu *InstancePtr)
 Resets the QSPIPSU device. More...
 
void XQspiPsu_Abort (XQspiPsu *InstancePtr)
 Aborts a transfer in progress. More...
 
s32 XQspiPsu_PolledTransfer (XQspiPsu *InstancePtr, XQspiPsu_Msg *Msg, u32 NumMsg)
 Performs a transfer on the bus in polled mode. More...
 
s32 XQspiPsu_InterruptTransfer (XQspiPsu *InstancePtr, XQspiPsu_Msg *Msg, u32 NumMsg)
 Initiates a transfer on the bus and enables interrupts. More...
 
s32 XQspiPsu_InterruptHandler (XQspiPsu *InstancePtr)
 Handles interrupt based transfers by acting on GENFIFO and DMA interurpts. More...
 
void XQspiPsu_SetStatusHandler (XQspiPsu *InstancePtr, void *CallBackRef, XQspiPsu_StatusHandler FuncPointer)
 Sets the status callback function, the status handler, which the driver calls when it encounters conditions that should be reported to upper layer software. More...
 
s32 XQspiPsu_StartDmaTransfer (XQspiPsu *InstancePtr, XQspiPsu_Msg *Msg, u32 NumMsg)
 Starts a DMA transfer. More...
 
s32 XQspiPsu_CheckDmaDone (XQspiPsu *InstancePtr)
 Checks for DMA transfer complete. More...
 
s32 XQspiPsu_SetClkPrescaler (const XQspiPsu *InstancePtr, u8 Prescaler)
 Configures the clock according to the prescaler passed. More...
 
void XQspiPsu_SelectFlash (XQspiPsu *InstancePtr, u8 FlashCS, u8 FlashBus)
 Used to tell the QSPIPSU driver the hardware flash configuration being used. More...
 
s32 XQspiPsu_SetOptions (XQspiPsu *InstancePtr, u32 Options)
 Sets the options for the QSPIPSU device driver.The options control how the device behaves relative to the QSPIPSU bus. More...
 
s32 XQspiPsu_ClearOptions (XQspiPsu *InstancePtr, u32 Options)
 Resets the options for the QSPIPSU device driver. More...
 
u32 XQspiPsu_GetOptions (const XQspiPsu *InstancePtr)
 Gets the options for the QSPIPSU device. More...
 
s32 XQspiPsu_SetReadMode (XQspiPsu *InstancePtr, u32 Mode)
 Sets the Read mode for the QSPIPSU device driver. More...
 
void XQspiPsu_SetWP (const XQspiPsu *InstancePtr, u8 Value)
 Sets the Write Protect and Hold options for the QSPIPSU device driver. More...
 
void XQspiPsu_WriteProtectToggle (const XQspiPsu *InstancePtr, u32 Toggle)
 Enables/disables Write Protect pin on the flash parts. More...
 
void XQspiPsu_Idle (const XQspiPsu *InstancePtr)
 Stops the transfer of data to internal DST FIFO from stream interface and also stops the issuing of new write commands to memory. More...
 

Variables

XQspiPsu_Config XQspiPsu_ConfigTable [XPAR_XQSPIPSU_NUM_INSTANCES]
 This table contains configuration information for each QSPIPSU device in the system. More...