1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 16:52:14 +02:00

mmc: rpmb: add mmc_rpmb_route_frames()

Adds mmc_rpmb_route_frames() to route RPMB data frames from/to an
external entity.

Tested-by: Igor Opaniuk <igor.opaniuk@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Jens Wiklander
2018-09-25 16:40:08 +02:00
committed by Tom Rini
parent 6d89902d7a
commit 4853ad3e13
2 changed files with 179 additions and 0 deletions

View File

@@ -759,6 +759,25 @@ int mmc_rpmb_read(struct mmc *mmc, void *addr, unsigned short blk,
unsigned short cnt, unsigned char *key);
int mmc_rpmb_write(struct mmc *mmc, void *addr, unsigned short blk,
unsigned short cnt, unsigned char *key);
/**
* mmc_rpmb_route_frames() - route RPMB data frames
* @mmc Pointer to a MMC device struct
* @req Request data frames
* @reqlen Length of data frames in bytes
* @rsp Supplied buffer for response data frames
* @rsplen Length of supplied buffer for response data frames
*
* The RPMB data frames are routed to/from some external entity, for
* example a Trusted Exectuion Environment in an arm TrustZone protected
* secure world. It's expected that it's the external entity who is in
* control of the RPMB key.
*
* Returns 0 on success, < 0 on error.
*/
int mmc_rpmb_route_frames(struct mmc *mmc, void *req, unsigned long reqlen,
void *rsp, unsigned long rsplen);
#ifdef CONFIG_CMD_BKOPS_ENABLE
int mmc_set_bkops_enable(struct mmc *mmc);
#endif