From 380282ca43769553aec70bae9b395c0d2772b1d8 Mon Sep 17 00:00:00 2001 From: P L Sai Krishna Date: Thu, 9 Jul 2015 16:33:37 +0530 Subject: [PATCH] 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 --- lib/sw_services/xilffs/src/diskio.c | 117 +------------------ lib/sw_services/xilffs/src/include/integer.h | 2 +- 2 files changed, 2 insertions(+), 117 deletions(-) diff --git a/lib/sw_services/xilffs/src/diskio.c b/lib/sw_services/xilffs/src/diskio.c index c1de5e00..a0190901 100644 --- a/lib/sw_services/xilffs/src/diskio.c +++ b/lib/sw_services/xilffs/src/diskio.c @@ -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. diff --git a/lib/sw_services/xilffs/src/include/integer.h b/lib/sw_services/xilffs/src/include/integer.h index f254b2a0..8933f148 100644 --- a/lib/sw_services/xilffs/src/include/integer.h +++ b/lib/sw_services/xilffs/src/include/integer.h @@ -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