
资深技术员

- 积分
- 352
 
- 在线时间
- 80 小时
- 精华
- 0
- 注册时间
- 2003-2-21
- 最后登录
- 2021-1-16
|
今天查看源码
drivers/mmc/core/mmc.c中
129 * Given a 128-bit response, decode to our card CSD structure.
130 */
131 static int mmc_decode_csd(struct mmc_card *card)
132 {
133 struct mmc_csd *csd = &card->csd;
134 unsigned int e, m, a, b;
135 u32 *resp = card->raw_csd;
136
137 /*
138 * We only understand CSD structure v1.1 and v1.2.
139 * v1.2 has extra information in bits 15, 11 and 10.
140 * We also support eMMC v4.4 & v4.41.
141 */
142 csd->structure = UNSTUFF_BITS(resp, 126, 2);
143 if (csd->structure == 0) {
144 pr_err("%s: unrecognised CSD structure version %d\n",
145 mmc_hostname(card->host), csd->structure);
146 return -EINVAL;
147 }
如何破? |
|