GNU Linux-libre 4.14.290-gnu1
[releases.git] / arch / cris / include / arch-v32 / mach-a3 / mach / hwregs / strmux_defs.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __strmux_defs_h
3 #define __strmux_defs_h
4
5 /*
6  * This file is autogenerated from
7  *   file:           strmux.r
8  * 
9  *   by ../../../tools/rdesc/bin/rdes2c -outfile strmux_defs.h strmux.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 strmux */
84
85 /* Register rw_cfg, scope strmux, type rw */
86 typedef struct {
87   unsigned int dma0  : 2;
88   unsigned int dma1  : 2;
89   unsigned int dma2  : 2;
90   unsigned int dma3  : 2;
91   unsigned int dma4  : 2;
92   unsigned int dma5  : 2;
93   unsigned int dma6  : 2;
94   unsigned int dma7  : 2;
95   unsigned int dummy1 : 2;
96   unsigned int dma9  : 2;
97   unsigned int dummy2 : 2;
98   unsigned int dma11 : 2;
99   unsigned int dummy3 : 8;
100 } reg_strmux_rw_cfg;
101 #define REG_RD_ADDR_strmux_rw_cfg 0
102 #define REG_WR_ADDR_strmux_rw_cfg 0
103
104
105 /* Constants */
106 enum {
107   regk_strmux_eth                          = 0x00000001,
108   regk_strmux_h264                         = 0x00000001,
109   regk_strmux_iop                          = 0x00000001,
110   regk_strmux_jpeg                         = 0x00000001,
111   regk_strmux_off                          = 0x00000000,
112   regk_strmux_rw_cfg_default               = 0x00000000,
113   regk_strmux_ser0                         = 0x00000002,
114   regk_strmux_ser1                         = 0x00000002,
115   regk_strmux_ser2                         = 0x00000002,
116   regk_strmux_ser3                         = 0x00000002,
117   regk_strmux_ser4                         = 0x00000002,
118   regk_strmux_sser                         = 0x00000001,
119   regk_strmux_strcop                       = 0x00000001
120 };
121 #endif /* __strmux_defs_h */