Lines Matching refs:rpmb_frame

153 	ALLOC_CACHE_ALIGN_BUFFER(struct s_rpmb, rpmb_frame, 1);  in mmc_rpmb_status()
155 memset(rpmb_frame, 0, sizeof(struct s_rpmb)); in mmc_rpmb_status()
156 rpmb_frame->request = cpu_to_be16(RPMB_REQ_STATUS); in mmc_rpmb_status()
157 if (mmc_rpmb_request(mmc, rpmb_frame, 1, false)) in mmc_rpmb_status()
161 return mmc_rpmb_response(mmc, rpmb_frame, expected, 1); in mmc_rpmb_status()
210 ALLOC_CACHE_ALIGN_BUFFER(struct s_rpmb, rpmb_frame, 1); in mmc_rpmb_get_counter()
213 memset(rpmb_frame, 0, sizeof(struct s_rpmb)); in mmc_rpmb_get_counter()
214 rpmb_frame->request = cpu_to_be16(RPMB_REQ_WCOUNTER); in mmc_rpmb_get_counter()
215 if (mmc_rpmb_request(mmc, rpmb_frame, 1, false)) in mmc_rpmb_get_counter()
219 ret = mmc_rpmb_response(mmc, rpmb_frame, RPMB_RESP_WCOUNTER, 1); in mmc_rpmb_get_counter()
223 *pcounter = be32_to_cpu(rpmb_frame->write_counter); in mmc_rpmb_get_counter()
228 ALLOC_CACHE_ALIGN_BUFFER(struct s_rpmb, rpmb_frame, 1); in mmc_rpmb_set_key()
230 memset(rpmb_frame, 0, sizeof(struct s_rpmb)); in mmc_rpmb_set_key()
231 rpmb_frame->request = cpu_to_be16(RPMB_REQ_KEY); in mmc_rpmb_set_key()
232 memcpy(rpmb_frame->mac, key, RPMB_SZ_MAC); in mmc_rpmb_set_key()
234 if (mmc_rpmb_request(mmc, rpmb_frame, 1, true)) in mmc_rpmb_set_key()
249 struct s_rpmb *rpmb_frame; in mmc_rpmb_read() local
255 rpmb_frame = (struct s_rpmb *)rpmb_frame_data; in mmc_rpmb_read()
256 rpmb_frame->address = cpu_to_be16(blk); in mmc_rpmb_read()
257 rpmb_frame->request = cpu_to_be16(RPMB_REQ_READ_DATA); in mmc_rpmb_read()
258 if (mmc_rpmb_request(mmc, rpmb_frame, 1, false)) { in mmc_rpmb_read()
272 rpmb_frame = (struct s_rpmb *) in mmc_rpmb_read()
279 memcpy(addr + i * RPMB_SZ_DATA, rpmb_frame->data, RPMB_SZ_DATA); in mmc_rpmb_read()
280 memcpy(rpmb_frame_vrify->data, rpmb_frame->data, 284); in mmc_rpmb_read()
288 if (memcmp(ret_hmac, rpmb_frame->mac, RPMB_SZ_MAC)) { in mmc_rpmb_read()
299 struct s_rpmb *rpmb_frame; in mmc_rpmb_write() local
323 rpmb_frame = (struct s_rpmb *) in mmc_rpmb_write()
329 memcpy(rpmb_frame->data, addr + i * RPMB_SZ_DATA, RPMB_SZ_DATA); in mmc_rpmb_write()
332 rpmb_frame->address = cpu_to_be16(blk); in mmc_rpmb_write()
334 rpmb_frame->block_count = cpu_to_be16(cnt); in mmc_rpmb_write()
336 rpmb_frame->write_counter = cpu_to_be32(wcount); in mmc_rpmb_write()
338 rpmb_frame->request = cpu_to_be16(RPMB_REQ_WRITE_DATA); in mmc_rpmb_write()
343 284 * cnt, rpmb_frame->mac); in mmc_rpmb_write()