XilinxProcessorIPLib/drivers/nandps/src/xnandps_onfi.c
static void Onfi_GetFeature(XNandPs *InstancePtr, u8 Feature, u8 *Val)
{
	u8 Status;
	u32 ZeroCommand;

	XNandPs_SendCommand(InstancePtr, &OnfiCommands[GET_FEATURES],
			XNANDPS_PAGE_NOT_VALID, Feature);
	/*
	 * Check the Status Register SR[6]
	 */
	do {
		Status = Onfi_CmdReadStatus(InstancePtr);
	}while ((Status & ONFI_STATUS_RDY) != ONFI_STATUS_RDY);

	/*
	 * ONFI 2.3: Reissue the 0x00 on the command line to start reading
	 * data.
	 */
	ZeroCommand = InstancePtr->Config.FlashBase |
			(0 << XNANDPS_ADDR_CYCLES_SHIFT)|
			(0 << XNANDPS_END_CMD_VALID_SHIFT)|
			(XNANDPS_COMMAND_PHASE_MASK)|
			(0 << XNANDPS_END_CMD_SHIFT)|
			(0 << XNANDPS_START_CMD_SHIFT);

	/*
	 * Dummy AXI transaction for sending command 0x00 to the flash
	 */
	Xil_Out32(ZeroCommand, 0x00);

	/*
	 * Read the feature value
	 */
	Onfi_ReadData(InstancePtr, Val, 4);
}
/**************************************************************************/
/**
*
* This function sends Get Feature command to the flash device.
*
* @param	InstancePtr is a pointer to the XNandPs instance.
* @param	Feature is the feature value to read.
*
* @return	None
*
* @note		None
*
***************************************************************************/
This function sends Get Feature command to the flash device.
This function sends Get Feature command to the flash device .
static void Onfi_GetFeature(XNandPs *InstancePtr, u8 Feature, u8 *Val)
{
	u8 Status;
	u32 ZeroCommand;
	XNandPs_SendCommand(InstancePtr, &OnfiCommands[GET_FEATURES],
			XNANDPS_PAGE_NOT_VALID, Feature);
	do {
		Status = Onfi_CmdReadStatus(InstancePtr);
	}while ((Status & ONFI_STATUS_RDY) != ONFI_STATUS_RDY);
	ZeroCommand = InstancePtr->Config.FlashBase |
			(0 << XNANDPS_ADDR_CYCLES_SHIFT)|
			(0 << XNANDPS_END_CMD_VALID_SHIFT)|
			(XNANDPS_COMMAND_PHASE_MASK)|
			(0 << XNANDPS_END_CMD_SHIFT)|
			(0 << XNANDPS_START_CMD_SHIFT);
	Xil_Out32(ZeroCommand, 0x00);
	Onfi_ReadData(InstancePtr, Val, 4);
}
static void Onfi_GetFeature ( XNandPs * InstancePtr , u8 Feature , u8 * Val ) { u8 Status ; u32 ZeroCommand ; XNandPs_SendCommand ( InstancePtr , & OnfiCommands [ GET_FEATURES ] , XNANDPS_PAGE_NOT_VALID , Feature ) ; do { Status = Onfi_CmdReadStatus ( InstancePtr ) ; } while ( ( Status & ONFI_STATUS_RDY ) != ONFI_STATUS_RDY ) ; ZeroCommand = InstancePtr -> Config . FlashBase | ( 0 << XNANDPS_ADDR_CYCLES_SHIFT ) | ( 0 << XNANDPS_END_CMD_VALID_SHIFT ) | ( XNANDPS_COMMAND_PHASE_MASK ) | ( 0 << XNANDPS_END_CMD_SHIFT ) | ( 0 << XNANDPS_START_CMD_SHIFT ) ; Xil_Out32 ( ZeroCommand , 0x00 ) ; Onfi_ReadData ( InstancePtr , Val , 4 ) ; }
This function sends Get Feature command to the flash device.
This function sends Get Feature command to the flash device .
/*
	 * Check the Status Register SR[6]
	 */ /*
	 * ONFI 2.3: Reissue the 0x00 on the command line to start reading
	 * data.
	 */ /*
	 * Dummy AXI transaction for sending command 0x00 to the flash
	 */ /*
	 * Read the feature value
	 */