/* Set card to max frequence in normal mode.  */
static status_t SDSPI_SetMaxFrequencyNormalMode(sdspi_card_t *card)
/* Set card to max frequence in normal mode.  */
static status_t SDSPI_SetMaxFrequencyNormalMode(sdspi_card_t *card)
{
    uint32_t maxFrequency;
    maxFrequency = g_transferSpeedRateUnit[SD_RD_TRANSFER_SPEED_RATE_UNIT(card->csd)] *
                   g_transferSpeedMultiplierFactor[SD_RD_TRANSFER_SPEED_TIME_VALUE(card->csd)];
    if (maxFrequency > card->host->busBaudRate)
    {
        maxFrequency = card->host->busBaudRate;
    }
    if (kStatus_Success != card->host->setFrequency(maxFrequency))
    {
        return kStatus_SDSPI_SetFrequencyFailed;
    }
    return kStatus_Success;
}