3515 SMF_STATE(EStWritePowerClass) |
3515 SMF_STATE(EStWritePowerClass) |
3516 |
3516 |
3517 OstTrace0( TRACE_INTERNALS, DMMCSTACK_DETERMINEBUSWIDTHANDCLOCKSM3, "EStWritePowerClass" ); |
3517 OstTrace0( TRACE_INTERNALS, DMMCSTACK_DETERMINEBUSWIDTHANDCLOCKSM3, "EStWritePowerClass" ); |
3518 |
3518 |
3519 // Check the card type is valid |
3519 // Check the card type is valid |
3520 // The only currently valid values for this field are 0x01 or 0x03 |
3520 if (!(cardP->iExtendedCSD.IsSupportedCardType())) |
3521 TUint cardType = cardP->iExtendedCSD.CardType(); |
3521 { |
3522 if (cardType != (TExtendedCSD::EHighSpeedCard26Mhz) && |
3522 __KTRACE_OPT(KPBUS1, Kern::Printf("Unsupported card type %u", cardP->iExtendedCSD.CardType())); |
3523 cardType != (TExtendedCSD::EHighSpeedCard26Mhz | TExtendedCSD::EHighSpeedCard52Mhz)) |
3523 OstTrace1( TRACE_INTERNALS, DMMCSTACK_DETERMINEBUSWIDTHANDCLOCKSM4, "Unsupported card type=%u", cardP->iExtendedCSD.CardType() ); |
3524 { |
|
3525 __KTRACE_OPT(KPBUS1, Kern::Printf("Unsupported card type %u", cardType)); |
|
3526 OstTrace1( TRACE_INTERNALS, DMMCSTACK_DETERMINEBUSWIDTHANDCLOCKSM4, "Unsupported card type=%u", cardType ); |
|
3527 |
3524 |
3528 SMF_GOTOS(EStExit); |
3525 SMF_GOTOS(EStExit); |
3529 } |
3526 } |
3530 |
3527 |
3531 // determine the optimum bus width & clock speed which match the power constraints |
3528 // determine the optimum bus width & clock speed which match the power constraints |
3616 OstTrace1( TRACE_INTERNALS, DMMCSTACK_CONFIGUREHIGHSPEEDSM3, "iCxCardCount=%d", iCxCardCount ); |
3613 OstTrace1( TRACE_INTERNALS, DMMCSTACK_CONFIGUREHIGHSPEEDSM3, "iCxCardCount=%d", iCxCardCount ); |
3617 |
3614 |
3618 cardP->SetHighSpeedClock(0); |
3615 cardP->SetHighSpeedClock(0); |
3619 |
3616 |
3620 // Check the card type is valid |
3617 // Check the card type is valid |
3621 // The only currently valid values for this field are 0x01 or 0x03 |
3618 if (!(cardP->iExtendedCSD.IsSupportedCardType())) |
3622 TUint cardType = cardP->iExtendedCSD.CardType(); |
3619 { |
3623 if (cardType != (TExtendedCSD::EHighSpeedCard26Mhz) && |
3620 __KTRACE_OPT(KPBUS1, Kern::Printf("Unsupported card type %u", cardP->iExtendedCSD.CardType())); |
3624 cardType != (TExtendedCSD::EHighSpeedCard26Mhz | TExtendedCSD::EHighSpeedCard52Mhz)) |
3621 OstTrace1( TRACE_INTERNALS, DMMCSTACK_CONFIGUREHIGHSPEEDSM4, "Unsupported card type=%u", cardP->iExtendedCSD.CardType() ); |
3625 { |
|
3626 __KTRACE_OPT(KPBUS1, Kern::Printf("Unsupported card type %u", cardType)); |
|
3627 OstTrace1( TRACE_INTERNALS, DMMCSTACK_CONFIGUREHIGHSPEEDSM4, "Unsupported card type=%u", cardType ); |
|
3628 SMF_GOTOS(EStExit); |
3622 SMF_GOTOS(EStExit); |
3629 } |
3623 } |
3630 |
3624 |
3631 // If the bus width is 4 or 8, send SWITCH cmd and write the BUS_WIDTH byte of the EXT_CSD register |
3625 // If the bus width is 4 or 8, send SWITCH cmd and write the BUS_WIDTH byte of the EXT_CSD register |
3632 |
3626 |