From 44b6cc594ef9b3173261832cfa8f0063f0f3a63c Mon Sep 17 00:00:00 2001 From: Nitin Kumbhar Date: Fri, 23 Sep 2016 14:21:40 +0530 Subject: trusty: add dt node based checks Update trusty driver(s) to inclue trusty DT node based run time checks for presence of trusty device. All APIs exported to clients are updated to include this check. If trusty DT node is absent or in disabled state, these interfaces return an error. Bug 200173095 Change-Id: Ib8853c9c4b25efa3a69c3cd83e4eb6c77be42d9a Signed-off-by: Nitin Kumbhar Reviewed-on: http://git-master/r/1225984 (cherry picked from commit 585cb6718254db2e75b949efbf8ac76903c6ee86) --- include/linux/trusty/trusty.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/linux') diff --git a/include/linux/trusty/trusty.h b/include/linux/trusty/trusty.h index 742c09e9e..d6fffc710 100644 --- a/include/linux/trusty/trusty.h +++ b/include/linux/trusty/trusty.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2013 Google, Inc. + * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and @@ -19,6 +20,12 @@ #include #include +enum { + TRUSTY_DEV_UNINIT = -1, + + TRUSTY_DEV_DISABLED = 0, + TRUSTY_DEV_ENABLED +}; #ifdef CONFIG_TRUSTY s32 trusty_std_call32(struct device *dev, u32 smcnr, u32 a0, u32 a1, u32 a2); @@ -84,5 +91,6 @@ static inline void trusty_nop_init(struct trusty_nop *nop, void trusty_enqueue_nop(struct device *dev, struct trusty_nop *nop); void trusty_dequeue_nop(struct device *dev, struct trusty_nop *nop); +int is_trusty_dev_enabled(void); #endif -- cgit v1.2.2