Lines Matching refs:mhi_buf

25 	struct mhi_buf *mhi_buf = img_info->mhi_buf;  in mhi_rddm_prepare()  local
33 for (i = 0; i < img_info->entries - 1; i++, mhi_buf++, bhi_vec++) { in mhi_rddm_prepare()
34 bhi_vec->dma_addr = mhi_buf->dma_addr; in mhi_rddm_prepare()
35 bhi_vec->size = mhi_buf->len; in mhi_rddm_prepare()
41 upper_32_bits(mhi_buf->dma_addr)); in mhi_rddm_prepare()
44 lower_32_bits(mhi_buf->dma_addr)); in mhi_rddm_prepare()
46 mhi_write_reg(mhi_cntrl, base, BHIE_RXVECSIZE_OFFS, mhi_buf->len); in mhi_rddm_prepare()
57 &mhi_buf->dma_addr, mhi_buf->len, sequence_id); in mhi_rddm_prepare()
183 const struct mhi_buf *mhi_buf) in mhi_fw_load_bhie() argument
201 upper_32_bits(mhi_buf->dma_addr)); in mhi_fw_load_bhie()
204 lower_32_bits(mhi_buf->dma_addr)); in mhi_fw_load_bhie()
206 mhi_write_reg(mhi_cntrl, base, BHIE_TXVECSIZE_OFFS, mhi_buf->len); in mhi_fw_load_bhie()
305 struct mhi_buf *mhi_buf = image_info->mhi_buf; in mhi_free_bhie_table() local
307 for (i = 0; i < image_info->entries; i++, mhi_buf++) in mhi_free_bhie_table()
308 dma_free_coherent(mhi_cntrl->cntrl_dev, mhi_buf->len, in mhi_free_bhie_table()
309 mhi_buf->buf, mhi_buf->dma_addr); in mhi_free_bhie_table()
311 kfree(image_info->mhi_buf); in mhi_free_bhie_table()
323 struct mhi_buf *mhi_buf; in mhi_alloc_bhie_table() local
330 img_info->mhi_buf = kcalloc(segments, sizeof(*img_info->mhi_buf), in mhi_alloc_bhie_table()
332 if (!img_info->mhi_buf) in mhi_alloc_bhie_table()
336 mhi_buf = img_info->mhi_buf; in mhi_alloc_bhie_table()
337 for (i = 0; i < segments; i++, mhi_buf++) { in mhi_alloc_bhie_table()
344 mhi_buf->len = vec_size; in mhi_alloc_bhie_table()
345 mhi_buf->buf = dma_alloc_coherent(mhi_cntrl->cntrl_dev, in mhi_alloc_bhie_table()
346 vec_size, &mhi_buf->dma_addr, in mhi_alloc_bhie_table()
348 if (!mhi_buf->buf) in mhi_alloc_bhie_table()
352 img_info->bhi_vec = img_info->mhi_buf[segments - 1].buf; in mhi_alloc_bhie_table()
359 for (--i, --mhi_buf; i >= 0; i--, mhi_buf--) in mhi_alloc_bhie_table()
360 dma_free_coherent(mhi_cntrl->cntrl_dev, mhi_buf->len, in mhi_alloc_bhie_table()
361 mhi_buf->buf, mhi_buf->dma_addr); in mhi_alloc_bhie_table()
376 struct mhi_buf *mhi_buf = img_info->mhi_buf; in mhi_firmware_copy() local
380 to_cpy = min(remainder, mhi_buf->len); in mhi_firmware_copy()
381 memcpy(mhi_buf->buf, buf, to_cpy); in mhi_firmware_copy()
382 bhi_vec->dma_addr = mhi_buf->dma_addr; in mhi_firmware_copy()
388 mhi_buf++; in mhi_firmware_copy()
528 &image_info->mhi_buf[image_info->entries - 1]); in mhi_download_amss_image()