equal
deleted
inserted
replaced
14 // |
14 // |
15 |
15 |
16 #include <drivers/sdcard.h> |
16 #include <drivers/sdcard.h> |
17 #include "OstTraceDefinitions.h" |
17 #include "OstTraceDefinitions.h" |
18 #ifdef OST_TRACE_COMPILER_IN_USE |
18 #ifdef OST_TRACE_COMPILER_IN_USE |
19 #include "locmedia_ost.h" |
19 #include "../../../../include/drivers/locmedia_ost.h" |
20 #ifdef __VC32__ |
20 #ifdef __VC32__ |
21 #pragma warning(disable: 4127) // disabling warning "conditional expression is constant" |
21 #pragma warning(disable: 4127) // disabling warning "conditional expression is constant" |
22 #endif |
22 #endif |
23 #include "sdcardTraces.h" |
23 #include "sdcardTraces.h" |
24 #endif |
24 #endif |
592 static const TUint32 KCmd8Param = 0x0100 | 0x00AA; // Voltage supplied : 2.7-3.6V, Check Pattern 10101010b |
592 static const TUint32 KCmd8Param = 0x0100 | 0x00AA; // Voltage supplied : 2.7-3.6V, Check Pattern 10101010b |
593 static const TUint32 KCmd8CheckMask = 0x00000FFF; |
593 static const TUint32 KCmd8CheckMask = 0x00000FFF; |
594 |
594 |
595 SMF_BEGIN |
595 SMF_BEGIN |
596 |
596 |
597 OstTrace0( TRACE_INTERNALS, DSDSTACK_INITIALISEMEMORYCARDSM1, "EStBegin" ); |
597 OstTrace0( TRACE_INTERNALS, DSDSTACK_INITIALISEMEMORYCARDSM1, "EStBegin" ); |
598 iCxCardType = ESDCardTypeUnknown; |
598 |
|
599 iCxCardType = CardType(MMCSocket()->iSocketNumber, iCxCardCount); |
|
600 |
|
601 if (iCxCardType==ESDCardTypeIsMMC) |
|
602 { |
|
603 // Skip the SD Protocol Seq. |
|
604 SMF_INVOKES(GoIdleSMST, EStCheckVoltage); |
|
605 } |
|
606 |
599 s.iCardP = NULL; // This stops ExecCommandSM() from setting old RCA when sending CMD55 |
607 s.iCardP = NULL; // This stops ExecCommandSM() from setting old RCA when sending CMD55 |
600 |
608 |
601 // Send CMD0 to initialise memory |
609 // Send CMD0 to initialise memory |
602 SMF_INVOKES(GoIdleSMST, EStSendInterfaceCondition); |
610 SMF_INVOKES(GoIdleSMST, EStSendInterfaceCondition); |
603 |
611 |
1621 { |
1629 { |
1622 OstTraceFunctionEntry1( DSDSTACK_ALLOCSESSION_ENTRY, this ); |
1630 OstTraceFunctionEntry1( DSDSTACK_ALLOCSESSION_ENTRY, this ); |
1623 return new DSDSession(aCallBack); |
1631 return new DSDSession(aCallBack); |
1624 } |
1632 } |
1625 |
1633 |
|
1634 EXPORT_C DSDStack::TSDCardType DSDStack::CardType(TInt /*aSocket*/, TInt /*aCardNumber*/) |
|
1635 /** |
|
1636 * This method allows a preset card type to be specified for a given slot/socket. |
|
1637 * The SD protocol stack attempts to identify card types (SD or MMC) through protocol responses; |
|
1638 * For embedded media (eMMC or eSD) this is unnecessary as the media type is already known and cannot change. |
|
1639 * Licensee may override this function to specify the preset card type. |
|
1640 * @param aSocket Socket to be queried for card type. |
|
1641 * @param aCardNumber Card number attached to Socket to be queried for card type. |
|
1642 * @return Preset card type |
|
1643 */ |
|
1644 { |
|
1645 // Default implmentation. |
|
1646 return DSDStack::ESDCardTypeUnknown; |
|
1647 } |
|
1648 |
|
1649 |
1626 EXPORT_C void DSDStack::Dummy1() {} |
1650 EXPORT_C void DSDStack::Dummy1() {} |
1627 EXPORT_C void DSDStack::Dummy2() {} |
1651 EXPORT_C void DSDStack::Dummy2() {} |
1628 EXPORT_C void DSDStack::Dummy3() {} |
1652 EXPORT_C void DSDStack::Dummy3() {} |
1629 EXPORT_C void DSDStack::Dummy4() {} |
|