blob: 7f88f7da8d13836add2992a7d0a9e01787f3ef55 [file] [log] [blame]
Nobuhiro Iwamatsu7fbb92b2013-11-21 17:07:46 +09001/*
2 * board/renesas/koelsch/qos.c
3 *
4 * Copyright (C) 2013 Renesas Electronics Corporation
5 *
6 * SPDX-License-Identifier: GPL-2.0
7 *
8 */
9
10#include <common.h>
11#include <asm/processor.h>
12#include <asm/mach-types.h>
13#include <asm/io.h>
14#include <asm/arch/rmobile.h>
15
16/* QoS version 0.23 */
17
18enum {
19 DBSC3_00, DBSC3_01, DBSC3_02, DBSC3_03, DBSC3_04,
20 DBSC3_05, DBSC3_06, DBSC3_07, DBSC3_08, DBSC3_09,
21 DBSC3_10, DBSC3_11, DBSC3_12, DBSC3_13, DBSC3_14,
22 DBSC3_15,
23 DBSC3_NR,
24};
25
26static u32 dbsc3_0_r_qos_addr[DBSC3_NR] = {
27 [DBSC3_00] = DBSC3_0_QOS_R0_BASE,
28 [DBSC3_01] = DBSC3_0_QOS_R1_BASE,
29 [DBSC3_02] = DBSC3_0_QOS_R2_BASE,
30 [DBSC3_03] = DBSC3_0_QOS_R3_BASE,
31 [DBSC3_04] = DBSC3_0_QOS_R4_BASE,
32 [DBSC3_05] = DBSC3_0_QOS_R5_BASE,
33 [DBSC3_06] = DBSC3_0_QOS_R6_BASE,
34 [DBSC3_07] = DBSC3_0_QOS_R7_BASE,
35 [DBSC3_08] = DBSC3_0_QOS_R8_BASE,
36 [DBSC3_09] = DBSC3_0_QOS_R9_BASE,
37 [DBSC3_10] = DBSC3_0_QOS_R10_BASE,
38 [DBSC3_11] = DBSC3_0_QOS_R11_BASE,
39 [DBSC3_12] = DBSC3_0_QOS_R12_BASE,
40 [DBSC3_13] = DBSC3_0_QOS_R13_BASE,
41 [DBSC3_14] = DBSC3_0_QOS_R14_BASE,
42 [DBSC3_15] = DBSC3_0_QOS_R15_BASE,
43};
44
45static u32 dbsc3_0_w_qos_addr[DBSC3_NR] = {
46 [DBSC3_00] = DBSC3_0_QOS_W0_BASE,
47 [DBSC3_01] = DBSC3_0_QOS_W1_BASE,
48 [DBSC3_02] = DBSC3_0_QOS_W2_BASE,
49 [DBSC3_03] = DBSC3_0_QOS_W3_BASE,
50 [DBSC3_04] = DBSC3_0_QOS_W4_BASE,
51 [DBSC3_05] = DBSC3_0_QOS_W5_BASE,
52 [DBSC3_06] = DBSC3_0_QOS_W6_BASE,
53 [DBSC3_07] = DBSC3_0_QOS_W7_BASE,
54 [DBSC3_08] = DBSC3_0_QOS_W8_BASE,
55 [DBSC3_09] = DBSC3_0_QOS_W9_BASE,
56 [DBSC3_10] = DBSC3_0_QOS_W10_BASE,
57 [DBSC3_11] = DBSC3_0_QOS_W11_BASE,
58 [DBSC3_12] = DBSC3_0_QOS_W12_BASE,
59 [DBSC3_13] = DBSC3_0_QOS_W13_BASE,
60 [DBSC3_14] = DBSC3_0_QOS_W14_BASE,
61 [DBSC3_15] = DBSC3_0_QOS_W15_BASE,
62};
63
64static u32 dbsc3_1_r_qos_addr[DBSC3_NR] = {
65 [DBSC3_00] = DBSC3_1_QOS_R0_BASE,
66 [DBSC3_01] = DBSC3_1_QOS_R1_BASE,
67 [DBSC3_02] = DBSC3_1_QOS_R2_BASE,
68 [DBSC3_03] = DBSC3_1_QOS_R3_BASE,
69 [DBSC3_04] = DBSC3_1_QOS_R4_BASE,
70 [DBSC3_05] = DBSC3_1_QOS_R5_BASE,
71 [DBSC3_06] = DBSC3_1_QOS_R6_BASE,
72 [DBSC3_07] = DBSC3_1_QOS_R7_BASE,
73 [DBSC3_08] = DBSC3_1_QOS_R8_BASE,
74 [DBSC3_09] = DBSC3_1_QOS_R9_BASE,
75 [DBSC3_10] = DBSC3_1_QOS_R10_BASE,
76 [DBSC3_11] = DBSC3_1_QOS_R11_BASE,
77 [DBSC3_12] = DBSC3_1_QOS_R12_BASE,
78 [DBSC3_13] = DBSC3_1_QOS_R13_BASE,
79 [DBSC3_14] = DBSC3_1_QOS_R14_BASE,
80 [DBSC3_15] = DBSC3_1_QOS_R15_BASE,
81};
82
83static u32 dbsc3_1_w_qos_addr[DBSC3_NR] = {
84 [DBSC3_00] = DBSC3_1_QOS_W0_BASE,
85 [DBSC3_01] = DBSC3_1_QOS_W1_BASE,
86 [DBSC3_02] = DBSC3_1_QOS_W2_BASE,
87 [DBSC3_03] = DBSC3_1_QOS_W3_BASE,
88 [DBSC3_04] = DBSC3_1_QOS_W4_BASE,
89 [DBSC3_05] = DBSC3_1_QOS_W5_BASE,
90 [DBSC3_06] = DBSC3_1_QOS_W6_BASE,
91 [DBSC3_07] = DBSC3_1_QOS_W7_BASE,
92 [DBSC3_08] = DBSC3_1_QOS_W8_BASE,
93 [DBSC3_09] = DBSC3_1_QOS_W9_BASE,
94 [DBSC3_10] = DBSC3_1_QOS_W10_BASE,
95 [DBSC3_11] = DBSC3_1_QOS_W11_BASE,
96 [DBSC3_12] = DBSC3_1_QOS_W12_BASE,
97 [DBSC3_13] = DBSC3_1_QOS_W13_BASE,
98 [DBSC3_14] = DBSC3_1_QOS_W14_BASE,
99 [DBSC3_15] = DBSC3_1_QOS_W15_BASE,
100};
101
102void qos_init(void)
103{
104 int i;
105 struct r8a7791_s3c *s3c;
106 struct r8a7791_s3c_qos *s3c_qos;
107 struct r8a7791_dbsc3_qos *qos_addr;
108 struct r8a7791_mxi *mxi;
109 struct r8a7791_mxi_qos *mxi_qos;
110 struct r8a7791_axi_qos *axi_qos;
111
112 /* DBSC DBADJ2 */
113 writel(0x20042004, DBSC3_0_DBADJ2);
114
115 /* S3C -QoS */
116 s3c = (struct r8a7791_s3c *)S3C_BASE;
117 writel(0x00FF1B1D, &s3c->s3cadsplcr);
118 writel(0x1F0D0C0C, &s3c->s3crorr);
119 writel(0x1F0D0C0A, &s3c->s3cworr);
120
121 /* QoS Control Registers */
122 s3c_qos = (struct r8a7791_s3c_qos *)S3C_QOS_CCI0_BASE;
123 writel(0x00890089, &s3c_qos->s3cqos0);
124 writel(0x20960010, &s3c_qos->s3cqos1);
125 writel(0x20302030, &s3c_qos->s3cqos2);
126 writel(0x20AA2200, &s3c_qos->s3cqos3);
127 writel(0x00002032, &s3c_qos->s3cqos4);
128 writel(0x20960010, &s3c_qos->s3cqos5);
129 writel(0x20302030, &s3c_qos->s3cqos6);
130 writel(0x20AA2200, &s3c_qos->s3cqos7);
131 writel(0x00002032, &s3c_qos->s3cqos8);
132
133 s3c_qos = (struct r8a7791_s3c_qos *)S3C_QOS_CCI1_BASE;
134 writel(0x00890089, &s3c_qos->s3cqos0);
135 writel(0x20960010, &s3c_qos->s3cqos1);
136 writel(0x20302030, &s3c_qos->s3cqos2);
137 writel(0x20AA2200, &s3c_qos->s3cqos3);
138 writel(0x00002032, &s3c_qos->s3cqos4);
139 writel(0x20960010, &s3c_qos->s3cqos5);
140 writel(0x20302030, &s3c_qos->s3cqos6);
141 writel(0x20AA2200, &s3c_qos->s3cqos7);
142 writel(0x00002032, &s3c_qos->s3cqos8);
143
144 s3c_qos = (struct r8a7791_s3c_qos *)S3C_QOS_MXI_BASE;
145 writel(0x00820082, &s3c_qos->s3cqos0);
146 writel(0x20960020, &s3c_qos->s3cqos1);
147 writel(0x20302030, &s3c_qos->s3cqos2);
148 writel(0x20AA20DC, &s3c_qos->s3cqos3);
149 writel(0x00002032, &s3c_qos->s3cqos4);
150 writel(0x20960020, &s3c_qos->s3cqos5);
151 writel(0x20302030, &s3c_qos->s3cqos6);
152 writel(0x20AA20DC, &s3c_qos->s3cqos7);
153 writel(0x00002032, &s3c_qos->s3cqos8);
154
155 s3c_qos = (struct r8a7791_s3c_qos *)S3C_QOS_AXI_BASE;
156 writel(0x00820082, &s3c_qos->s3cqos0);
157 writel(0x20960020, &s3c_qos->s3cqos1);
158 writel(0x20302030, &s3c_qos->s3cqos2);
159 writel(0x20AA20FA, &s3c_qos->s3cqos3);
160 writel(0x00002032, &s3c_qos->s3cqos4);
161 writel(0x20960020, &s3c_qos->s3cqos5);
162 writel(0x20302030, &s3c_qos->s3cqos6);
163 writel(0x20AA20FA, &s3c_qos->s3cqos7);
164 writel(0x00002032, &s3c_qos->s3cqos8);
165
166 /* DBSC -QoS */
167 /* DBSC0 - Read */
168 for (i = DBSC3_00; i < DBSC3_NR; i++) {
169 qos_addr = (struct r8a7791_dbsc3_qos *)dbsc3_0_r_qos_addr[i];
170 writel(0x00000002, &qos_addr->dblgcnt);
171 writel(0x00002096, &qos_addr->dbtmval0);
172 writel(0x00002064, &qos_addr->dbtmval1);
173 writel(0x00002032, &qos_addr->dbtmval2);
174 writel(0x00001FB0, &qos_addr->dbtmval3);
175 writel(0x00000001, &qos_addr->dbrqctr);
176 writel(0x00002078, &qos_addr->dbthres0);
177 writel(0x0000204B, &qos_addr->dbthres1);
178 writel(0x00001FE7, &qos_addr->dbthres2);
179 writel(0x00000001, &qos_addr->dblgqon);
180 }
181
182 /* DBSC0 - Write */
183 for (i = DBSC3_00; i < DBSC3_NR; i++) {
184 qos_addr = (struct r8a7791_dbsc3_qos *)dbsc3_0_w_qos_addr[i];
185 writel(0x00000002, &qos_addr->dblgcnt);
186 writel(0x000020EB, &qos_addr->dbtmval0);
187 writel(0x0000206E, &qos_addr->dbtmval1);
188 writel(0x00002050, &qos_addr->dbtmval2);
189 writel(0x0000203A, &qos_addr->dbtmval3);
190 writel(0x00000001, &qos_addr->dbrqctr);
191 writel(0x00002078, &qos_addr->dbthres0);
192 writel(0x0000205A, &qos_addr->dbthres1);
193 writel(0x0000203C, &qos_addr->dbthres2);
194 writel(0x00000001, &qos_addr->dblgqon);
195 }
196
197 /* DBSC1 - Read */
198 for (i = DBSC3_00; i < DBSC3_NR; i++) {
199 qos_addr = (struct r8a7791_dbsc3_qos *)dbsc3_1_r_qos_addr[i];
200 writel(0x00000002, &qos_addr->dblgcnt);
201 writel(0x00002096, &qos_addr->dbtmval0);
202 writel(0x00002064, &qos_addr->dbtmval1);
203 writel(0x00002032, &qos_addr->dbtmval2);
204 writel(0x00001FB0, &qos_addr->dbtmval3);
205 writel(0x00000001, &qos_addr->dbrqctr);
206 writel(0x00002078, &qos_addr->dbthres0);
207 writel(0x0000204B, &qos_addr->dbthres1);
208 writel(0x00001FE7, &qos_addr->dbthres2);
209 writel(0x00000001, &qos_addr->dblgqon);
210 }
211
212 /* DBSC1 - Write */
213 for (i = DBSC3_00; i < DBSC3_NR; i++) {
214 qos_addr = (struct r8a7791_dbsc3_qos *)dbsc3_1_w_qos_addr[i];
215 writel(0x00000002, &qos_addr->dblgcnt);
216 writel(0x000020EB, &qos_addr->dbtmval0);
217 writel(0x0000206E, &qos_addr->dbtmval1);
218 writel(0x00002050, &qos_addr->dbtmval2);
219 writel(0x0000203A, &qos_addr->dbtmval3);
220 writel(0x00000001, &qos_addr->dbrqctr);
221 writel(0x00002078, &qos_addr->dbthres0);
222 writel(0x0000205A, &qos_addr->dbthres1);
223 writel(0x0000203C, &qos_addr->dbthres2);
224 writel(0x00000001, &qos_addr->dblgqon);
225 }
226
227 /* CCI-400 -QoS */
228 writel(0x20001000, CCI_400_MAXOT_1);
229 writel(0x20001000, CCI_400_MAXOT_2);
230 writel(0x0000000C, CCI_400_QOSCNTL_1);
231 writel(0x0000000C, CCI_400_QOSCNTL_2);
232
233 /* MXI -QoS */
234 /* Transaction Control (MXI) */
235 mxi = (struct r8a7791_mxi *)MXI_BASE;
236 writel(0x00000013, &mxi->mxrtcr);
237 writel(0x00000013, &mxi->mxwtcr);
238 writel(0x00780080, &mxi->mxsaar0);
239 writel(0x02000800, &mxi->mxsaar1);
240
241 /* QoS Control (MXI) */
242 mxi_qos = (struct r8a7791_mxi_qos *)MXI_QOS_BASE;
243 writel(0x0000000C, &mxi_qos->vspdu0);
244 writel(0x0000000C, &mxi_qos->vspdu1);
245 writel(0x0000000D, &mxi_qos->du0);
246 writel(0x0000000D, &mxi_qos->du1);
247
248 /* AXI -QoS */
249 /* Transaction Control (MXI) */
250 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_SYX64TO128_BASE;
251 writel(0x00000002, &axi_qos->qosconf);
252 writel(0x00002245, &axi_qos->qosctset0);
253 writel(0x00002096, &axi_qos->qosctset1);
254 writel(0x00002030, &axi_qos->qosctset2);
255 writel(0x00002030, &axi_qos->qosctset3);
256 writel(0x00000001, &axi_qos->qosreqctr);
257 writel(0x00002064, &axi_qos->qosthres0);
258 writel(0x00002004, &axi_qos->qosthres1);
259 writel(0x00000000, &axi_qos->qosthres2);
260 writel(0x00000001, &axi_qos->qosqon);
261
262 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_AVB_BASE;
263 writel(0x00000000, &axi_qos->qosconf);
264 writel(0x000020A6, &axi_qos->qosctset0);
265 writel(0x00000001, &axi_qos->qosreqctr);
266 writel(0x00002064, &axi_qos->qosthres0);
267 writel(0x00002004, &axi_qos->qosthres1);
268 writel(0x00000000, &axi_qos->qosthres2);
269 writel(0x00000001, &axi_qos->qosqon);
270
271 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_G2D_BASE;
272 writel(0x00000000, &axi_qos->qosconf);
273 writel(0x000020A6, &axi_qos->qosctset0);
274 writel(0x00000001, &axi_qos->qosreqctr);
275 writel(0x00002064, &axi_qos->qosthres0);
276 writel(0x00002004, &axi_qos->qosthres1);
277 writel(0x00000000, &axi_qos->qosthres2);
278 writel(0x00000001, &axi_qos->qosqon);
279
280 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_IMP0_BASE;
281 writel(0x00000000, &axi_qos->qosconf);
282 writel(0x00002021, &axi_qos->qosctset0);
283 writel(0x00000001, &axi_qos->qosreqctr);
284 writel(0x00002064, &axi_qos->qosthres0);
285 writel(0x00002004, &axi_qos->qosthres1);
286 writel(0x00000000, &axi_qos->qosthres2);
287 writel(0x00000001, &axi_qos->qosqon);
288
289 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_IMP1_BASE;
290 writel(0x00000000, &axi_qos->qosconf);
291 writel(0x00002037, &axi_qos->qosctset0);
292 writel(0x00000001, &axi_qos->qosreqctr);
293 writel(0x00002064, &axi_qos->qosthres0);
294 writel(0x00002004, &axi_qos->qosthres1);
295 writel(0x00000000, &axi_qos->qosthres2);
296 writel(0x00000001, &axi_qos->qosqon);
297
298 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_IMUX0_BASE;
299 writel(0x00000002, &axi_qos->qosconf);
300 writel(0x00002245, &axi_qos->qosctset0);
301 writel(0x00002096, &axi_qos->qosctset1);
302 writel(0x00002030, &axi_qos->qosctset2);
303 writel(0x00002030, &axi_qos->qosctset3);
304 writel(0x00000001, &axi_qos->qosreqctr);
305 writel(0x00002064, &axi_qos->qosthres0);
306 writel(0x00002004, &axi_qos->qosthres1);
307 writel(0x00000000, &axi_qos->qosthres2);
308 writel(0x00000001, &axi_qos->qosqon);
309
310 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_IMUX1_BASE;
311 writel(0x00000002, &axi_qos->qosconf);
312 writel(0x00002245, &axi_qos->qosctset0);
313 writel(0x00002096, &axi_qos->qosctset1);
314 writel(0x00002030, &axi_qos->qosctset2);
315 writel(0x00002030, &axi_qos->qosctset3);
316 writel(0x00000001, &axi_qos->qosreqctr);
317 writel(0x00002064, &axi_qos->qosthres0);
318 writel(0x00002004, &axi_qos->qosthres1);
319 writel(0x00000000, &axi_qos->qosthres2);
320 writel(0x00000001, &axi_qos->qosqon);
321
322 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_IMUX2_BASE;
323 writel(0x00000002, &axi_qos->qosconf);
324 writel(0x00002245, &axi_qos->qosctset0);
325 writel(0x00002096, &axi_qos->qosctset1);
326 writel(0x00002030, &axi_qos->qosctset2);
327 writel(0x00002030, &axi_qos->qosctset3);
328 writel(0x00000001, &axi_qos->qosreqctr);
329 writel(0x00002064, &axi_qos->qosthres0);
330 writel(0x00002004, &axi_qos->qosthres1);
331 writel(0x00000000, &axi_qos->qosthres2);
332 writel(0x00000001, &axi_qos->qosqon);
333
334 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_LBS_BASE;
335 writel(0x00000000, &axi_qos->qosconf);
336 writel(0x0000214C, &axi_qos->qosctset0);
337 writel(0x00000001, &axi_qos->qosreqctr);
338 writel(0x00002064, &axi_qos->qosthres0);
339 writel(0x00002004, &axi_qos->qosthres1);
340 writel(0x00000000, &axi_qos->qosthres2);
341 writel(0x00000001, &axi_qos->qosqon);
342
343 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_MMUDS_BASE;
344 writel(0x00000001, &axi_qos->qosconf);
345 writel(0x00002004, &axi_qos->qosctset0);
346 writel(0x00002096, &axi_qos->qosctset1);
347 writel(0x00002030, &axi_qos->qosctset2);
348 writel(0x00002030, &axi_qos->qosctset3);
349 writel(0x00000001, &axi_qos->qosreqctr);
350 writel(0x00002064, &axi_qos->qosthres0);
351 writel(0x00002004, &axi_qos->qosthres1);
352 writel(0x00000000, &axi_qos->qosthres2);
353 writel(0x00000001, &axi_qos->qosqon);
354
355 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_MMUM_BASE;
356 writel(0x00000001, &axi_qos->qosconf);
357 writel(0x00002004, &axi_qos->qosctset0);
358 writel(0x00002096, &axi_qos->qosctset1);
359 writel(0x00002030, &axi_qos->qosctset2);
360 writel(0x00002030, &axi_qos->qosctset3);
361 writel(0x00000001, &axi_qos->qosreqctr);
362 writel(0x00002064, &axi_qos->qosthres0);
363 writel(0x00002004, &axi_qos->qosthres1);
364 writel(0x00000000, &axi_qos->qosthres2);
365 writel(0x00000001, &axi_qos->qosqon);
366
367 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_MMUR_BASE;
368 writel(0x00000001, &axi_qos->qosconf);
369 writel(0x00002004, &axi_qos->qosctset0);
370 writel(0x00002096, &axi_qos->qosctset1);
371 writel(0x00002030, &axi_qos->qosctset2);
372 writel(0x00002030, &axi_qos->qosctset3);
373 writel(0x00000001, &axi_qos->qosreqctr);
374 writel(0x00002064, &axi_qos->qosthres0);
375 writel(0x00002004, &axi_qos->qosthres1);
376 writel(0x00000000, &axi_qos->qosthres2);
377 writel(0x00000001, &axi_qos->qosqon);
378
379 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_MMUS0_BASE;
380 writel(0x00000001, &axi_qos->qosconf);
381 writel(0x00002004, &axi_qos->qosctset0);
382 writel(0x00002096, &axi_qos->qosctset1);
383 writel(0x00002030, &axi_qos->qosctset2);
384 writel(0x00002030, &axi_qos->qosctset3);
385 writel(0x00000001, &axi_qos->qosreqctr);
386 writel(0x00002064, &axi_qos->qosthres0);
387 writel(0x00002004, &axi_qos->qosthres1);
388 writel(0x00000000, &axi_qos->qosthres2);
389 writel(0x00000001, &axi_qos->qosqon);
390
391 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_MMUS1_BASE;
392 writel(0x00000001, &axi_qos->qosconf);
393 writel(0x00002004, &axi_qos->qosctset0);
394 writel(0x00002096, &axi_qos->qosctset1);
395 writel(0x00002030, &axi_qos->qosctset2);
396 writel(0x00002030, &axi_qos->qosctset3);
397 writel(0x00000001, &axi_qos->qosreqctr);
398 writel(0x00002064, &axi_qos->qosthres0);
399 writel(0x00002004, &axi_qos->qosthres1);
400 writel(0x00000000, &axi_qos->qosthres2);
401 writel(0x00000001, &axi_qos->qosqon);
402
403 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_MTSB0_BASE;
404 writel(0x00000000, &axi_qos->qosconf);
405 writel(0x00002021, &axi_qos->qosctset0);
406 writel(0x00000001, &axi_qos->qosreqctr);
407 writel(0x00002064, &axi_qos->qosthres0);
408 writel(0x00002004, &axi_qos->qosthres1);
409 writel(0x00000000, &axi_qos->qosthres2);
410 writel(0x00000001, &axi_qos->qosqon);
411
412 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_MTSB1_BASE;
413 writel(0x00000000, &axi_qos->qosconf);
414 writel(0x00002021, &axi_qos->qosctset0);
415 writel(0x00000001, &axi_qos->qosreqctr);
416 writel(0x00002064, &axi_qos->qosthres0);
417 writel(0x00002004, &axi_qos->qosthres1);
418 writel(0x00000000, &axi_qos->qosthres2);
419 writel(0x00000001, &axi_qos->qosqon);
420
421 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_PCI_BASE;
422 writel(0x00000000, &axi_qos->qosconf);
423 writel(0x0000214C, &axi_qos->qosctset0);
424 writel(0x00000001, &axi_qos->qosreqctr);
425 writel(0x00002064, &axi_qos->qosthres0);
426 writel(0x00002004, &axi_qos->qosthres1);
427 writel(0x00000000, &axi_qos->qosthres2);
428 writel(0x00000001, &axi_qos->qosqon);
429
430 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_RTX_BASE;
431 writel(0x00000002, &axi_qos->qosconf);
432 writel(0x00002245, &axi_qos->qosctset0);
433 writel(0x00002096, &axi_qos->qosctset1);
434 writel(0x00002030, &axi_qos->qosctset2);
435 writel(0x00002030, &axi_qos->qosctset3);
436 writel(0x00000001, &axi_qos->qosreqctr);
437 writel(0x00002064, &axi_qos->qosthres0);
438 writel(0x00002004, &axi_qos->qosthres1);
439 writel(0x00000000, &axi_qos->qosthres2);
440 writel(0x00000001, &axi_qos->qosqon);
441
442 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_SDS0_BASE;
443 writel(0x00000000, &axi_qos->qosconf);
444 writel(0x000020A6, &axi_qos->qosctset0);
445 writel(0x00000001, &axi_qos->qosreqctr);
446 writel(0x00002064, &axi_qos->qosthres0);
447 writel(0x00002004, &axi_qos->qosthres1);
448 writel(0x00000000, &axi_qos->qosthres2);
449 writel(0x00000001, &axi_qos->qosqon);
450
451 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_SDS1_BASE;
452 writel(0x00000000, &axi_qos->qosconf);
453 writel(0x000020A6, &axi_qos->qosctset0);
454 writel(0x00000001, &axi_qos->qosreqctr);
455 writel(0x00002064, &axi_qos->qosthres0);
456 writel(0x00002004, &axi_qos->qosthres1);
457 writel(0x00000000, &axi_qos->qosthres2);
458 writel(0x00000001, &axi_qos->qosqon);
459
460 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_USB20_BASE;
461 writel(0x00000000, &axi_qos->qosconf);
462 writel(0x00002053, &axi_qos->qosctset0);
463 writel(0x00000001, &axi_qos->qosreqctr);
464 writel(0x00002064, &axi_qos->qosthres0);
465 writel(0x00002004, &axi_qos->qosthres1);
466 writel(0x00000000, &axi_qos->qosthres2);
467 writel(0x00000001, &axi_qos->qosqon);
468
469 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_USB21_BASE;
470 writel(0x00000000, &axi_qos->qosconf);
471 writel(0x00002053, &axi_qos->qosctset0);
472 writel(0x00000001, &axi_qos->qosreqctr);
473 writel(0x00002064, &axi_qos->qosthres0);
474 writel(0x00002004, &axi_qos->qosthres1);
475 writel(0x00000000, &axi_qos->qosthres2);
476 writel(0x00000001, &axi_qos->qosqon);
477
478 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_USB22_BASE;
479 writel(0x00000000, &axi_qos->qosconf);
480 writel(0x00002053, &axi_qos->qosctset0);
481 writel(0x00000001, &axi_qos->qosreqctr);
482 writel(0x00002064, &axi_qos->qosthres0);
483 writel(0x00002004, &axi_qos->qosthres1);
484 writel(0x00000000, &axi_qos->qosthres2);
485 writel(0x00000001, &axi_qos->qosqon);
486
487 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_USB30_BASE;
488 writel(0x00000000, &axi_qos->qosconf);
489 writel(0x0000214C, &axi_qos->qosctset0);
490 writel(0x00000001, &axi_qos->qosreqctr);
491 writel(0x00002064, &axi_qos->qosthres0);
492 writel(0x00002004, &axi_qos->qosthres1);
493 writel(0x00000000, &axi_qos->qosthres2);
494 writel(0x00000001, &axi_qos->qosqon);
495
496 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_AX2M_BASE;
497 writel(0x00000002, &axi_qos->qosconf);
498 writel(0x00002245, &axi_qos->qosctset0);
499 writel(0x00000001, &axi_qos->qosreqctr);
500 writel(0x00002064, &axi_qos->qosthres0);
501 writel(0x00002004, &axi_qos->qosthres1);
502 writel(0x00000000, &axi_qos->qosthres2);
503 writel(0x00000001, &axi_qos->qosqon);
504
505 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_CC50_BASE;
506 writel(0x00000000, &axi_qos->qosconf);
507 writel(0x00002029, &axi_qos->qosctset0);
508 writel(0x00000001, &axi_qos->qosreqctr);
509 writel(0x00002064, &axi_qos->qosthres0);
510 writel(0x00002004, &axi_qos->qosthres1);
511 writel(0x00000000, &axi_qos->qosthres2);
512 writel(0x00000001, &axi_qos->qosqon);
513
514 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_CCI_BASE;
515 writel(0x00000002, &axi_qos->qosconf);
516 writel(0x00002245, &axi_qos->qosctset0);
517 writel(0x00000001, &axi_qos->qosreqctr);
518 writel(0x00002064, &axi_qos->qosthres0);
519 writel(0x00002004, &axi_qos->qosthres1);
520 writel(0x00000000, &axi_qos->qosthres2);
521 writel(0x00000001, &axi_qos->qosqon);
522
523 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_CS_BASE;
524 writel(0x00000000, &axi_qos->qosconf);
525 writel(0x00002053, &axi_qos->qosctset0);
526 writel(0x00000001, &axi_qos->qosreqctr);
527 writel(0x00002064, &axi_qos->qosthres0);
528 writel(0x00002004, &axi_qos->qosthres1);
529 writel(0x00000000, &axi_qos->qosthres2);
530 writel(0x00000001, &axi_qos->qosqon);
531
532 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_DDM_BASE;
533 writel(0x00000000, &axi_qos->qosconf);
534 writel(0x000020A6, &axi_qos->qosctset0);
535 writel(0x00000001, &axi_qos->qosreqctr);
536 writel(0x00002064, &axi_qos->qosthres0);
537 writel(0x00002004, &axi_qos->qosthres1);
538 writel(0x00000000, &axi_qos->qosthres2);
539 writel(0x00000001, &axi_qos->qosqon);
540
541 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_ETH_BASE;
542 writel(0x00000000, &axi_qos->qosconf);
543 writel(0x00002053, &axi_qos->qosctset0);
544 writel(0x00000001, &axi_qos->qosreqctr);
545 writel(0x00002064, &axi_qos->qosthres0);
546 writel(0x00002004, &axi_qos->qosthres1);
547 writel(0x00000000, &axi_qos->qosthres2);
548 writel(0x00000001, &axi_qos->qosqon);
549
550 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_MPXM_BASE;
551 writel(0x00000002, &axi_qos->qosconf);
552 writel(0x00002245, &axi_qos->qosctset0);
553 writel(0x00000001, &axi_qos->qosreqctr);
554 writel(0x00002064, &axi_qos->qosthres0);
555 writel(0x00002004, &axi_qos->qosthres1);
556 writel(0x00000000, &axi_qos->qosthres2);
557 writel(0x00000001, &axi_qos->qosqon);
558
559 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_SAT0_BASE;
560 writel(0x00000000, &axi_qos->qosconf);
561 writel(0x00002053, &axi_qos->qosctset0);
562 writel(0x00000001, &axi_qos->qosreqctr);
563 writel(0x00002064, &axi_qos->qosthres0);
564 writel(0x00002004, &axi_qos->qosthres1);
565 writel(0x00000000, &axi_qos->qosthres2);
566 writel(0x00000001, &axi_qos->qosqon);
567
568 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_SAT1_BASE;
569 writel(0x00000000, &axi_qos->qosconf);
570 writel(0x00002053, &axi_qos->qosctset0);
571 writel(0x00000001, &axi_qos->qosreqctr);
572 writel(0x00002064, &axi_qos->qosthres0);
573 writel(0x00002004, &axi_qos->qosthres1);
574 writel(0x00000000, &axi_qos->qosthres2);
575 writel(0x00000001, &axi_qos->qosqon);
576
577 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_SDM0_BASE;
578 writel(0x00000000, &axi_qos->qosconf);
579 writel(0x0000214C, &axi_qos->qosctset0);
580 writel(0x00000001, &axi_qos->qosreqctr);
581 writel(0x00002064, &axi_qos->qosthres0);
582 writel(0x00002004, &axi_qos->qosthres1);
583 writel(0x00000000, &axi_qos->qosthres2);
584 writel(0x00000001, &axi_qos->qosqon);
585
586 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_SDM1_BASE;
587 writel(0x00000000, &axi_qos->qosconf);
588 writel(0x0000214C, &axi_qos->qosctset0);
589 writel(0x00000001, &axi_qos->qosreqctr);
590 writel(0x00002064, &axi_qos->qosthres0);
591 writel(0x00002004, &axi_qos->qosthres1);
592 writel(0x00000000, &axi_qos->qosthres2);
593 writel(0x00000001, &axi_qos->qosqon);
594
595 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_TRAB_BASE;
596 writel(0x00000000, &axi_qos->qosconf);
597 writel(0x000020A6, &axi_qos->qosctset0);
598 writel(0x00000001, &axi_qos->qosreqctr);
599 writel(0x00002064, &axi_qos->qosthres0);
600 writel(0x00002004, &axi_qos->qosthres1);
601 writel(0x00000000, &axi_qos->qosthres2);
602 writel(0x00000001, &axi_qos->qosqon);
603
604 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_UDM0_BASE;
605 writel(0x00000000, &axi_qos->qosconf);
606 writel(0x00002053, &axi_qos->qosctset0);
607 writel(0x00000001, &axi_qos->qosreqctr);
608 writel(0x00002064, &axi_qos->qosthres0);
609 writel(0x00002004, &axi_qos->qosthres1);
610 writel(0x00000000, &axi_qos->qosthres2);
611 writel(0x00000001, &axi_qos->qosqon);
612
613 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI_UDM1_BASE;
614 writel(0x00000000, &axi_qos->qosconf);
615 writel(0x00002053, &axi_qos->qosctset0);
616 writel(0x00000001, &axi_qos->qosreqctr);
617 writel(0x00002064, &axi_qos->qosthres0);
618 writel(0x00002004, &axi_qos->qosthres1);
619 writel(0x00000000, &axi_qos->qosthres2);
620 writel(0x00000001, &axi_qos->qosqon);
621
622 /* QoS Register (RT-AXI) */
623 axi_qos = (struct r8a7791_axi_qos *)RT_AXI_SHX_BASE;
624 writel(0x00000000, &axi_qos->qosconf);
625 writel(0x00002053, &axi_qos->qosctset0);
626 writel(0x00002096, &axi_qos->qosctset1);
627 writel(0x00002030, &axi_qos->qosctset2);
628 writel(0x00002030, &axi_qos->qosctset3);
629 writel(0x00000001, &axi_qos->qosreqctr);
630 writel(0x00002064, &axi_qos->qosthres0);
631 writel(0x00002004, &axi_qos->qosthres1);
632 writel(0x00000000, &axi_qos->qosthres2);
633 writel(0x00000001, &axi_qos->qosqon);
634
635 axi_qos = (struct r8a7791_axi_qos *)RT_AXI_DBG_BASE;
636 writel(0x00000000, &axi_qos->qosconf);
637 writel(0x00002053, &axi_qos->qosctset0);
638 writel(0x00002096, &axi_qos->qosctset1);
639 writel(0x00002030, &axi_qos->qosctset2);
640 writel(0x00002030, &axi_qos->qosctset3);
641 writel(0x00000001, &axi_qos->qosreqctr);
642 writel(0x00002064, &axi_qos->qosthres0);
643 writel(0x00002004, &axi_qos->qosthres1);
644 writel(0x00000000, &axi_qos->qosthres2);
645 writel(0x00000001, &axi_qos->qosqon);
646
647 axi_qos = (struct r8a7791_axi_qos *)RT_AXI_RDM_BASE;
648 writel(0x00000000, &axi_qos->qosconf);
649 writel(0x00002299, &axi_qos->qosctset0);
650 writel(0x00000001, &axi_qos->qosreqctr);
651 writel(0x00002064, &axi_qos->qosthres0);
652 writel(0x00002004, &axi_qos->qosthres1);
653 writel(0x00000000, &axi_qos->qosthres2);
654 writel(0x00000001, &axi_qos->qosqon);
655
656 axi_qos = (struct r8a7791_axi_qos *)RT_AXI_RDS_BASE;
657 writel(0x00000000, &axi_qos->qosconf);
658 writel(0x00002029, &axi_qos->qosctset0);
659 writel(0x00000001, &axi_qos->qosreqctr);
660 writel(0x00002064, &axi_qos->qosthres0);
661 writel(0x00002004, &axi_qos->qosthres1);
662 writel(0x00000000, &axi_qos->qosthres2);
663 writel(0x00000001, &axi_qos->qosqon);
664
665 axi_qos = (struct r8a7791_axi_qos *)RT_AXI_RTX64TO128_BASE;
666 writel(0x00000002, &axi_qos->qosconf);
667 writel(0x00002245, &axi_qos->qosctset0);
668 writel(0x00002096, &axi_qos->qosctset1);
669 writel(0x00002030, &axi_qos->qosctset2);
670 writel(0x00002030, &axi_qos->qosctset3);
671 writel(0x00000001, &axi_qos->qosreqctr);
672 writel(0x00002064, &axi_qos->qosthres0);
673 writel(0x00002004, &axi_qos->qosthres1);
674 writel(0x00000000, &axi_qos->qosthres2);
675 writel(0x00000001, &axi_qos->qosqon);
676
677 axi_qos = (struct r8a7791_axi_qos *)RT_AXI_STPRO_BASE;
678 writel(0x00000000, &axi_qos->qosconf);
679 writel(0x00002029, &axi_qos->qosctset0);
680 writel(0x00002096, &axi_qos->qosctset1);
681 writel(0x00002030, &axi_qos->qosctset2);
682 writel(0x00002030, &axi_qos->qosctset3);
683 writel(0x00000001, &axi_qos->qosreqctr);
684 writel(0x00002064, &axi_qos->qosthres0);
685 writel(0x00002004, &axi_qos->qosthres1);
686 writel(0x00000000, &axi_qos->qosthres2);
687 writel(0x00000001, &axi_qos->qosqon);
688
689 axi_qos = (struct r8a7791_axi_qos *)RT_AXI_SY2RT_BASE;
690 writel(0x00000002, &axi_qos->qosconf);
691 writel(0x00002245, &axi_qos->qosctset0);
692 writel(0x00002096, &axi_qos->qosctset1);
693 writel(0x00002030, &axi_qos->qosctset2);
694 writel(0x00002030, &axi_qos->qosctset3);
695 writel(0x00000001, &axi_qos->qosreqctr);
696 writel(0x00002064, &axi_qos->qosthres0);
697 writel(0x00002004, &axi_qos->qosthres1);
698 writel(0x00000000, &axi_qos->qosthres2);
699 writel(0x00000001, &axi_qos->qosqon);
700
701 /* QoS Register (MP-AXI) */
702 axi_qos = (struct r8a7791_axi_qos *)MP_AXI_ADSP_BASE;
703 writel(0x00000000, &axi_qos->qosconf);
704 writel(0x00002037, &axi_qos->qosctset0);
705 writel(0x00000001, &axi_qos->qosreqctr);
706 writel(0x00002064, &axi_qos->qosthres0);
707 writel(0x00002004, &axi_qos->qosthres1);
708 writel(0x00000000, &axi_qos->qosthres2);
709 writel(0x00000001, &axi_qos->qosqon);
710
711 axi_qos = (struct r8a7791_axi_qos *)MP_AXI_ASDS0_BASE;
712 writel(0x00000001, &axi_qos->qosconf);
713 writel(0x00002014, &axi_qos->qosctset0);
714 writel(0x00000001, &axi_qos->qosreqctr);
715 writel(0x00002064, &axi_qos->qosthres0);
716 writel(0x00002004, &axi_qos->qosthres1);
717 writel(0x00000000, &axi_qos->qosthres2);
718 writel(0x00000001, &axi_qos->qosqon);
719
720 axi_qos = (struct r8a7791_axi_qos *)MP_AXI_ASDS1_BASE;
721 writel(0x00000001, &axi_qos->qosconf);
722 writel(0x00002014, &axi_qos->qosctset0);
723 writel(0x00000001, &axi_qos->qosreqctr);
724 writel(0x00002064, &axi_qos->qosthres0);
725 writel(0x00002004, &axi_qos->qosthres1);
726 writel(0x00000000, &axi_qos->qosthres2);
727 writel(0x00000001, &axi_qos->qosqon);
728
729 axi_qos = (struct r8a7791_axi_qos *)MP_AXI_MLP_BASE;
730 writel(0x00000000, &axi_qos->qosconf);
731 writel(0x00002014, &axi_qos->qosctset0);
732 writel(0x00000001, &axi_qos->qosreqctr);
733 writel(0x00002064, &axi_qos->qosthres0);
734 writel(0x00002004, &axi_qos->qosthres1);
735 writel(0x00000000, &axi_qos->qosthres2);
736 writel(0x00000001, &axi_qos->qosqon);
737
738 axi_qos = (struct r8a7791_axi_qos *)MP_AXI_MMUMP_BASE;
739 writel(0x00000001, &axi_qos->qosconf);
740 writel(0x00002004, &axi_qos->qosctset0);
741 writel(0x00002096, &axi_qos->qosctset1);
742 writel(0x00002030, &axi_qos->qosctset2);
743 writel(0x00002030, &axi_qos->qosctset3);
744 writel(0x00000001, &axi_qos->qosreqctr);
745 writel(0x00002064, &axi_qos->qosthres0);
746 writel(0x00002004, &axi_qos->qosthres1);
747 writel(0x00000000, &axi_qos->qosthres2);
748 writel(0x00000001, &axi_qos->qosqon);
749
750 axi_qos = (struct r8a7791_axi_qos *)MP_AXI_SPU_BASE;
751 writel(0x00000000, &axi_qos->qosconf);
752 writel(0x00002053, &axi_qos->qosctset0);
753 writel(0x00000001, &axi_qos->qosreqctr);
754 writel(0x00002064, &axi_qos->qosthres0);
755 writel(0x00002004, &axi_qos->qosthres1);
756 writel(0x00000000, &axi_qos->qosthres2);
757 writel(0x00000001, &axi_qos->qosqon);
758
759 axi_qos = (struct r8a7791_axi_qos *)MP_AXI_SPUC_BASE;
760 writel(0x00000000, &axi_qos->qosconf);
761 writel(0x0000206E, &axi_qos->qosctset0);
762 writel(0x00000001, &axi_qos->qosreqctr);
763 writel(0x00002064, &axi_qos->qosthres0);
764 writel(0x00002004, &axi_qos->qosthres1);
765 writel(0x00000000, &axi_qos->qosthres2);
766 writel(0x00000001, &axi_qos->qosqon);
767
768 /* QoS Register (SYS-AXI256) */
769 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI256_AXI128TO256_BASE;
770 writel(0x00000002, &axi_qos->qosconf);
771 writel(0x00002245, &axi_qos->qosctset0);
772 writel(0x00002096, &axi_qos->qosctset1);
773 writel(0x00002030, &axi_qos->qosctset2);
774 writel(0x00002030, &axi_qos->qosctset3);
775 writel(0x00000001, &axi_qos->qosreqctr);
776 writel(0x00002064, &axi_qos->qosthres0);
777 writel(0x00002004, &axi_qos->qosthres1);
778 writel(0x00000000, &axi_qos->qosthres2);
779 writel(0x00000001, &axi_qos->qosqon);
780
781 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI256_SYX_BASE;
782 writel(0x00000002, &axi_qos->qosconf);
783 writel(0x00002245, &axi_qos->qosctset0);
784 writel(0x00002096, &axi_qos->qosctset1);
785 writel(0x00002030, &axi_qos->qosctset2);
786 writel(0x00002030, &axi_qos->qosctset3);
787 writel(0x00000001, &axi_qos->qosreqctr);
788 writel(0x00002064, &axi_qos->qosthres0);
789 writel(0x00002004, &axi_qos->qosthres1);
790 writel(0x00000000, &axi_qos->qosthres2);
791 writel(0x00000001, &axi_qos->qosqon);
792
793 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI256_MPX_BASE;
794 writel(0x00000002, &axi_qos->qosconf);
795 writel(0x00002245, &axi_qos->qosctset0);
796 writel(0x00002096, &axi_qos->qosctset1);
797 writel(0x00002030, &axi_qos->qosctset2);
798 writel(0x00002030, &axi_qos->qosctset3);
799 writel(0x00000001, &axi_qos->qosreqctr);
800 writel(0x00002064, &axi_qos->qosthres0);
801 writel(0x00002004, &axi_qos->qosthres1);
802 writel(0x00000000, &axi_qos->qosthres2);
803 writel(0x00000001, &axi_qos->qosqon);
804
805 axi_qos = (struct r8a7791_axi_qos *)SYS_AXI256_MXI_BASE;
806 writel(0x00000002, &axi_qos->qosconf);
807 writel(0x00002245, &axi_qos->qosctset0);
808 writel(0x00002096, &axi_qos->qosctset1);
809 writel(0x00002030, &axi_qos->qosctset2);
810 writel(0x00002030, &axi_qos->qosctset3);
811 writel(0x00000001, &axi_qos->qosreqctr);
812 writel(0x00002064, &axi_qos->qosthres0);
813 writel(0x00002004, &axi_qos->qosthres1);
814 writel(0x00000000, &axi_qos->qosthres2);
815 writel(0x00000001, &axi_qos->qosqon);
816
817 /* QoS Register (CCI-AXI) */
818 axi_qos = (struct r8a7791_axi_qos *)CCI_AXI_MMUS0_BASE;
819 writel(0x00000001, &axi_qos->qosconf);
820 writel(0x00002004, &axi_qos->qosctset0);
821 writel(0x00002096, &axi_qos->qosctset1);
822 writel(0x00002030, &axi_qos->qosctset2);
823 writel(0x00002030, &axi_qos->qosctset3);
824 writel(0x00000001, &axi_qos->qosreqctr);
825 writel(0x00002064, &axi_qos->qosthres0);
826 writel(0x00002004, &axi_qos->qosthres1);
827 writel(0x00000000, &axi_qos->qosthres2);
828 writel(0x00000001, &axi_qos->qosqon);
829
830 axi_qos = (struct r8a7791_axi_qos *)CCI_AXI_SYX2_BASE;
831 writel(0x00000002, &axi_qos->qosconf);
832 writel(0x00002245, &axi_qos->qosctset0);
833 writel(0x00002096, &axi_qos->qosctset1);
834 writel(0x00002030, &axi_qos->qosctset2);
835 writel(0x00002030, &axi_qos->qosctset3);
836 writel(0x00000001, &axi_qos->qosreqctr);
837 writel(0x00002064, &axi_qos->qosthres0);
838 writel(0x00002004, &axi_qos->qosthres1);
839 writel(0x00000000, &axi_qos->qosthres2);
840 writel(0x00000001, &axi_qos->qosqon);
841
842 axi_qos = (struct r8a7791_axi_qos *)CCI_AXI_MMUR_BASE;
843 writel(0x00000001, &axi_qos->qosconf);
844 writel(0x00002004, &axi_qos->qosctset0);
845 writel(0x00002096, &axi_qos->qosctset1);
846 writel(0x00002030, &axi_qos->qosctset2);
847 writel(0x00002030, &axi_qos->qosctset3);
848 writel(0x00000001, &axi_qos->qosreqctr);
849 writel(0x00002064, &axi_qos->qosthres0);
850 writel(0x00002004, &axi_qos->qosthres1);
851 writel(0x00000000, &axi_qos->qosthres2);
852 writel(0x00000001, &axi_qos->qosqon);
853
854 axi_qos = (struct r8a7791_axi_qos *)CCI_AXI_MMUDS_BASE;
855 writel(0x00000001, &axi_qos->qosconf);
856 writel(0x00002004, &axi_qos->qosctset0);
857 writel(0x00002096, &axi_qos->qosctset1);
858 writel(0x00002030, &axi_qos->qosctset2);
859 writel(0x00002030, &axi_qos->qosctset3);
860 writel(0x00000001, &axi_qos->qosreqctr);
861 writel(0x00002064, &axi_qos->qosthres0);
862 writel(0x00002004, &axi_qos->qosthres1);
863 writel(0x00000000, &axi_qos->qosthres2);
864 writel(0x00000001, &axi_qos->qosqon);
865
866 axi_qos = (struct r8a7791_axi_qos *)CCI_AXI_MMUM_BASE;
867 writel(0x00000001, &axi_qos->qosconf);
868 writel(0x00002004, &axi_qos->qosctset0);
869 writel(0x00002096, &axi_qos->qosctset1);
870 writel(0x00002030, &axi_qos->qosctset2);
871 writel(0x00002030, &axi_qos->qosctset3);
872 writel(0x00000001, &axi_qos->qosreqctr);
873 writel(0x00002064, &axi_qos->qosthres0);
874 writel(0x00002004, &axi_qos->qosthres1);
875 writel(0x00000000, &axi_qos->qosthres2);
876 writel(0x00000001, &axi_qos->qosqon);
877
878 axi_qos = (struct r8a7791_axi_qos *)CCI_AXI_MXI_BASE;
879 writel(0x00000002, &axi_qos->qosconf);
880 writel(0x00002245, &axi_qos->qosctset0);
881 writel(0x00002096, &axi_qos->qosctset1);
882 writel(0x00002030, &axi_qos->qosctset2);
883 writel(0x00002030, &axi_qos->qosctset3);
884 writel(0x00000001, &axi_qos->qosreqctr);
885 writel(0x00002064, &axi_qos->qosthres0);
886 writel(0x00002004, &axi_qos->qosthres1);
887 writel(0x00000000, &axi_qos->qosthres2);
888 writel(0x00000001, &axi_qos->qosqon);
889
890 axi_qos = (struct r8a7791_axi_qos *)CCI_AXI_MMUS1_BASE;
891 writel(0x00000001, &axi_qos->qosconf);
892 writel(0x00002004, &axi_qos->qosctset0);
893 writel(0x00002096, &axi_qos->qosctset1);
894 writel(0x00002030, &axi_qos->qosctset2);
895 writel(0x00002030, &axi_qos->qosctset3);
896 writel(0x00000001, &axi_qos->qosreqctr);
897 writel(0x00002064, &axi_qos->qosthres0);
898 writel(0x00002004, &axi_qos->qosthres1);
899 writel(0x00000000, &axi_qos->qosthres2);
900 writel(0x00000001, &axi_qos->qosqon);
901
902 axi_qos = (struct r8a7791_axi_qos *)CCI_AXI_MMUMP_BASE;
903 writel(0x00000001, &axi_qos->qosconf);
904 writel(0x00002004, &axi_qos->qosctset0);
905 writel(0x00002096, &axi_qos->qosctset1);
906 writel(0x00002030, &axi_qos->qosctset2);
907 writel(0x00002030, &axi_qos->qosctset3);
908 writel(0x00000001, &axi_qos->qosreqctr);
909 writel(0x00002064, &axi_qos->qosthres0);
910 writel(0x00002004, &axi_qos->qosthres1);
911 writel(0x00000000, &axi_qos->qosthres2);
912 writel(0x00000001, &axi_qos->qosqon);
913
914 /* QoS Register (Media-AXI) */
915 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_MXR_BASE;
916 writel(0x00000002, &axi_qos->qosconf);
917 writel(0x000020DC, &axi_qos->qosctset0);
918 writel(0x00002096, &axi_qos->qosctset1);
919 writel(0x00002030, &axi_qos->qosctset2);
920 writel(0x00002030, &axi_qos->qosctset3);
921 writel(0x00000020, &axi_qos->qosreqctr);
922 writel(0x000020AA, &axi_qos->qosthres0);
923 writel(0x00002032, &axi_qos->qosthres1);
924 writel(0x00000001, &axi_qos->qosthres2);
925
926 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_MXW_BASE;
927 writel(0x00000002, &axi_qos->qosconf);
928 writel(0x000020DC, &axi_qos->qosctset0);
929 writel(0x00002096, &axi_qos->qosctset1);
930 writel(0x00002030, &axi_qos->qosctset2);
931 writel(0x00002030, &axi_qos->qosctset3);
932 writel(0x00000020, &axi_qos->qosreqctr);
933 writel(0x000020AA, &axi_qos->qosthres0);
934 writel(0x00002032, &axi_qos->qosthres1);
935 writel(0x00000001, &axi_qos->qosthres2);
936
937 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_JPR_BASE;
938 writel(0x00000001, &axi_qos->qosconf);
939 writel(0x00002190, &axi_qos->qosctset0);
940 writel(0x00000020, &axi_qos->qosreqctr);
941 writel(0x00002064, &axi_qos->qosthres0);
942 writel(0x00002004, &axi_qos->qosthres1);
943 writel(0x00000001, &axi_qos->qosthres2);
944 writel(0x00000001, &axi_qos->qosqon);
945
946 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_JPW_BASE;
947 writel(0x00000001, &axi_qos->qosconf);
948 writel(0x00002190, &axi_qos->qosctset0);
949 writel(0x00000020, &axi_qos->qosreqctr);
950 writel(0x00002064, &axi_qos->qosthres0);
951 writel(0x00002004, &axi_qos->qosthres1);
952 writel(0x00000001, &axi_qos->qosthres2);
953 writel(0x00000001, &axi_qos->qosqon);
954
955 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_TDMR_BASE;
956 writel(0x00000001, &axi_qos->qosconf);
957 writel(0x00002190, &axi_qos->qosctset0);
958 writel(0x00000020, &axi_qos->qosreqctr);
959 writel(0x00002064, &axi_qos->qosthres0);
960 writel(0x00002004, &axi_qos->qosthres1);
961 writel(0x00000001, &axi_qos->qosthres2);
962 writel(0x00000001, &axi_qos->qosqon);
963
964 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_TDMW_BASE;
965 writel(0x00000001, &axi_qos->qosconf);
966 writel(0x00002190, &axi_qos->qosctset0);
967 writel(0x00000020, &axi_qos->qosreqctr);
968 writel(0x00002064, &axi_qos->qosthres0);
969 writel(0x00002004, &axi_qos->qosthres1);
970 writel(0x00000001, &axi_qos->qosthres2);
971 writel(0x00000001, &axi_qos->qosqon);
972
973 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_VSP1CR_BASE;
974 writel(0x00000001, &axi_qos->qosconf);
975 writel(0x00002190, &axi_qos->qosctset0);
976 writel(0x00000020, &axi_qos->qosreqctr);
977 writel(0x00002064, &axi_qos->qosthres0);
978 writel(0x00002004, &axi_qos->qosthres1);
979 writel(0x00000001, &axi_qos->qosthres2);
980 writel(0x00000001, &axi_qos->qosqon);
981
982 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_VSP1CW_BASE;
983 writel(0x00000001, &axi_qos->qosconf);
984 writel(0x00002190, &axi_qos->qosctset0);
985 writel(0x00000020, &axi_qos->qosreqctr);
986 writel(0x00002064, &axi_qos->qosthres0);
987 writel(0x00002004, &axi_qos->qosthres1);
988 writel(0x00000001, &axi_qos->qosthres2);
989 writel(0x00000001, &axi_qos->qosqon);
990
991 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_VSPDU0CR_BASE;
992 writel(0x00000001, &axi_qos->qosconf);
993 writel(0x00002190, &axi_qos->qosctset0);
994 writel(0x00000020, &axi_qos->qosreqctr);
995 writel(0x00002064, &axi_qos->qosthres0);
996 writel(0x00002004, &axi_qos->qosthres1);
997 writel(0x00000001, &axi_qos->qosthres2);
998 writel(0x00000001, &axi_qos->qosqon);
999
1000 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_VSPDU0CW_BASE;
1001 writel(0x00000001, &axi_qos->qosconf);
1002 writel(0x00002190, &axi_qos->qosctset0);
1003 writel(0x00000020, &axi_qos->qosreqctr);
1004 writel(0x00002064, &axi_qos->qosthres0);
1005 writel(0x00002004, &axi_qos->qosthres1);
1006 writel(0x00000001, &axi_qos->qosthres2);
1007 writel(0x00000001, &axi_qos->qosqon);
1008
1009 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_VSPDU1CR_BASE;
1010 writel(0x00000001, &axi_qos->qosconf);
1011 writel(0x00002190, &axi_qos->qosctset0);
1012 writel(0x00000020, &axi_qos->qosreqctr);
1013 writel(0x00002064, &axi_qos->qosthres0);
1014 writel(0x00002004, &axi_qos->qosthres1);
1015 writel(0x00000001, &axi_qos->qosthres2);
1016 writel(0x00000001, &axi_qos->qosqon);
1017
1018 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_VSPDU1CW_BASE;
1019 writel(0x00000001, &axi_qos->qosconf);
1020 writel(0x00002190, &axi_qos->qosctset0);
1021 writel(0x00000020, &axi_qos->qosreqctr);
1022 writel(0x00002064, &axi_qos->qosthres0);
1023 writel(0x00002004, &axi_qos->qosthres1);
1024 writel(0x00000001, &axi_qos->qosthres2);
1025 writel(0x00000001, &axi_qos->qosqon);
1026
1027 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_VIN0W_BASE;
1028 writel(0x00000001, &axi_qos->qosconf);
1029 writel(0x000020C8, &axi_qos->qosctset0);
1030 writel(0x00000020, &axi_qos->qosreqctr);
1031 writel(0x00002064, &axi_qos->qosthres0);
1032 writel(0x00002004, &axi_qos->qosthres1);
1033 writel(0x00000001, &axi_qos->qosthres2);
1034 writel(0x00000001, &axi_qos->qosqon);
1035
1036 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_FDP0R_BASE;
1037 writel(0x00000001, &axi_qos->qosconf);
1038 writel(0x000020C8, &axi_qos->qosctset0);
1039 writel(0x00000020, &axi_qos->qosreqctr);
1040 writel(0x00002064, &axi_qos->qosthres0);
1041 writel(0x00002004, &axi_qos->qosthres1);
1042 writel(0x00000001, &axi_qos->qosthres2);
1043 writel(0x00000001, &axi_qos->qosqon);
1044
1045 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_FDP0W_BASE;
1046 writel(0x00000001, &axi_qos->qosconf);
1047 writel(0x000020C8, &axi_qos->qosctset0);
1048 writel(0x00000020, &axi_qos->qosreqctr);
1049 writel(0x00002064, &axi_qos->qosthres0);
1050 writel(0x00002004, &axi_qos->qosthres1);
1051 writel(0x00000001, &axi_qos->qosthres2);
1052 writel(0x00000001, &axi_qos->qosqon);
1053
1054 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_IMSR_BASE;
1055 writel(0x00000001, &axi_qos->qosconf);
1056 writel(0x000020C8, &axi_qos->qosctset0);
1057 writel(0x00000020, &axi_qos->qosreqctr);
1058 writel(0x00002064, &axi_qos->qosthres0);
1059 writel(0x00002004, &axi_qos->qosthres1);
1060 writel(0x00000001, &axi_qos->qosthres2);
1061 writel(0x00000001, &axi_qos->qosqon);
1062
1063 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_IMSW_BASE;
1064 writel(0x00000001, &axi_qos->qosconf);
1065 writel(0x000020C8, &axi_qos->qosctset0);
1066 writel(0x00000020, &axi_qos->qosreqctr);
1067 writel(0x00002064, &axi_qos->qosthres0);
1068 writel(0x00002004, &axi_qos->qosthres1);
1069 writel(0x00000001, &axi_qos->qosthres2);
1070 writel(0x00000001, &axi_qos->qosqon);
1071
1072 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_VSP1R_BASE;
1073 writel(0x00000001, &axi_qos->qosconf);
1074 writel(0x000020C8, &axi_qos->qosctset0);
1075 writel(0x00000020, &axi_qos->qosreqctr);
1076 writel(0x00002064, &axi_qos->qosthres0);
1077 writel(0x00002004, &axi_qos->qosthres1);
1078 writel(0x00000001, &axi_qos->qosthres2);
1079 writel(0x00000001, &axi_qos->qosqon);
1080
1081 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_VSP1W_BASE;
1082 writel(0x00000001, &axi_qos->qosconf);
1083 writel(0x000020C8, &axi_qos->qosctset0);
1084 writel(0x00000020, &axi_qos->qosreqctr);
1085 writel(0x00002064, &axi_qos->qosthres0);
1086 writel(0x00002004, &axi_qos->qosthres1);
1087 writel(0x00000001, &axi_qos->qosthres2);
1088 writel(0x00000001, &axi_qos->qosqon);
1089
1090 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_FDP1R_BASE;
1091 writel(0x00000001, &axi_qos->qosconf);
1092 writel(0x000020C8, &axi_qos->qosctset0);
1093 writel(0x00000020, &axi_qos->qosreqctr);
1094 writel(0x00002064, &axi_qos->qosthres0);
1095 writel(0x00002004, &axi_qos->qosthres1);
1096 writel(0x00000001, &axi_qos->qosthres2);
1097 writel(0x00000001, &axi_qos->qosqon);
1098
1099 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_FDP1W_BASE;
1100 writel(0x00000001, &axi_qos->qosconf);
1101 writel(0x000020C8, &axi_qos->qosctset0);
1102 writel(0x00000020, &axi_qos->qosreqctr);
1103 writel(0x00002064, &axi_qos->qosthres0);
1104 writel(0x00002004, &axi_qos->qosthres1);
1105 writel(0x00000001, &axi_qos->qosthres2);
1106 writel(0x00000001, &axi_qos->qosqon);
1107
1108 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_IMRR_BASE;
1109 writel(0x00000001, &axi_qos->qosconf);
1110 writel(0x000020C8, &axi_qos->qosctset0);
1111 writel(0x00000020, &axi_qos->qosreqctr);
1112 writel(0x00002064, &axi_qos->qosthres0);
1113 writel(0x00002004, &axi_qos->qosthres1);
1114 writel(0x00000001, &axi_qos->qosthres2);
1115 writel(0x00000001, &axi_qos->qosqon);
1116
1117 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_IMRW_BASE;
1118 writel(0x00000001, &axi_qos->qosconf);
1119 writel(0x000020C8, &axi_qos->qosctset0);
1120 writel(0x00000020, &axi_qos->qosreqctr);
1121 writel(0x00002064, &axi_qos->qosthres0);
1122 writel(0x00002004, &axi_qos->qosthres1);
1123 writel(0x00000001, &axi_qos->qosthres2);
1124 writel(0x00000001, &axi_qos->qosqon);
1125
1126 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_VSPD0R_BASE;
1127 writel(0x00000000, &axi_qos->qosconf);
1128 writel(0x000020C8, &axi_qos->qosctset0);
1129 writel(0x00002064, &axi_qos->qosthres0);
1130 writel(0x00002004, &axi_qos->qosthres1);
1131 writel(0x00000001, &axi_qos->qosthres2);
1132 writel(0x00000001, &axi_qos->qosqon);
1133
1134 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_VSPD0W_BASE;
1135 writel(0x00000000, &axi_qos->qosconf);
1136 writel(0x000020C8, &axi_qos->qosctset0);
1137 writel(0x00002064, &axi_qos->qosthres0);
1138 writel(0x00002004, &axi_qos->qosthres1);
1139 writel(0x00000001, &axi_qos->qosthres2);
1140 writel(0x00000001, &axi_qos->qosqon);
1141
1142 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_VSPD1R_BASE;
1143 writel(0x00000000, &axi_qos->qosconf);
1144 writel(0x000020C8, &axi_qos->qosctset0);
1145 writel(0x00002064, &axi_qos->qosthres0);
1146 writel(0x00002004, &axi_qos->qosthres1);
1147 writel(0x00000001, &axi_qos->qosthres2);
1148 writel(0x00000001, &axi_qos->qosqon);
1149
1150 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_VSPD1W_BASE;
1151 writel(0x00000000, &axi_qos->qosconf);
1152 writel(0x000020C8, &axi_qos->qosctset0);
1153 writel(0x00002064, &axi_qos->qosthres0);
1154 writel(0x00002004, &axi_qos->qosthres1);
1155 writel(0x00000001, &axi_qos->qosthres2);
1156 writel(0x00000001, &axi_qos->qosqon);
1157
1158 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_DU0R_BASE;
1159 writel(0x00000000, &axi_qos->qosconf);
1160 writel(0x00002063, &axi_qos->qosctset0);
1161 writel(0x00000001, &axi_qos->qosreqctr);
1162 writel(0x00002064, &axi_qos->qosthres0);
1163 writel(0x00002004, &axi_qos->qosthres1);
1164 writel(0x00000001, &axi_qos->qosthres2);
1165 writel(0x00000001, &axi_qos->qosqon);
1166
1167 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_DU0W_BASE;
1168 writel(0x00000000, &axi_qos->qosconf);
1169 writel(0x00002063, &axi_qos->qosctset0);
1170 writel(0x00000001, &axi_qos->qosreqctr);
1171 writel(0x00002064, &axi_qos->qosthres0);
1172 writel(0x00002004, &axi_qos->qosthres1);
1173 writel(0x00000001, &axi_qos->qosthres2);
1174 writel(0x00000001, &axi_qos->qosqon);
1175
1176 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_VCP0CR_BASE;
1177 writel(0x00000001, &axi_qos->qosconf);
1178 writel(0x00002073, &axi_qos->qosctset0);
1179 writel(0x00000020, &axi_qos->qosreqctr);
1180 writel(0x00002064, &axi_qos->qosthres0);
1181 writel(0x00002004, &axi_qos->qosthres1);
1182 writel(0x00000001, &axi_qos->qosthres2);
1183 writel(0x00000001, &axi_qos->qosqon);
1184
1185 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_VCP0CW_BASE;
1186 writel(0x00000001, &axi_qos->qosconf);
1187 writel(0x00002073, &axi_qos->qosctset0);
1188 writel(0x00000020, &axi_qos->qosreqctr);
1189 writel(0x00002064, &axi_qos->qosthres0);
1190 writel(0x00002004, &axi_qos->qosthres1);
1191 writel(0x00000001, &axi_qos->qosthres2);
1192 writel(0x00000001, &axi_qos->qosqon);
1193
1194 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_VCP0VR_BASE;
1195 writel(0x00000001, &axi_qos->qosconf);
1196 writel(0x00002073, &axi_qos->qosctset0);
1197 writel(0x00000020, &axi_qos->qosreqctr);
1198 writel(0x00002064, &axi_qos->qosthres0);
1199 writel(0x00002004, &axi_qos->qosthres1);
1200 writel(0x00000001, &axi_qos->qosthres2);
1201 writel(0x00000001, &axi_qos->qosqon);
1202
1203 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_VCP0VW_BASE;
1204 writel(0x00000001, &axi_qos->qosconf);
1205 writel(0x00002073, &axi_qos->qosctset0);
1206 writel(0x00000020, &axi_qos->qosreqctr);
1207 writel(0x00002064, &axi_qos->qosthres0);
1208 writel(0x00002004, &axi_qos->qosthres1);
1209 writel(0x00000001, &axi_qos->qosthres2);
1210 writel(0x00000001, &axi_qos->qosqon);
1211
1212 axi_qos = (struct r8a7791_axi_qos *)MEDIA_AXI_VPC0R_BASE;
1213 writel(0x00000001, &axi_qos->qosconf);
1214 writel(0x00002073, &axi_qos->qosctset0);
1215 writel(0x00000020, &axi_qos->qosreqctr);
1216 writel(0x00002064, &axi_qos->qosthres0);
1217 writel(0x00002004, &axi_qos->qosthres1);
1218 writel(0x00000001, &axi_qos->qosthres2);
1219 writel(0x00000001, &axi_qos->qosqon);
1220}