Lines Matching refs:rpmb_frame
140 ALLOC_CACHE_ALIGN_BUFFER(struct s_rpmb, rpmb_frame, 1); in mmc_rpmb_status()
142 memset(rpmb_frame, 0, sizeof(struct s_rpmb)); in mmc_rpmb_status()
143 rpmb_frame->request = cpu_to_be16(RPMB_REQ_STATUS); in mmc_rpmb_status()
144 if (mmc_rpmb_request(mmc, rpmb_frame, 1, false)) in mmc_rpmb_status()
148 return mmc_rpmb_response(mmc, rpmb_frame, expected, 1); in mmc_rpmb_status()
197 ALLOC_CACHE_ALIGN_BUFFER(struct s_rpmb, rpmb_frame, 1); in mmc_rpmb_get_counter()
200 memset(rpmb_frame, 0, sizeof(struct s_rpmb)); in mmc_rpmb_get_counter()
201 rpmb_frame->request = cpu_to_be16(RPMB_REQ_WCOUNTER); in mmc_rpmb_get_counter()
202 if (mmc_rpmb_request(mmc, rpmb_frame, 1, false)) in mmc_rpmb_get_counter()
206 ret = mmc_rpmb_response(mmc, rpmb_frame, RPMB_RESP_WCOUNTER, 1); in mmc_rpmb_get_counter()
210 *pcounter = be32_to_cpu(rpmb_frame->write_counter); in mmc_rpmb_get_counter()
215 ALLOC_CACHE_ALIGN_BUFFER(struct s_rpmb, rpmb_frame, 1); in mmc_rpmb_set_key()
217 memset(rpmb_frame, 0, sizeof(struct s_rpmb)); in mmc_rpmb_set_key()
218 rpmb_frame->request = cpu_to_be16(RPMB_REQ_KEY); in mmc_rpmb_set_key()
219 memcpy(rpmb_frame->mac, key, RPMB_SZ_MAC); in mmc_rpmb_set_key()
221 if (mmc_rpmb_request(mmc, rpmb_frame, 1, true)) in mmc_rpmb_set_key()
236 struct s_rpmb *rpmb_frame; in mmc_rpmb_read() local
242 rpmb_frame = (struct s_rpmb *)rpmb_frame_data; in mmc_rpmb_read()
243 rpmb_frame->address = cpu_to_be16(blk); in mmc_rpmb_read()
244 rpmb_frame->request = cpu_to_be16(RPMB_REQ_READ_DATA); in mmc_rpmb_read()
245 if (mmc_rpmb_request(mmc, rpmb_frame, 1, false)) { in mmc_rpmb_read()
259 rpmb_frame = (struct s_rpmb *) in mmc_rpmb_read()
266 memcpy(addr + i * RPMB_SZ_DATA, rpmb_frame->data, RPMB_SZ_DATA); in mmc_rpmb_read()
267 memcpy(rpmb_frame_vrify->data, rpmb_frame->data, 284); in mmc_rpmb_read()
275 if (memcmp(ret_hmac, rpmb_frame->mac, RPMB_SZ_MAC)) { in mmc_rpmb_read()
286 struct s_rpmb *rpmb_frame; in mmc_rpmb_write() local
310 rpmb_frame = (struct s_rpmb *) in mmc_rpmb_write()
316 memcpy(rpmb_frame->data, addr + i * RPMB_SZ_DATA, RPMB_SZ_DATA); in mmc_rpmb_write()
319 rpmb_frame->address = cpu_to_be16(blk); in mmc_rpmb_write()
321 rpmb_frame->block_count = cpu_to_be16(cnt); in mmc_rpmb_write()
323 rpmb_frame->write_counter = cpu_to_be32(wcount); in mmc_rpmb_write()
325 rpmb_frame->request = cpu_to_be16(RPMB_REQ_WRITE_DATA); in mmc_rpmb_write()
330 284 * cnt, rpmb_frame->mac); in mmc_rpmb_write()