H A D | sd.c | 56 #define UNSTUFF_BITS(resp,start,size) \ macro 83 card->cid.manfid = UNSTUFF_BITS(resp, 120, 8); mmc_decode_cid() 84 card->cid.oemid = UNSTUFF_BITS(resp, 104, 16); mmc_decode_cid() 85 card->cid.prod_name[0] = UNSTUFF_BITS(resp, 96, 8); mmc_decode_cid() 86 card->cid.prod_name[1] = UNSTUFF_BITS(resp, 88, 8); mmc_decode_cid() 87 card->cid.prod_name[2] = UNSTUFF_BITS(resp, 80, 8); mmc_decode_cid() 88 card->cid.prod_name[3] = UNSTUFF_BITS(resp, 72, 8); mmc_decode_cid() 89 card->cid.prod_name[4] = UNSTUFF_BITS(resp, 64, 8); mmc_decode_cid() 90 card->cid.hwrev = UNSTUFF_BITS(resp, 60, 4); mmc_decode_cid() 91 card->cid.fwrev = UNSTUFF_BITS(resp, 56, 4); mmc_decode_cid() 92 card->cid.serial = UNSTUFF_BITS(resp, 24, 32); mmc_decode_cid() 93 card->cid.year = UNSTUFF_BITS(resp, 12, 8); mmc_decode_cid() 94 card->cid.month = UNSTUFF_BITS(resp, 8, 4); mmc_decode_cid() 108 csd_struct = UNSTUFF_BITS(resp, 126, 2); mmc_decode_csd() 112 m = UNSTUFF_BITS(resp, 115, 4); mmc_decode_csd() 113 e = UNSTUFF_BITS(resp, 112, 3); mmc_decode_csd() 115 csd->tacc_clks = UNSTUFF_BITS(resp, 104, 8) * 100; mmc_decode_csd() 117 m = UNSTUFF_BITS(resp, 99, 4); mmc_decode_csd() 118 e = UNSTUFF_BITS(resp, 96, 3); mmc_decode_csd() 120 csd->cmdclass = UNSTUFF_BITS(resp, 84, 12); mmc_decode_csd() 122 e = UNSTUFF_BITS(resp, 47, 3); mmc_decode_csd() 123 m = UNSTUFF_BITS(resp, 62, 12); mmc_decode_csd() 126 csd->read_blkbits = UNSTUFF_BITS(resp, 80, 4); mmc_decode_csd() 127 csd->read_partial = UNSTUFF_BITS(resp, 79, 1); mmc_decode_csd() 128 csd->write_misalign = UNSTUFF_BITS(resp, 78, 1); mmc_decode_csd() 129 csd->read_misalign = UNSTUFF_BITS(resp, 77, 1); mmc_decode_csd() 130 csd->dsr_imp = UNSTUFF_BITS(resp, 76, 1); mmc_decode_csd() 131 csd->r2w_factor = UNSTUFF_BITS(resp, 26, 3); mmc_decode_csd() 132 csd->write_blkbits = UNSTUFF_BITS(resp, 22, 4); mmc_decode_csd() 133 csd->write_partial = UNSTUFF_BITS(resp, 21, 1); mmc_decode_csd() 135 if (UNSTUFF_BITS(resp, 46, 1)) { mmc_decode_csd() 138 csd->erase_size = UNSTUFF_BITS(resp, 39, 7) + 1; mmc_decode_csd() 154 m = UNSTUFF_BITS(resp, 99, 4); mmc_decode_csd() 155 e = UNSTUFF_BITS(resp, 96, 3); mmc_decode_csd() 157 csd->cmdclass = UNSTUFF_BITS(resp, 84, 12); mmc_decode_csd() 158 csd->c_size = UNSTUFF_BITS(resp, 48, 22); mmc_decode_csd() 164 m = UNSTUFF_BITS(resp, 48, 22); mmc_decode_csd() 199 scr_struct = UNSTUFF_BITS(resp, 60, 4); mmc_decode_scr() 206 scr->sda_vsn = UNSTUFF_BITS(resp, 56, 4); mmc_decode_scr() 207 scr->bus_widths = UNSTUFF_BITS(resp, 48, 4); mmc_decode_scr() 210 scr->sda_spec3 = UNSTUFF_BITS(resp, 47, 1); mmc_decode_scr() 212 if (UNSTUFF_BITS(resp, 55, 1)) mmc_decode_scr() 218 scr->cmds = UNSTUFF_BITS(resp, 32, 2); mmc_decode_scr() 253 * UNSTUFF_BITS only works with four u32s so we have to offset the mmc_read_ssr() 256 au = UNSTUFF_BITS(ssr, 428 - 384, 4); mmc_read_ssr() 260 es = UNSTUFF_BITS(ssr, 408 - 384, 16); mmc_read_ssr() 261 et = UNSTUFF_BITS(ssr, 402 - 384, 6); mmc_read_ssr() 263 eo = UNSTUFF_BITS(ssr, 400 - 384, 2); mmc_read_ssr()
|