lib/sw_services/xilflash/src/xilflash_amd.c
void AmdDevice_is_Ready(XFlash * InstancePtr)
{
	u32 FlashStatus;
	XFlashGeometry *GeomPtr;
	GeomPtr = &InstancePtr->Geometry;
	XFlashVendorData_Amd *DevDataPtr;

	DevDataPtr = GET_PARTDATA(InstancePtr);

	while (1) {
		/* Send Status Register Read Command. */
		DevDataPtr->SendCmd(GeomPtr->BaseAddress,XFL_AMD_CMD1_ADDR,
				XFL_AMD_CMD_STATUS_REG_READ);
		FlashStatus = DevDataPtr->GetStatus(GeomPtr->BaseAddress,0);
                if (FlashStatus & XFL_AMD_DEVICE_READY_MASK)
			break;
	}

}
/*****************************************************************************/
/**
*
* Check the device is ready or not.
*
* @param	InstancePtr is a pointer to the XFlash instance.
*
* @return
* 		This API waits until the device ready.
*
* @note		None.
*
******************************************************************************/
Check the device is ready or not.
Check the device is ready or not .
void AmdDevice_is_Ready(XFlash * InstancePtr)
{
	u32 FlashStatus;
	XFlashGeometry *GeomPtr;
	GeomPtr = &InstancePtr->Geometry;
	XFlashVendorData_Amd *DevDataPtr;
	DevDataPtr = GET_PARTDATA(InstancePtr);
	while (1) {
		DevDataPtr->SendCmd(GeomPtr->BaseAddress,XFL_AMD_CMD1_ADDR,
				XFL_AMD_CMD_STATUS_REG_READ);
		FlashStatus = DevDataPtr->GetStatus(GeomPtr->BaseAddress,0);
                if (FlashStatus & XFL_AMD_DEVICE_READY_MASK)
			break;
	}
}
void AmdDevice_is_Ready ( XFlash * InstancePtr ) { u32 FlashStatus ; XFlashGeometry * GeomPtr ; GeomPtr = & InstancePtr -> Geometry ; XFlashVendorData_Amd * DevDataPtr ; DevDataPtr = GET_PARTDATA ( InstancePtr ) ; while ( 1 ) { DevDataPtr -> SendCmd ( GeomPtr -> BaseAddress , XFL_AMD_CMD1_ADDR , XFL_AMD_CMD_STATUS_REG_READ ) ; FlashStatus = DevDataPtr -> GetStatus ( GeomPtr -> BaseAddress , 0 ) ; if ( FlashStatus & XFL_AMD_DEVICE_READY_MASK ) break ; } }
Check the device is ready or not.
Check the device is ready or not .
/* Send Status Register Read Command. */