Lines Matching refs:mmc

25 	struct mmc *mmc;  in mmc_block_op()  local
29 mmc = find_mmc_device(dfu->data.mmc.dev_num); in mmc_block_op()
30 if (!mmc) { in mmc_block_op()
31 pr_err("Device MMC %d - not found!", dfu->data.mmc.dev_num); in mmc_block_op()
39 *len = ALIGN(*len, dfu->data.mmc.lba_blk_size); in mmc_block_op()
41 blk_start = dfu->data.mmc.lba_start + in mmc_block_op()
42 (u32)lldiv(offset, dfu->data.mmc.lba_blk_size); in mmc_block_op()
43 blk_count = *len / dfu->data.mmc.lba_blk_size; in mmc_block_op()
45 dfu->data.mmc.lba_start + dfu->data.mmc.lba_size) { in mmc_block_op()
50 if (dfu->data.mmc.hw_partition >= 0) { in mmc_block_op()
51 part_num_bkp = mmc_get_blk_desc(mmc)->hwpart; in mmc_block_op()
53 dfu->data.mmc.dev_num, in mmc_block_op()
54 dfu->data.mmc.hw_partition); in mmc_block_op()
61 dfu->data.mmc.dev_num, blk_start, blk_count, buf); in mmc_block_op()
64 n = blk_dread(mmc_get_blk_desc(mmc), blk_start, blk_count, buf); in mmc_block_op()
67 n = blk_dwrite(mmc_get_blk_desc(mmc), blk_start, blk_count, in mmc_block_op()
76 if (dfu->data.mmc.hw_partition >= 0) in mmc_block_op()
78 dfu->data.mmc.dev_num, in mmc_block_op()
83 if (dfu->data.mmc.hw_partition >= 0) { in mmc_block_op()
85 dfu->data.mmc.dev_num, in mmc_block_op()
144 dfu->data.mmc.dev, dfu->data.mmc.part); in mmc_file_op()
217 *size = dfu->data.mmc.lba_size * dfu->data.mmc.lba_blk_size; in dfu_get_medium_size_mmc()
304 struct mmc *mmc; in dfu_fill_entity_mmc() local
309 dfu->data.mmc.dev_num = simple_strtoul(devstr, NULL, 10); in dfu_fill_entity_mmc()
327 mmc = find_mmc_device(dfu->data.mmc.dev_num); in dfu_fill_entity_mmc()
328 if (mmc == NULL) { in dfu_fill_entity_mmc()
330 dfu->data.mmc.dev_num); in dfu_fill_entity_mmc()
334 if (mmc_init(mmc)) { in dfu_fill_entity_mmc()
339 dfu->data.mmc.hw_partition = -EINVAL; in dfu_fill_entity_mmc()
342 dfu->data.mmc.lba_start = second_arg; in dfu_fill_entity_mmc()
343 dfu->data.mmc.lba_size = third_arg; in dfu_fill_entity_mmc()
344 dfu->data.mmc.lba_blk_size = mmc->read_bl_len; in dfu_fill_entity_mmc()
352 dfu->data.mmc.hw_partition = in dfu_fill_entity_mmc()
357 struct blk_desc *blk_dev = mmc_get_blk_desc(mmc); in dfu_fill_entity_mmc()
368 dfu->data.mmc.lba_start = partinfo.start; in dfu_fill_entity_mmc()
369 dfu->data.mmc.lba_size = partinfo.size; in dfu_fill_entity_mmc()
370 dfu->data.mmc.lba_blk_size = partinfo.blksz; in dfu_fill_entity_mmc()
382 dfu->data.mmc.dev = second_arg; in dfu_fill_entity_mmc()
383 dfu->data.mmc.part = third_arg; in dfu_fill_entity_mmc()