summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorfaqiang.zhu <faqiang.zhu@nxp.com>2018-11-09 18:58:13 +0800
committerfaqiang.zhu <faqiang.zhu@nxp.com>2018-11-12 09:18:37 +0800
commitb5bb5e0eced5acede4703a3d979de428297099ab (patch)
treeed4bece41cb3227fd05a47ab87709060caedb7a6 /lib
parent3cbf9e37a382acddd7bcf9bdb8c64657b0224d99 (diff)
initialize trusty hardware crypto service for Android Auto
for Android Things, sha256 is caculated with software, for Android Auto, sha256 is caculated with CAAM hardware module. so use macro to seperate the code about hardware crypto service. Change-Id: Ibf4cad2c98240ab2c826869e9cb28ad09bded2f6 Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/trusty/ql-tipc/libtipc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/trusty/ql-tipc/libtipc.c b/lib/trusty/ql-tipc/libtipc.c
index 2f3a663aa6..9dd15a3567 100644
--- a/lib/trusty/ql-tipc/libtipc.c
+++ b/lib/trusty/ql-tipc/libtipc.c
@@ -51,7 +51,10 @@ void trusty_ipc_shutdown(void)
(void)avb_tipc_shutdown(_ipc_dev);
(void)km_tipc_shutdown(_ipc_dev);
+
+#ifdef CONFIG_ANDROID_AUTO_SUPPORT
(void)hwcrypto_tipc_shutdown(_ipc_dev);
+#endif
/* shutdown Trusty IPC device */
(void)trusty_ipc_dev_shutdown(_ipc_dev);
@@ -119,12 +122,14 @@ int trusty_ipc_init(void)
return rc;
}
+#ifdef CONFIG_ANDROID_AUTO_SUPPORT
trusty_info("Initializing Trusty Hardware Crypto client\n");
rc = hwcrypto_tipc_init(_ipc_dev);
if (rc != 0) {
trusty_error("Initlializing Trusty Keymaster client failed (%d)\n", rc);
return rc;
}
+#endif
return TRUSTY_ERR_NONE;
}