Lines Matching refs:blkcnt
17 static ulong mmc_erase_t(struct mmc *mmc, ulong start, lbaint_t blkcnt) in mmc_erase_t() argument
24 end = start + blkcnt - 1; in mmc_erase_t()
26 end = (start + blkcnt - 1) * mmc->write_bl_len; in mmc_erase_t()
69 ulong mmc_berase(struct udevice *dev, lbaint_t start, lbaint_t blkcnt) in mmc_berase() argument
71 ulong mmc_berase(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt) in mmc_berase()
98 err = div_u64_rem(blkcnt, mmc->erase_grp_size, &blkcnt_rem); in mmc_berase()
104 ((start + blkcnt + mmc->erase_grp_size) in mmc_berase()
107 while (blk < blkcnt) { in mmc_berase()
109 blk_r = ((blkcnt - blk) > mmc->ssr.au) ? in mmc_berase()
110 mmc->ssr.au : (blkcnt - blk); in mmc_berase()
112 blk_r = ((blkcnt - blk) > mmc->erase_grp_size) ? in mmc_berase()
113 mmc->erase_grp_size : (blkcnt - blk); in mmc_berase()
130 lbaint_t blkcnt, const void *src) in mmc_write_blocks() argument
136 if ((start + blkcnt) > mmc_get_blk_desc(mmc)->lba) { in mmc_write_blocks()
138 start + blkcnt, mmc_get_blk_desc(mmc)->lba); in mmc_write_blocks()
142 if (blkcnt == 0) in mmc_write_blocks()
144 else if (blkcnt == 1) in mmc_write_blocks()
157 data.blocks = blkcnt; in mmc_write_blocks()
169 if (!mmc_host_is_spi(mmc) && blkcnt > 1) { in mmc_write_blocks()
183 return blkcnt; in mmc_write_blocks()
187 ulong mmc_bwrite(struct udevice *dev, lbaint_t start, lbaint_t blkcnt, in mmc_bwrite() argument
190 ulong mmc_bwrite(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt, in mmc_bwrite()
198 lbaint_t cur, blocks_todo = blkcnt; in mmc_bwrite()
222 return blkcnt; in mmc_bwrite()