lib/sw_services/xilflash/src/xilflash_amd.c
static int EraseSuspend(XFlash * InstancePtr, u32 EraseAddrOff)
{
	XFlashVendorData_Amd *DevDataPtr;

	/*
	 * Verify inputs are valid.
	 */
	if(InstancePtr == NULL) {
		return (XST_FAILURE);
	}

	DevDataPtr = GET_PARTDATA(InstancePtr);

	/*
	 * Send the erase suspend command.
	 */
	DevDataPtr->WriteFlash(InstancePtr->Geometry.BaseAddress,
				EraseAddrOff, XFL_AMD_CMD_ERASE_SUSPEND);

	/*
	 * Wait until Toggle Stops.
	 */
	(void) DevDataPtr->PollSR(InstancePtr->Geometry.BaseAddress,
				  EraseAddrOff);

	/*
	 * Return to Read mode.
	 */
	(void) XFlashAmd_Reset(InstancePtr);

	return (XST_SUCCESS);
}
/*****************************************************************************/
/**
*
* This function suspends an erase operation on a bank of the AMD flash device.
*
* @param	InstancePtr is the pointer to the XFlash instance.
* @param	EraseAddrOff holds the address inside the bank where the
*		operation must be suspended.
*
* @return
*		- XST_SUCCESS if successful.
*		- XST_FAILURE if fail.
*
* @note		This API can not be used in application, because Erase API is
*		blocking function in this library. If user wants to use this
*		feature than Flash library Erase function should be changed such
*		Erase API will be non blocking function. In case of non blocking
*		Erase API, application must check status of erase operation in
*		the application.
*
******************************************************************************/
This function suspends an erase operation on a bank of the AMD flash device.
This function suspends an erase operation on a bank of the AMD flash device .
static int EraseSuspend(XFlash * InstancePtr, u32 EraseAddrOff)
{
	XFlashVendorData_Amd *DevDataPtr;
	if(InstancePtr == NULL) {
		return (XST_FAILURE);
	}
	DevDataPtr = GET_PARTDATA(InstancePtr);
	DevDataPtr->WriteFlash(InstancePtr->Geometry.BaseAddress,
				EraseAddrOff, XFL_AMD_CMD_ERASE_SUSPEND);
	(void) DevDataPtr->PollSR(InstancePtr->Geometry.BaseAddress,
				  EraseAddrOff);
	(void) XFlashAmd_Reset(InstancePtr);
	return (XST_SUCCESS);
}
static int EraseSuspend ( XFlash * InstancePtr , u32 EraseAddrOff ) { XFlashVendorData_Amd * DevDataPtr ; if ( InstancePtr == NULL ) { return ( XST_FAILURE ) ; } DevDataPtr = GET_PARTDATA ( InstancePtr ) ; DevDataPtr -> WriteFlash ( InstancePtr -> Geometry . BaseAddress , EraseAddrOff , XFL_AMD_CMD_ERASE_SUSPEND ) ; ( void ) DevDataPtr -> PollSR ( InstancePtr -> Geometry . BaseAddress , EraseAddrOff ) ; ( void ) XFlashAmd_Reset ( InstancePtr ) ; return ( XST_SUCCESS ) ; }
This function suspends an erase operation on a bank of the AMD flash device.
This function suspends an erase operation on a bank of the AMD flash device .
/*
	 * Verify inputs are valid.
	 */ /*
	 * Send the erase suspend command.
	 */ /*
	 * Wait until Toggle Stops.
	 */ /*
	 * Return to Read mode.
	 */