1
2
3
4
5
6
7
8
9 #ifndef DIM2_OS62420_H
10 #define DIM2_OS62420_H
11
12 #include <linux/types.h>
13
14 struct dim2_regs {
15 u32 MLBC0;
16 u32 rsvd0[1];
17 u32 MLBPC0;
18 u32 MS0;
19 u32 rsvd1[1];
20 u32 MS1;
21 u32 rsvd2[2];
22 u32 MSS;
23 u32 MSD;
24 u32 rsvd3[1];
25 u32 MIEN;
26 u32 rsvd4[1];
27 u32 MLBPC2;
28 u32 MLBPC1;
29 u32 MLBC1;
30 u32 rsvd5[0x10];
31 u32 HCTL;
32 u32 rsvd6[1];
33 u32 HCMR0;
34 u32 HCMR1;
35 u32 HCER0;
36 u32 HCER1;
37 u32 HCBR0;
38 u32 HCBR1;
39 u32 rsvd7[8];
40 u32 MDAT0;
41 u32 MDAT1;
42 u32 MDAT2;
43 u32 MDAT3;
44 u32 MDWE0;
45 u32 MDWE1;
46 u32 MDWE2;
47 u32 MDWE3;
48 u32 MCTL;
49 u32 MADR;
50 u32 rsvd8[0xb6];
51 u32 ACTL;
52 u32 rsvd9[3];
53 u32 ACSR0;
54 u32 ACSR1;
55 u32 ACMR0;
56 u32 ACMR1;
57 };
58
59 #define DIM2_MASK(n) (~((~(u32)0) << (n)))
60
61 enum {
62 MLBC0_MLBLK_BIT = 7,
63
64 MLBC0_MLBPEN_BIT = 5,
65
66 MLBC0_MLBCLK_SHIFT = 2,
67 MLBC0_MLBCLK_VAL_256FS = 0,
68 MLBC0_MLBCLK_VAL_512FS = 1,
69 MLBC0_MLBCLK_VAL_1024FS = 2,
70 MLBC0_MLBCLK_VAL_2048FS = 3,
71
72 MLBC0_FCNT_SHIFT = 15,
73 MLBC0_FCNT_MASK = 7,
74 MLBC0_FCNT_MAX_VAL = 6,
75
76 MLBC0_MLBEN_BIT = 0,
77
78 MIEN_CTX_BREAK_BIT = 29,
79 MIEN_CTX_PE_BIT = 28,
80 MIEN_CTX_DONE_BIT = 27,
81
82 MIEN_CRX_BREAK_BIT = 26,
83 MIEN_CRX_PE_BIT = 25,
84 MIEN_CRX_DONE_BIT = 24,
85
86 MIEN_ATX_BREAK_BIT = 22,
87 MIEN_ATX_PE_BIT = 21,
88 MIEN_ATX_DONE_BIT = 20,
89
90 MIEN_ARX_BREAK_BIT = 19,
91 MIEN_ARX_PE_BIT = 18,
92 MIEN_ARX_DONE_BIT = 17,
93
94 MIEN_SYNC_PE_BIT = 16,
95
96 MIEN_ISOC_BUFO_BIT = 1,
97 MIEN_ISOC_PE_BIT = 0,
98
99 MLBC1_NDA_SHIFT = 8,
100 MLBC1_NDA_MASK = 0xFF,
101
102 MLBC1_CLKMERR_BIT = 7,
103 MLBC1_LOCKERR_BIT = 6,
104
105 ACTL_DMA_MODE_BIT = 2,
106 ACTL_DMA_MODE_VAL_DMA_MODE_0 = 0,
107 ACTL_DMA_MODE_VAL_DMA_MODE_1 = 1,
108 ACTL_SCE_BIT = 0,
109
110 HCTL_EN_BIT = 15
111 };
112
113 enum {
114 CDT0_RPC_SHIFT = 16 + 11,
115 CDT0_RPC_MASK = DIM2_MASK(5),
116
117 CDT1_BS_ISOC_SHIFT = 0,
118 CDT1_BS_ISOC_MASK = DIM2_MASK(9),
119
120 CDT3_BD_SHIFT = 0,
121 CDT3_BD_MASK = DIM2_MASK(12),
122 CDT3_BD_ISOC_MASK = DIM2_MASK(13),
123 CDT3_BA_SHIFT = 16,
124
125 ADT0_CE_BIT = 15,
126 ADT0_LE_BIT = 14,
127 ADT0_PG_BIT = 13,
128
129 ADT1_RDY_BIT = 15,
130 ADT1_DNE_BIT = 14,
131 ADT1_ERR_BIT = 13,
132 ADT1_PS_BIT = 12,
133 ADT1_MEP_BIT = 11,
134 ADT1_BD_SHIFT = 0,
135 ADT1_CTRL_ASYNC_BD_MASK = DIM2_MASK(11),
136 ADT1_ISOC_SYNC_BD_MASK = DIM2_MASK(13),
137
138 CAT_FCE_BIT = 14,
139 CAT_MFE_BIT = 14,
140
141 CAT_MT_BIT = 13,
142
143 CAT_RNW_BIT = 12,
144
145 CAT_CE_BIT = 11,
146
147 CAT_CT_SHIFT = 8,
148 CAT_CT_VAL_SYNC = 0,
149 CAT_CT_VAL_CONTROL = 1,
150 CAT_CT_VAL_ASYNC = 2,
151 CAT_CT_VAL_ISOC = 3,
152
153 CAT_CL_SHIFT = 0,
154 CAT_CL_MASK = DIM2_MASK(6)
155 };
156
157 #endif