From 4853ad3e13e21462a86e09caee4ea27ae68e764b Mon Sep 17 00:00:00 2001 From: Jens Wiklander Date: Tue, 25 Sep 2018 16:40:08 +0200 Subject: 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 Signed-off-by: Jens Wiklander Reviewed-by: Simon Glass --- include/mmc.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'include/mmc.h') 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 -- cgit v1.2.3