]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - drivers/staging/ccree/cc_regs.h
Merge tag 'iio-for-4.13b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
[mirror_ubuntu-artful-kernel.git] / drivers / staging / ccree / cc_regs.h
1 /*
2 * Copyright (C) 2012-2017 ARM Limited or its affiliates.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, see <http://www.gnu.org/licenses/>.
15 */
16
17 /*!
18 * @file
19 * @brief This file contains macro definitions for accessing ARM TrustZone
20 * CryptoCell register space.
21 */
22
23 #ifndef _CC_REGS_H_
24 #define _CC_REGS_H_
25
26 #include <linux/bitfield.h>
27
28 #define AXIM_MON_BASE_OFFSET CC_REG_OFFSET(CRY_KERNEL, AXIM_MON_COMP)
29 #define AXIM_MON_COMP_VALUE GENMASK(DX_AXIM_MON_COMP_VALUE_BIT_SIZE + \
30 DX_AXIM_MON_COMP_VALUE_BIT_SHIFT, \
31 DX_AXIM_MON_COMP_VALUE_BIT_SHIFT)
32
33 #define AXIM_MON_BASE_OFFSET CC_REG_OFFSET(CRY_KERNEL, AXIM_MON_COMP)
34 #define AXIM_MON_COMP_VALUE GENMASK(DX_AXIM_MON_COMP_VALUE_BIT_SIZE + \
35 DX_AXIM_MON_COMP_VALUE_BIT_SHIFT, \
36 DX_AXIM_MON_COMP_VALUE_BIT_SHIFT)
37
38 /* Register Offset macro */
39 #define CC_REG_OFFSET(unit_name, reg_name) \
40 (DX_BASE_ ## unit_name + DX_ ## reg_name ## _REG_OFFSET)
41
42 #endif /*_CC_REGS_H_*/