]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/iop_version_defs.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-bionic-kernel.git] / arch / cris / include / arch-v32 / mach-a3 / mach / hwregs / iop / iop_version_defs.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __iop_version_defs_h
3 #define __iop_version_defs_h
4
5 /*
6 * This file is autogenerated from
7 * file: iop_version.r
8 *
9 * by ../../../tools/rdesc/bin/rdes2c -outfile iop_version_defs.h iop_version.r
10 * Any changes here will be lost.
11 *
12 * -*- buffer-read-only: t -*-
13 */
14 /* Main access macros */
15 #ifndef REG_RD
16 #define REG_RD( scope, inst, reg ) \
17 REG_READ( reg_##scope##_##reg, \
18 (inst) + REG_RD_ADDR_##scope##_##reg )
19 #endif
20
21 #ifndef REG_WR
22 #define REG_WR( scope, inst, reg, val ) \
23 REG_WRITE( reg_##scope##_##reg, \
24 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
25 #endif
26
27 #ifndef REG_RD_VECT
28 #define REG_RD_VECT( scope, inst, reg, index ) \
29 REG_READ( reg_##scope##_##reg, \
30 (inst) + REG_RD_ADDR_##scope##_##reg + \
31 (index) * STRIDE_##scope##_##reg )
32 #endif
33
34 #ifndef REG_WR_VECT
35 #define REG_WR_VECT( scope, inst, reg, index, val ) \
36 REG_WRITE( reg_##scope##_##reg, \
37 (inst) + REG_WR_ADDR_##scope##_##reg + \
38 (index) * STRIDE_##scope##_##reg, (val) )
39 #endif
40
41 #ifndef REG_RD_INT
42 #define REG_RD_INT( scope, inst, reg ) \
43 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
44 #endif
45
46 #ifndef REG_WR_INT
47 #define REG_WR_INT( scope, inst, reg, val ) \
48 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
49 #endif
50
51 #ifndef REG_RD_INT_VECT
52 #define REG_RD_INT_VECT( scope, inst, reg, index ) \
53 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
54 (index) * STRIDE_##scope##_##reg )
55 #endif
56
57 #ifndef REG_WR_INT_VECT
58 #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
59 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
60 (index) * STRIDE_##scope##_##reg, (val) )
61 #endif
62
63 #ifndef REG_TYPE_CONV
64 #define REG_TYPE_CONV( type, orgtype, val ) \
65 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
66 #endif
67
68 #ifndef reg_page_size
69 #define reg_page_size 8192
70 #endif
71
72 #ifndef REG_ADDR
73 #define REG_ADDR( scope, inst, reg ) \
74 ( (inst) + REG_RD_ADDR_##scope##_##reg )
75 #endif
76
77 #ifndef REG_ADDR_VECT
78 #define REG_ADDR_VECT( scope, inst, reg, index ) \
79 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
80 (index) * STRIDE_##scope##_##reg )
81 #endif
82
83 /* C-code for register scope iop_version */
84
85 /* Register r_version, scope iop_version, type r */
86 typedef struct {
87 unsigned int nr : 8;
88 unsigned int dummy1 : 24;
89 } reg_iop_version_r_version;
90 #define REG_RD_ADDR_iop_version_r_version 0
91
92
93 /* Constants */
94 enum {
95 regk_iop_version_v2_0 = 0x00000002
96 };
97 #endif /* __iop_version_defs_h */