lib/sw_apps/img_rcvry/src/xbir_sd.c
int Xbir_SdInit(void)
{
	int Status = XST_FAILURE;
	XSdPs_Config *SdConfig;

	/* Initialize the SD driver so that it's ready to use */
	SdConfig =  XSdPs_LookupConfig(XBIR_SD_DEVICE_ID);
	if (NULL == SdConfig) {
		Status = XBIR_ERROR_SD_CONFIG;
		goto END;
	}

	Status =  XSdPs_CfgInitialize(&SdInstance, SdConfig,
			SdConfig->BaseAddress);
	if (Status != XST_SUCCESS) {
		Status = XBIR_ERROR_SD_CONFIG_INIT;
		goto END;
	}

	Status = XSdPs_CardInitialize(&SdInstance);
	if (Status != XST_SUCCESS) {
		Status = XBIR_ERROR_SD_CARD_INIT;
	}

END:
	return Status;
}
/*****************************************************************************/
/**
 * @brief
 * This function is used to initialize SD driver
 *
 * @return	XST_SUCCESS on successful initialization
 *		Error code on failure
 *
 *****************************************************************************/
@brief
This function is used to initialize SD driver

@return      XST_SUCCESS on successful initialization
Error code on failure
@brief This function is used to initialize SD driver @return XST_SUCCESS on successful initialization Error code on failure
int Xbir_SdInit(void)
{
	int Status = XST_FAILURE;
	XSdPs_Config *SdConfig;
	SdConfig =  XSdPs_LookupConfig(XBIR_SD_DEVICE_ID);
	if (NULL == SdConfig) {
		Status = XBIR_ERROR_SD_CONFIG;
		goto END;
	}
	Status =  XSdPs_CfgInitialize(&SdInstance, SdConfig,
			SdConfig->BaseAddress);
	if (Status != XST_SUCCESS) {
		Status = XBIR_ERROR_SD_CONFIG_INIT;
		goto END;
	}
	Status = XSdPs_CardInitialize(&SdInstance);
	if (Status != XST_SUCCESS) {
		Status = XBIR_ERROR_SD_CARD_INIT;
	}
END:
	return Status;
}
int Xbir_SdInit ( void ) { int Status = XST_FAILURE ; XSdPs_Config * SdConfig ; SdConfig = XSdPs_LookupConfig ( XBIR_SD_DEVICE_ID ) ; if ( NULL == SdConfig ) { Status = XBIR_ERROR_SD_CONFIG ; goto END ; } Status = XSdPs_CfgInitialize ( & SdInstance , SdConfig , SdConfig -> BaseAddress ) ; if ( Status != XST_SUCCESS ) { Status = XBIR_ERROR_SD_CONFIG_INIT ; goto END ; } Status = XSdPs_CardInitialize ( & SdInstance ) ; if ( Status != XST_SUCCESS ) { Status = XBIR_ERROR_SD_CARD_INIT ; } END : return Status ; }
@brief
 This function is used to initialize SD driver
@brief This function is used to initialize SD driver
/* Initialize the SD driver so that it's ready to use */