![]() |
ospipsv
Xilinx SDK Drivers API Documentation
|
Functions | |
u32 | XOspiPsv_CfgInitialize (XOspiPsv *InstancePtr, const XOspiPsv_Config *ConfigPtr) |
Initializes a specific XOspiPsv instance such that the driver is ready to use. More... | |
void | XOspiPsv_Reset (const XOspiPsv *InstancePtr) |
This function reset the configuration register. More... | |
u32 | XOspiPsv_DeviceReset (u8 Type) |
This function reset the OSPI flash device. More... | |
u32 | XOspiPsv_PollTransfer (XOspiPsv *InstancePtr, XOspiPsv_Msg *Msg) |
This function performs a transfer on the bus in polled mode. More... | |
u32 | XOspiPsv_IntrTransfer (XOspiPsv *InstancePtr, XOspiPsv_Msg *Msg) |
This function performs a transfer on the bus in interrupt mode. More... | |
u32 | XOspiPsv_IntrHandler (XOspiPsv *InstancePtr) |
This function handles interrupt based transfers. More... | |
void | XOspiPsv_Idle (const XOspiPsv *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... | |
void | XOspiPsv_SetStatusHandler (XOspiPsv *InstancePtr, void *CallBackRef, XOspiPsv_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... | |
u32 XOspiPsv_CfgInitialize | ( | XOspiPsv * | InstancePtr, |
const XOspiPsv_Config * | ConfigPtr | ||
) |
Initializes a specific XOspiPsv instance such that the driver is ready to use.
InstancePtr | is a pointer to the XOspiPsv instance. |
ConfigPtr | is a reference to a structure containing information about a specific OSPIPSV device. This function initializes an InstancePtr object for a specific device specified by the contents of Config. |
EffectiveAddr | is the device base address in the virtual memory address space. The caller is responsible for keeping the address mapping from EffectiveAddr to the device physical base address unchanged once this function is invoked. Unexpected errors may occur if the address mapping changes after this function is called. If address translation is not used, use ConfigPtr->Config.BaseAddress for this device. |
References XOspiPsv_Config::BaseAddress, XOspiPsv::Config, XOspiPsv_Config::InputClockHz, XOspiPsv::IsBusy, XOspiPsv_Config::IsCacheCoherent, XOspiPsv::IsReady, XOspiPsv::OpMode, XOspiPsv::RecvBufferPtr, XOspiPsv::RxBytes, XOspiPsv::SdrDdrMode, XOspiPsv::SendBufferPtr, XOspiPsv::TxBytes, XOspiPsv_Reset(), and XOspiPsv_SetSdrDdrMode().
Referenced by OspiPsvInterruptFlashExample(), and OspiPsvPolledFlashExample().
u32 XOspiPsv_DeviceReset | ( | u8 | Type | ) |
This function reset the OSPI flash device.
Type | is Reset type. |
Referenced by OspiPsvInterruptFlashExample(), and OspiPsvPolledFlashExample().
void XOspiPsv_Idle | ( | const XOspiPsv * | InstancePtr | ) |
Stops the transfer of data to internal DST FIFO from stream interface and also stops the issuing of new write commands to memory.
By calling this API, any ongoing Dma transfers will be paused and DMA will not issue AXI write commands to memory
InstancePtr | is a pointer to the XOspiPsv instance. |
References XOspiPsv_Config::BaseAddress, XOspiPsv::Config, XOSPIPSV_CONFIG_REG, and XOSPIPSV_OSPIDMA_DST_CTRL.
u32 XOspiPsv_IntrHandler | ( | XOspiPsv * | InstancePtr | ) |
This function handles interrupt based transfers.
InstancePtr | is a pointer to the XOspiPsv instance. |
Msg | is a pointer to the structure containing transfer data. |
References XOspiPsv_Msg::Addr, XOspiPsv_Msg::Addrvalid, XOspiPsv_Config::BaseAddress, XOspiPsv_Msg::ByteCount, XOspiPsv::Config, XOspiPsv_Msg::Flags, XOspiPsv::IsBusy, XOspiPsv_Config::IsCacheCoherent, XOspiPsv::RecvBufferPtr, XOspiPsv_Msg::RxBfrPtr, XOspiPsv::RxBytes, XOspiPsv::StatusRef, XOSPIPSV_CONFIG_REG, XOSPIPSV_INDIRECT_READ_XFER_CTRL_REG, XOSPIPSV_IRQ_MASK_REG, XOSPIPSV_IRQ_STATUS_REG, XOSPIPSV_OSPIDMA_DST_I_DIS, and XOSPIPSV_OSPIDMA_DST_I_STS.
u32 XOspiPsv_IntrTransfer | ( | XOspiPsv * | InstancePtr, |
XOspiPsv_Msg * | Msg | ||
) |
This function performs a transfer on the bus in interrupt mode.
InstancePtr | is a pointer to the XOspiPsv instance. |
Msg | is a pointer to the structure containing transfer data. |
References XOspiPsv_Msg::Addr, XOspiPsv_Msg::Addrsize, XOspiPsv_Msg::Addrvalid, XOspiPsv_Config::BaseAddress, XOspiPsv_Msg::ByteCount, XOspiPsv::Config, XOspiPsv_Msg::Dummy, XOspiPsv_Msg::Flags, XOspiPsv::IsBusy, XOspiPsv::IsReady, XOspiPsv_Msg::Opcode, XOspiPsv::OpMode, XOspiPsv::RecvBufferPtr, XOspiPsv_Msg::RxBfrPtr, XOspiPsv::RxBytes, XOspiPsv::SendBufferPtr, XOspiPsv_Msg::TxBfrPtr, XOspiPsv::TxBytes, XOSPIPSV_CONFIG_REG, XOSPIPSV_FLASH_CMD_ADDR_REG, XOSPIPSV_FLASH_CMD_CTRL_REG, XOSPIPSV_IRQ_MASK_REG, and XOSPIPSV_OSPIDMA_DST_I_EN.
Referenced by BulkErase(), DieErase(), FlashEnterExit4BAddMode(), FlashErase(), FlashIoWrite(), FlashRead(), FlashReadID(), and FlashSetSDRDDRMode().
u32 XOspiPsv_PollTransfer | ( | XOspiPsv * | InstancePtr, |
XOspiPsv_Msg * | Msg | ||
) |
This function performs a transfer on the bus in polled mode.
The messages passed are all transferred on the bus between one CS assert and de-assert.
InstancePtr | is a pointer to the XOspiPsv instance. |
Msg | is a pointer to the structure containing transfer data. |
References XOspiPsv_Config::BaseAddress, XOspiPsv::Config, XOspiPsv::IsBusy, XOspiPsv::IsReady, and XOSPIPSV_CONFIG_REG.
Referenced by FlashLinearWrite().
void XOspiPsv_Reset | ( | const XOspiPsv * | InstancePtr | ) |
This function reset the configuration register.
The Upper layer software is responsible for re-configuring (if necessary) and restarting the OSPIPSV device after the reset.
InstancePtr | is a pointer to the XOspiPsv instance. |
References XOspiPsv_Config::BaseAddress, XOspiPsv::Config, XOSPIPSV_CONFIG_REG, and XOSPIPSV_DEV_DELAY_REG.
Referenced by XOspiPsv_CfgInitialize().
void XOspiPsv_SetStatusHandler | ( | XOspiPsv * | InstancePtr, |
void * | CallBackRef, | ||
XOspiPsv_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.
The handler executes in an interrupt context, so it must minimize the amount of processing performed. One of the following status events is passed to the status handler.
XST_SPI_TRANSFER_DONE The requested data transfer is done
InstancePtr | is a pointer to the XOspiPsv instance. |
CallBackRef | is the upper layer callback reference passed back when the callback function is invoked. |
FuncPointer | is the pointer to the callback function. |
The handler is called within interrupt context, so it should do its work quickly and queue potentially time-consuming work to a task-level thread.
References XOspiPsv::IsReady, and XOspiPsv::StatusRef.
Referenced by OspiPsvInterruptFlashExample().