201017_04
authorhgs
Thu, 29 Apr 2010 11:08:53 +0100
changeset 129 a990138eda40
parent 128 21b8e4e0ff99
child 130 c30940f6d922
201017_04
kernel/eka/drivers/pbus/mmc/stack.cpp
kernel/eka/include/drivers/mmc.h
kernel/eka/include/drivers/mmc.inl
kernel/eka/include/e32ver.h
kernel/eka/release.txt
--- a/kernel/eka/drivers/pbus/mmc/stack.cpp	Wed Apr 28 16:16:32 2010 +0100
+++ b/kernel/eka/drivers/pbus/mmc/stack.cpp	Thu Apr 29 11:08:53 2010 +0100
@@ -3517,13 +3517,10 @@
 		OstTrace0( TRACE_INTERNALS, DMMCSTACK_DETERMINEBUSWIDTHANDCLOCKSM3, "EStWritePowerClass" );
 	
 		// Check the card type is valid
-		// The only currently valid values for this field are 0x01 or 0x03
-		TUint cardType = cardP->iExtendedCSD.CardType();
-		if (cardType != (TExtendedCSD::EHighSpeedCard26Mhz) && 
-			cardType != (TExtendedCSD::EHighSpeedCard26Mhz | TExtendedCSD::EHighSpeedCard52Mhz))
-			{
-			__KTRACE_OPT(KPBUS1, Kern::Printf("Unsupported card type %u", cardType));
-			OstTrace1( TRACE_INTERNALS, DMMCSTACK_DETERMINEBUSWIDTHANDCLOCKSM4, "Unsupported card type=%u", cardType );
+		if (!(cardP->iExtendedCSD.IsSupportedCardType()))
+			{            
+			__KTRACE_OPT(KPBUS1, Kern::Printf("Unsupported card type %u", cardP->iExtendedCSD.CardType()));
+			OstTrace1( TRACE_INTERNALS, DMMCSTACK_DETERMINEBUSWIDTHANDCLOCKSM4, "Unsupported card type=%u", cardP->iExtendedCSD.CardType() );
 			
 			SMF_GOTOS(EStExit);
 			}
@@ -3618,13 +3615,10 @@
 		cardP->SetHighSpeedClock(0);
 
 		// Check the card type is valid
-		// The only currently valid values for this field are 0x01 or 0x03
-		TUint cardType = cardP->iExtendedCSD.CardType();
-		if (cardType != (TExtendedCSD::EHighSpeedCard26Mhz) && 
-			cardType != (TExtendedCSD::EHighSpeedCard26Mhz | TExtendedCSD::EHighSpeedCard52Mhz))
-			{
-			__KTRACE_OPT(KPBUS1, Kern::Printf("Unsupported card type %u", cardType));
-			OstTrace1( TRACE_INTERNALS, DMMCSTACK_CONFIGUREHIGHSPEEDSM4, "Unsupported card type=%u", cardType );
+        if (!(cardP->iExtendedCSD.IsSupportedCardType()))
+            {            
+			__KTRACE_OPT(KPBUS1, Kern::Printf("Unsupported card type %u", cardP->iExtendedCSD.CardType()));
+			OstTrace1( TRACE_INTERNALS, DMMCSTACK_CONFIGUREHIGHSPEEDSM4, "Unsupported card type=%u", cardP->iExtendedCSD.CardType() );
 			SMF_GOTOS(EStExit);
 			}
 
--- a/kernel/eka/include/drivers/mmc.h	Wed Apr 28 16:16:32 2010 +0100
+++ b/kernel/eka/include/drivers/mmc.h	Thu Apr 29 11:08:53 2010 +0100
@@ -1540,7 +1540,8 @@
 	enum TCardTypes
 		{
 		EHighSpeedCard26Mhz = 0x01,
-		EHighSpeedCard52Mhz = 0x02
+		EHighSpeedCard52Mhz = 0x02,
+		ECardTypeMsk        = 0x03 
 		};
 	
 	/**
@@ -1714,6 +1715,9 @@
 	
 	/** returns the contents of the S_A_TIMEOUT field */
 	inline TUint SleepAwakeTimeout() const;
+	
+	/** returns True if the CARD_TYPE field conatains a valid value **/
+	inline TBool IsSupportedCardType() const;
 
 private:
 	/** 
--- a/kernel/eka/include/drivers/mmc.inl	Wed Apr 28 16:16:32 2010 +0100
+++ b/kernel/eka/include/drivers/mmc.inl	Thu Apr 29 11:08:53 2010 +0100
@@ -190,6 +190,19 @@
 inline TUint TExtendedCSD::BootBusWidth() const {return iData[EBootBusWidthIndex];}
 inline TUint TExtendedCSD::EraseGroupDef() const {return iData[EEraseGroupDefIndex];}
 
+/*
+ * MMC v4.3 specification states the only valid values for CardType are 0x01 or 0x03
+ */
+inline TBool TExtendedCSD::IsSupportedCardType() const        
+        {
+        switch (CardType()&ECardTypeMsk)
+            {
+            case 0x01:
+            case 0x03: return ETrue;
+            default: return EFalse;
+            }
+        }
+
 //	--------  class TMMCStatus  --------
  /**
  * Constructor for TMMCStatus.
--- a/kernel/eka/include/e32ver.h	Wed Apr 28 16:16:32 2010 +0100
+++ b/kernel/eka/include/e32ver.h	Thu Apr 29 11:08:53 2010 +0100
@@ -28,7 +28,7 @@
 
 const TInt KE32MajorVersionNumber=2;
 const TInt KE32MinorVersionNumber=0;
-const TInt KE32BuildVersionNumber=3073;
+const TInt KE32BuildVersionNumber=3074;
 
 const TInt KMachineConfigurationMajorVersionNumber=1;
 const TInt KMachineConfigurationMinorVersionNumber=0;
--- a/kernel/eka/release.txt	Wed Apr 28 16:16:32 2010 +0100
+++ b/kernel/eka/release.txt	Thu Apr 29 11:08:53 2010 +0100
@@ -1,3 +1,11 @@
+Version 2.00.3074
+=================
+(Made by vfebvre 28/04/2010)
+
+1.	necliffo
+	1.	ou1cimx1#357516 eMMC with DDR-mode support is not used in 4-bit mode
+
+
 Version 2.00.3073
 =================
 (Made by vfebvre 26/04/2010)