#include "include/xilflash.h"
#include "include/xilflash_cfi.h"
Functions | |
int | XFlash_Initialize (XFlash *InstancePtr, u32 BaseAddress, u8 BusWidth, int IsPlatformFlash) |
int | XFlash_Read (XFlash *InstancePtr, u32 Offset, u32 Bytes, void *DestPtr) |
int | XFlash_Write (XFlash *InstancePtr, u32 Offset, u32 Bytes, void *SrcPtr) |
int | XFlash_Erase (XFlash *InstancePtr, u32 Offset, u32 Bytes) |
int | XFlash_Lock (XFlash *InstancePtr, u32 Offset, u32 Bytes) |
int | XFlash_Unlock (XFlash *InstancePtr, u32 Offset, u32 Bytes) |
int | XFlash_Reset (XFlash *InstancePtr) |
int | XFlash_DeviceControl (XFlash *InstancePtr, u32 Command, DeviceCtrlParam *Parameters) |
int | XFlash_IsReady (XFlash *InstancePtr) |
int | XFlashGeometry_ToAbsolute (XFlashGeometry *InstancePtr, u16 Region, u16 Block, u32 BlockOffset, u32 *AbsoluteOffsetPtr) |
int | XFlashGeometry_ToBlock (XFlashGeometry *InstancePtr, u32 AbsoluteOffset, u16 *RegionPtr, u16 *BlockPtr, u32 *BlockOffsetPtr) |
MODIFICATION HISTORY:
Ver Who Date Changes ----- ---- -------- ----------------------------------------------- 1.00a rmm 10/20/07 First release 1.00a mta 10/25/07 Updated to flash library 1.01a ksu 04/10/08 Added support for AMD CFI Interface 1.02a ksu 06/16/09 Added support for multiple banks in Intel flash. Added support for Xilinx Platform Flash XL. If the user selects to use the Xilinx Platfrom Flash XL then it is set to Async mode during the initialization. If the user wants to use it in Sync mode then it can be done using the XFlash_DeviceControl API. 2.00a ktn 12/04/09 Updated to use the HAL processor APIs/macros. 3.00a sdm 03/03/11 Removed static parameters in mld and updated code to determine these parameters from the CFI data. 3.01a srt 03/02/12 Added support for Micron G18 Flash device to fix CRs 648372, 648282. 3.02a srt 05/30/12 Changed Implementation for Micron G18 Flash, which fixes the CR 662317. CR 662317 Description - Xilinx Platform Flash on ML605 fails to work.
|
This function is used to execute device specific commands. For a list of device specific commands, see the xilflash.h.
|
|
This function erases the specified address range in the flash device. The number of bytes to erase can be any number as long as it is within the bounds of the device(s). The device is polled until an error or the operation completes successfully.
|
|
Initializes a specific XFlash instance. The initialization entails:
|
|
Checks the readiness of the device, which means it has been successfully initialized.
|
|
This function Locks the blocks in the specified range of the flash device(s). The device is polled until an error or the operation completes successfully.
|
|
This function reads the data from the Flash device and copies it into the specified user buffer. The source and destination addresses can be on any alignment supported by the processor. The device is polled until an error or the operation completes successfully.
|
|
This function resets the flash device and places it in read mode.
|
|
This function Unlocks the blocks in the specified range of the flash device(s). The device is polled until an error or the operation completes successfully.
|
|
This function programs the flash device(s) with data specified in the user buffer. The source and destination address must be aligned to the width of the flash's data bus. The device is polled until an error or the operation completes successfully.
|
|
Converts block coordinates to a part offset. Region, Block, & BlockOffset are converted to PartOffset
|
|
Converts part offset block coordinates. PartOffset is converted to Region, Block & BlockOffset
|