Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / arch / cris / include / arch-v32 / mach-fs / mach / hwregs / strmux_defs.h
blob0ab49edb1c81a0bb0188a344c09a8d1f1ad2ae6c
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __strmux_defs_h
3 #define __strmux_defs_h
5 /*
6 * This file is autogenerated from
7 * file: ../../inst/strmux/rtl/guinness/strmux_regs.r
8 * id: strmux_regs.r,v 1.10 2005/02/10 10:10:46 perz Exp
9 * last modfied: Mon Apr 11 16:09:43 2005
11 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile strmux_defs.h ../../inst/strmux/rtl/guinness/strmux_regs.r
12 * id: $Id: strmux_defs.h,v 1.1 2007/02/13 11:55:30 starvik Exp $
13 * Any changes here will be lost.
15 * -*- buffer-read-only: t -*-
17 /* Main access macros */
18 #ifndef REG_RD
19 #define REG_RD( scope, inst, reg ) \
20 REG_READ( reg_##scope##_##reg, \
21 (inst) + REG_RD_ADDR_##scope##_##reg )
22 #endif
24 #ifndef REG_WR
25 #define REG_WR( scope, inst, reg, val ) \
26 REG_WRITE( reg_##scope##_##reg, \
27 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
28 #endif
30 #ifndef REG_RD_VECT
31 #define REG_RD_VECT( scope, inst, reg, index ) \
32 REG_READ( reg_##scope##_##reg, \
33 (inst) + REG_RD_ADDR_##scope##_##reg + \
34 (index) * STRIDE_##scope##_##reg )
35 #endif
37 #ifndef REG_WR_VECT
38 #define REG_WR_VECT( scope, inst, reg, index, val ) \
39 REG_WRITE( reg_##scope##_##reg, \
40 (inst) + REG_WR_ADDR_##scope##_##reg + \
41 (index) * STRIDE_##scope##_##reg, (val) )
42 #endif
44 #ifndef REG_RD_INT
45 #define REG_RD_INT( scope, inst, reg ) \
46 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
47 #endif
49 #ifndef REG_WR_INT
50 #define REG_WR_INT( scope, inst, reg, val ) \
51 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
52 #endif
54 #ifndef REG_RD_INT_VECT
55 #define REG_RD_INT_VECT( scope, inst, reg, index ) \
56 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
57 (index) * STRIDE_##scope##_##reg )
58 #endif
60 #ifndef REG_WR_INT_VECT
61 #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
62 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
63 (index) * STRIDE_##scope##_##reg, (val) )
64 #endif
66 #ifndef REG_TYPE_CONV
67 #define REG_TYPE_CONV( type, orgtype, val ) \
68 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
69 #endif
71 #ifndef reg_page_size
72 #define reg_page_size 8192
73 #endif
75 #ifndef REG_ADDR
76 #define REG_ADDR( scope, inst, reg ) \
77 ( (inst) + REG_RD_ADDR_##scope##_##reg )
78 #endif
80 #ifndef REG_ADDR_VECT
81 #define REG_ADDR_VECT( scope, inst, reg, index ) \
82 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
83 (index) * STRIDE_##scope##_##reg )
84 #endif
86 /* C-code for register scope strmux */
88 /* Register rw_cfg, scope strmux, type rw */
89 typedef struct {
90 unsigned int dma0 : 3;
91 unsigned int dma1 : 3;
92 unsigned int dma2 : 3;
93 unsigned int dma3 : 3;
94 unsigned int dma4 : 3;
95 unsigned int dma5 : 3;
96 unsigned int dma6 : 3;
97 unsigned int dma7 : 3;
98 unsigned int dma8 : 3;
99 unsigned int dma9 : 3;
100 unsigned int dummy1 : 2;
101 } reg_strmux_rw_cfg;
102 #define REG_RD_ADDR_strmux_rw_cfg 0
103 #define REG_WR_ADDR_strmux_rw_cfg 0
106 /* Constants */
107 enum {
108 regk_strmux_ata = 0x00000003,
109 regk_strmux_eth0 = 0x00000001,
110 regk_strmux_eth1 = 0x00000004,
111 regk_strmux_ext0 = 0x00000001,
112 regk_strmux_ext1 = 0x00000001,
113 regk_strmux_ext2 = 0x00000001,
114 regk_strmux_ext3 = 0x00000001,
115 regk_strmux_iop0 = 0x00000002,
116 regk_strmux_iop1 = 0x00000001,
117 regk_strmux_off = 0x00000000,
118 regk_strmux_p21 = 0x00000004,
119 regk_strmux_rw_cfg_default = 0x00000000,
120 regk_strmux_ser0 = 0x00000002,
121 regk_strmux_ser1 = 0x00000002,
122 regk_strmux_ser2 = 0x00000004,
123 regk_strmux_ser3 = 0x00000003,
124 regk_strmux_sser0 = 0x00000003,
125 regk_strmux_sser1 = 0x00000003,
126 regk_strmux_strcop = 0x00000002
128 #endif /* __strmux_defs_h */