summaryrefslogtreecommitdiffstats
path: root/drivers/staging/ccree/cc_hal.h
diff options
context:
space:
mode:
authorGilad Ben-Yossef2017-04-23 11:26:09 +0200
committerGreg Kroah-Hartman2017-04-28 12:17:30 +0200
commitabefd6741d540fc624e73a2a3bdef2397bcbd064 (patch)
tree520714881dd060c66a2bda607ff0dc8bc1a153e9 /drivers/staging/ccree/cc_hal.h
parentstaging: rtl8723bs: rework debug configuration handling (diff)
downloadkernel-qcow2-linux-abefd6741d540fc624e73a2a3bdef2397bcbd064.tar.gz
kernel-qcow2-linux-abefd6741d540fc624e73a2a3bdef2397bcbd064.tar.xz
kernel-qcow2-linux-abefd6741d540fc624e73a2a3bdef2397bcbd064.zip
staging: ccree: introduce CryptoCell HW driver
Introduce basic low level Arm TrustZone CryptoCell HW support. This first patch doesn't actually register any Crypto API transformations, these will follow up in the next patch. This first revision supports the CC 712 REE component. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ccree/cc_hal.h')
-rw-r--r--drivers/staging/ccree/cc_hal.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/staging/ccree/cc_hal.h b/drivers/staging/ccree/cc_hal.h
new file mode 100644
index 000000000000..75a0ce3e80d6
--- /dev/null
+++ b/drivers/staging/ccree/cc_hal.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2012-2017 ARM Limited or its affiliates.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* pseudo cc_hal.h for cc7x_perf_test_driver (to be able to include code from CC drivers) */
+
+#ifndef __CC_HAL_H__
+#define __CC_HAL_H__
+
+#include <linux/io.h>
+
+#define READ_REGISTER(_addr) ioread32((_addr))
+#define WRITE_REGISTER(_addr, _data) iowrite32((_data), (_addr))
+
+#define CC_HAL_WRITE_REGISTER(offset, val) WRITE_REGISTER(cc_base + offset, val)
+#define CC_HAL_READ_REGISTER(offset) READ_REGISTER(cc_base + offset)
+
+#endif