drivers: optee: rpmb: fix returning CID to TEE
authorJorge Ramirez-Ortiz <jorge@foundries.io>
Tue, 26 Nov 2019 16:19:34 +0000 (17:19 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 5 Dec 2019 15:28:38 +0000 (10:28 -0500)
commit2464b229b5ab281d8698aa0f4d4de6d4d3fabf7d
treeeb5aa123928d04533d4d45a857962d4a3b5b26bf
parent787f10a9d2553f89e382e7ed09c2cf6b3b1d70cf
drivers: optee: rpmb: fix returning CID to TEE

The mmc CID value is one of the input parameters used to provision the
RPMB key. The trusted execution environment expects this value to be
specified in big endian format.

Before this fix, on little endian systems, the value returned by the
linux kernel mmc driver differed from the one returned by u-boot.
This meant that if linux provisioned the RPMB key, u-boot would not
have access to the partition (and the other way around).

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
drivers/tee/optee/rpmb.c