usb: gadget: rockusb: write keybox to RPMB
invoke function: write_keybox_to_secure_storage(uint8_t *uboot_data, uint32_t len). it only work when the chip support OPTEE_V1 Change-Id: If010b7cab6bab87485d9542af8c04544d27162cc Signed-off-by: tony.xu <tony.xu@rock-chips.com>
This commit is contained in:
parent
1c2bd90493
commit
6f0347c8c3
|
|
@ -8,6 +8,7 @@
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/arch/boot_mode.h>
|
#include <asm/arch/boot_mode.h>
|
||||||
#include <asm/arch/chip_info.h>
|
#include <asm/arch/chip_info.h>
|
||||||
|
#include <optee_include/OpteeClientInterface.h>
|
||||||
|
|
||||||
#ifdef CONFIG_ROCKCHIP_VENDOR_PARTITION
|
#ifdef CONFIG_ROCKCHIP_VENDOR_PARTITION
|
||||||
#include <asm/arch/vendor.h>
|
#include <asm/arch/vendor.h>
|
||||||
|
|
@ -352,6 +353,13 @@ static int rkusb_do_vs_write(struct fsg_common *common)
|
||||||
return -EIO;
|
return -EIO;
|
||||||
} else {
|
} else {
|
||||||
/* RPMB */
|
/* RPMB */
|
||||||
|
#ifdef CONFIG_OPTEE_V1
|
||||||
|
rc =
|
||||||
|
write_keybox_to_secure_storage((u8 *)data,
|
||||||
|
vhead->size);
|
||||||
|
if (!rc)
|
||||||
|
return -EIO;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
common->residue -= common->data_size;
|
common->residue -= common->data_size;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue