diff options
| author | Nitin Kumbhar <nkumbhar@nvidia.com> | 2016-09-23 04:51:40 -0400 |
|---|---|---|
| committer | Stephen Wolfe <swolfe@nvidia.com> | 2018-07-27 17:12:44 -0400 |
| commit | 44b6cc594ef9b3173261832cfa8f0063f0f3a63c (patch) | |
| tree | a59cb1296f24241d36183fccf6ac5d6f4200520b /include/linux | |
| parent | fbabc91f2a3404609c8ae84b27ff8aa7a7abfc57 (diff) | |
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 <nkumbhar@nvidia.com>
Reviewed-on: http://git-master/r/1225984
(cherry picked from commit 585cb6718254db2e75b949efbf8ac76903c6ee86)
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/trusty/trusty.h | 8 |
1 files changed, 8 insertions, 0 deletions
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 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (C) 2013 Google, Inc. | 2 | * Copyright (C) 2013 Google, Inc. |
| 3 | * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. | ||
| 3 | * | 4 | * |
| 4 | * This software is licensed under the terms of the GNU General Public | 5 | * This software is licensed under the terms of the GNU General Public |
| 5 | * License version 2, as published by the Free Software Foundation, and | 6 | * License version 2, as published by the Free Software Foundation, and |
| @@ -19,6 +20,12 @@ | |||
| 19 | #include <linux/device.h> | 20 | #include <linux/device.h> |
| 20 | #include <linux/pagemap.h> | 21 | #include <linux/pagemap.h> |
| 21 | 22 | ||
| 23 | enum { | ||
| 24 | TRUSTY_DEV_UNINIT = -1, | ||
| 25 | |||
| 26 | TRUSTY_DEV_DISABLED = 0, | ||
| 27 | TRUSTY_DEV_ENABLED | ||
| 28 | }; | ||
| 22 | 29 | ||
| 23 | #ifdef CONFIG_TRUSTY | 30 | #ifdef CONFIG_TRUSTY |
| 24 | s32 trusty_std_call32(struct device *dev, u32 smcnr, u32 a0, u32 a1, u32 a2); | 31 | 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, | |||
| 84 | 91 | ||
| 85 | void trusty_enqueue_nop(struct device *dev, struct trusty_nop *nop); | 92 | void trusty_enqueue_nop(struct device *dev, struct trusty_nop *nop); |
| 86 | void trusty_dequeue_nop(struct device *dev, struct trusty_nop *nop); | 93 | void trusty_dequeue_nop(struct device *dev, struct trusty_nop *nop); |
| 94 | int is_trusty_dev_enabled(void); | ||
| 87 | 95 | ||
| 88 | #endif | 96 | #endif |
