update SDIO protocol

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1979 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
luohui2320@gmail.com
2012-02-28 16:40:40 +00:00
parent b2d0a9c146
commit dea9c19e5e
12 changed files with 1699 additions and 36 deletions

View File

@@ -102,7 +102,7 @@ static rt_int32_t mmcsd_parse_csd(struct rt_mmcsd_card *card)
#endif
break;
case 1:
card->card_type |= CARD_TYPE_SDHC;
card->flags |= CARD_FLAG_SDHC;
/*This field is fixed to 0Eh, which indicates 1 ms.
The host should not use TAAC, NSAC, and R2W_FACTOR
@@ -187,7 +187,7 @@ static rt_int32_t mmcsd_switch(struct rt_mmcsd_card *card)
}
if (!(card->card_type & CARD_TYPE_SD))
if (card->card_type != CARD_TYPE_SD)
goto err;
if (card->scr.sd_version < SCR_SPEC_VER_1)
goto err;
@@ -255,7 +255,7 @@ static rt_int32_t mmcsd_switch(struct rt_mmcsd_card *card)
goto err;
}
card->flags |= CARD_MODE_HIGHSPEED;
card->flags |= CARD_FLAG_HIGHSPEED;
err:
rt_free_align(buf);
@@ -629,7 +629,7 @@ static rt_int32_t mmcsd_sd_init_card(struct rt_mmcsd_host *host, rt_uint32_t ocr
/* set bus speed */
max_data_rate = (unsigned int)-1;
if (card->flags & CARD_MODE_HIGHSPEED)
if (card->flags & CARD_FLAG_HIGHSPEED)
{
if (max_data_rate > card->hs_max_data_rate)
max_data_rate = card->hs_max_data_rate;