xilffs: Removed Change Bus Speed, Clock API's in glue layer.
This patch removes Change Bus Speed, Clock Freq, SelectCard API's in glue layer since driver is taking care of those things. Signed-off-by: Srinivas Goud <sgoud@xilinx.com>
This commit is contained in:
parent
ee32c4dda8
commit
380282ca43
2 changed files with 2 additions and 117 deletions
|
@ -252,127 +252,12 @@ DSTATUS disk_initialize (
|
|||
return s;
|
||||
}
|
||||
|
||||
#ifndef MMC_CARD
|
||||
Status = XSdPs_SdCardInitialize(&SdInstance);
|
||||
Status = XSdPs_CardInitialize(&SdInstance);
|
||||
if (Status != XST_SUCCESS) {
|
||||
s |= STA_NOINIT;
|
||||
return s;
|
||||
}
|
||||
|
||||
Status = XSdPs_Change_ClkFreq(&SdInstance, SD_CLK_25_MHZ);
|
||||
if (Status != XST_SUCCESS) {
|
||||
s |= STA_NOINIT;
|
||||
return s;
|
||||
}
|
||||
|
||||
Status = XSdPs_Select_Card(&SdInstance);
|
||||
if (Status != XST_SUCCESS) {
|
||||
s |= STA_NOINIT;
|
||||
return s;
|
||||
}
|
||||
|
||||
Status = XSdPs_Get_BusWidth(&SdInstance, SCR);
|
||||
if (Status != XST_SUCCESS) {
|
||||
s |= STA_NOINIT;
|
||||
return s;
|
||||
}
|
||||
|
||||
Status = XSdPs_Get_BusSpeed(&SdInstance, ReadBuff);
|
||||
if (Status != XST_SUCCESS) {
|
||||
s |= STA_NOINIT;
|
||||
return s;
|
||||
}
|
||||
|
||||
if((ReadBuff[13] & HIGH_SPEED_SUPPORT) != 0U){
|
||||
Status = XSdPs_Change_BusSpeed(&SdInstance);
|
||||
if (Status != XST_SUCCESS) {
|
||||
s |= STA_NOINIT;
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
||||
Status = XSdPs_Pullup(&SdInstance);
|
||||
if (Status != XST_SUCCESS) {
|
||||
s |= STA_NOINIT;
|
||||
return s;
|
||||
}
|
||||
|
||||
if ((SCR[1] & WIDTH_4_BIT_SUPPORT) != 0U) {
|
||||
Status = XSdPs_Change_BusWidth(&SdInstance);
|
||||
if (Status != XST_SUCCESS) {
|
||||
s |= STA_NOINIT;
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
||||
Status = XSdPs_SetBlkSize(&SdInstance, (u16)XSDPS_BLK_SIZE_512_MASK);
|
||||
if (Status != XST_SUCCESS) {
|
||||
s |= STA_NOINIT;
|
||||
return s;
|
||||
}
|
||||
|
||||
#else
|
||||
Status = XSdPs_MmcCardInitialize(&SdInstance);
|
||||
if (Status != XST_SUCCESS) {
|
||||
s |= STA_NOINIT;
|
||||
return s;
|
||||
}
|
||||
|
||||
Status = XSdPs_Change_ClkFreq(&SdInstance, SD_CLK_26_MHZ);
|
||||
if (Status != XST_SUCCESS) {
|
||||
s |= STA_NOINIT;
|
||||
return s;
|
||||
}
|
||||
|
||||
Status = XSdPs_Select_Card(&SdInstance);
|
||||
if (Status != XST_SUCCESS) {
|
||||
s |= STA_NOINIT;
|
||||
return s;
|
||||
}
|
||||
|
||||
Status = XSdPs_Change_BusWidth(&SdInstance);
|
||||
if (Status != XST_SUCCESS) {
|
||||
s |= STA_NOINIT;
|
||||
return s;
|
||||
}
|
||||
|
||||
Status = XSdPs_Get_Mmc_ExtCsd(&SdInstance, ExtCsd);
|
||||
if (Status != XST_SUCCESS) {
|
||||
s |= STA_NOINIT;
|
||||
return s;
|
||||
}
|
||||
|
||||
if(ExtCsd[EXT_CSD_4_BIT_WIDTH_BYTE] != 0x1) {
|
||||
s |= STA_NOINIT;
|
||||
return s;
|
||||
}
|
||||
|
||||
if(ExtCsd[EXT_CSD_DEVICE_TYPE_BYTE] & EXT_CSD_DEVICE_TYPE_HIGH_SPEED){
|
||||
Status = XSdPs_Change_BusSpeed(&SdInstance);
|
||||
if (Status != XST_SUCCESS) {
|
||||
s |= STA_NOINIT;
|
||||
return s;
|
||||
}
|
||||
|
||||
Status = XSdPs_Get_Mmc_ExtCsd(&SdInstance, ExtCsd);
|
||||
if (Status != XST_SUCCESS) {
|
||||
s |= STA_NOINIT;
|
||||
return s;
|
||||
}
|
||||
|
||||
if(ExtCsd[EXT_CSD_HIGH_SPEED_BYTE] != 0x1) {
|
||||
s |= STA_NOINIT;
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
||||
Status = XSdPs_SetBlkSize(&SdInstance, XSDPS_BLK_SIZE_512_MASK);
|
||||
if (Status != XST_SUCCESS) {
|
||||
s |= STA_NOINIT;
|
||||
return s;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Disk is initialized.
|
||||
|
|
|
@ -26,7 +26,7 @@ typedef unsigned int UINT;
|
|||
|
||||
/* These types MUST be 32 bit */
|
||||
typedef long LONG;
|
||||
typedef unsigned long DWORD;
|
||||
typedef unsigned int DWORD;
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue