diff options
author | Jens Wiklander <jens.wiklander@linaro.org> | 2018-09-25 16:40:08 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-10-07 10:47:38 -0400 |
commit | 4853ad3e13e21462a86e09caee4ea27ae68e764b (patch) | |
tree | 2efee443ad0aa84110f37c79f5d3391bedb8f307 /include/mmc.h | |
parent | 6d89902d7a97bc988595fe471783715245096a9e (diff) | |
download | u-boot-4853ad3e13e21462a86e09caee4ea27ae68e764b.tar.gz |
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>
Diffstat (limited to 'include/mmc.h')
-rw-r--r-- | include/mmc.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/mmc.h b/include/mmc.h index 9b9cbedadc..95548e94c4 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -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 |