lib/sw_services/xilflash/src/xilflash_amd.c
static void GetPartID(XFlash * InstancePtr)
{
	void *Ptr;
	u8 Mode;
	u8 Interleave;
	u32 CmdAddress;
	XFlashVendorData_Amd *DevDataPtr;

	DevDataPtr = GET_PARTDATA(InstancePtr);
	CmdAddress = InstancePtr->Geometry.BaseAddress;
	Interleave = (InstancePtr->Geometry.MemoryLayout &
		      XFL_LAYOUT_CFI_INTERL_MASK) >> 24;
	Mode = (InstancePtr->Geometry.MemoryLayout &
		      XFL_LAYOUT_PART_MODE_MASK) >> 8;

	/*
	 * Send Read id codes command.
	 */
	DevDataPtr->SendCmdSeq(CmdAddress,
				XFL_AMD_CMD1_ADDR, XFL_AMD_CMD2_ADDR,
				XFL_AMD_CMD1_DATA, XFL_AMD_CMD2_DATA);

	DevDataPtr->SendCmd(CmdAddress,
				XFL_AMD_CMD1_ADDR,
				XFL_AMD_CMD_AUTO_SELECT);

	/*
	 * Retrieve Manufacturer ID located at word offset 0.
	 */
	XFL_CFI_POSITION_PTR(Ptr, CmdAddress, Interleave,
				XFL_AMD_MANUFECTURE_ID_OFFSET);
	InstancePtr->Properties.PartID.ManufacturerID =
		XFlashCFI_Read8((u8*)Ptr, Interleave, Mode);

	/*
	 * Retrieve Device Code located at word offset 1.
	 */
	XFL_CFI_ADVANCE_PTR8(Ptr, Interleave);
	InstancePtr->Properties.PartID.DeviceID =
		XFlashCFI_Read8((u8*)Ptr, Interleave, Mode);
	/*
	 * Place device(s) back into read-array mode.
	 */
	(void) XFlashAmd_Reset(InstancePtr);
}
/*****************************************************************************/
/**
*
* Reads and interprets part identification data.
*
* @param	InstancePtr is the instance to work on.
*
* @return	None.
*
* @note		None.
*
******************************************************************************/
Reads and interprets part identification data.
Reads and interprets part identification data .
static void GetPartID(XFlash * InstancePtr)
{
	void *Ptr;
	u8 Mode;
	u8 Interleave;
	u32 CmdAddress;
	XFlashVendorData_Amd *DevDataPtr;
	DevDataPtr = GET_PARTDATA(InstancePtr);
	CmdAddress = InstancePtr->Geometry.BaseAddress;
	Interleave = (InstancePtr->Geometry.MemoryLayout &
		      XFL_LAYOUT_CFI_INTERL_MASK) >> 24;
	Mode = (InstancePtr->Geometry.MemoryLayout &
		      XFL_LAYOUT_PART_MODE_MASK) >> 8;
	DevDataPtr->SendCmdSeq(CmdAddress,
				XFL_AMD_CMD1_ADDR, XFL_AMD_CMD2_ADDR,
				XFL_AMD_CMD1_DATA, XFL_AMD_CMD2_DATA);
	DevDataPtr->SendCmd(CmdAddress,
				XFL_AMD_CMD1_ADDR,
				XFL_AMD_CMD_AUTO_SELECT);
	XFL_CFI_POSITION_PTR(Ptr, CmdAddress, Interleave,
				XFL_AMD_MANUFECTURE_ID_OFFSET);
	InstancePtr->Properties.PartID.ManufacturerID =
		XFlashCFI_Read8((u8*)Ptr, Interleave, Mode);
	XFL_CFI_ADVANCE_PTR8(Ptr, Interleave);
	InstancePtr->Properties.PartID.DeviceID =
		XFlashCFI_Read8((u8*)Ptr, Interleave, Mode);
	(void) XFlashAmd_Reset(InstancePtr);
}
static void GetPartID ( XFlash * InstancePtr ) { void * Ptr ; u8 Mode ; u8 Interleave ; u32 CmdAddress ; XFlashVendorData_Amd * DevDataPtr ; DevDataPtr = GET_PARTDATA ( InstancePtr ) ; CmdAddress = InstancePtr -> Geometry . BaseAddress ; Interleave = ( InstancePtr -> Geometry . MemoryLayout & XFL_LAYOUT_CFI_INTERL_MASK ) >> 24 ; Mode = ( InstancePtr -> Geometry . MemoryLayout & XFL_LAYOUT_PART_MODE_MASK ) >> 8 ; DevDataPtr -> SendCmdSeq ( CmdAddress , XFL_AMD_CMD1_ADDR , XFL_AMD_CMD2_ADDR , XFL_AMD_CMD1_DATA , XFL_AMD_CMD2_DATA ) ; DevDataPtr -> SendCmd ( CmdAddress , XFL_AMD_CMD1_ADDR , XFL_AMD_CMD_AUTO_SELECT ) ; XFL_CFI_POSITION_PTR ( Ptr , CmdAddress , Interleave , XFL_AMD_MANUFECTURE_ID_OFFSET ) ; InstancePtr -> Properties . PartID . ManufacturerID = XFlashCFI_Read8 ( ( u8 * ) Ptr , Interleave , Mode ) ; XFL_CFI_ADVANCE_PTR8 ( Ptr , Interleave ) ; InstancePtr -> Properties . PartID . DeviceID = XFlashCFI_Read8 ( ( u8 * ) Ptr , Interleave , Mode ) ; ( void ) XFlashAmd_Reset ( InstancePtr ) ; }
Reads and interprets part identification data.
Reads and interprets part identification data .
/*
	 * Send Read id codes command.
	 */ /*
	 * Retrieve Manufacturer ID located at word offset 0.
	 */ /*
	 * Retrieve Device Code located at word offset 1.
	 */ /*
	 * Place device(s) back into read-array mode.
	 */