summaryrefslogtreecommitdiffstats
path: root/drivers/renesas/rcar/qos
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:13:47 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:13:47 +0000
commit102b0d2daa97dae68d3eed54d8fe37a9cc38a892 (patch)
treebcf648efac40ca6139842707f0eba5a4496a6dd2 /drivers/renesas/rcar/qos
parentInitial commit. (diff)
downloadarm-trusted-firmware-102b0d2daa97dae68d3eed54d8fe37a9cc38a892.tar.xz
arm-trusted-firmware-102b0d2daa97dae68d3eed54d8fe37a9cc38a892.zip
Adding upstream version 2.8.0+dfsg.upstream/2.8.0+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/renesas/rcar/qos')
-rw-r--r--drivers/renesas/rcar/qos/D3/qos_init_d3.c147
-rw-r--r--drivers/renesas/rcar/qos/D3/qos_init_d3.h13
-rw-r--r--drivers/renesas/rcar/qos/D3/qos_init_d3_mstat.h244
-rw-r--r--drivers/renesas/rcar/qos/E3/qos_init_e3_v10.c142
-rw-r--r--drivers/renesas/rcar/qos/E3/qos_init_e3_v10.h12
-rw-r--r--drivers/renesas/rcar/qos/E3/qos_init_e3_v10_mstat390.h241
-rw-r--r--drivers/renesas/rcar/qos/E3/qos_init_e3_v10_mstat780.h241
-rw-r--r--drivers/renesas/rcar/qos/H3/qos_init_h3_v10.c104
-rw-r--r--drivers/renesas/rcar/qos/H3/qos_init_h3_v10.h12
-rw-r--r--drivers/renesas/rcar/qos/H3/qos_init_h3_v10_mstat.h221
-rw-r--r--drivers/renesas/rcar/qos/H3/qos_init_h3_v11.c200
-rw-r--r--drivers/renesas/rcar/qos/H3/qos_init_h3_v11.h12
-rw-r--r--drivers/renesas/rcar/qos/H3/qos_init_h3_v11_mstat.h221
-rw-r--r--drivers/renesas/rcar/qos/H3/qos_init_h3_v20.c234
-rw-r--r--drivers/renesas/rcar/qos/H3/qos_init_h3_v20.h12
-rw-r--r--drivers/renesas/rcar/qos/H3/qos_init_h3_v20_mstat195.h231
-rw-r--r--drivers/renesas/rcar/qos/H3/qos_init_h3_v20_mstat390.h231
-rw-r--r--drivers/renesas/rcar/qos/H3/qos_init_h3_v20_qoswt195.h231
-rw-r--r--drivers/renesas/rcar/qos/H3/qos_init_h3_v20_qoswt390.h231
-rw-r--r--drivers/renesas/rcar/qos/H3/qos_init_h3_v30.c236
-rw-r--r--drivers/renesas/rcar/qos/H3/qos_init_h3_v30.h12
-rw-r--r--drivers/renesas/rcar/qos/H3/qos_init_h3_v30_mstat195.h231
-rw-r--r--drivers/renesas/rcar/qos/H3/qos_init_h3_v30_mstat390.h231
-rw-r--r--drivers/renesas/rcar/qos/H3/qos_init_h3_v30_qoswt195.h231
-rw-r--r--drivers/renesas/rcar/qos/H3/qos_init_h3_v30_qoswt390.h231
-rw-r--r--drivers/renesas/rcar/qos/H3/qos_init_h3n_v30.c230
-rw-r--r--drivers/renesas/rcar/qos/H3/qos_init_h3n_v30.h12
-rw-r--r--drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_mstat195.h231
-rw-r--r--drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_mstat390.h231
-rw-r--r--drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_qoswt195.h231
-rw-r--r--drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_qoswt390.h231
-rw-r--r--drivers/renesas/rcar/qos/M3/qos_init_m3_v10.c149
-rw-r--r--drivers/renesas/rcar/qos/M3/qos_init_m3_v10.h12
-rw-r--r--drivers/renesas/rcar/qos/M3/qos_init_m3_v10_mstat.h227
-rw-r--r--drivers/renesas/rcar/qos/M3/qos_init_m3_v11.c223
-rw-r--r--drivers/renesas/rcar/qos/M3/qos_init_m3_v11.h12
-rw-r--r--drivers/renesas/rcar/qos/M3/qos_init_m3_v11_mstat195.h225
-rw-r--r--drivers/renesas/rcar/qos/M3/qos_init_m3_v11_mstat390.h225
-rw-r--r--drivers/renesas/rcar/qos/M3/qos_init_m3_v11_qoswt195.h225
-rw-r--r--drivers/renesas/rcar/qos/M3/qos_init_m3_v11_qoswt390.h225
-rw-r--r--drivers/renesas/rcar/qos/M3/qos_init_m3_v30.c209
-rw-r--r--drivers/renesas/rcar/qos/M3/qos_init_m3_v30.h12
-rw-r--r--drivers/renesas/rcar/qos/M3/qos_init_m3_v30_mstat195.h225
-rw-r--r--drivers/renesas/rcar/qos/M3/qos_init_m3_v30_mstat390.h225
-rw-r--r--drivers/renesas/rcar/qos/M3/qos_init_m3_v30_qoswt195.h225
-rw-r--r--drivers/renesas/rcar/qos/M3/qos_init_m3_v30_qoswt390.h225
-rw-r--r--drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10.c203
-rw-r--r--drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10.h12
-rw-r--r--drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_mstat195.h241
-rw-r--r--drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_mstat390.h241
-rw-r--r--drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_qoswt195.h241
-rw-r--r--drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_qoswt390.h241
-rw-r--r--drivers/renesas/rcar/qos/V3M/qos_init_v3m.c111
-rw-r--r--drivers/renesas/rcar/qos/V3M/qos_init_v3m.h13
-rw-r--r--drivers/renesas/rcar/qos/V3M/qos_init_v3m_mstat.h98
-rw-r--r--drivers/renesas/rcar/qos/qos.mk106
-rw-r--r--drivers/renesas/rcar/qos/qos_common.h142
-rw-r--r--drivers/renesas/rcar/qos/qos_init.c394
-rw-r--r--drivers/renesas/rcar/qos/qos_init.h13
59 files changed, 10018 insertions, 0 deletions
diff --git a/drivers/renesas/rcar/qos/D3/qos_init_d3.c b/drivers/renesas/rcar/qos/D3/qos_init_d3.c
new file mode 100644
index 0000000..b96e822
--- /dev/null
+++ b/drivers/renesas/rcar/qos/D3/qos_init_d3.c
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 2015-2019, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <stdint.h>
+
+#include <common/debug.h>
+
+#include "../qos_common.h"
+#include "../qos_reg.h"
+#include "qos_init_d3.h"
+
+#define RCAR_QOS_VERSION "rev.0.05"
+
+#include "qos_init_d3_mstat.h"
+
+struct rcar_gen3_dbsc_qos_settings d3_qos[] = {
+ /* BUFCAM settings */
+ { DBSC_DBCAM0CNF1, 0x00043218 },
+ { DBSC_DBCAM0CNF2, 0x000000F4 },
+ { DBSC_DBSCHCNT0, 0x000F0037 },
+ { DBSC_DBSCHSZ0, 0x00000001 },
+ { DBSC_DBSCHRW0, 0x22421111 },
+
+ /* DDR3 */
+ { DBSC_SCFCTST2, 0x012F1123 },
+
+ /* QoS Settings */
+ { DBSC_DBSCHQOS00, 0x00000F00 },
+ { DBSC_DBSCHQOS01, 0x00000B00 },
+ { DBSC_DBSCHQOS02, 0x00000000 },
+ { DBSC_DBSCHQOS03, 0x00000000 },
+ { DBSC_DBSCHQOS40, 0x00000300 },
+ { DBSC_DBSCHQOS41, 0x000002F0 },
+ { DBSC_DBSCHQOS42, 0x00000200 },
+ { DBSC_DBSCHQOS43, 0x00000100 },
+ { DBSC_DBSCHQOS90, 0x00000300 },
+ { DBSC_DBSCHQOS91, 0x000002F0 },
+ { DBSC_DBSCHQOS92, 0x00000200 },
+ { DBSC_DBSCHQOS93, 0x00000100 },
+ { DBSC_DBSCHQOS130, 0x00000100 },
+ { DBSC_DBSCHQOS131, 0x000000F0 },
+ { DBSC_DBSCHQOS132, 0x000000A0 },
+ { DBSC_DBSCHQOS133, 0x00000040 },
+ { DBSC_DBSCHQOS140, 0x000000C0 },
+ { DBSC_DBSCHQOS141, 0x000000B0 },
+ { DBSC_DBSCHQOS142, 0x00000080 },
+ { DBSC_DBSCHQOS143, 0x00000040 },
+ { DBSC_DBSCHQOS150, 0x00000040 },
+ { DBSC_DBSCHQOS151, 0x00000030 },
+ { DBSC_DBSCHQOS152, 0x00000020 },
+ { DBSC_DBSCHQOS153, 0x00000010 },
+};
+
+void qos_init_d3(void)
+{
+ rcar_qos_dbsc_setting(d3_qos, ARRAY_SIZE(d3_qos), true);
+
+ /* DRAM Split Address mapping */
+#if RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_4CH
+ ERROR("DRAM Split 4ch not supported.(D3)");
+ panic();
+#elif RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_2CH
+ ERROR("DRAM Split 2ch not supported.(D3)");
+ panic();
+#elif RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_AUTO
+ ERROR("DRAM Split Auto not supported.(D3)");
+ panic();
+#elif RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_LINEAR
+/* NOTICE("BL2: DRAM Split is OFF\n"); */
+ /* Split setting(DDR 1ch) */
+ io_write_32(AXI_ADSPLCR0, 0x00000000U);
+ io_write_32(AXI_ADSPLCR3, 0x00000000U);
+#else
+ ERROR("DRAM split is an invalid value.(D3)");
+ panic();
+#endif
+
+#if !(RCAR_QOS_TYPE == RCAR_QOS_NONE)
+#if RCAR_QOS_TYPE == RCAR_QOS_TYPE_DEFAULT
+ NOTICE("BL2: QoS is default setting(%s)\n", RCAR_QOS_VERSION);
+#endif
+
+ /* Resource Alloc setting */
+ io_write_32(QOSCTRL_RAS, 0x00000020U);
+ io_write_32(QOSCTRL_FIXTH, 0x000F0005U);
+ io_write_32(QOSCTRL_RAEN, 0x00000001U);
+ io_write_32(QOSCTRL_REGGD, 0x00000000U);
+ io_write_64(QOSCTRL_DANN, 0x0404020002020201U);
+ io_write_32(QOSCTRL_DANT, 0x00100804U);
+ io_write_32(QOSCTRL_EC, 0x00000000U);
+ io_write_64(QOSCTRL_EMS, 0x0000000000000000U);
+ io_write_32(QOSCTRL_FSS, 0x0000000AU);
+ io_write_32(QOSCTRL_INSFC, 0xC7840001U);
+ io_write_32(QOSCTRL_BERR, 0x00000000U);
+ io_write_32(QOSCTRL_EARLYR, 0x00000000U);
+ io_write_32(QOSCTRL_RACNT0, 0x00010003U);
+ io_write_32(QOSCTRL_STATGEN0, 0x00000000U);
+
+ /* GPU setting */
+ io_write_32(0xFD812030U, 0x00000000U);
+
+ /* QOSBW setting */
+ io_write_32(QOSCTRL_SL_INIT, 0x030500ACU);
+ io_write_32(QOSCTRL_REF_ARS, 0x00780000U);
+
+ /* QOSBW SRAM setting */
+ uint32_t i;
+
+ for (i = 0U; i < ARRAY_SIZE(mstat_fix); i++) {
+ io_write_64(QOSBW_FIX_QOS_BANK0 + i * 8, mstat_fix[i]);
+ io_write_64(QOSBW_FIX_QOS_BANK1 + i * 8, mstat_fix[i]);
+ }
+ for (i = 0U; i < ARRAY_SIZE(mstat_be); i++) {
+ io_write_64(QOSBW_BE_QOS_BANK0 + i * 8, mstat_be[i]);
+ io_write_64(QOSBW_BE_QOS_BANK1 + i * 8, mstat_be[i]);
+ }
+
+ /* 3DG bus Leaf setting */
+ io_write_32(GPU_ACT_GRD, 0x00001234U);
+ io_write_32(GPU_ACT0, 0x00000000U);
+ io_write_32(GPU_ACT1, 0x00000000U);
+ io_write_32(GPU_ACT2, 0x00000000U);
+ io_write_32(GPU_ACT3, 0x00000000U);
+
+ /* RT bus Leaf setting */
+ io_write_32(CPU_ACT0, 0x00000003U);
+ io_write_32(CPU_ACT1, 0x00000003U);
+ io_write_32(RT_ACT0, 0x00000000U);
+ io_write_32(RT_ACT1, 0x00000000U);
+
+ /* Resource Alloc start */
+ io_write_32(QOSCTRL_RAEN, 0x00000001U);
+
+ /* QOSBW start */
+ io_write_32(QOSCTRL_STATQC, 0x00000001U);
+#else
+ NOTICE("BL2: QoS is None\n");
+
+ /* Resource Alloc setting */
+ io_write_32(QOSCTRL_EC, 0x00000000U);
+ /* Resource Alloc start */
+ io_write_32(QOSCTRL_RAEN, 0x00000001U);
+#endif /* !(RCAR_QOS_TYPE == RCAR_QOS_NONE) */
+}
diff --git a/drivers/renesas/rcar/qos/D3/qos_init_d3.h b/drivers/renesas/rcar/qos/D3/qos_init_d3.h
new file mode 100644
index 0000000..968ee7a
--- /dev/null
+++ b/drivers/renesas/rcar/qos/D3/qos_init_d3.h
@@ -0,0 +1,13 @@
+/*
+ * Copyright (c) 2015-2017, Renesas Electronics Corporation
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef QOS_INIT_H_D3__
+#define QOS_INIT_H_D3__
+
+void qos_init_d3(void);
+
+#endif /* QOS_INIT_H_D3__ */
diff --git a/drivers/renesas/rcar/qos/D3/qos_init_d3_mstat.h b/drivers/renesas/rcar/qos/D3/qos_init_d3_mstat.h
new file mode 100644
index 0000000..cbf1f65
--- /dev/null
+++ b/drivers/renesas/rcar/qos/D3/qos_init_d3_mstat.h
@@ -0,0 +1,244 @@
+/*
+ * Copyright (c) 2015-2019, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#if RCAR_QOS_TYPE == RCAR_QOS_TYPE_DEFAULT
+static const uint64_t mstat_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x001004340000FFFFUL,
+ /* 0x0038, */ 0x001004140000FFFFUL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x00140B030000FFFFUL,
+ /* 0x0060, */ 0x001408610000FFFFUL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x001410620000FFFFUL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00A0, */ 0x000C041C0000FFFFUL,
+ /* 0x00A8, */ 0x000C04090000FFFFUL,
+ /* 0x00B0, */ 0x000C04110000FFFFUL,
+ /* 0x00B8, */ 0x0000000000000000UL,
+ /* 0x00C0, */ 0x000C041C0000FFFFUL,
+ /* 0x00C8, */ 0x000C04090000FFFFUL,
+ /* 0x00D0, */ 0x000C04110000FFFFUL,
+ /* 0x00D8, */ 0x0000000000000000UL,
+ /* 0x00E0, */ 0x0000000000000000UL,
+ /* 0x00E8, */ 0x0000000000000000UL,
+ /* 0x00F0, */ 0x001018570000FFFFUL,
+ /* 0x00F8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x001008570000FFFFUL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x001008520000FFFFUL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x00100CA30000FFFFUL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01A0, */ 0x0000000000000000UL,
+ /* 0x01A8, */ 0x0000000000000000UL,
+ /* 0x01B0, */ 0x0000000000000000UL,
+ /* 0x01B8, */ 0x0000000000000000UL,
+ /* 0x01C0, */ 0x0000000000000000UL,
+ /* 0x01C8, */ 0x0000000000000000UL,
+ /* 0x01D0, */ 0x0000000000000000UL,
+ /* 0x01D8, */ 0x0000000000000000UL,
+ /* 0x01E0, */ 0x0000000000000000UL,
+ /* 0x01E8, */ 0x000C04020000FFFFUL,
+ /* 0x01F0, */ 0x0000000000000000UL,
+ /* 0x01F8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x000C04090000FFFFUL,
+ /* 0x0210, */ 0x0000000000000000UL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x001410040000FFFFUL,
+ /* 0x0270, */ 0x001404020000FFFFUL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x001410040000FFFFUL,
+ /* 0x0298, */ 0x001404020000FFFFUL,
+ /* 0x02A0, */ 0x000C04050000FFFFUL,
+ /* 0x02A8, */ 0x000C04050000FFFFUL,
+ /* 0x02B0, */ 0x0000000000000000UL,
+ /* 0x02B8, */ 0x0000000000000000UL,
+ /* 0x02C0, */ 0x0000000000000000UL,
+ /* 0x02C8, */ 0x0000000000000000UL,
+ /* 0x02D0, */ 0x000C04050000FFFFUL,
+ /* 0x02D8, */ 0x000C04050000FFFFUL,
+ /* 0x02E0, */ 0x0000000000000000UL,
+ /* 0x02E8, */ 0x0000000000000000UL,
+ /* 0x02F0, */ 0x0000000000000000UL,
+ /* 0x02F8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0000000000000000UL,
+ /* 0x0370, */ 0x000C04020000FFFFUL,
+ /* 0x0378, */ 0x000C04020000FFFFUL,
+ /* 0x0380, */ 0x000C04090000FFFFUL,
+ /* 0x0388, */ 0x000C04090000FFFFUL,
+ /* 0x0390, */ 0x0000000000000000UL,
+};
+
+static const uint64_t mstat_be[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00A0, */ 0x0000000000000000UL,
+ /* 0x00A8, */ 0x0000000000000000UL,
+ /* 0x00B0, */ 0x0000000000000000UL,
+ /* 0x00B8, */ 0x0000000000000000UL,
+ /* 0x00C0, */ 0x0000000000000000UL,
+ /* 0x00C8, */ 0x0000000000000000UL,
+ /* 0x00D0, */ 0x0000000000000000UL,
+ /* 0x00D8, */ 0x0000000000000000UL,
+ /* 0x00E0, */ 0x0000000000000000UL,
+ /* 0x00E8, */ 0x0000000000000000UL,
+ /* 0x00F0, */ 0x0000000000000000UL,
+ /* 0x00F8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01A0, */ 0x0000000000000000UL,
+ /* 0x01A8, */ 0x0000000000000000UL,
+ /* 0x01B0, */ 0x0000000000000000UL,
+ /* 0x01B8, */ 0x0000000000000000UL,
+ /* 0x01C0, */ 0x00110090060FA001UL,
+ /* 0x01C8, */ 0x00110090060FA001UL,
+ /* 0x01D0, */ 0x0000000000000000UL,
+ /* 0x01D8, */ 0x0000000000000000UL,
+ /* 0x01E0, */ 0x0000000000000000UL,
+ /* 0x01E8, */ 0x0000000000000000UL,
+ /* 0x01F0, */ 0x0011001006004401UL,
+ /* 0x01F8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0011001006004401UL,
+ /* 0x0218, */ 0x0011001006009801UL,
+ /* 0x0220, */ 0x0011001006009801UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0011001006009801UL,
+ /* 0x0238, */ 0x0011001006009801UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02A0, */ 0x0000000000000000UL,
+ /* 0x02A8, */ 0x0000000000000000UL,
+ /* 0x02B0, */ 0x0000000000000000UL,
+ /* 0x02B8, */ 0x0011001006003401UL,
+ /* 0x02C0, */ 0x0000000000000000UL,
+ /* 0x02C8, */ 0x0000000000000000UL,
+ /* 0x02D0, */ 0x0000000000000000UL,
+ /* 0x02D8, */ 0x0000000000000000UL,
+ /* 0x02E0, */ 0x0000000000000000UL,
+ /* 0x02E8, */ 0x0011001006003401UL,
+ /* 0x02F0, */ 0x00110090060FA001UL,
+ /* 0x02F8, */ 0x00110090060FA001UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0012001006003401UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x00120090060FA001UL,
+ /* 0x0360, */ 0x00120090060FA001UL,
+ /* 0x0368, */ 0x0012001006003401UL,
+ /* 0x0370, */ 0x0000000000000000UL,
+ /* 0x0378, */ 0x0000000000000000UL,
+ /* 0x0380, */ 0x0000000000000000UL,
+ /* 0x0388, */ 0x0000000000000000UL,
+ /* 0x0390, */ 0x0012001006003401UL,
+};
+#endif
+
diff --git a/drivers/renesas/rcar/qos/E3/qos_init_e3_v10.c b/drivers/renesas/rcar/qos/E3/qos_init_e3_v10.c
new file mode 100644
index 0000000..6f4c66c
--- /dev/null
+++ b/drivers/renesas/rcar/qos/E3/qos_init_e3_v10.c
@@ -0,0 +1,142 @@
+/*
+ * Copyright (c) 2018-2019, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <stdint.h>
+
+#include <common/debug.h>
+
+#include "../qos_common.h"
+#include "../qos_reg.h"
+#include "qos_init_e3_v10.h"
+
+#define RCAR_QOS_VERSION "rev.0.05"
+
+#define REF_ARS_ARBSTOPCYCLE_E3 (((SL_INIT_SSLOTCLK_E3) - 5U) << 16U)
+
+#if RCAR_QOS_TYPE == RCAR_QOS_TYPE_DEFAULT
+
+#if RCAR_REF_INT == RCAR_REF_DEFAULT
+#include "qos_init_e3_v10_mstat390.h"
+#else
+#include "qos_init_e3_v10_mstat780.h"
+#endif
+
+#endif
+
+struct rcar_gen3_dbsc_qos_settings e3_qos[] = {
+ /* BUFCAM settings */
+ { DBSC_DBCAM0CNF1, 0x00043218 },
+ { DBSC_DBCAM0CNF2, 0x000000F4 },
+ { DBSC_DBSCHCNT0, 0x000F0037 },
+ { DBSC_DBSCHSZ0, 0x00000001 },
+ { DBSC_DBSCHRW0, 0x22421111 },
+
+ /* DDR3 */
+ { DBSC_SCFCTST2, 0x012F1123 },
+
+ /* QoS Settings */
+ { DBSC_DBSCHQOS00, 0x00000F00 },
+ { DBSC_DBSCHQOS01, 0x00000B00 },
+ { DBSC_DBSCHQOS02, 0x00000000 },
+ { DBSC_DBSCHQOS03, 0x00000000 },
+ { DBSC_DBSCHQOS40, 0x00000300 },
+ { DBSC_DBSCHQOS41, 0x000002F0 },
+ { DBSC_DBSCHQOS42, 0x00000200 },
+ { DBSC_DBSCHQOS43, 0x00000100 },
+ { DBSC_DBSCHQOS90, 0x00000100 },
+ { DBSC_DBSCHQOS91, 0x000000F0 },
+ { DBSC_DBSCHQOS92, 0x000000A0 },
+ { DBSC_DBSCHQOS93, 0x00000040 },
+ { DBSC_DBSCHQOS130, 0x00000100 },
+ { DBSC_DBSCHQOS131, 0x000000F0 },
+ { DBSC_DBSCHQOS132, 0x000000A0 },
+ { DBSC_DBSCHQOS133, 0x00000040 },
+ { DBSC_DBSCHQOS140, 0x000000C0 },
+ { DBSC_DBSCHQOS141, 0x000000B0 },
+ { DBSC_DBSCHQOS142, 0x00000080 },
+ { DBSC_DBSCHQOS143, 0x00000040 },
+ { DBSC_DBSCHQOS150, 0x00000040 },
+ { DBSC_DBSCHQOS151, 0x00000030 },
+ { DBSC_DBSCHQOS152, 0x00000020 },
+ { DBSC_DBSCHQOS153, 0x00000010 },
+};
+
+void qos_init_e3_v10(void)
+{
+ rcar_qos_dbsc_setting(e3_qos, ARRAY_SIZE(e3_qos), true);
+
+ /* DRAM Split Address mapping */
+#if RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_4CH
+#if RCAR_LSI == RCAR_E3
+#error "Don't set DRAM Split 4ch(E3)"
+#else
+ ERROR("DRAM Split 4ch not supported.(E3)");
+ panic();
+#endif
+#elif (RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_2CH)
+#if RCAR_LSI == RCAR_E3
+#error "Don't set DRAM Split 2ch(E3)"
+#else
+ ERROR("DRAM Split 2ch not supported.(E3)");
+ panic();
+#endif
+#else
+ NOTICE("BL2: DRAM Split is OFF\n");
+#endif
+
+#if !(RCAR_QOS_TYPE == RCAR_QOS_NONE)
+#if RCAR_QOS_TYPE == RCAR_QOS_TYPE_DEFAULT
+ NOTICE("BL2: QoS is default setting(%s)\n", RCAR_QOS_VERSION);
+#endif
+
+#if RCAR_REF_INT == RCAR_REF_DEFAULT
+ NOTICE("BL2: DRAM refresh interval 3.9 usec\n");
+#else
+ NOTICE("BL2: DRAM refresh interval 7.8 usec\n");
+#endif
+
+ io_write_32(QOSCTRL_RAS, 0x00000020U);
+ io_write_64(QOSCTRL_DANN, 0x0404020002020201UL);
+ io_write_32(QOSCTRL_DANT, 0x00100804U);
+ io_write_32(QOSCTRL_FSS, 0x0000000AU);
+ io_write_32(QOSCTRL_INSFC, 0x06330001U);
+ io_write_32(QOSCTRL_EARLYR, 0x00000000U);
+ io_write_32(QOSCTRL_RACNT0, 0x00010003U);
+
+ io_write_32(QOSCTRL_SL_INIT,
+ SL_INIT_REFFSSLOT | SL_INIT_SLOTSSLOT |
+ SL_INIT_SSLOTCLK_E3);
+ io_write_32(QOSCTRL_REF_ARS, REF_ARS_ARBSTOPCYCLE_E3);
+
+ /* QOSBW SRAM setting */
+ uint32_t i;
+
+ for (i = 0U; i < ARRAY_SIZE(mstat_fix); i++) {
+ io_write_64(QOSBW_FIX_QOS_BANK0 + i * 8, mstat_fix[i]);
+ io_write_64(QOSBW_FIX_QOS_BANK1 + i * 8, mstat_fix[i]);
+ }
+ for (i = 0U; i < ARRAY_SIZE(mstat_be); i++) {
+ io_write_64(QOSBW_BE_QOS_BANK0 + i * 8, mstat_be[i]);
+ io_write_64(QOSBW_BE_QOS_BANK1 + i * 8, mstat_be[i]);
+ }
+
+ /* RT bus Leaf setting */
+ io_write_32(RT_ACT0, 0x00000000U);
+ io_write_32(RT_ACT1, 0x00000000U);
+
+ /* CCI bus Leaf setting */
+ io_write_32(CPU_ACT0, 0x00000003U);
+ io_write_32(CPU_ACT1, 0x00000003U);
+
+ io_write_32(QOSCTRL_RAEN, 0x00000001U);
+
+ io_write_32(QOSCTRL_STATQC, 0x00000001U);
+#else
+ NOTICE("BL2: QoS is None\n");
+
+ io_write_32(QOSCTRL_RAEN, 0x00000001U);
+#endif
+}
diff --git a/drivers/renesas/rcar/qos/E3/qos_init_e3_v10.h b/drivers/renesas/rcar/qos/E3/qos_init_e3_v10.h
new file mode 100644
index 0000000..2c1d8c5
--- /dev/null
+++ b/drivers/renesas/rcar/qos/E3/qos_init_e3_v10.h
@@ -0,0 +1,12 @@
+/*
+ * Copyright (c) 2018, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef QOS_INIT_E3_V10_H
+#define QOS_INIT_E3_V10_H
+
+void qos_init_e3_v10(void);
+
+#endif /* QOS_INIT_E3_V10_H */
diff --git a/drivers/renesas/rcar/qos/E3/qos_init_e3_v10_mstat390.h b/drivers/renesas/rcar/qos/E3/qos_init_e3_v10_mstat390.h
new file mode 100644
index 0000000..d7f9d14
--- /dev/null
+++ b/drivers/renesas/rcar/qos/E3/qos_init_e3_v10_mstat390.h
@@ -0,0 +1,241 @@
+/*
+ * Copyright (c) 2018, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+static uint64_t mstat_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x001008620000FFFFUL,
+ /* 0x0038, */ 0x001008620000FFFFUL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x001415260000FFFFUL,
+ /* 0x0060, */ 0x001415260000FFFFUL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x001414930000FFFFUL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x000C08380000FFFFUL,
+ /* 0x00a8, */ 0x000C04110000FFFFUL,
+ /* 0x00b0, */ 0x000C04150000FFFFUL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x000C08380000FFFFUL,
+ /* 0x00c8, */ 0x000C04110000FFFFUL,
+ /* 0x00d0, */ 0x000C04150000FFFFUL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x001018580000FFFFUL,
+ /* 0x00f8, */ 0x000C084F0000FFFFUL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x001008580000FFFFUL,
+ /* 0x0118, */ 0x000C21E40000FFFFUL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x001008530000FFFFUL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x00100C960000FFFFUL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x001008530000FFFFUL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0010042A0000FFFFUL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x00101D8D0000FFFFUL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x001008530000FFFFUL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x000C04010000FFFFUL,
+ /* 0x01c8, */ 0x000C04010000FFFFUL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x000C04020000FFFFUL,
+ /* 0x01f0, */ 0x000C04090000FFFFUL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x000C04090000FFFFUL,
+ /* 0x0210, */ 0x000C04090000FFFFUL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x000C0C2A0000FFFFUL,
+ /* 0x0268, */ 0x001410040000FFFFUL,
+ /* 0x0270, */ 0x001404020000FFFFUL,
+ /* 0x0278, */ 0x000C08110000FFFFUL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x001410040000FFFFUL,
+ /* 0x0298, */ 0x001404020000FFFFUL,
+ /* 0x02a0, */ 0x000C04090000FFFFUL,
+ /* 0x02a8, */ 0x000C04090000FFFFUL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x000C04020000FFFFUL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x000C04090000FFFFUL,
+ /* 0x02d8, */ 0x000C04090000FFFFUL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x000C04020000FFFFUL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0000000000000000UL,
+ /* 0x0370, */ 0x000C04020000FFFFUL,
+ /* 0x0378, */ 0x000C04020000FFFFUL,
+ /* 0x0380, */ 0x000C04090000FFFFUL,
+ /* 0x0388, */ 0x000C04090000FFFFUL,
+ /* 0x0390, */ 0x0000000000000000UL,
+};
+
+static uint64_t mstat_be[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0012001005F03401UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x0021060005FFFC01UL,
+ /* 0x01c8, */ 0x0021060005FFFC01UL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0021010005F79801UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0021010005F79801UL,
+ /* 0x0218, */ 0x0011010005F79801UL,
+ /* 0x0220, */ 0x0011010005F79801UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0011010005F79801UL,
+ /* 0x0238, */ 0x0011010005F79801UL,
+ /* 0x0240, */ 0x0012010005F79801UL,
+ /* 0x0248, */ 0x0011010005F79801UL,
+ /* 0x0250, */ 0x0012010005F79801UL,
+ /* 0x0258, */ 0x0011010005F79801UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0011060005FFFC01UL,
+ /* 0x02f8, */ 0x0011060005FFFC01UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0012001005F03401UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0012060005FFFC01UL,
+ /* 0x0360, */ 0x0012060005FFFC01UL,
+ /* 0x0368, */ 0x0012001005F03401UL,
+ /* 0x0370, */ 0x0000000000000000UL,
+ /* 0x0378, */ 0x0000000000000000UL,
+ /* 0x0380, */ 0x0000000000000000UL,
+ /* 0x0388, */ 0x0000000000000000UL,
+ /* 0x0390, */ 0x0012001005F03401UL,
+};
diff --git a/drivers/renesas/rcar/qos/E3/qos_init_e3_v10_mstat780.h b/drivers/renesas/rcar/qos/E3/qos_init_e3_v10_mstat780.h
new file mode 100644
index 0000000..439cafe
--- /dev/null
+++ b/drivers/renesas/rcar/qos/E3/qos_init_e3_v10_mstat780.h
@@ -0,0 +1,241 @@
+/*
+ * Copyright (c) 2018, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+static uint64_t mstat_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x001010C40000FFFFUL,
+ /* 0x0038, */ 0x001010C40000FFFFUL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x00142A4B0000FFFFUL,
+ /* 0x0060, */ 0x00142A4B0000FFFFUL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x001429260000FFFFUL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x000C10700000FFFFUL,
+ /* 0x00a8, */ 0x000C08210000FFFFUL,
+ /* 0x00b0, */ 0x000C082A0000FFFFUL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x000C10700000FFFFUL,
+ /* 0x00c8, */ 0x000C08210000FFFFUL,
+ /* 0x00d0, */ 0x000C082A0000FFFFUL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x00102CAF0000FFFFUL,
+ /* 0x00f8, */ 0x000C0C9D0000FFFFUL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x00100CAF0000FFFFUL,
+ /* 0x0118, */ 0x000C43C80000FFFFUL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x00100CA50000FFFFUL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0010152C0000FFFFUL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x00100CA50000FFFFUL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x001008530000FFFFUL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x001037190000FFFFUL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x00100CA50000FFFFUL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x000C04010000FFFFUL,
+ /* 0x01c8, */ 0x000C04010000FFFFUL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x000C04040000FFFFUL,
+ /* 0x01f0, */ 0x000C08110000FFFFUL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x000C04110000FFFFUL,
+ /* 0x0210, */ 0x000C08110000FFFFUL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x000C18530000FFFFUL,
+ /* 0x0268, */ 0x00141C070000FFFFUL,
+ /* 0x0270, */ 0x001404040000FFFFUL,
+ /* 0x0278, */ 0x000C0C210000FFFFUL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x00141C070000FFFFUL,
+ /* 0x0298, */ 0x001404040000FFFFUL,
+ /* 0x02a0, */ 0x000C04110000FFFFUL,
+ /* 0x02a8, */ 0x000C04110000FFFFUL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x000C04040000FFFFUL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x000C04110000FFFFUL,
+ /* 0x02d8, */ 0x000C04110000FFFFUL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x000C04040000FFFFUL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0000000000000000UL,
+ /* 0x0370, */ 0x000C04040000FFFFUL,
+ /* 0x0378, */ 0x000C04040000FFFFUL,
+ /* 0x0380, */ 0x000C04110000FFFFUL,
+ /* 0x0388, */ 0x000C04110000FFFFUL,
+ /* 0x0390, */ 0x0000000000000000UL,
+};
+
+static uint64_t mstat_be[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0012001002F03401UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x0021060002FFFC01UL,
+ /* 0x01c8, */ 0x0021060002FFFC01UL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0021010002F3CC01UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0021010002F3CC01UL,
+ /* 0x0218, */ 0x0011010002F3CC01UL,
+ /* 0x0220, */ 0x0011010002F3CC01UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0011010002F3CC01UL,
+ /* 0x0238, */ 0x0011010002F3CC01UL,
+ /* 0x0240, */ 0x0012010002F3CC01UL,
+ /* 0x0248, */ 0x0011010002F3CC01UL,
+ /* 0x0250, */ 0x0012010002F3CC01UL,
+ /* 0x0258, */ 0x0011010002F3CC01UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0011060002FFFC01UL,
+ /* 0x02f8, */ 0x0011060002FFFC01UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0012001002F03401UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0012060002FFFC01UL,
+ /* 0x0360, */ 0x0012060002FFFC01UL,
+ /* 0x0368, */ 0x0012001002F03401UL,
+ /* 0x0370, */ 0x0000000000000000UL,
+ /* 0x0378, */ 0x0000000000000000UL,
+ /* 0x0380, */ 0x0000000000000000UL,
+ /* 0x0388, */ 0x0000000000000000UL,
+ /* 0x0390, */ 0x0012001002F03401UL,
+};
diff --git a/drivers/renesas/rcar/qos/H3/qos_init_h3_v10.c b/drivers/renesas/rcar/qos/H3/qos_init_h3_v10.c
new file mode 100644
index 0000000..1fb43a7
--- /dev/null
+++ b/drivers/renesas/rcar/qos/H3/qos_init_h3_v10.c
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2015-2019, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <stdint.h>
+
+#include <common/debug.h>
+
+#include "../qos_common.h"
+#include "../qos_reg.h"
+#include "qos_init_h3_v10.h"
+
+#define RCAR_QOS_VERSION "rev.0.36"
+
+#include "qos_init_h3_v10_mstat.h"
+
+void qos_init_h3_v10(void)
+{
+ /* DRAM Split Address mapping */
+#if (RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_4CH) || \
+ (RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_AUTO)
+ NOTICE("BL2: DRAM Split is 4ch\n");
+ io_write_32(AXI_ADSPLCR0, ADSPLCR0_ADRMODE_DEFAULT
+ | ADSPLCR0_SPLITSEL(0xFFU)
+ | ADSPLCR0_AREA(0x1BU)
+ | ADSPLCR0_SWP);
+ io_write_32(AXI_ADSPLCR1, 0x00000000U);
+ io_write_32(AXI_ADSPLCR2, 0xA8A90000U);
+ io_write_32(AXI_ADSPLCR3, 0x00000000U);
+#elif RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_2CH
+ NOTICE("BL2: DRAM Split is 2ch\n");
+ io_write_32(AXI_ADSPLCR0, 0x00000000U);
+ io_write_32(AXI_ADSPLCR1, ADSPLCR0_ADRMODE_DEFAULT
+ | ADSPLCR0_SPLITSEL(0xFFU)
+ | ADSPLCR0_AREA(0x1BU)
+ | ADSPLCR0_SWP);
+ io_write_32(AXI_ADSPLCR2, 0x00000000U);
+ io_write_32(AXI_ADSPLCR3, 0x00000000U);
+#else
+ NOTICE("BL2: DRAM Split is OFF\n");
+#endif
+
+#if !(RCAR_QOS_TYPE == RCAR_QOS_NONE)
+#if RCAR_QOS_TYPE == RCAR_QOS_TYPE_DEFAULT
+ NOTICE("BL2: QoS is default setting(%s)\n", RCAR_QOS_VERSION);
+#endif
+
+ /* AR Cache setting */
+ io_write_32(0xE67D1000U, 0x00000100U);
+ io_write_32(0xE67D1008U, 0x00000100U);
+
+ /* Resource Alloc setting */
+ io_write_32(QOSCTRL_RAS, 0x00000040U);
+ io_write_32(QOSCTRL_FIXTH, 0x000F0005U);
+ io_write_32(QOSCTRL_REGGD, 0x00000004U);
+ io_write_64(QOSCTRL_DANN, 0x0202000004040404UL);
+ io_write_32(QOSCTRL_DANT, 0x003C1110U);
+ io_write_32(QOSCTRL_EC, 0x00080001U); /* need for H3 v1.* */
+ io_write_64(QOSCTRL_EMS, 0x0000000000000000UL);
+ io_write_32(QOSCTRL_INSFC, 0xC7840001U);
+ io_write_32(QOSCTRL_BERR, 0x00000000U);
+
+ /* QOSBW setting */
+ io_write_32(QOSCTRL_SL_INIT,
+ SL_INIT_REFFSSLOT | SL_INIT_SLOTSSLOT | SL_INIT_SSLOTCLK);
+ io_write_32(QOSCTRL_REF_ARS, 0x00330000U);
+
+ /* QOSBW SRAM setting */
+ uint32_t i;
+
+ for (i = 0U; i < ARRAY_SIZE(mstat_fix); i++) {
+ io_write_64(QOSBW_FIX_QOS_BANK0 + i * 8, mstat_fix[i]);
+ io_write_64(QOSBW_FIX_QOS_BANK1 + i * 8, mstat_fix[i]);
+ }
+ for (i = 0U; i < ARRAY_SIZE(mstat_be); i++) {
+ io_write_64(QOSBW_BE_QOS_BANK0 + i * 8, mstat_be[i]);
+ io_write_64(QOSBW_BE_QOS_BANK1 + i * 8, mstat_be[i]);
+ }
+
+ /* 3DG bus Leaf setting */
+ io_write_32(0xFD820808U, 0x00001234U);
+ io_write_32(0xFD820800U, 0x0000003FU);
+ io_write_32(0xFD821800U, 0x0000003FU);
+ io_write_32(0xFD822800U, 0x0000003FU);
+ io_write_32(0xFD823800U, 0x0000003FU);
+ io_write_32(0xFD824800U, 0x0000003FU);
+ io_write_32(0xFD825800U, 0x0000003FU);
+ io_write_32(0xFD826800U, 0x0000003FU);
+ io_write_32(0xFD827800U, 0x0000003FU);
+
+ /* Resource Alloc start */
+ io_write_32(QOSCTRL_RAEN, 0x00000001U);
+
+ /* QOSBW start */
+ io_write_32(QOSCTRL_STATQC, 0x00000001U);
+#else
+ NOTICE("BL2: QoS is None\n");
+
+ /* Resource Alloc setting */
+ io_write_32(QOSCTRL_EC, 0x00080001U); /* need for H3 v1.* */
+#endif /* !(RCAR_QOS_TYPE == RCAR_QOS_NONE) */
+}
diff --git a/drivers/renesas/rcar/qos/H3/qos_init_h3_v10.h b/drivers/renesas/rcar/qos/H3/qos_init_h3_v10.h
new file mode 100644
index 0000000..f96182a
--- /dev/null
+++ b/drivers/renesas/rcar/qos/H3/qos_init_h3_v10.h
@@ -0,0 +1,12 @@
+/*
+ * Copyright (c) 2015-2017, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef QOS_INIT_H3_V10_H
+#define QOS_INIT_H3_V10_H
+
+void qos_init_h3_v10(void);
+
+#endif /* QOS_INIT_H3_V10_H */
diff --git a/drivers/renesas/rcar/qos/H3/qos_init_h3_v10_mstat.h b/drivers/renesas/rcar/qos/H3/qos_init_h3_v10_mstat.h
new file mode 100644
index 0000000..fe63236
--- /dev/null
+++ b/drivers/renesas/rcar/qos/H3/qos_init_h3_v10_mstat.h
@@ -0,0 +1,221 @@
+/*
+ * Copyright (c) 2015-2019, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#if RCAR_QOS_TYPE == RCAR_QOS_TYPE_DEFAULT
+static const uint64_t mstat_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x00140C050000FFFFUL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x001404030000FFFFUL,
+ /* 0x0060, */ 0x001408060000FFFFUL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x00140C050000FFFFUL,
+ /* 0x0090, */ 0x001408060000FFFFUL,
+ /* 0x0098, */ 0x001404020000FFFFUL,
+ /* 0x00A0, */ 0x0000000000000000UL,
+ /* 0x00A8, */ 0x0000000000000000UL,
+ /* 0x00B0, */ 0x0000000000000000UL,
+ /* 0x00B8, */ 0x0000000000000000UL,
+ /* 0x00C0, */ 0x0000000000000000UL,
+ /* 0x00C8, */ 0x0000000000000000UL,
+ /* 0x00D0, */ 0x0000000000000000UL,
+ /* 0x00D8, */ 0x0000000000000000UL,
+ /* 0x00E0, */ 0x0000000000000000UL,
+ /* 0x00E8, */ 0x0000000000000000UL,
+ /* 0x00F0, */ 0x0000000000000000UL,
+ /* 0x00F8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x001004020000FFFFUL,
+ /* 0x0140, */ 0x001004020000FFFFUL,
+ /* 0x0148, */ 0x001004020000FFFFUL,
+ /* 0x0150, */ 0x001008050000FFFFUL,
+ /* 0x0158, */ 0x001008050000FFFFUL,
+ /* 0x0160, */ 0x001008050000FFFFUL,
+ /* 0x0168, */ 0x001008050000FFFFUL,
+ /* 0x0170, */ 0x001008050000FFFFUL,
+ /* 0x0178, */ 0x001004030000FFFFUL,
+ /* 0x0180, */ 0x001004030000FFFFUL,
+ /* 0x0188, */ 0x001004030000FFFFUL,
+ /* 0x0190, */ 0x001014140000FFFFUL,
+ /* 0x0198, */ 0x001014140000FFFFUL,
+ /* 0x01A0, */ 0x001008060000FFFFUL,
+ /* 0x01A8, */ 0x001008060000FFFFUL,
+ /* 0x01B0, */ 0x001008060000FFFFUL,
+ /* 0x01B8, */ 0x0000000000000000UL,
+ /* 0x01C0, */ 0x0000000000000000UL,
+ /* 0x01C8, */ 0x0000000000000000UL,
+ /* 0x01D0, */ 0x0000000000000000UL,
+ /* 0x01D8, */ 0x0000000000000000UL,
+ /* 0x01E0, */ 0x0000000000000000UL,
+ /* 0x01E8, */ 0x0000000000000000UL,
+ /* 0x01F0, */ 0x0000000000000000UL,
+ /* 0x01F8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0000000000000000UL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02A0, */ 0x0000000000000000UL,
+ /* 0x02A8, */ 0x0000000000000000UL,
+ /* 0x02B0, */ 0x0000000000000000UL,
+ /* 0x02B8, */ 0x0000000000000000UL,
+ /* 0x02C0, */ 0x0000000000000000UL,
+ /* 0x02C8, */ 0x0000000000000000UL,
+ /* 0x02D0, */ 0x0000000000000000UL,
+ /* 0x02D8, */ 0x0000000000000000UL,
+ /* 0x02E0, */ 0x0000000000000000UL,
+ /* 0x02E8, */ 0x0000000000000000UL,
+ /* 0x02F0, */ 0x0000000000000000UL,
+ /* 0x02F8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+};
+
+static const uint64_t mstat_be[] = {
+ /* 0x0000, */ 0x001000100C8FFC01UL,
+ /* 0x0008, */ 0x001000100C8FFC01UL,
+ /* 0x0010, */ 0x001000100C8FFC01UL,
+ /* 0x0018, */ 0x001000100C8FFC01UL,
+ /* 0x0020, */ 0x001000100C8FFC01UL,
+ /* 0x0028, */ 0x001000100C8FFC01UL,
+ /* 0x0030, */ 0x001000100C8FFC01UL,
+ /* 0x0038, */ 0x001000100C8FFC01UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x001000100C8FFC01UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x001000100C8FFC01UL,
+ /* 0x0070, */ 0x001000100C8FFC01UL,
+ /* 0x0078, */ 0x001000100C8FFC01UL,
+ /* 0x0080, */ 0x001000100C8FFC01UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00A0, */ 0x001000100C8FFC01UL,
+ /* 0x00A8, */ 0x001000100C8FFC01UL,
+ /* 0x00B0, */ 0x001000100C8FFC01UL,
+ /* 0x00B8, */ 0x001000100C8FFC01UL,
+ /* 0x00C0, */ 0x001000100C8FFC01UL,
+ /* 0x00C8, */ 0x001000100C8FFC01UL,
+ /* 0x00D0, */ 0x001000100C8FFC01UL,
+ /* 0x00D8, */ 0x002000200C8FFC01UL,
+ /* 0x00E0, */ 0x002000200C8FFC01UL,
+ /* 0x00E8, */ 0x001000100C8FFC01UL,
+ /* 0x00F0, */ 0x001000100C8FFC01UL,
+ /* 0x00F8, */ 0x001000100C8FFC01UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x002000200C8FFC01UL,
+ /* 0x0110, */ 0x001000100C8FFC01UL,
+ /* 0x0118, */ 0x001000100C8FFC01UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x002000200C8FFC01UL,
+ /* 0x0130, */ 0x001000100C8FFC01UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01A0, */ 0x0000000000000000UL,
+ /* 0x01A8, */ 0x0000000000000000UL,
+ /* 0x01B0, */ 0x0000000000000000UL,
+ /* 0x01B8, */ 0x001000100C8FFC01UL,
+ /* 0x01C0, */ 0x001000200C8FFC01UL,
+ /* 0x01C8, */ 0x001000200C8FFC01UL,
+ /* 0x01D0, */ 0x001000200C8FFC01UL,
+ /* 0x01D8, */ 0x001000200C8FFC01UL,
+ /* 0x01E0, */ 0x001000100C8FFC01UL,
+ /* 0x01E8, */ 0x001000100C8FFC01UL,
+ /* 0x01F0, */ 0x001000100C8FFC01UL,
+ /* 0x01F8, */ 0x001000100C8FFC01UL,
+ /* 0x0200, */ 0x001000100C8FFC01UL,
+ /* 0x0208, */ 0x001000100C8FFC01UL,
+ /* 0x0210, */ 0x001000100C8FFC01UL,
+ /* 0x0218, */ 0x001000100C8FFC01UL,
+ /* 0x0220, */ 0x001000100C8FFC01UL,
+ /* 0x0228, */ 0x001000100C8FFC01UL,
+ /* 0x0230, */ 0x001000100C8FFC01UL,
+ /* 0x0238, */ 0x001000100C8FFC01UL,
+ /* 0x0240, */ 0x001000100C8FFC01UL,
+ /* 0x0248, */ 0x001000100C8FFC01UL,
+ /* 0x0250, */ 0x001000100C8FFC01UL,
+ /* 0x0258, */ 0x001000100C8FFC01UL,
+ /* 0x0260, */ 0x001000100C8FFC01UL,
+ /* 0x0268, */ 0x001000100C8FFC01UL,
+ /* 0x0270, */ 0x001000100C8FFC01UL,
+ /* 0x0278, */ 0x001000100C8FFC01UL,
+ /* 0x0280, */ 0x001000100C8FFC01UL,
+ /* 0x0288, */ 0x001000100C8FFC01UL,
+ /* 0x0290, */ 0x001000100C8FFC01UL,
+ /* 0x0298, */ 0x001000100C8FFC01UL,
+ /* 0x02A0, */ 0x001000100C8FFC01UL,
+ /* 0x02A8, */ 0x001000100C8FFC01UL,
+ /* 0x02B0, */ 0x001000100C8FFC01UL,
+ /* 0x02B8, */ 0x001000100C8FFC01UL,
+ /* 0x02C0, */ 0x001000100C8FFC01UL,
+ /* 0x02C8, */ 0x001000100C8FFC01UL,
+ /* 0x02D0, */ 0x001000100C8FFC01UL,
+ /* 0x02D8, */ 0x001000100C8FFC01UL,
+ /* 0x02E0, */ 0x001000100C8FFC01UL,
+ /* 0x02E8, */ 0x001000100C8FFC01UL,
+ /* 0x02F0, */ 0x001000200C8FFC01UL,
+ /* 0x02F8, */ 0x001000300C8FFC01UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x001000200C8FFC01UL,
+ /* 0x0310, */ 0x001000300C8FFC01UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x001000200C8FFC01UL,
+ /* 0x0328, */ 0x001000300C8FFC01UL,
+ /* 0x0330, */ 0x001000200C8FFC01UL,
+ /* 0x0338, */ 0x001000300C8FFC01UL,
+};
+#endif
diff --git a/drivers/renesas/rcar/qos/H3/qos_init_h3_v11.c b/drivers/renesas/rcar/qos/H3/qos_init_h3_v11.c
new file mode 100644
index 0000000..329bcb8
--- /dev/null
+++ b/drivers/renesas/rcar/qos/H3/qos_init_h3_v11.c
@@ -0,0 +1,200 @@
+/*
+ * Copyright (c) 2015-2019, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <stdint.h>
+
+#include <common/debug.h>
+
+#include <rcar_def.h>
+
+#include "../qos_common.h"
+#include "../qos_reg.h"
+#include "qos_init_h3_v11.h"
+
+#define RCAR_QOS_VERSION "rev.0.37"
+
+#include "qos_init_h3_v11_mstat.h"
+
+struct rcar_gen3_dbsc_qos_settings h3_v11_qos[] = {
+ /* BUFCAM settings */
+ /* DBSC_DBCAM0CNF0 not set */
+ { DBSC_DBCAM0CNF1, 0x00044218 },
+ { DBSC_DBCAM0CNF2, 0x000000F4 },
+ /* DBSC_DBCAM0CNF3 not set */
+ { DBSC_DBSCHCNT0, 0x080F0037 },
+ { DBSC_DBSCHCNT1, 0x00001010 },
+ { DBSC_DBSCHSZ0, 0x00000001 },
+ { DBSC_DBSCHRW0, 0x22421111 },
+
+ /* DDR3 */
+ { DBSC_SCFCTST2, 0x012F1123 },
+
+ /* QoS Settings */
+ { DBSC_DBSCHQOS00, 0x0000F000 },
+ { DBSC_DBSCHQOS01, 0x0000E000 },
+ { DBSC_DBSCHQOS02, 0x00007000 },
+ { DBSC_DBSCHQOS03, 0x00000000 },
+ { DBSC_DBSCHQOS40, 0x00000E00 },
+ { DBSC_DBSCHQOS41, 0x00000DFF },
+ { DBSC_DBSCHQOS42, 0x00000400 },
+ { DBSC_DBSCHQOS43, 0x00000200 },
+ { DBSC_DBSCHQOS90, 0x00000C00 },
+ { DBSC_DBSCHQOS91, 0x00000BFF },
+ { DBSC_DBSCHQOS92, 0x00000400 },
+ { DBSC_DBSCHQOS93, 0x00000200 },
+ { DBSC_DBSCHQOS130, 0x00000980 },
+ { DBSC_DBSCHQOS131, 0x0000097F },
+ { DBSC_DBSCHQOS132, 0x00000300 },
+ { DBSC_DBSCHQOS133, 0x00000180 },
+ { DBSC_DBSCHQOS140, 0x00000800 },
+ { DBSC_DBSCHQOS141, 0x000007FF },
+ { DBSC_DBSCHQOS142, 0x00000300 },
+ { DBSC_DBSCHQOS143, 0x00000180 },
+ { DBSC_DBSCHQOS150, 0x000007D0 },
+ { DBSC_DBSCHQOS151, 0x000007CF },
+ { DBSC_DBSCHQOS152, 0x000005D0 },
+ { DBSC_DBSCHQOS153, 0x000003D0 },
+};
+
+void qos_init_h3_v11(void)
+{
+ rcar_qos_dbsc_setting(h3_v11_qos, ARRAY_SIZE(h3_v11_qos), false);
+
+ /* DRAM Split Address mapping */
+#if (RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_4CH) || \
+ (RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_AUTO)
+ NOTICE("BL2: DRAM Split is 4ch\n");
+ io_write_32(AXI_ADSPLCR0, ADSPLCR0_ADRMODE_DEFAULT
+ | ADSPLCR0_SPLITSEL(0xFFU)
+ | ADSPLCR0_AREA(0x1BU)
+ | ADSPLCR0_SWP);
+ io_write_32(AXI_ADSPLCR1, 0x00000000U);
+ io_write_32(AXI_ADSPLCR2, 0xA8A90000U);
+ io_write_32(AXI_ADSPLCR3, 0x00000000U);
+#elif RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_2CH
+ NOTICE("BL2: DRAM Split is 2ch\n");
+ io_write_32(AXI_ADSPLCR0, 0x00000000U);
+ io_write_32(AXI_ADSPLCR1, ADSPLCR0_ADRMODE_DEFAULT
+ | ADSPLCR0_SPLITSEL(0xFFU)
+ | ADSPLCR0_AREA(0x1BU)
+ | ADSPLCR0_SWP);
+ io_write_32(AXI_ADSPLCR2, 0x00000000U);
+ io_write_32(AXI_ADSPLCR3, 0x00000000U);
+#else
+ NOTICE("BL2: DRAM Split is OFF\n");
+#endif
+
+#if !(RCAR_QOS_TYPE == RCAR_QOS_NONE)
+#if RCAR_QOS_TYPE == RCAR_QOS_TYPE_DEFAULT
+ NOTICE("BL2: QoS is default setting(%s)\n", RCAR_QOS_VERSION);
+#endif
+
+ /* AR Cache setting */
+ io_write_32(0xE67D1000U, 0x00000100U);
+ io_write_32(0xE67D1008U, 0x00000100U);
+
+ /* Resource Alloc setting */
+#if RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_2CH
+ io_write_32(QOSCTRL_RAS, 0x00000020U);
+#else
+ io_write_32(QOSCTRL_RAS, 0x00000040U);
+#endif
+ io_write_32(QOSCTRL_FIXTH, 0x000F0005U);
+ io_write_32(QOSCTRL_REGGD, 0x00000000U);
+#if RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_2CH
+ io_write_64(QOSCTRL_DANN, 0x0101010102020201UL);
+ io_write_32(QOSCTRL_DANT, 0x00181008U);
+#else
+ io_write_64(QOSCTRL_DANN, 0x0101000004040401UL);
+ io_write_32(QOSCTRL_DANT, 0x003C2010U);
+#endif
+ io_write_32(QOSCTRL_EC, 0x00080001U); /* need for H3 v1.* */
+ io_write_64(QOSCTRL_EMS, 0x0000000000000000UL);
+ io_write_32(QOSCTRL_INSFC, 0xC7840001U);
+ io_write_32(QOSCTRL_BERR, 0x00000000U);
+ io_write_32(QOSCTRL_RACNT0, 0x00000000U);
+
+ /* QOSBW setting */
+ io_write_32(QOSCTRL_SL_INIT,
+ SL_INIT_REFFSSLOT | SL_INIT_SLOTSSLOT | SL_INIT_SSLOTCLK);
+ io_write_32(QOSCTRL_REF_ARS, 0x00330000U);
+
+ /* QOSBW SRAM setting */
+ uint32_t i;
+
+ for (i = 0U; i < ARRAY_SIZE(mstat_fix); i++) {
+ io_write_64(QOSBW_FIX_QOS_BANK0 + i * 8, mstat_fix[i]);
+ io_write_64(QOSBW_FIX_QOS_BANK1 + i * 8, mstat_fix[i]);
+ }
+ for (i = 0U; i < ARRAY_SIZE(mstat_be); i++) {
+ io_write_64(QOSBW_BE_QOS_BANK0 + i * 8, mstat_be[i]);
+ io_write_64(QOSBW_BE_QOS_BANK1 + i * 8, mstat_be[i]);
+ }
+
+ /* 3DG bus Leaf setting */
+ io_write_32(0xFD820808U, 0x00001234U);
+ io_write_32(0xFD820800U, 0x0000003FU);
+ io_write_32(0xFD821800U, 0x0000003FU);
+ io_write_32(0xFD822800U, 0x0000003FU);
+ io_write_32(0xFD823800U, 0x0000003FU);
+ io_write_32(0xFD824800U, 0x0000003FU);
+ io_write_32(0xFD825800U, 0x0000003FU);
+ io_write_32(0xFD826800U, 0x0000003FU);
+ io_write_32(0xFD827800U, 0x0000003FU);
+
+ /* VIO bus Leaf setting */
+ io_write_32(0xFEB89800, 0x00000001U);
+ io_write_32(0xFEB8A800, 0x00000001U);
+ io_write_32(0xFEB8B800, 0x00000001U);
+ io_write_32(0xFEB8C800, 0x00000001U);
+
+ /* HSC bus Leaf setting */
+ io_write_32(0xE6430800, 0x00000001U);
+ io_write_32(0xE6431800, 0x00000001U);
+ io_write_32(0xE6432800, 0x00000001U);
+ io_write_32(0xE6433800, 0x00000001U);
+
+ /* MP bus Leaf setting */
+ io_write_32(0xEC620800, 0x00000001U);
+ io_write_32(0xEC621800, 0x00000001U);
+
+ /* PERIE bus Leaf setting */
+ io_write_32(0xE7760800, 0x00000001U);
+ io_write_32(0xE7768800, 0x00000001U);
+
+ /* PERIW bus Leaf setting */
+ io_write_32(0xE6760800, 0x00000001U);
+ io_write_32(0xE6768800, 0x00000001U);
+
+ /* RT bus Leaf setting */
+ io_write_32(0xFFC50800, 0x00000001U);
+ io_write_32(0xFFC51800, 0x00000001U);
+
+ /* CCI bus Leaf setting */
+ uint32_t modemr = io_read_32(RCAR_MODEMR);
+
+ modemr &= MODEMR_BOOT_CPU_MASK;
+
+ if ((modemr == MODEMR_BOOT_CPU_CA57) ||
+ (modemr == MODEMR_BOOT_CPU_CA53)) {
+ io_write_32(0xF1300800, 0x00000001U);
+ io_write_32(0xF1340800, 0x00000001U);
+ io_write_32(0xF1380800, 0x00000001U);
+ io_write_32(0xF13C0800, 0x00000001U);
+ }
+
+ /* Resource Alloc start */
+ io_write_32(QOSCTRL_RAEN, 0x00000001U);
+
+ /* QOSBW start */
+ io_write_32(QOSCTRL_STATQC, 0x00000001U);
+#else
+ NOTICE("BL2: QoS is None\n");
+
+ /* Resource Alloc setting */
+ io_write_32(QOSCTRL_EC, 0x00080001U); /* need for H3 v1.* */
+#endif /* !(RCAR_QOS_TYPE == RCAR_QOS_NONE) */
+}
diff --git a/drivers/renesas/rcar/qos/H3/qos_init_h3_v11.h b/drivers/renesas/rcar/qos/H3/qos_init_h3_v11.h
new file mode 100644
index 0000000..3faeb4f
--- /dev/null
+++ b/drivers/renesas/rcar/qos/H3/qos_init_h3_v11.h
@@ -0,0 +1,12 @@
+/*
+ * Copyright (c) 2015-2017, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef QOS_INIT_H3_V11_H
+#define QOS_INIT_H3_V11_H
+
+void qos_init_h3_v11(void);
+
+#endif /* QOS_INIT_H3_V11_H */
diff --git a/drivers/renesas/rcar/qos/H3/qos_init_h3_v11_mstat.h b/drivers/renesas/rcar/qos/H3/qos_init_h3_v11_mstat.h
new file mode 100644
index 0000000..46c68c8
--- /dev/null
+++ b/drivers/renesas/rcar/qos/H3/qos_init_h3_v11_mstat.h
@@ -0,0 +1,221 @@
+/*
+ * Copyright (c) 2015-2019, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#if RCAR_QOS_TYPE == RCAR_QOS_TYPE_DEFAULT
+static const uint64_t mstat_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x001004030000FFFFUL,
+ /* 0x0038, */ 0x001008060000FFFFUL,
+ /* 0x0040, */ 0x001414090000FFFFUL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x001410010000FFFFUL,
+ /* 0x0058, */ 0x00140C0C0000FFFFUL,
+ /* 0x0060, */ 0x00140C0C0000FFFFUL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x001410010000FFFFUL,
+ /* 0x0078, */ 0x001008060000FFFFUL,
+ /* 0x0080, */ 0x001004020000FFFFUL,
+ /* 0x0088, */ 0x001414090000FFFFUL,
+ /* 0x0090, */ 0x00140C0C0000FFFFUL,
+ /* 0x0098, */ 0x001408080000FFFFUL,
+ /* 0x00A0, */ 0x000C08020000FFFFUL,
+ /* 0x00A8, */ 0x000C04010000FFFFUL,
+ /* 0x00B0, */ 0x000C04010000FFFFUL,
+ /* 0x00B8, */ 0x0000000000000000UL,
+ /* 0x00C0, */ 0x000C08020000FFFFUL,
+ /* 0x00C8, */ 0x000C04010000FFFFUL,
+ /* 0x00D0, */ 0x000C04010000FFFFUL,
+ /* 0x00D8, */ 0x000C04030000FFFFUL,
+ /* 0x00E0, */ 0x000C100F0000FFFFUL,
+ /* 0x00E8, */ 0x0000000000000000UL,
+ /* 0x00F0, */ 0x001010080000FFFFUL,
+ /* 0x00F8, */ 0x001010080000FFFFUL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x000C04030000FFFFUL,
+ /* 0x0110, */ 0x001010080000FFFFUL,
+ /* 0x0118, */ 0x001010080000FFFFUL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x000C100E0000FFFFUL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x001008050000FFFFUL,
+ /* 0x0140, */ 0x001008050000FFFFUL,
+ /* 0x0148, */ 0x001008050000FFFFUL,
+ /* 0x0150, */ 0x001008050000FFFFUL,
+ /* 0x0158, */ 0x001008050000FFFFUL,
+ /* 0x0160, */ 0x001008050000FFFFUL,
+ /* 0x0168, */ 0x001008050000FFFFUL,
+ /* 0x0170, */ 0x001008050000FFFFUL,
+ /* 0x0178, */ 0x001004030000FFFFUL,
+ /* 0x0180, */ 0x001004030000FFFFUL,
+ /* 0x0188, */ 0x001004030000FFFFUL,
+ /* 0x0190, */ 0x001014140000FFFFUL,
+ /* 0x0198, */ 0x001014140000FFFFUL,
+ /* 0x01A0, */ 0x001008050000FFFFUL,
+ /* 0x01A8, */ 0x001008050000FFFFUL,
+ /* 0x01B0, */ 0x001008050000FFFFUL,
+ /* 0x01B8, */ 0x0000000000000000UL,
+ /* 0x01C0, */ 0x0000000000000000UL,
+ /* 0x01C8, */ 0x0000000000000000UL,
+ /* 0x01D0, */ 0x0000000000000000UL,
+ /* 0x01D8, */ 0x0000000000000000UL,
+ /* 0x01E0, */ 0x0000000000000000UL,
+ /* 0x01E8, */ 0x0000000000000000UL,
+ /* 0x01F0, */ 0x0000000000000000UL,
+ /* 0x01F8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0000000000000000UL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x001408010000FFFFUL,
+ /* 0x0270, */ 0x001404010000FFFFUL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x001408010000FFFFUL,
+ /* 0x0298, */ 0x001404010000FFFFUL,
+ /* 0x02A0, */ 0x000C04010000FFFFUL,
+ /* 0x02A8, */ 0x000C04010000FFFFUL,
+ /* 0x02B0, */ 0x001404010000FFFFUL,
+ /* 0x02B8, */ 0x0000000000000000UL,
+ /* 0x02C0, */ 0x0000000000000000UL,
+ /* 0x02C8, */ 0x0000000000000000UL,
+ /* 0x02D0, */ 0x000C04010000FFFFUL,
+ /* 0x02D8, */ 0x000C04010000FFFFUL,
+ /* 0x02E0, */ 0x001404010000FFFFUL,
+ /* 0x02E8, */ 0x0000000000000000UL,
+ /* 0x02F0, */ 0x0000000000000000UL,
+ /* 0x02F8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+};
+
+static const uint64_t mstat_be[] = {
+ /* 0x0000, */ 0x001200100C89C401UL,
+ /* 0x0008, */ 0x001200100C89C401UL,
+ /* 0x0010, */ 0x001200100C89C401UL,
+ /* 0x0018, */ 0x001200100C89C401UL,
+ /* 0x0020, */ 0x001100100C803401UL,
+ /* 0x0028, */ 0x001100100C80FC01UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x001100100C803401UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00A0, */ 0x0000000000000000UL,
+ /* 0x00A8, */ 0x0000000000000000UL,
+ /* 0x00B0, */ 0x0000000000000000UL,
+ /* 0x00B8, */ 0x001100100C803401UL,
+ /* 0x00C0, */ 0x0000000000000000UL,
+ /* 0x00C8, */ 0x0000000000000000UL,
+ /* 0x00D0, */ 0x0000000000000000UL,
+ /* 0x00D8, */ 0x0000000000000000UL,
+ /* 0x00E0, */ 0x0000000000000000UL,
+ /* 0x00E8, */ 0x001100100C803401UL,
+ /* 0x00F0, */ 0x0000000000000000UL,
+ /* 0x00F8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x001100100C803401UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01A0, */ 0x0000000000000000UL,
+ /* 0x01A8, */ 0x0000000000000000UL,
+ /* 0x01B0, */ 0x0000000000000000UL,
+ /* 0x01B8, */ 0x001100100C803401UL,
+ /* 0x01C0, */ 0x001100800C8FFC01UL,
+ /* 0x01C8, */ 0x001100800C8FFC01UL,
+ /* 0x01D0, */ 0x001100800C8FFC01UL,
+ /* 0x01D8, */ 0x001100800C8FFC01UL,
+ /* 0x01E0, */ 0x001100100C80FC01UL,
+ /* 0x01E8, */ 0x001200100C80FC01UL,
+ /* 0x01F0, */ 0x001100100C80FC01UL,
+ /* 0x01F8, */ 0x001100100C803401UL,
+ /* 0x0200, */ 0x001100100C80FC01UL,
+ /* 0x0208, */ 0x001200100C80FC01UL,
+ /* 0x0210, */ 0x001100100C80FC01UL,
+ /* 0x0218, */ 0x001100100C825801UL,
+ /* 0x0220, */ 0x001100100C825801UL,
+ /* 0x0228, */ 0x001100100C803401UL,
+ /* 0x0230, */ 0x001100100C825801UL,
+ /* 0x0238, */ 0x001100100C825801UL,
+ /* 0x0240, */ 0x001200100C8BB801UL,
+ /* 0x0248, */ 0x001100200C8FFC01UL,
+ /* 0x0250, */ 0x001200100C8BB801UL,
+ /* 0x0258, */ 0x001100200C8FFC01UL,
+ /* 0x0260, */ 0x001100100C84E401UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x001100100C81F401UL,
+ /* 0x0280, */ 0x001100100C803401UL,
+ /* 0x0288, */ 0x001100100C803401UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02A0, */ 0x0000000000000000UL,
+ /* 0x02A8, */ 0x0000000000000000UL,
+ /* 0x02B0, */ 0x0000000000000000UL,
+ /* 0x02B8, */ 0x001100100C803401UL,
+ /* 0x02C0, */ 0x001100100C803401UL,
+ /* 0x02C8, */ 0x001100100C803401UL,
+ /* 0x02D0, */ 0x0000000000000000UL,
+ /* 0x02D8, */ 0x0000000000000000UL,
+ /* 0x02E0, */ 0x0000000000000000UL,
+ /* 0x02E8, */ 0x001100100C803401UL,
+ /* 0x02F0, */ 0x001100300C8FFC01UL,
+ /* 0x02F8, */ 0x001100500C8FFC01UL,
+ /* 0x0300, */ 0x001100100C803401UL,
+ /* 0x0308, */ 0x001100300C8FFC01UL,
+ /* 0x0310, */ 0x001100500C8FFC01UL,
+ /* 0x0318, */ 0x001200100C803401UL,
+ /* 0x0320, */ 0x001100300C8FFC01UL,
+ /* 0x0328, */ 0x001100500C8FFC01UL,
+ /* 0x0330, */ 0x001100300C8FFC01UL,
+ /* 0x0338, */ 0x001100500C8FFC01UL,
+};
+#endif
diff --git a/drivers/renesas/rcar/qos/H3/qos_init_h3_v20.c b/drivers/renesas/rcar/qos/H3/qos_init_h3_v20.c
new file mode 100644
index 0000000..c20ab08
--- /dev/null
+++ b/drivers/renesas/rcar/qos/H3/qos_init_h3_v20.c
@@ -0,0 +1,234 @@
+/*
+ * Copyright (c) 2015-2019, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <stdint.h>
+
+#include <common/debug.h>
+
+#include "../qos_common.h"
+#include "../qos_reg.h"
+#include "qos_init_h3_v20.h"
+
+#define RCAR_QOS_VERSION "rev.0.21"
+
+#define QOSWT_TIME_BANK0 20000000U /* unit:ns */
+
+#define QOSWT_WTEN_ENABLE 0x1U
+
+#define QOSCTRL_REF_ARS_ARBSTOPCYCLE_H3_20 (SL_INIT_SSLOTCLK_H3_20 - 0x5U)
+
+#define OSWT_WTREF_SLOT0_EN_REQ1_SLOT 3U
+#define OSWT_WTREF_SLOT0_EN_REQ2_SLOT 9U
+#define QOSWT_WTREF_SLOT0_EN \
+ ((0x1U << OSWT_WTREF_SLOT0_EN_REQ1_SLOT) | \
+ (0x1U << OSWT_WTREF_SLOT0_EN_REQ2_SLOT))
+#define QOSWT_WTREF_SLOT1_EN \
+ ((0x1U << OSWT_WTREF_SLOT0_EN_REQ1_SLOT) | \
+ (0x1U << OSWT_WTREF_SLOT0_EN_REQ2_SLOT))
+
+#define QOSWT_WTSET0_REQ_SSLOT0 5U
+#define WT_BASE_SUB_SLOT_NUM0 12U
+#define QOSWT_WTSET0_PERIOD0_H3_20 \
+ ((QOSWT_TIME_BANK0 / QOSWT_WTSET0_CYCLE_H3_20) - 1U)
+#define QOSWT_WTSET0_SSLOT0 (QOSWT_WTSET0_REQ_SSLOT0 - 1U)
+#define QOSWT_WTSET0_SLOTSLOT0 (WT_BASE_SUB_SLOT_NUM0 - 1U)
+
+#define QOSWT_WTSET1_PERIOD1_H3_20 \
+ ((QOSWT_TIME_BANK0 / QOSWT_WTSET0_CYCLE_H3_20) - 1U)
+#define QOSWT_WTSET1_SSLOT1 (QOSWT_WTSET0_REQ_SSLOT0 - 1U)
+#define QOSWT_WTSET1_SLOTSLOT1 (WT_BASE_SUB_SLOT_NUM0 - 1U)
+
+#if RCAR_QOS_TYPE == RCAR_QOS_TYPE_DEFAULT
+
+#if RCAR_REF_INT == RCAR_REF_DEFAULT
+#include "qos_init_h3_v20_mstat195.h"
+#else
+#include "qos_init_h3_v20_mstat390.h"
+#endif
+
+#if RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE
+
+#if RCAR_REF_INT == RCAR_REF_DEFAULT
+#include "qos_init_h3_v20_qoswt195.h"
+#else
+#include "qos_init_h3_v20_qoswt390.h"
+#endif
+
+#endif /* RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE */
+
+#endif
+
+struct rcar_gen3_dbsc_qos_settings h3_v20_qos[] = {
+ /* BUFCAM settings */
+ { DBSC_DBCAM0CNF1, 0x00043218U },
+ { DBSC_DBCAM0CNF2, 0x000000F4U },
+ { DBSC_DBCAM0CNF3, 0x00000000U },
+ { DBSC_DBSCHCNT0, 0x000F0037U },
+ { DBSC_DBSCHSZ0, 0x00000001U },
+ { DBSC_DBSCHRW0, 0x22421111U },
+
+ /* DDR3 */
+ { DBSC_SCFCTST2, 0x012F1123U },
+
+ /* QoS Settings */
+ { DBSC_DBSCHQOS00, 0x00000F00U },
+ { DBSC_DBSCHQOS01, 0x00000B00U },
+ { DBSC_DBSCHQOS02, 0x00000000U },
+ { DBSC_DBSCHQOS03, 0x00000000U },
+ { DBSC_DBSCHQOS40, 0x00000300U },
+ { DBSC_DBSCHQOS41, 0x000002F0U },
+ { DBSC_DBSCHQOS42, 0x00000200U },
+ { DBSC_DBSCHQOS43, 0x00000100U },
+ { DBSC_DBSCHQOS90, 0x00000100U },
+ { DBSC_DBSCHQOS91, 0x000000F0U },
+ { DBSC_DBSCHQOS92, 0x000000A0U },
+ { DBSC_DBSCHQOS93, 0x00000040U },
+ { DBSC_DBSCHQOS120, 0x00000040U },
+ { DBSC_DBSCHQOS121, 0x00000030U },
+ { DBSC_DBSCHQOS122, 0x00000020U },
+ { DBSC_DBSCHQOS123, 0x00000010U },
+ { DBSC_DBSCHQOS130, 0x00000100U },
+ { DBSC_DBSCHQOS131, 0x000000F0U },
+ { DBSC_DBSCHQOS132, 0x000000A0U },
+ { DBSC_DBSCHQOS133, 0x00000040U },
+ { DBSC_DBSCHQOS140, 0x000000C0U },
+ { DBSC_DBSCHQOS141, 0x000000B0U },
+ { DBSC_DBSCHQOS142, 0x00000080U },
+ { DBSC_DBSCHQOS143, 0x00000040U },
+ { DBSC_DBSCHQOS150, 0x00000040U },
+ { DBSC_DBSCHQOS151, 0x00000030U },
+ { DBSC_DBSCHQOS152, 0x00000020U },
+ { DBSC_DBSCHQOS153, 0x00000010U },
+};
+
+void qos_init_h3_v20(void)
+{
+ rcar_qos_dbsc_setting(h3_v20_qos, ARRAY_SIZE(h3_v20_qos), true);
+
+ /* DRAM Split Address mapping */
+#if (RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_4CH) || \
+ (RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_AUTO)
+ NOTICE("BL2: DRAM Split is 4ch\n");
+ io_write_32(AXI_ADSPLCR0, ADSPLCR0_ADRMODE_DEFAULT
+ | ADSPLCR0_SPLITSEL(0xFFU)
+ | ADSPLCR0_AREA(0x1BU)
+ | ADSPLCR0_SWP);
+ io_write_32(AXI_ADSPLCR1, 0x00000000U);
+ io_write_32(AXI_ADSPLCR2, 0x00001054U);
+ io_write_32(AXI_ADSPLCR3, 0x00000000U);
+#elif RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_2CH
+ NOTICE("BL2: DRAM Split is 2ch\n");
+ io_write_32(AXI_ADSPLCR0, 0x00000000U);
+ io_write_32(AXI_ADSPLCR1, ADSPLCR0_ADRMODE_DEFAULT
+ | ADSPLCR0_SPLITSEL(0xFFU)
+ | ADSPLCR0_AREA(0x1BU)
+ | ADSPLCR0_SWP);
+ io_write_32(AXI_ADSPLCR2, 0x00001004U);
+ io_write_32(AXI_ADSPLCR3, 0x00000000U);
+#else
+ NOTICE("BL2: DRAM Split is OFF\n");
+#endif
+
+#if !(RCAR_QOS_TYPE == RCAR_QOS_NONE)
+#if RCAR_QOS_TYPE == RCAR_QOS_TYPE_DEFAULT
+ NOTICE("BL2: QoS is default setting(%s)\n", RCAR_QOS_VERSION);
+#endif
+
+#if RCAR_REF_INT == RCAR_REF_DEFAULT
+ NOTICE("BL2: DRAM refresh interval 1.95 usec\n");
+#else
+ NOTICE("BL2: DRAM refresh interval 3.9 usec\n");
+#endif
+
+#if RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE
+ NOTICE("BL2: Periodic Write DQ Training\n");
+#endif /* RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE */
+
+ io_write_32(QOSCTRL_RAS, 0x00000044U);
+ io_write_64(QOSCTRL_DANN, 0x0404010002020201UL);
+ io_write_32(QOSCTRL_DANT, 0x0020100AU);
+ io_write_32(QOSCTRL_INSFC, 0x06330001U);
+ io_write_32(QOSCTRL_RACNT0, 0x00010003U);
+
+ /* GPU Boost Mode */
+ io_write_32(QOSCTRL_STATGEN0, 0x00000001U);
+
+ io_write_32(QOSCTRL_SL_INIT,
+ SL_INIT_REFFSSLOT | SL_INIT_SLOTSSLOT |
+ SL_INIT_SSLOTCLK_H3_20);
+#if RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE
+ io_write_32(QOSCTRL_REF_ARS,
+ ((QOSCTRL_REF_ARS_ARBSTOPCYCLE_H3_20 << 16)));
+#else
+ io_write_32(QOSCTRL_REF_ARS, 0x00330000U);
+#endif /* RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE */
+
+ uint32_t i;
+
+ for (i = 0U; i < ARRAY_SIZE(mstat_fix); i++) {
+ io_write_64(QOSBW_FIX_QOS_BANK0 + i * 8, mstat_fix[i]);
+ io_write_64(QOSBW_FIX_QOS_BANK1 + i * 8, mstat_fix[i]);
+ }
+ for (i = 0U; i < ARRAY_SIZE(mstat_be); i++) {
+ io_write_64(QOSBW_BE_QOS_BANK0 + i * 8, mstat_be[i]);
+ io_write_64(QOSBW_BE_QOS_BANK1 + i * 8, mstat_be[i]);
+ }
+#if RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE
+ for (i = 0U; i < ARRAY_SIZE(qoswt_fix); i++) {
+ io_write_64(QOSWT_FIX_WTQOS_BANK0 + i * 8,
+ qoswt_fix[i]);
+ io_write_64(QOSWT_FIX_WTQOS_BANK1 + i * 8,
+ qoswt_fix[i]);
+ }
+ for (i = 0U; i < ARRAY_SIZE(qoswt_be); i++) {
+ io_write_64(QOSWT_BE_WTQOS_BANK0 + i * 8, qoswt_be[i]);
+ io_write_64(QOSWT_BE_WTQOS_BANK1 + i * 8, qoswt_be[i]);
+ }
+#endif /* RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE */
+
+ /* 3DG bus Leaf setting */
+ io_write_32(GPU_ACT0, 0x00000000U);
+ io_write_32(GPU_ACT1, 0x00000000U);
+ io_write_32(GPU_ACT2, 0x00000000U);
+ io_write_32(GPU_ACT3, 0x00000000U);
+ io_write_32(GPU_ACT4, 0x00000000U);
+ io_write_32(GPU_ACT5, 0x00000000U);
+ io_write_32(GPU_ACT6, 0x00000000U);
+ io_write_32(GPU_ACT7, 0x00000000U);
+
+ /* RT bus Leaf setting */
+ io_write_32(RT_ACT0, 0x00000000U);
+ io_write_32(RT_ACT1, 0x00000000U);
+
+ /* CCI bus Leaf setting */
+ io_write_32(CPU_ACT0, 0x00000003U);
+ io_write_32(CPU_ACT1, 0x00000003U);
+ io_write_32(CPU_ACT2, 0x00000003U);
+ io_write_32(CPU_ACT3, 0x00000003U);
+
+ io_write_32(QOSCTRL_RAEN, 0x00000001U);
+
+#if RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE
+ /* re-write training setting */
+ io_write_32(QOSWT_WTREF,
+ ((QOSWT_WTREF_SLOT1_EN << 16) | QOSWT_WTREF_SLOT0_EN));
+ io_write_32(QOSWT_WTSET0,
+ ((QOSWT_WTSET0_PERIOD0_H3_20 << 16) |
+ (QOSWT_WTSET0_SSLOT0 << 8) | QOSWT_WTSET0_SLOTSLOT0));
+ io_write_32(QOSWT_WTSET1,
+ ((QOSWT_WTSET1_PERIOD1_H3_20 << 16) |
+ (QOSWT_WTSET1_SSLOT1 << 8) | QOSWT_WTSET1_SLOTSLOT1));
+
+ io_write_32(QOSWT_WTEN, QOSWT_WTEN_ENABLE);
+#endif /* RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE */
+
+ io_write_32(QOSCTRL_STATQC, 0x00000001U);
+#else
+ NOTICE("BL2: QoS is None\n");
+
+ io_write_32(QOSCTRL_RAEN, 0x00000001U);
+#endif /* !(RCAR_QOS_TYPE == RCAR_QOS_NONE) */
+}
diff --git a/drivers/renesas/rcar/qos/H3/qos_init_h3_v20.h b/drivers/renesas/rcar/qos/H3/qos_init_h3_v20.h
new file mode 100644
index 0000000..9b7619e
--- /dev/null
+++ b/drivers/renesas/rcar/qos/H3/qos_init_h3_v20.h
@@ -0,0 +1,12 @@
+/*
+ * Copyright (c) 2015-2017, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef QOS_INIT_H3_V20_H
+#define QOS_INIT_H3_V20_H
+
+void qos_init_h3_v20(void);
+
+#endif /* QOS_INIT_H3_V20_H */
diff --git a/drivers/renesas/rcar/qos/H3/qos_init_h3_v20_mstat195.h b/drivers/renesas/rcar/qos/H3/qos_init_h3_v20_mstat195.h
new file mode 100644
index 0000000..3995df3
--- /dev/null
+++ b/drivers/renesas/rcar/qos/H3/qos_init_h3_v20_mstat195.h
@@ -0,0 +1,231 @@
+/*
+ * Copyright (c) 2018, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+static uint64_t mstat_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x001004040000FFFFUL,
+ /* 0x0038, */ 0x001008070000FFFFUL,
+ /* 0x0040, */ 0x001424110000FFFFUL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x001404010000FFFFUL,
+ /* 0x0058, */ 0x001410100000FFFFUL,
+ /* 0x0060, */ 0x0014100D0000FFFFUL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x001404010000FFFFUL,
+ /* 0x0078, */ 0x001008070000FFFFUL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x001424110000FFFFUL,
+ /* 0x0090, */ 0x0014100D0000FFFFUL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x000C04020000FFFFUL,
+ /* 0x00a8, */ 0x000C04010000FFFFUL,
+ /* 0x00b0, */ 0x000C04010000FFFFUL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x000C04020000FFFFUL,
+ /* 0x00c8, */ 0x000C04010000FFFFUL,
+ /* 0x00d0, */ 0x000C04010000FFFFUL,
+ /* 0x00d8, */ 0x001024090000FFFFUL,
+ /* 0x00e0, */ 0x00100C090000FFFFUL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x001024090000FFFFUL,
+ /* 0x00f8, */ 0x000C08070000FFFFUL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x00100C090000FFFFUL,
+ /* 0x0118, */ 0x000C10100000FFFFUL,
+ /* 0x0120, */ 0x000C10100000FFFFUL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x00100C0B0000FFFFUL,
+ /* 0x0140, */ 0x00100C0B0000FFFFUL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0010100D0000FFFFUL,
+ /* 0x0158, */ 0x0010100D0000FFFFUL,
+ /* 0x0160, */ 0x00100C0B0000FFFFUL,
+ /* 0x0168, */ 0x00100C0B0000FFFFUL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x001008060000FFFFUL,
+ /* 0x0180, */ 0x001008060000FFFFUL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x00102C2C0000FFFFUL,
+ /* 0x0198, */ 0x00102C2C0000FFFFUL,
+ /* 0x01a0, */ 0x00100C0B0000FFFFUL,
+ /* 0x01a8, */ 0x00100C0B0000FFFFUL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x000C04010000FFFFUL,
+ /* 0x01c8, */ 0x000C04010000FFFFUL,
+ /* 0x01d0, */ 0x000C04010000FFFFUL,
+ /* 0x01d8, */ 0x000C04010000FFFFUL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x000C04010000FFFFUL,
+ /* 0x01f0, */ 0x000C04010000FFFFUL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x000C04010000FFFFUL,
+ /* 0x0210, */ 0x000C04010000FFFFUL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x000C08020000FFFFUL,
+ /* 0x0268, */ 0x001408010000FFFFUL,
+ /* 0x0270, */ 0x001404010000FFFFUL,
+ /* 0x0278, */ 0x000C04010000FFFFUL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x001408010000FFFFUL,
+ /* 0x0298, */ 0x001404010000FFFFUL,
+ /* 0x02a0, */ 0x000C04010000FFFFUL,
+ /* 0x02a8, */ 0x000C04010000FFFFUL,
+ /* 0x02b0, */ 0x001408010000FFFFUL,
+ /* 0x02b8, */ 0x000C04010000FFFFUL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x000C04010000FFFFUL,
+ /* 0x02d8, */ 0x000C04010000FFFFUL,
+ /* 0x02e0, */ 0x001408010000FFFFUL,
+ /* 0x02e8, */ 0x000C04010000FFFFUL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0000000000000000UL,
+};
+
+static uint64_t mstat_be[] = {
+ /* 0x0000, */ 0x001200200BDFFC01UL,
+ /* 0x0008, */ 0x001200200BDFFC01UL,
+ /* 0x0010, */ 0x001200200BDFFC01UL,
+ /* 0x0018, */ 0x001200200BDFFC01UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x001200100BD0FC01UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x002100700BDFFC01UL,
+ /* 0x01c8, */ 0x002100700BDFFC01UL,
+ /* 0x01d0, */ 0x002100700BDFFC01UL,
+ /* 0x01d8, */ 0x002100700BDFFC01UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x002100200BDFFC01UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x002100200BDFFC01UL,
+ /* 0x0218, */ 0x001100200BDFFC01UL,
+ /* 0x0220, */ 0x001100200BDFFC01UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x001100200BDFFC01UL,
+ /* 0x0238, */ 0x001100200BDFFC01UL,
+ /* 0x0240, */ 0x001200200BDFFC01UL,
+ /* 0x0248, */ 0x001100200BDFFC01UL,
+ /* 0x0250, */ 0x001200200BDFFC01UL,
+ /* 0x0258, */ 0x001100200BDFFC01UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x001100400BDFFC01UL,
+ /* 0x02f8, */ 0x001100600BDFFC01UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x001100400BDFFC01UL,
+ /* 0x0310, */ 0x001100600BDFFC01UL,
+ /* 0x0318, */ 0x001200100BD03401UL,
+ /* 0x0320, */ 0x001100400BDFFC01UL,
+ /* 0x0328, */ 0x001100600BDFFC01UL,
+ /* 0x0330, */ 0x001100400BDFFC01UL,
+ /* 0x0338, */ 0x001100600BDFFC01UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x001200100BD0FC01UL,
+};
diff --git a/drivers/renesas/rcar/qos/H3/qos_init_h3_v20_mstat390.h b/drivers/renesas/rcar/qos/H3/qos_init_h3_v20_mstat390.h
new file mode 100644
index 0000000..770c022
--- /dev/null
+++ b/drivers/renesas/rcar/qos/H3/qos_init_h3_v20_mstat390.h
@@ -0,0 +1,231 @@
+/*
+ * Copyright (c) 2018, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+static uint64_t mstat_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x001008070000FFFFUL,
+ /* 0x0038, */ 0x0010100D0000FFFFUL,
+ /* 0x0040, */ 0x001444210000FFFFUL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x001404010000FFFFUL,
+ /* 0x0058, */ 0x0014201F0000FFFFUL,
+ /* 0x0060, */ 0x00141C190000FFFFUL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x001404010000FFFFUL,
+ /* 0x0078, */ 0x0010100D0000FFFFUL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x001444210000FFFFUL,
+ /* 0x0090, */ 0x00141C190000FFFFUL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x000C08040000FFFFUL,
+ /* 0x00a8, */ 0x000C04020000FFFFUL,
+ /* 0x00b0, */ 0x000C04020000FFFFUL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x000C08040000FFFFUL,
+ /* 0x00c8, */ 0x000C04020000FFFFUL,
+ /* 0x00d0, */ 0x000C04020000FFFFUL,
+ /* 0x00d8, */ 0x001044110000FFFFUL,
+ /* 0x00e0, */ 0x001014110000FFFFUL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x001044110000FFFFUL,
+ /* 0x00f8, */ 0x000C100D0000FFFFUL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x001014110000FFFFUL,
+ /* 0x0118, */ 0x000C20200000FFFFUL,
+ /* 0x0120, */ 0x000C20200000FFFFUL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x001018150000FFFFUL,
+ /* 0x0140, */ 0x001018150000FFFFUL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x00101C190000FFFFUL,
+ /* 0x0158, */ 0x00101C190000FFFFUL,
+ /* 0x0160, */ 0x001018150000FFFFUL,
+ /* 0x0168, */ 0x001018150000FFFFUL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x00100C0B0000FFFFUL,
+ /* 0x0180, */ 0x00100C0B0000FFFFUL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x001058570000FFFFUL,
+ /* 0x0198, */ 0x001058570000FFFFUL,
+ /* 0x01a0, */ 0x001018150000FFFFUL,
+ /* 0x01a8, */ 0x001018150000FFFFUL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x000C04010000FFFFUL,
+ /* 0x01c8, */ 0x000C04010000FFFFUL,
+ /* 0x01d0, */ 0x000C04010000FFFFUL,
+ /* 0x01d8, */ 0x000C04010000FFFFUL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x000C04010000FFFFUL,
+ /* 0x01f0, */ 0x000C04010000FFFFUL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x000C04010000FFFFUL,
+ /* 0x0210, */ 0x000C04010000FFFFUL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x000C0C030000FFFFUL,
+ /* 0x0268, */ 0x001410010000FFFFUL,
+ /* 0x0270, */ 0x001404010000FFFFUL,
+ /* 0x0278, */ 0x000C08020000FFFFUL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x001410010000FFFFUL,
+ /* 0x0298, */ 0x001404010000FFFFUL,
+ /* 0x02a0, */ 0x000C04010000FFFFUL,
+ /* 0x02a8, */ 0x000C04010000FFFFUL,
+ /* 0x02b0, */ 0x00140C010000FFFFUL,
+ /* 0x02b8, */ 0x000C04010000FFFFUL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x000C04010000FFFFUL,
+ /* 0x02d8, */ 0x000C04010000FFFFUL,
+ /* 0x02e0, */ 0x00140C010000FFFFUL,
+ /* 0x02e8, */ 0x000C04010000FFFFUL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0000000000000000UL,
+};
+
+static uint64_t mstat_be[] = {
+ /* 0x0000, */ 0x0012003005EFFC01UL,
+ /* 0x0008, */ 0x0012003005EFFC01UL,
+ /* 0x0010, */ 0x0012003005EFFC01UL,
+ /* 0x0018, */ 0x0012003005EFFC01UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0012001005E0FC01UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x002100D005EFFC01UL,
+ /* 0x01c8, */ 0x002100D005EFFC01UL,
+ /* 0x01d0, */ 0x002100D005EFFC01UL,
+ /* 0x01d8, */ 0x002100D005EFFC01UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0021003005EFFC01UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0021003005EFFC01UL,
+ /* 0x0218, */ 0x0011003005EFFC01UL,
+ /* 0x0220, */ 0x0011003005EFFC01UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0011003005EFFC01UL,
+ /* 0x0238, */ 0x0011003005EFFC01UL,
+ /* 0x0240, */ 0x0012003005EFFC01UL,
+ /* 0x0248, */ 0x0011003005EFFC01UL,
+ /* 0x0250, */ 0x0012003005EFFC01UL,
+ /* 0x0258, */ 0x0011003005EFFC01UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0011007005EFFC01UL,
+ /* 0x02f8, */ 0x001100B005EFFC01UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0011007005EFFC01UL,
+ /* 0x0310, */ 0x001100B005EFFC01UL,
+ /* 0x0318, */ 0x0012001005E03401UL,
+ /* 0x0320, */ 0x0011007005EFFC01UL,
+ /* 0x0328, */ 0x001100B005EFFC01UL,
+ /* 0x0330, */ 0x0011007005EFFC01UL,
+ /* 0x0338, */ 0x001100B005EFFC01UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0012001005E0FC01UL,
+};
diff --git a/drivers/renesas/rcar/qos/H3/qos_init_h3_v20_qoswt195.h b/drivers/renesas/rcar/qos/H3/qos_init_h3_v20_qoswt195.h
new file mode 100644
index 0000000..82e4b01
--- /dev/null
+++ b/drivers/renesas/rcar/qos/H3/qos_init_h3_v20_qoswt195.h
@@ -0,0 +1,231 @@
+/*
+ * Copyright (c) 2018, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+static uint64_t qoswt_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x001004040000C010UL,
+ /* 0x0038, */ 0x001008070000C010UL,
+ /* 0x0040, */ 0x001424110000FFF0UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x001410100000C010UL,
+ /* 0x0060, */ 0x0014100D0000C010UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x001008070000C010UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x001424110000FFF0UL,
+ /* 0x0090, */ 0x0014100D0000C010UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x0000000000000000UL,
+ /* 0x01c8, */ 0x0000000000000000UL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0000000000000000UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0000000000000000UL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x000C08020000FFF0UL,
+ /* 0x0268, */ 0x001408010000FFF0UL,
+ /* 0x0270, */ 0x001404010000FFF0UL,
+ /* 0x0278, */ 0x000C04010000FFF0UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x001408010000FFF0UL,
+ /* 0x0298, */ 0x001404010000FFF0UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0000000000000000UL,
+};
+
+static uint64_t qoswt_be[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x0000000000000000UL,
+ /* 0x01c8, */ 0x0000000000000000UL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0000000000000000UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0000000000000000UL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0000000000000000UL,
+};
diff --git a/drivers/renesas/rcar/qos/H3/qos_init_h3_v20_qoswt390.h b/drivers/renesas/rcar/qos/H3/qos_init_h3_v20_qoswt390.h
new file mode 100644
index 0000000..f3e7360
--- /dev/null
+++ b/drivers/renesas/rcar/qos/H3/qos_init_h3_v20_qoswt390.h
@@ -0,0 +1,231 @@
+/*
+ * Copyright (c) 2018, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+static uint64_t qoswt_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x001008070000C010UL,
+ /* 0x0038, */ 0x0010100D0000C010UL,
+ /* 0x0040, */ 0x001444210000FFF0UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0014201F0000C010UL,
+ /* 0x0060, */ 0x00141C190000C010UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0010100D0000C010UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x001444210000FFF0UL,
+ /* 0x0090, */ 0x00141C190000C010UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x0000000000000000UL,
+ /* 0x01c8, */ 0x0000000000000000UL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0000000000000000UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0000000000000000UL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x000C0C030000FFF0UL,
+ /* 0x0268, */ 0x001410010000FFF0UL,
+ /* 0x0270, */ 0x001404010000FFF0UL,
+ /* 0x0278, */ 0x000C08020000FFF0UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x001410010000FFF0UL,
+ /* 0x0298, */ 0x001404010000FFF0UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0000000000000000UL,
+};
+
+static uint64_t qoswt_be[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x0000000000000000UL,
+ /* 0x01c8, */ 0x0000000000000000UL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0000000000000000UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0000000000000000UL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0000000000000000UL,
+};
diff --git a/drivers/renesas/rcar/qos/H3/qos_init_h3_v30.c b/drivers/renesas/rcar/qos/H3/qos_init_h3_v30.c
new file mode 100644
index 0000000..1fe6182
--- /dev/null
+++ b/drivers/renesas/rcar/qos/H3/qos_init_h3_v30.c
@@ -0,0 +1,236 @@
+/*
+ * Copyright (c) 2018-2019, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <stdint.h>
+
+#include <common/debug.h>
+
+#include "../qos_common.h"
+#include "../qos_reg.h"
+#include "qos_init_h3_v30.h"
+
+#define RCAR_QOS_VERSION "rev.0.11"
+
+#define QOSWT_TIME_BANK0 20000000U /* unit:ns */
+
+#define QOSWT_WTEN_ENABLE 0x1U
+
+#define QOSCTRL_REF_ARS_ARBSTOPCYCLE_H3_30 (SL_INIT_SSLOTCLK_H3_30 - 0x5U)
+
+#define OSWT_WTREF_SLOT0_EN_REQ1_SLOT 3U
+#define OSWT_WTREF_SLOT0_EN_REQ2_SLOT 9U
+#define QOSWT_WTREF_SLOT0_EN \
+ ((0x1U << OSWT_WTREF_SLOT0_EN_REQ1_SLOT) | \
+ (0x1U << OSWT_WTREF_SLOT0_EN_REQ2_SLOT))
+#define QOSWT_WTREF_SLOT1_EN \
+ ((0x1U << OSWT_WTREF_SLOT0_EN_REQ1_SLOT) | \
+ (0x1U << OSWT_WTREF_SLOT0_EN_REQ2_SLOT))
+
+#define QOSWT_WTSET0_REQ_SSLOT0 5U
+#define WT_BASE_SUB_SLOT_NUM0 12U
+#define QOSWT_WTSET0_PERIOD0_H3_30 \
+ ((QOSWT_TIME_BANK0 / QOSWT_WTSET0_CYCLE_H3_30) - 1U)
+#define QOSWT_WTSET0_SSLOT0 (QOSWT_WTSET0_REQ_SSLOT0 - 1U)
+#define QOSWT_WTSET0_SLOTSLOT0 (WT_BASE_SUB_SLOT_NUM0 - 1U)
+
+#define QOSWT_WTSET1_PERIOD1_H3_30 (QOSWT_WTSET0_PERIOD0_H3_30)
+#define QOSWT_WTSET1_SSLOT1 (QOSWT_WTSET0_SSLOT0)
+#define QOSWT_WTSET1_SLOTSLOT1 (QOSWT_WTSET0_SLOTSLOT0)
+
+#if RCAR_QOS_TYPE == RCAR_QOS_TYPE_DEFAULT
+
+#if RCAR_REF_INT == RCAR_REF_DEFAULT
+#include "qos_init_h3_v30_mstat195.h"
+#else
+#include "qos_init_h3_v30_mstat390.h"
+#endif
+
+#if RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE
+
+#if RCAR_REF_INT == RCAR_REF_DEFAULT
+#include "qos_init_h3_v30_qoswt195.h"
+#else
+#include "qos_init_h3_v30_qoswt390.h"
+#endif
+
+#endif /* RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE */
+
+#endif
+
+struct rcar_gen3_dbsc_qos_settings h3_v30_qos[] = {
+ /* BUFCAM settings */
+ { DBSC_DBCAM0CNF1, 0x00043218U },
+ { DBSC_DBCAM0CNF2, 0x000000F4U },
+ { DBSC_DBCAM0CNF3, 0x00000000U },
+ { DBSC_DBSCHCNT0, 0x000F0037U },
+ { DBSC_DBSCHSZ0, 0x00000001U },
+ { DBSC_DBSCHRW0, 0x22421111U },
+
+ /* DDR3 */
+ { DBSC_SCFCTST2, 0x012F1123U },
+
+ /* QoS Settings */
+ { DBSC_DBSCHQOS00, 0x00000F00U },
+ { DBSC_DBSCHQOS01, 0x00000B00U },
+ { DBSC_DBSCHQOS02, 0x00000000U },
+ { DBSC_DBSCHQOS03, 0x00000000U },
+ { DBSC_DBSCHQOS40, 0x00000300U },
+ { DBSC_DBSCHQOS41, 0x000002F0U },
+ { DBSC_DBSCHQOS42, 0x00000200U },
+ { DBSC_DBSCHQOS43, 0x00000100U },
+ { DBSC_DBSCHQOS90, 0x00000100U },
+ { DBSC_DBSCHQOS91, 0x000000F0U },
+ { DBSC_DBSCHQOS92, 0x000000A0U },
+ { DBSC_DBSCHQOS93, 0x00000040U },
+ { DBSC_DBSCHQOS120, 0x00000040U },
+ { DBSC_DBSCHQOS121, 0x00000030U },
+ { DBSC_DBSCHQOS122, 0x00000020U },
+ { DBSC_DBSCHQOS123, 0x00000010U },
+ { DBSC_DBSCHQOS130, 0x00000100U },
+ { DBSC_DBSCHQOS131, 0x000000F0U },
+ { DBSC_DBSCHQOS132, 0x000000A0U },
+ { DBSC_DBSCHQOS133, 0x00000040U },
+ { DBSC_DBSCHQOS140, 0x000000C0U },
+ { DBSC_DBSCHQOS141, 0x000000B0U },
+ { DBSC_DBSCHQOS142, 0x00000080U },
+ { DBSC_DBSCHQOS143, 0x00000040U },
+ { DBSC_DBSCHQOS150, 0x00000040U },
+ { DBSC_DBSCHQOS151, 0x00000030U },
+ { DBSC_DBSCHQOS152, 0x00000020U },
+ { DBSC_DBSCHQOS153, 0x00000010U },
+};
+
+void qos_init_h3_v30(void)
+{
+ unsigned int split_area;
+
+ rcar_qos_dbsc_setting(h3_v30_qos, ARRAY_SIZE(h3_v30_qos), true);
+
+#if RCAR_DRAM_LPDDR4_MEMCONF == 0 /* 1GB */
+ split_area = 0x1BU;
+#else /* default 2GB */
+ split_area = 0x1CU;
+#endif
+
+ /* DRAM Split Address mapping */
+#if (RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_4CH) || \
+ (RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_AUTO)
+ NOTICE("BL2: DRAM Split is 4ch(DDR %x)\n", (int)qos_init_ddr_phyvalid);
+
+ io_write_32(AXI_ADSPLCR0, ADSPLCR0_ADRMODE_DEFAULT
+ | ADSPLCR0_SPLITSEL(0xFFU)
+ | ADSPLCR0_AREA(split_area)
+ | ADSPLCR0_SWP);
+ io_write_32(AXI_ADSPLCR1, 0x00000000U);
+ io_write_32(AXI_ADSPLCR2, 0x00001054U);
+ io_write_32(AXI_ADSPLCR3, 0x00000000U);
+#elif RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_2CH
+ NOTICE("BL2: DRAM Split is 2ch(DDR %x)\n", (int)qos_init_ddr_phyvalid);
+
+ io_write_32(AXI_ADSPLCR0, ADSPLCR0_AREA(split_area));
+ io_write_32(AXI_ADSPLCR1, ADSPLCR0_ADRMODE_DEFAULT
+ | ADSPLCR0_SPLITSEL(0xFFU)
+ | ADSPLCR0_AREA(split_area)
+ | ADSPLCR0_SWP);
+ io_write_32(AXI_ADSPLCR2, 0x00001004U);
+ io_write_32(AXI_ADSPLCR3, 0x00000000U);
+#else
+ io_write_32(AXI_ADSPLCR0, ADSPLCR0_AREA(split_area));
+ NOTICE("BL2: DRAM Split is OFF(DDR %x)\n", (int)qos_init_ddr_phyvalid);
+#endif
+
+#if !(RCAR_QOS_TYPE == RCAR_QOS_NONE)
+#if RCAR_QOS_TYPE == RCAR_QOS_TYPE_DEFAULT
+ NOTICE("BL2: QoS is default setting(%s)\n", RCAR_QOS_VERSION);
+#endif
+
+#if RCAR_REF_INT == RCAR_REF_DEFAULT
+ NOTICE("BL2: DRAM refresh interval 1.95 usec\n");
+#else
+ NOTICE("BL2: DRAM refresh interval 3.9 usec\n");
+#endif
+
+#if RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE
+ NOTICE("BL2: Periodic Write DQ Training\n");
+#endif /* RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE */
+
+ io_write_32(QOSCTRL_RAS, 0x00000044U);
+ io_write_64(QOSCTRL_DANN, 0x0404010002020201UL);
+ io_write_32(QOSCTRL_DANT, 0x0020100AU);
+ io_write_32(QOSCTRL_FSS, 0x0000000AU);
+ io_write_32(QOSCTRL_INSFC, 0x06330001U);
+ io_write_32(QOSCTRL_RACNT0, 0x00010003U);
+
+ /* GPU Boost Mode */
+ io_write_32(QOSCTRL_STATGEN0, 0x00000001U);
+
+ io_write_32(QOSCTRL_SL_INIT,
+ SL_INIT_REFFSSLOT | SL_INIT_SLOTSSLOT |
+ SL_INIT_SSLOTCLK_H3_30);
+ io_write_32(QOSCTRL_REF_ARS,
+ ((QOSCTRL_REF_ARS_ARBSTOPCYCLE_H3_30 << 16)));
+
+ uint32_t i;
+
+ for (i = 0U; i < ARRAY_SIZE(mstat_fix); i++) {
+ io_write_64(QOSBW_FIX_QOS_BANK0 + i * 8, mstat_fix[i]);
+ io_write_64(QOSBW_FIX_QOS_BANK1 + i * 8, mstat_fix[i]);
+ }
+ for (i = 0U; i < ARRAY_SIZE(mstat_be); i++) {
+ io_write_64(QOSBW_BE_QOS_BANK0 + i * 8, mstat_be[i]);
+ io_write_64(QOSBW_BE_QOS_BANK1 + i * 8, mstat_be[i]);
+ }
+#if RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE
+ for (i = 0U; i < ARRAY_SIZE(qoswt_fix); i++) {
+ io_write_64(QOSWT_FIX_WTQOS_BANK0 + i * 8,
+ qoswt_fix[i]);
+ io_write_64(QOSWT_FIX_WTQOS_BANK1 + i * 8,
+ qoswt_fix[i]);
+ }
+ for (i = 0U; i < ARRAY_SIZE(qoswt_be); i++) {
+ io_write_64(QOSWT_BE_WTQOS_BANK0 + i * 8, qoswt_be[i]);
+ io_write_64(QOSWT_BE_WTQOS_BANK1 + i * 8, qoswt_be[i]);
+ }
+#endif /* RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE */
+
+ /* AXI setting */
+ io_write_32(AXI_MMCR, 0x00010008U);
+ io_write_32(AXI_TR3CR, 0x00010000U);
+ io_write_32(AXI_TR4CR, 0x00010000U);
+
+ /* RT bus Leaf setting */
+ io_write_32(RT_ACT0, 0x00000000U);
+ io_write_32(RT_ACT1, 0x00000000U);
+
+ /* CCI bus Leaf setting */
+ io_write_32(CPU_ACT0, 0x00000003U);
+ io_write_32(CPU_ACT1, 0x00000003U);
+ io_write_32(CPU_ACT2, 0x00000003U);
+ io_write_32(CPU_ACT3, 0x00000003U);
+
+ io_write_32(QOSCTRL_RAEN, 0x00000001U);
+
+#if RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE
+ /* re-write training setting */
+ io_write_32(QOSWT_WTREF,
+ ((QOSWT_WTREF_SLOT1_EN << 16) | QOSWT_WTREF_SLOT0_EN));
+ io_write_32(QOSWT_WTSET0,
+ ((QOSWT_WTSET0_PERIOD0_H3_30 << 16) |
+ (QOSWT_WTSET0_SSLOT0 << 8) | QOSWT_WTSET0_SLOTSLOT0));
+ io_write_32(QOSWT_WTSET1,
+ ((QOSWT_WTSET1_PERIOD1_H3_30 << 16) |
+ (QOSWT_WTSET1_SSLOT1 << 8) | QOSWT_WTSET1_SLOTSLOT1));
+
+ io_write_32(QOSWT_WTEN, QOSWT_WTEN_ENABLE);
+#endif /* RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE */
+
+ io_write_32(QOSCTRL_STATQC, 0x00000001U);
+#else
+ NOTICE("BL2: QoS is None\n");
+
+ io_write_32(QOSCTRL_RAEN, 0x00000001U);
+#endif /* !(RCAR_QOS_TYPE == RCAR_QOS_NONE) */
+}
diff --git a/drivers/renesas/rcar/qos/H3/qos_init_h3_v30.h b/drivers/renesas/rcar/qos/H3/qos_init_h3_v30.h
new file mode 100644
index 0000000..d33b43c
--- /dev/null
+++ b/drivers/renesas/rcar/qos/H3/qos_init_h3_v30.h
@@ -0,0 +1,12 @@
+/*
+ * Copyright (c) 2018, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef QOS_INIT_H3_V30_H
+#define QOS_INIT_H3_V30_H
+
+void qos_init_h3_v30(void);
+
+#endif /* QOS_INIT_H3_V30_H */
diff --git a/drivers/renesas/rcar/qos/H3/qos_init_h3_v30_mstat195.h b/drivers/renesas/rcar/qos/H3/qos_init_h3_v30_mstat195.h
new file mode 100644
index 0000000..28a240f
--- /dev/null
+++ b/drivers/renesas/rcar/qos/H3/qos_init_h3_v30_mstat195.h
@@ -0,0 +1,231 @@
+/*
+ * Copyright (c) 2018, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+static uint64_t mstat_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x001004040000FFFFUL,
+ /* 0x0038, */ 0x001008070000FFFFUL,
+ /* 0x0040, */ 0x001410070000FFFFUL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x001404010000FFFFUL,
+ /* 0x0058, */ 0x0014100D0000FFFFUL,
+ /* 0x0060, */ 0x0014100D0000FFFFUL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x001404010000FFFFUL,
+ /* 0x0078, */ 0x001008070000FFFFUL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x001410070000FFFFUL,
+ /* 0x0090, */ 0x0014100D0000FFFFUL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x000C04020000FFFFUL,
+ /* 0x00a8, */ 0x000C04010000FFFFUL,
+ /* 0x00b0, */ 0x000C04010000FFFFUL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x000C04020000FFFFUL,
+ /* 0x00c8, */ 0x000C04010000FFFFUL,
+ /* 0x00d0, */ 0x000C04010000FFFFUL,
+ /* 0x00d8, */ 0x001024090000FFFFUL,
+ /* 0x00e0, */ 0x00100C090000FFFFUL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x001024090000FFFFUL,
+ /* 0x00f8, */ 0x000C100D0000FFFFUL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x00100C090000FFFFUL,
+ /* 0x0118, */ 0x000C1C1B0000FFFFUL,
+ /* 0x0120, */ 0x000C1C1B0000FFFFUL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x00100C0B0000FFFFUL,
+ /* 0x0140, */ 0x00100C0B0000FFFFUL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0010100D0000FFFFUL,
+ /* 0x0158, */ 0x0010100D0000FFFFUL,
+ /* 0x0160, */ 0x00100C0B0000FFFFUL,
+ /* 0x0168, */ 0x00100C0B0000FFFFUL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x001008060000FFFFUL,
+ /* 0x0180, */ 0x001008060000FFFFUL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x00102C2C0000FFFFUL,
+ /* 0x0198, */ 0x00102C2C0000FFFFUL,
+ /* 0x01a0, */ 0x00100C0B0000FFFFUL,
+ /* 0x01a8, */ 0x00100C0B0000FFFFUL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x000C04010000FFFFUL,
+ /* 0x01c8, */ 0x000C04010000FFFFUL,
+ /* 0x01d0, */ 0x000C04010000FFFFUL,
+ /* 0x01d8, */ 0x000C04010000FFFFUL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x000C04010000FFFFUL,
+ /* 0x01f0, */ 0x000C04010000FFFFUL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x000C04010000FFFFUL,
+ /* 0x0210, */ 0x000C04010000FFFFUL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x000C08020000FFFFUL,
+ /* 0x0268, */ 0x001408010000FFFFUL,
+ /* 0x0270, */ 0x001404010000FFFFUL,
+ /* 0x0278, */ 0x000C04010000FFFFUL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x001408010000FFFFUL,
+ /* 0x0298, */ 0x001404010000FFFFUL,
+ /* 0x02a0, */ 0x000C04010000FFFFUL,
+ /* 0x02a8, */ 0x000C04010000FFFFUL,
+ /* 0x02b0, */ 0x001408010000FFFFUL,
+ /* 0x02b8, */ 0x000C04010000FFFFUL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x000C04010000FFFFUL,
+ /* 0x02d8, */ 0x000C04010000FFFFUL,
+ /* 0x02e0, */ 0x001408010000FFFFUL,
+ /* 0x02e8, */ 0x000C04010000FFFFUL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0000000000000000UL,
+};
+
+static uint64_t mstat_be[] = {
+ /* 0x0000, */ 0x001200600BDFFC01UL,
+ /* 0x0008, */ 0x001200600BDFFC01UL,
+ /* 0x0010, */ 0x001200600BDFFC01UL,
+ /* 0x0018, */ 0x001200600BDFFC01UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x001200100BD0FC01UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x002100600BDFFC01UL,
+ /* 0x01c8, */ 0x002100600BDFFC01UL,
+ /* 0x01d0, */ 0x002100600BDFFC01UL,
+ /* 0x01d8, */ 0x002100600BDFFC01UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x002100100BDF2401UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x002100100BDF2401UL,
+ /* 0x0218, */ 0x001100100BDF2401UL,
+ /* 0x0220, */ 0x001100100BDF2401UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x001100100BDF2401UL,
+ /* 0x0238, */ 0x001100100BDF2401UL,
+ /* 0x0240, */ 0x001200100BDF2401UL,
+ /* 0x0248, */ 0x001100100BDF2401UL,
+ /* 0x0250, */ 0x001200100BDF2401UL,
+ /* 0x0258, */ 0x001100100BDF2401UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x001100600BDFFC01UL,
+ /* 0x02f8, */ 0x001100600BDFFC01UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x001100600BDFFC01UL,
+ /* 0x0310, */ 0x001100600BDFFC01UL,
+ /* 0x0318, */ 0x001200100BD03401UL,
+ /* 0x0320, */ 0x001100600BDFFC01UL,
+ /* 0x0328, */ 0x001100600BDFFC01UL,
+ /* 0x0330, */ 0x001100600BDFFC01UL,
+ /* 0x0338, */ 0x001100600BDFFC01UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x001200100BD0FC01UL,
+};
diff --git a/drivers/renesas/rcar/qos/H3/qos_init_h3_v30_mstat390.h b/drivers/renesas/rcar/qos/H3/qos_init_h3_v30_mstat390.h
new file mode 100644
index 0000000..def6585
--- /dev/null
+++ b/drivers/renesas/rcar/qos/H3/qos_init_h3_v30_mstat390.h
@@ -0,0 +1,231 @@
+/*
+ * Copyright (c) 2018, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+static uint64_t mstat_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x001008070000FFFFUL,
+ /* 0x0038, */ 0x0010100D0000FFFFUL,
+ /* 0x0040, */ 0x00141C0E0000FFFFUL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x001408010000FFFFUL,
+ /* 0x0058, */ 0x00141C190000FFFFUL,
+ /* 0x0060, */ 0x00141C190000FFFFUL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x001408010000FFFFUL,
+ /* 0x0078, */ 0x0010100D0000FFFFUL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x00141C0E0000FFFFUL,
+ /* 0x0090, */ 0x00141C190000FFFFUL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x000C08040000FFFFUL,
+ /* 0x00a8, */ 0x000C04020000FFFFUL,
+ /* 0x00b0, */ 0x000C04020000FFFFUL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x000C08040000FFFFUL,
+ /* 0x00c8, */ 0x000C04020000FFFFUL,
+ /* 0x00d0, */ 0x000C04020000FFFFUL,
+ /* 0x00d8, */ 0x001044110000FFFFUL,
+ /* 0x00e0, */ 0x001014110000FFFFUL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x001044110000FFFFUL,
+ /* 0x00f8, */ 0x000C1C1A0000FFFFUL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x001014110000FFFFUL,
+ /* 0x0118, */ 0x000C38360000FFFFUL,
+ /* 0x0120, */ 0x000C38360000FFFFUL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x001018150000FFFFUL,
+ /* 0x0140, */ 0x001018150000FFFFUL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x00101C190000FFFFUL,
+ /* 0x0158, */ 0x00101C190000FFFFUL,
+ /* 0x0160, */ 0x001018150000FFFFUL,
+ /* 0x0168, */ 0x001018150000FFFFUL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x00100C0B0000FFFFUL,
+ /* 0x0180, */ 0x00100C0B0000FFFFUL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x001058570000FFFFUL,
+ /* 0x0198, */ 0x001058570000FFFFUL,
+ /* 0x01a0, */ 0x001018150000FFFFUL,
+ /* 0x01a8, */ 0x001018150000FFFFUL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x000C04010000FFFFUL,
+ /* 0x01c8, */ 0x000C04010000FFFFUL,
+ /* 0x01d0, */ 0x000C04010000FFFFUL,
+ /* 0x01d8, */ 0x000C04010000FFFFUL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x000C04010000FFFFUL,
+ /* 0x01f0, */ 0x000C04010000FFFFUL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x000C04010000FFFFUL,
+ /* 0x0210, */ 0x000C04010000FFFFUL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x000C0C030000FFFFUL,
+ /* 0x0268, */ 0x001410010000FFFFUL,
+ /* 0x0270, */ 0x001404010000FFFFUL,
+ /* 0x0278, */ 0x000C08020000FFFFUL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x001410010000FFFFUL,
+ /* 0x0298, */ 0x001404010000FFFFUL,
+ /* 0x02a0, */ 0x000C04010000FFFFUL,
+ /* 0x02a8, */ 0x000C04010000FFFFUL,
+ /* 0x02b0, */ 0x00140C010000FFFFUL,
+ /* 0x02b8, */ 0x000C04010000FFFFUL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x000C04010000FFFFUL,
+ /* 0x02d8, */ 0x000C04010000FFFFUL,
+ /* 0x02e0, */ 0x00140C010000FFFFUL,
+ /* 0x02e8, */ 0x000C04010000FFFFUL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0000000000000000UL,
+};
+
+static uint64_t mstat_be[] = {
+ /* 0x0000, */ 0x0012006005EFFC01UL,
+ /* 0x0008, */ 0x0012006005EFFC01UL,
+ /* 0x0010, */ 0x0012006005EFFC01UL,
+ /* 0x0018, */ 0x0012006005EFFC01UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0012001005E0FC01UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x0021006005EFFC01UL,
+ /* 0x01c8, */ 0x0021006005EFFC01UL,
+ /* 0x01d0, */ 0x0021006005EFFC01UL,
+ /* 0x01d8, */ 0x0021006005EFFC01UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0021001005E79401UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0021001005E79401UL,
+ /* 0x0218, */ 0x0011001005E79401UL,
+ /* 0x0220, */ 0x0011001005E79401UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0011001005E79401UL,
+ /* 0x0238, */ 0x0011001005E79401UL,
+ /* 0x0240, */ 0x0012001005E79401UL,
+ /* 0x0248, */ 0x0011001005E79401UL,
+ /* 0x0250, */ 0x0012001005E79401UL,
+ /* 0x0258, */ 0x0011001005E79401UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0011006005EFFC01UL,
+ /* 0x02f8, */ 0x0011006005EFFC01UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0011006005EFFC01UL,
+ /* 0x0310, */ 0x0011006005EFFC01UL,
+ /* 0x0318, */ 0x0012001005E03401UL,
+ /* 0x0320, */ 0x0011006005EFFC01UL,
+ /* 0x0328, */ 0x0011006005EFFC01UL,
+ /* 0x0330, */ 0x0011006005EFFC01UL,
+ /* 0x0338, */ 0x0011006005EFFC01UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0012001005E0FC01UL,
+};
diff --git a/drivers/renesas/rcar/qos/H3/qos_init_h3_v30_qoswt195.h b/drivers/renesas/rcar/qos/H3/qos_init_h3_v30_qoswt195.h
new file mode 100644
index 0000000..b0c11cc
--- /dev/null
+++ b/drivers/renesas/rcar/qos/H3/qos_init_h3_v30_qoswt195.h
@@ -0,0 +1,231 @@
+/*
+ * Copyright (c) 2018, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+static uint64_t qoswt_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x001004040000C010UL,
+ /* 0x0038, */ 0x001008070000C010UL,
+ /* 0x0040, */ 0x001410070000FFF0UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0014100D0000C010UL,
+ /* 0x0060, */ 0x0014100D0000C010UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x001008070000C010UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x001410070000FFF0UL,
+ /* 0x0090, */ 0x0014100D0000C010UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x0000000000000000UL,
+ /* 0x01c8, */ 0x0000000000000000UL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0000000000000000UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0000000000000000UL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x000C08020000FFF0UL,
+ /* 0x0268, */ 0x001408010000FFF0UL,
+ /* 0x0270, */ 0x001404010000FFF0UL,
+ /* 0x0278, */ 0x000C04010000FFF0UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x001408010000FFF0UL,
+ /* 0x0298, */ 0x001404010000FFF0UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0000000000000000UL,
+};
+
+static uint64_t qoswt_be[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x0000000000000000UL,
+ /* 0x01c8, */ 0x0000000000000000UL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0000000000000000UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0000000000000000UL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0000000000000000UL,
+};
diff --git a/drivers/renesas/rcar/qos/H3/qos_init_h3_v30_qoswt390.h b/drivers/renesas/rcar/qos/H3/qos_init_h3_v30_qoswt390.h
new file mode 100644
index 0000000..a1e4c72
--- /dev/null
+++ b/drivers/renesas/rcar/qos/H3/qos_init_h3_v30_qoswt390.h
@@ -0,0 +1,231 @@
+/*
+ * Copyright (c) 2018, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+static uint64_t qoswt_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x001008070000C010UL,
+ /* 0x0038, */ 0x0010100D0000C010UL,
+ /* 0x0040, */ 0x00141C0E0000FFF0UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x00141C190000C010UL,
+ /* 0x0060, */ 0x00141C190000C010UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0010100D0000C010UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x00141C0E0000FFF0UL,
+ /* 0x0090, */ 0x00141C190000C010UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x0000000000000000UL,
+ /* 0x01c8, */ 0x0000000000000000UL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0000000000000000UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0000000000000000UL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x000C0C030000FFF0UL,
+ /* 0x0268, */ 0x001410010000FFF0UL,
+ /* 0x0270, */ 0x001404010000FFF0UL,
+ /* 0x0278, */ 0x000C08020000FFF0UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x001410010000FFF0UL,
+ /* 0x0298, */ 0x001404010000FFF0UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0000000000000000UL,
+};
+
+static uint64_t qoswt_be[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x0000000000000000UL,
+ /* 0x01c8, */ 0x0000000000000000UL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0000000000000000UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0000000000000000UL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0000000000000000UL,
+};
diff --git a/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30.c b/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30.c
new file mode 100644
index 0000000..f1ee41b
--- /dev/null
+++ b/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30.c
@@ -0,0 +1,230 @@
+/*
+ * Copyright (c) 2018-2019, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <stdint.h>
+
+#include <common/debug.h>
+
+#include "../qos_common.h"
+#include "../qos_reg.h"
+#include "qos_init_h3n_v30.h"
+
+#define RCAR_QOS_VERSION "rev.0.07"
+
+#define QOSWT_TIME_BANK0 20000000U /* unit:ns */
+
+#define QOSWT_WTEN_ENABLE 0x1U
+
+#define QOSCTRL_REF_ARS_ARBSTOPCYCLE_H3N (SL_INIT_SSLOTCLK_H3N - 0x5U)
+
+#define OSWT_WTREF_SLOT0_EN_REQ1_SLOT 3U
+#define OSWT_WTREF_SLOT0_EN_REQ2_SLOT 9U
+#define QOSWT_WTREF_SLOT0_EN \
+ ((0x1U << OSWT_WTREF_SLOT0_EN_REQ1_SLOT) | \
+ (0x1U << OSWT_WTREF_SLOT0_EN_REQ2_SLOT))
+#define QOSWT_WTREF_SLOT1_EN \
+ ((0x1U << OSWT_WTREF_SLOT0_EN_REQ1_SLOT) | \
+ (0x1U << OSWT_WTREF_SLOT0_EN_REQ2_SLOT))
+
+#define QOSWT_WTSET0_REQ_SSLOT0 5U
+#define WT_BASE_SUB_SLOT_NUM0 12U
+#define QOSWT_WTSET0_PERIOD0_H3N \
+ ((QOSWT_TIME_BANK0 / QOSWT_WTSET0_CYCLE_H3N) - 1U)
+#define QOSWT_WTSET0_SSLOT0 (QOSWT_WTSET0_REQ_SSLOT0 - 1U)
+#define QOSWT_WTSET0_SLOTSLOT0 (WT_BASE_SUB_SLOT_NUM0 - 1U)
+
+#define QOSWT_WTSET1_PERIOD1_H3N (QOSWT_WTSET0_PERIOD0_H3N)
+#define QOSWT_WTSET1_SSLOT1 (QOSWT_WTSET0_SSLOT0)
+#define QOSWT_WTSET1_SLOTSLOT1 (QOSWT_WTSET0_SLOTSLOT0)
+
+#if RCAR_QOS_TYPE == RCAR_QOS_TYPE_DEFAULT
+
+#if RCAR_REF_INT == RCAR_REF_DEFAULT
+#include "qos_init_h3n_v30_mstat195.h"
+#else
+#include "qos_init_h3n_v30_mstat390.h"
+#endif
+
+#if RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE
+
+#if RCAR_REF_INT == RCAR_REF_DEFAULT
+#include "qos_init_h3n_v30_qoswt195.h"
+#else
+#include "qos_init_h3n_v30_qoswt390.h"
+#endif
+
+#endif /* RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE */
+
+#endif
+
+struct rcar_gen3_dbsc_qos_settings h3n_v30_qos[] = {
+ /* BUFCAM settings */
+ { DBSC_DBCAM0CNF1, 0x00043218U },
+ { DBSC_DBCAM0CNF2, 0x000000F4U },
+ { DBSC_DBCAM0CNF3, 0x00000000U },
+ { DBSC_DBSCHCNT0, 0x000F0037U },
+ { DBSC_DBSCHSZ0, 0x00000001U },
+ { DBSC_DBSCHRW0, 0x22421111U },
+
+ /* DDR3 */
+ { DBSC_SCFCTST2, 0x012F1123U },
+
+ /* QoS Settings */
+ { DBSC_DBSCHQOS00, 0x00000F00U },
+ { DBSC_DBSCHQOS01, 0x00000B00U },
+ { DBSC_DBSCHQOS02, 0x00000000U },
+ { DBSC_DBSCHQOS03, 0x00000000U },
+ { DBSC_DBSCHQOS40, 0x00000300U },
+ { DBSC_DBSCHQOS41, 0x000002F0U },
+ { DBSC_DBSCHQOS42, 0x00000200U },
+ { DBSC_DBSCHQOS43, 0x00000100U },
+ { DBSC_DBSCHQOS90, 0x00000100U },
+ { DBSC_DBSCHQOS91, 0x000000F0U },
+ { DBSC_DBSCHQOS92, 0x000000A0U },
+ { DBSC_DBSCHQOS93, 0x00000040U },
+ { DBSC_DBSCHQOS120, 0x00000040U },
+ { DBSC_DBSCHQOS121, 0x00000030U },
+ { DBSC_DBSCHQOS122, 0x00000020U },
+ { DBSC_DBSCHQOS123, 0x00000010U },
+ { DBSC_DBSCHQOS130, 0x00000100U },
+ { DBSC_DBSCHQOS131, 0x000000F0U },
+ { DBSC_DBSCHQOS132, 0x000000A0U },
+ { DBSC_DBSCHQOS133, 0x00000040U },
+ { DBSC_DBSCHQOS140, 0x000000C0U },
+ { DBSC_DBSCHQOS141, 0x000000B0U },
+ { DBSC_DBSCHQOS142, 0x00000080U },
+ { DBSC_DBSCHQOS143, 0x00000040U },
+ { DBSC_DBSCHQOS150, 0x00000040U },
+ { DBSC_DBSCHQOS151, 0x00000030U },
+ { DBSC_DBSCHQOS152, 0x00000020U },
+ { DBSC_DBSCHQOS153, 0x00000010U },
+};
+
+void qos_init_h3n_v30(void)
+{
+ unsigned int split_area;
+
+ rcar_qos_dbsc_setting(h3n_v30_qos, ARRAY_SIZE(h3n_v30_qos), true);
+
+ /* use 1(2GB) for RCAR_DRAM_LPDDR4_MEMCONF for H3N */
+ split_area = 0x1CU;
+
+ /* DRAM Split Address mapping */
+#if (RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_4CH)
+#if RCAR_LSI == RCAR_H3N
+#error "Don't set DRAM Split 4ch(H3N)"
+#else
+ ERROR("DRAM Split 4ch not supported.(H3N)");
+ panic();
+#endif
+#elif (RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_2CH) || \
+ (RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_AUTO)
+ NOTICE("BL2: DRAM Split is 2ch(DDR %x)\n", (int)qos_init_ddr_phyvalid);
+
+ io_write_32(AXI_ADSPLCR0, ADSPLCR0_AREA(split_area));
+ io_write_32(AXI_ADSPLCR1, ADSPLCR0_ADRMODE_DEFAULT
+ | ADSPLCR0_SPLITSEL(0xFFU)
+ | ADSPLCR0_AREA(split_area)
+ | ADSPLCR0_SWP);
+ io_write_32(AXI_ADSPLCR2, 0x00001004U);
+ io_write_32(AXI_ADSPLCR3, 0x00000000U);
+#else
+ io_write_32(AXI_ADSPLCR0, ADSPLCR0_AREA(split_area));
+ NOTICE("BL2: DRAM Split is OFF(DDR %x)\n", (int)qos_init_ddr_phyvalid);
+#endif
+
+#if !(RCAR_QOS_TYPE == RCAR_QOS_NONE)
+#if RCAR_QOS_TYPE == RCAR_QOS_TYPE_DEFAULT
+ NOTICE("BL2: QoS is default setting(%s)\n", RCAR_QOS_VERSION);
+#endif
+
+#if RCAR_REF_INT == RCAR_REF_DEFAULT
+ NOTICE("BL2: DRAM refresh interval 1.95 usec\n");
+#else
+ NOTICE("BL2: DRAM refresh interval 3.9 usec\n");
+#endif
+
+#if RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE
+ NOTICE("BL2: Periodic Write DQ Training\n");
+#endif /* RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE */
+
+ io_write_32(QOSCTRL_RAS, 0x00000044U);
+ io_write_64(QOSCTRL_DANN, 0x0404020002020201UL);
+ io_write_32(QOSCTRL_DANT, 0x0020100AU);
+ io_write_32(QOSCTRL_FSS, 0x0000000AU);
+ io_write_32(QOSCTRL_INSFC, 0x06330001U);
+ io_write_32(QOSCTRL_RACNT0, 0x00010003U);
+
+ /* GPU Boost Mode */
+ io_write_32(QOSCTRL_STATGEN0, 0x00000001U);
+
+ io_write_32(QOSCTRL_SL_INIT,
+ SL_INIT_REFFSSLOT | SL_INIT_SLOTSSLOT |
+ SL_INIT_SSLOTCLK_H3N);
+ io_write_32(QOSCTRL_REF_ARS,
+ ((QOSCTRL_REF_ARS_ARBSTOPCYCLE_H3N << 16)));
+
+ uint32_t i;
+
+ for (i = 0U; i < ARRAY_SIZE(mstat_fix); i++) {
+ io_write_64(QOSBW_FIX_QOS_BANK0 + i * 8, mstat_fix[i]);
+ io_write_64(QOSBW_FIX_QOS_BANK1 + i * 8, mstat_fix[i]);
+ }
+ for (i = 0U; i < ARRAY_SIZE(mstat_be); i++) {
+ io_write_64(QOSBW_BE_QOS_BANK0 + i * 8, mstat_be[i]);
+ io_write_64(QOSBW_BE_QOS_BANK1 + i * 8, mstat_be[i]);
+ }
+#if RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE
+ for (i = 0U; i < ARRAY_SIZE(qoswt_fix); i++) {
+ io_write_64(QOSWT_FIX_WTQOS_BANK0 + i * 8,
+ qoswt_fix[i]);
+ io_write_64(QOSWT_FIX_WTQOS_BANK1 + i * 8,
+ qoswt_fix[i]);
+ }
+ for (i = 0U; i < ARRAY_SIZE(qoswt_be); i++) {
+ io_write_64(QOSWT_BE_WTQOS_BANK0 + i * 8, qoswt_be[i]);
+ io_write_64(QOSWT_BE_WTQOS_BANK1 + i * 8, qoswt_be[i]);
+ }
+#endif /* RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE */
+
+ /* AXI setting */
+ io_write_32(AXI_MMCR, 0x00010008U);
+ io_write_32(AXI_TR3CR, 0x00010000U);
+ io_write_32(AXI_TR4CR, 0x00010000U);
+
+ /* RT bus Leaf setting */
+ io_write_32(RT_ACT0, 0x00000000U);
+ io_write_32(RT_ACT1, 0x00000000U);
+
+ /* CCI bus Leaf setting */
+ io_write_32(CPU_ACT0, 0x00000003U);
+ io_write_32(CPU_ACT1, 0x00000003U);
+ io_write_32(CPU_ACT2, 0x00000003U);
+ io_write_32(CPU_ACT3, 0x00000003U);
+
+ io_write_32(QOSCTRL_RAEN, 0x00000001U);
+
+#if RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE
+ /* re-write training setting */
+ io_write_32(QOSWT_WTREF,
+ ((QOSWT_WTREF_SLOT1_EN << 16) | QOSWT_WTREF_SLOT0_EN));
+ io_write_32(QOSWT_WTSET0,
+ ((QOSWT_WTSET0_PERIOD0_H3N << 16) |
+ (QOSWT_WTSET0_SSLOT0 << 8) | QOSWT_WTSET0_SLOTSLOT0));
+ io_write_32(QOSWT_WTSET1,
+ ((QOSWT_WTSET1_PERIOD1_H3N << 16) |
+ (QOSWT_WTSET1_SSLOT1 << 8) | QOSWT_WTSET1_SLOTSLOT1));
+
+ io_write_32(QOSWT_WTEN, QOSWT_WTEN_ENABLE);
+#endif /* RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE */
+
+ io_write_32(QOSCTRL_STATQC, 0x00000001U);
+#else
+ NOTICE("BL2: QoS is None\n");
+
+ io_write_32(QOSCTRL_RAEN, 0x00000001U);
+#endif /* !(RCAR_QOS_TYPE == RCAR_QOS_NONE) */
+}
diff --git a/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30.h b/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30.h
new file mode 100644
index 0000000..46f3440
--- /dev/null
+++ b/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30.h
@@ -0,0 +1,12 @@
+/*
+ * Copyright (c) 2018, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef QOS_INIT_H3N_V30_H
+#define QOS_INIT_H3N_V30_H
+
+void qos_init_h3n_v30(void);
+
+#endif /* QOS_INIT_H3N_V30_H */
diff --git a/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_mstat195.h b/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_mstat195.h
new file mode 100644
index 0000000..6dbc88a
--- /dev/null
+++ b/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_mstat195.h
@@ -0,0 +1,231 @@
+/*
+ * Copyright (c) 2018, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+static uint64_t mstat_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x001004040000FFFFUL,
+ /* 0x0038, */ 0x001008070000FFFFUL,
+ /* 0x0040, */ 0x001410070000FFFFUL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x001404010000FFFFUL,
+ /* 0x0058, */ 0x0014100D0000FFFFUL,
+ /* 0x0060, */ 0x0014100D0000FFFFUL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x001404010000FFFFUL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x001410070000FFFFUL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x000C04020000FFFFUL,
+ /* 0x00a8, */ 0x000C04010000FFFFUL,
+ /* 0x00b0, */ 0x000C04010000FFFFUL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x000C04020000FFFFUL,
+ /* 0x00c8, */ 0x000C04010000FFFFUL,
+ /* 0x00d0, */ 0x000C04010000FFFFUL,
+ /* 0x00d8, */ 0x001024090000FFFFUL,
+ /* 0x00e0, */ 0x00100C090000FFFFUL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x001024090000FFFFUL,
+ /* 0x00f8, */ 0x000C100D0000FFFFUL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x00100C090000FFFFUL,
+ /* 0x0118, */ 0x000C1C1B0000FFFFUL,
+ /* 0x0120, */ 0x000C1C1B0000FFFFUL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x00100C0B0000FFFFUL,
+ /* 0x0140, */ 0x00100C0B0000FFFFUL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0010100D0000FFFFUL,
+ /* 0x0158, */ 0x0010100D0000FFFFUL,
+ /* 0x0160, */ 0x00100C0B0000FFFFUL,
+ /* 0x0168, */ 0x00100C0B0000FFFFUL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x001008060000FFFFUL,
+ /* 0x0180, */ 0x001008060000FFFFUL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x00102C2C0000FFFFUL,
+ /* 0x0198, */ 0x00102C2C0000FFFFUL,
+ /* 0x01a0, */ 0x00100C0B0000FFFFUL,
+ /* 0x01a8, */ 0x00100C0B0000FFFFUL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x000C04010000FFFFUL,
+ /* 0x01c8, */ 0x000C04010000FFFFUL,
+ /* 0x01d0, */ 0x000C04010000FFFFUL,
+ /* 0x01d8, */ 0x000C04010000FFFFUL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x000C04010000FFFFUL,
+ /* 0x01f0, */ 0x000C04010000FFFFUL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x000C04010000FFFFUL,
+ /* 0x0210, */ 0x000C04010000FFFFUL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x000C08020000FFFFUL,
+ /* 0x0268, */ 0x001408010000FFFFUL,
+ /* 0x0270, */ 0x001404010000FFFFUL,
+ /* 0x0278, */ 0x000C04010000FFFFUL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x001408010000FFFFUL,
+ /* 0x0298, */ 0x001404010000FFFFUL,
+ /* 0x02a0, */ 0x000C04010000FFFFUL,
+ /* 0x02a8, */ 0x000C04010000FFFFUL,
+ /* 0x02b0, */ 0x001408010000FFFFUL,
+ /* 0x02b8, */ 0x000C04010000FFFFUL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x000C04010000FFFFUL,
+ /* 0x02d8, */ 0x000C04010000FFFFUL,
+ /* 0x02e0, */ 0x001408010000FFFFUL,
+ /* 0x02e8, */ 0x000C04010000FFFFUL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0000000000000000UL,
+};
+
+static uint64_t mstat_be[] = {
+ /* 0x0000, */ 0x001200600BDFFC01UL,
+ /* 0x0008, */ 0x001200600BDFFC01UL,
+ /* 0x0010, */ 0x001200600BDFFC01UL,
+ /* 0x0018, */ 0x001200600BDFFC01UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x001200100BD0FC01UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x002100600BDFFC01UL,
+ /* 0x01c8, */ 0x002100600BDFFC01UL,
+ /* 0x01d0, */ 0x002100600BDFFC01UL,
+ /* 0x01d8, */ 0x002100600BDFFC01UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x002100100BDF2401UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x002100100BDF2401UL,
+ /* 0x0218, */ 0x001100100BDF2401UL,
+ /* 0x0220, */ 0x001100100BDF2401UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x001100100BDF2401UL,
+ /* 0x0238, */ 0x001100100BDF2401UL,
+ /* 0x0240, */ 0x001200100BDF2401UL,
+ /* 0x0248, */ 0x001100100BDF2401UL,
+ /* 0x0250, */ 0x001200100BDF2401UL,
+ /* 0x0258, */ 0x001100100BDF2401UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x001100600BDFFC01UL,
+ /* 0x02f8, */ 0x001100600BDFFC01UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x001100600BDFFC01UL,
+ /* 0x0310, */ 0x001100600BDFFC01UL,
+ /* 0x0318, */ 0x001200100BD03401UL,
+ /* 0x0320, */ 0x001100600BDFFC01UL,
+ /* 0x0328, */ 0x001100600BDFFC01UL,
+ /* 0x0330, */ 0x001100600BDFFC01UL,
+ /* 0x0338, */ 0x001100600BDFFC01UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x001200100BD0FC01UL,
+};
diff --git a/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_mstat390.h b/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_mstat390.h
new file mode 100644
index 0000000..880211c
--- /dev/null
+++ b/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_mstat390.h
@@ -0,0 +1,231 @@
+/*
+ * Copyright (c) 2018, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+static uint64_t mstat_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x001008070000FFFFUL,
+ /* 0x0038, */ 0x0010100D0000FFFFUL,
+ /* 0x0040, */ 0x00141C0E0000FFFFUL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x001408010000FFFFUL,
+ /* 0x0058, */ 0x00141C190000FFFFUL,
+ /* 0x0060, */ 0x00141C190000FFFFUL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x001408010000FFFFUL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x00141C0E0000FFFFUL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x000C08040000FFFFUL,
+ /* 0x00a8, */ 0x000C04020000FFFFUL,
+ /* 0x00b0, */ 0x000C04020000FFFFUL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x000C08040000FFFFUL,
+ /* 0x00c8, */ 0x000C04020000FFFFUL,
+ /* 0x00d0, */ 0x000C04020000FFFFUL,
+ /* 0x00d8, */ 0x001044110000FFFFUL,
+ /* 0x00e0, */ 0x001014110000FFFFUL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x001044110000FFFFUL,
+ /* 0x00f8, */ 0x000C1C1A0000FFFFUL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x001014110000FFFFUL,
+ /* 0x0118, */ 0x000C38360000FFFFUL,
+ /* 0x0120, */ 0x000C38360000FFFFUL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x001018150000FFFFUL,
+ /* 0x0140, */ 0x001018150000FFFFUL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x00101C190000FFFFUL,
+ /* 0x0158, */ 0x00101C190000FFFFUL,
+ /* 0x0160, */ 0x001018150000FFFFUL,
+ /* 0x0168, */ 0x001018150000FFFFUL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x00100C0B0000FFFFUL,
+ /* 0x0180, */ 0x00100C0B0000FFFFUL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x001058570000FFFFUL,
+ /* 0x0198, */ 0x001058570000FFFFUL,
+ /* 0x01a0, */ 0x001018150000FFFFUL,
+ /* 0x01a8, */ 0x001018150000FFFFUL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x000C04010000FFFFUL,
+ /* 0x01c8, */ 0x000C04010000FFFFUL,
+ /* 0x01d0, */ 0x000C04010000FFFFUL,
+ /* 0x01d8, */ 0x000C04010000FFFFUL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x000C04010000FFFFUL,
+ /* 0x01f0, */ 0x000C04010000FFFFUL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x000C04010000FFFFUL,
+ /* 0x0210, */ 0x000C04010000FFFFUL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x000C0C030000FFFFUL,
+ /* 0x0268, */ 0x001410010000FFFFUL,
+ /* 0x0270, */ 0x001404010000FFFFUL,
+ /* 0x0278, */ 0x000C08020000FFFFUL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x001410010000FFFFUL,
+ /* 0x0298, */ 0x001404010000FFFFUL,
+ /* 0x02a0, */ 0x000C04010000FFFFUL,
+ /* 0x02a8, */ 0x000C04010000FFFFUL,
+ /* 0x02b0, */ 0x00140C010000FFFFUL,
+ /* 0x02b8, */ 0x000C04010000FFFFUL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x000C04010000FFFFUL,
+ /* 0x02d8, */ 0x000C04010000FFFFUL,
+ /* 0x02e0, */ 0x00140C010000FFFFUL,
+ /* 0x02e8, */ 0x000C04010000FFFFUL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0000000000000000UL,
+};
+
+static uint64_t mstat_be[] = {
+ /* 0x0000, */ 0x0012006005EFFC01UL,
+ /* 0x0008, */ 0x0012006005EFFC01UL,
+ /* 0x0010, */ 0x0012006005EFFC01UL,
+ /* 0x0018, */ 0x0012006005EFFC01UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0012001005E0FC01UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x0021006005EFFC01UL,
+ /* 0x01c8, */ 0x0021006005EFFC01UL,
+ /* 0x01d0, */ 0x0021006005EFFC01UL,
+ /* 0x01d8, */ 0x0021006005EFFC01UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0021001005E79401UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0021001005E79401UL,
+ /* 0x0218, */ 0x0011001005E79401UL,
+ /* 0x0220, */ 0x0011001005E79401UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0011001005E79401UL,
+ /* 0x0238, */ 0x0011001005E79401UL,
+ /* 0x0240, */ 0x0012001005E79401UL,
+ /* 0x0248, */ 0x0011001005E79401UL,
+ /* 0x0250, */ 0x0012001005E79401UL,
+ /* 0x0258, */ 0x0011001005E79401UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0011006005EFFC01UL,
+ /* 0x02f8, */ 0x0011006005EFFC01UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0011006005EFFC01UL,
+ /* 0x0310, */ 0x0011006005EFFC01UL,
+ /* 0x0318, */ 0x0012001005E03401UL,
+ /* 0x0320, */ 0x0011006005EFFC01UL,
+ /* 0x0328, */ 0x0011006005EFFC01UL,
+ /* 0x0330, */ 0x0011006005EFFC01UL,
+ /* 0x0338, */ 0x0011006005EFFC01UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0012001005E0FC01UL,
+};
diff --git a/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_qoswt195.h b/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_qoswt195.h
new file mode 100644
index 0000000..affd013
--- /dev/null
+++ b/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_qoswt195.h
@@ -0,0 +1,231 @@
+/*
+ * Copyright (c) 2018, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+static uint64_t qoswt_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x001004040000C010UL,
+ /* 0x0038, */ 0x001008070000C010UL,
+ /* 0x0040, */ 0x001410070000FFF0UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0014100D0000C010UL,
+ /* 0x0060, */ 0x0014100D0000C010UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x001410070000FFF0UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x0000000000000000UL,
+ /* 0x01c8, */ 0x0000000000000000UL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0000000000000000UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0000000000000000UL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x000C08020000FFF0UL,
+ /* 0x0268, */ 0x001408010000FFF0UL,
+ /* 0x0270, */ 0x001404010000FFF0UL,
+ /* 0x0278, */ 0x000C04010000FFF0UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x001408010000FFF0UL,
+ /* 0x0298, */ 0x001404010000FFF0UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0000000000000000UL,
+};
+
+static uint64_t qoswt_be[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x0000000000000000UL,
+ /* 0x01c8, */ 0x0000000000000000UL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0000000000000000UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0000000000000000UL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0000000000000000UL,
+};
diff --git a/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_qoswt390.h b/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_qoswt390.h
new file mode 100644
index 0000000..1c48d28
--- /dev/null
+++ b/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_qoswt390.h
@@ -0,0 +1,231 @@
+/*
+ * Copyright (c) 2018, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+static uint64_t qoswt_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x001008070000C010UL,
+ /* 0x0038, */ 0x0010100D0000C010UL,
+ /* 0x0040, */ 0x00141C0E0000FFF0UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x00141C190000C010UL,
+ /* 0x0060, */ 0x00141C190000C010UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x00141C0E0000FFF0UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x0000000000000000UL,
+ /* 0x01c8, */ 0x0000000000000000UL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0000000000000000UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0000000000000000UL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x000C0C030000FFF0UL,
+ /* 0x0268, */ 0x001410010000FFF0UL,
+ /* 0x0270, */ 0x001404010000FFF0UL,
+ /* 0x0278, */ 0x000C08020000FFF0UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x001410010000FFF0UL,
+ /* 0x0298, */ 0x001404010000FFF0UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0000000000000000UL,
+};
+
+static uint64_t qoswt_be[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x0000000000000000UL,
+ /* 0x01c8, */ 0x0000000000000000UL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0000000000000000UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0000000000000000UL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0000000000000000UL,
+};
diff --git a/drivers/renesas/rcar/qos/M3/qos_init_m3_v10.c b/drivers/renesas/rcar/qos/M3/qos_init_m3_v10.c
new file mode 100644
index 0000000..a8264cb
--- /dev/null
+++ b/drivers/renesas/rcar/qos/M3/qos_init_m3_v10.c
@@ -0,0 +1,149 @@
+/*
+ * Copyright (c) 2015-2019, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <stdint.h>
+
+#include <common/debug.h>
+
+#include "../qos_common.h"
+#include "../qos_reg.h"
+#include "qos_init_m3_v10.h"
+
+#define RCAR_QOS_VERSION "rev.0.19"
+
+#include "qos_init_m3_v10_mstat.h"
+
+struct rcar_gen3_dbsc_qos_settings m3_v10_qos[] = {
+ /* BUFCAM settings */
+ /* DBSC_DBCAM0CNF0 not set */
+ { DBSC_DBCAM0CNF1, 0x00043218 },
+ { DBSC_DBCAM0CNF2, 0x000000F4 },
+ { DBSC_DBCAM0CNF3, 0x00000000 },
+ { DBSC_DBSCHCNT0, 0x080F0037 },
+ /* DBSC_DBSCHCNT1 not set */
+ { DBSC_DBSCHSZ0, 0x00000001 },
+ { DBSC_DBSCHRW0, 0x22421111 },
+
+ /* DDR3 */
+ { DBSC_SCFCTST2, 0x012F1123 },
+
+ /* QoS Settings */
+ { DBSC_DBSCHQOS00, 0x00000F00 },
+ { DBSC_DBSCHQOS01, 0x00000B00 },
+ { DBSC_DBSCHQOS02, 0x00000000 },
+ { DBSC_DBSCHQOS03, 0x00000000 },
+ { DBSC_DBSCHQOS40, 0x00000300 },
+ { DBSC_DBSCHQOS41, 0x000002F0 },
+ { DBSC_DBSCHQOS42, 0x00000200 },
+ { DBSC_DBSCHQOS43, 0x00000100 },
+ { DBSC_DBSCHQOS90, 0x00000300 },
+ { DBSC_DBSCHQOS91, 0x000002F0 },
+ { DBSC_DBSCHQOS92, 0x00000200 },
+ { DBSC_DBSCHQOS93, 0x00000100 },
+ { DBSC_DBSCHQOS130, 0x00000100 },
+ { DBSC_DBSCHQOS131, 0x000000F0 },
+ { DBSC_DBSCHQOS132, 0x000000A0 },
+ { DBSC_DBSCHQOS133, 0x00000040 },
+ { DBSC_DBSCHQOS140, 0x000000C0 },
+ { DBSC_DBSCHQOS141, 0x000000B0 },
+ { DBSC_DBSCHQOS142, 0x00000080 },
+ { DBSC_DBSCHQOS143, 0x00000040 },
+ { DBSC_DBSCHQOS150, 0x00000040 },
+ { DBSC_DBSCHQOS151, 0x00000030 },
+ { DBSC_DBSCHQOS152, 0x00000020 },
+ { DBSC_DBSCHQOS153, 0x00000010 },
+};
+
+void qos_init_m3_v10(void)
+{
+ rcar_qos_dbsc_setting(m3_v10_qos, ARRAY_SIZE(m3_v10_qos), false);
+
+ /* DRAM Split Address mapping */
+#if RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_4CH
+#if RCAR_LSI == RCAR_M3
+#error "Don't set DRAM Split 4ch(M3)"
+#else
+ ERROR("DRAM Split 4ch not supported.(M3)");
+ panic();
+#endif
+#elif (RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_2CH) || \
+ (RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_AUTO)
+ NOTICE("BL2: DRAM Split is 2ch\n");
+ io_write_32(AXI_ADSPLCR0, 0x00000000U);
+ io_write_32(AXI_ADSPLCR1, ADSPLCR0_ADRMODE_DEFAULT
+ | ADSPLCR0_SPLITSEL(0xFFU)
+ | ADSPLCR0_AREA(0x1CU)
+ | ADSPLCR0_SWP);
+ io_write_32(AXI_ADSPLCR2, 0x089A0000U);
+ io_write_32(AXI_ADSPLCR3, 0x00000000U);
+#else
+ NOTICE("BL2: DRAM Split is OFF\n");
+#endif
+
+#if !(RCAR_QOS_TYPE == RCAR_QOS_NONE)
+#if RCAR_QOS_TYPE == RCAR_QOS_TYPE_DEFAULT
+ NOTICE("BL2: QoS is default setting(%s)\n", RCAR_QOS_VERSION);
+#endif
+
+ /* Resource Alloc setting */
+ io_write_32(QOSCTRL_RAS, 0x00000028U);
+ io_write_32(QOSCTRL_FIXTH, 0x000F0005U);
+ io_write_32(QOSCTRL_REGGD, 0x00000000U);
+ io_write_64(QOSCTRL_DANN, 0x0101010102020201UL);
+ io_write_32(QOSCTRL_DANT, 0x00100804U);
+ io_write_32(QOSCTRL_EC, 0x00000000U);
+ io_write_64(QOSCTRL_EMS, 0x0000000000000000UL);
+ io_write_32(QOSCTRL_FSS, 0x000003e8U);
+ io_write_32(QOSCTRL_INSFC, 0xC7840001U);
+ io_write_32(QOSCTRL_BERR, 0x00000000U);
+ io_write_32(QOSCTRL_RACNT0, 0x00000000U);
+
+ /* QOSBW setting */
+ io_write_32(QOSCTRL_SL_INIT,
+ SL_INIT_REFFSSLOT | SL_INIT_SLOTSSLOT | SL_INIT_SSLOTCLK);
+ io_write_32(QOSCTRL_REF_ARS, 0x00330000U);
+
+ /* QOSBW SRAM setting */
+ uint32_t i;
+
+ for (i = 0U; i < ARRAY_SIZE(mstat_fix); i++) {
+ io_write_64(QOSBW_FIX_QOS_BANK0 + i * 8, mstat_fix[i]);
+ io_write_64(QOSBW_FIX_QOS_BANK1 + i * 8, mstat_fix[i]);
+ }
+ for (i = 0U; i < ARRAY_SIZE(mstat_be); i++) {
+ io_write_64(QOSBW_BE_QOS_BANK0 + i * 8, mstat_be[i]);
+ io_write_64(QOSBW_BE_QOS_BANK1 + i * 8, mstat_be[i]);
+ }
+
+ /* 3DG bus Leaf setting */
+ io_write_32(0xFD820808U, 0x00001234U);
+ io_write_32(0xFD820800U, 0x00000006U);
+ io_write_32(0xFD821800U, 0x00000006U);
+ io_write_32(0xFD822800U, 0x00000006U);
+ io_write_32(0xFD823800U, 0x00000006U);
+ io_write_32(0xFD824800U, 0x00000006U);
+ io_write_32(0xFD825800U, 0x00000006U);
+ io_write_32(0xFD826800U, 0x00000006U);
+ io_write_32(0xFD827800U, 0x00000006U);
+
+ /* RT bus Leaf setting */
+ io_write_32(0xFFC50800U, 0x00000000U);
+ io_write_32(0xFFC51800U, 0x00000000U);
+
+ /* Resource Alloc start */
+ io_write_32(QOSCTRL_RAEN, 0x00000001U);
+
+ /* QOSBW start */
+ io_write_32(QOSCTRL_STATQC, 0x00000001U);
+#else
+ NOTICE("BL2: QoS is None\n");
+
+ /* Resource Alloc setting */
+ io_write_32(QOSCTRL_EC, 0x00000000U);
+ /* Resource Alloc start */
+ io_write_32(QOSCTRL_RAEN, 0x00000001U);
+#endif /* !(RCAR_QOS_TYPE == RCAR_QOS_NONE) */
+}
diff --git a/drivers/renesas/rcar/qos/M3/qos_init_m3_v10.h b/drivers/renesas/rcar/qos/M3/qos_init_m3_v10.h
new file mode 100644
index 0000000..01ef46c
--- /dev/null
+++ b/drivers/renesas/rcar/qos/M3/qos_init_m3_v10.h
@@ -0,0 +1,12 @@
+/*
+ * Copyright (c) 2015-2017, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef QOS_INIT_M3_V10_H
+#define QOS_INIT_M3_V10_H
+
+void qos_init_m3_v10(void);
+
+#endif /* QOS_INIT_M3_V10_H */
diff --git a/drivers/renesas/rcar/qos/M3/qos_init_m3_v10_mstat.h b/drivers/renesas/rcar/qos/M3/qos_init_m3_v10_mstat.h
new file mode 100644
index 0000000..b78b5f1
--- /dev/null
+++ b/drivers/renesas/rcar/qos/M3/qos_init_m3_v10_mstat.h
@@ -0,0 +1,227 @@
+/*
+ * Copyright (c) 2015-2019, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#if RCAR_QOS_TYPE == RCAR_QOS_TYPE_DEFAULT
+static const uint64_t mstat_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x001004030000FFFFUL,
+ /* 0x0038, */ 0x001004030000FFFFUL,
+ /* 0x0040, */ 0x001414090000FFFFUL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x001410010000FFFFUL,
+ /* 0x0058, */ 0x00140C090000FFFFUL,
+ /* 0x0060, */ 0x00140C090000FFFFUL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x001410010000FFFFUL,
+ /* 0x0078, */ 0x001004020000FFFFUL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x001414090000FFFFUL,
+ /* 0x0090, */ 0x001408060000FFFFUL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00A0, */ 0x000C08020000FFFFUL,
+ /* 0x00A8, */ 0x000C04010000FFFFUL,
+ /* 0x00B0, */ 0x000C04010000FFFFUL,
+ /* 0x00B8, */ 0x0000000000000000UL,
+ /* 0x00C0, */ 0x000C08020000FFFFUL,
+ /* 0x00C8, */ 0x000C04010000FFFFUL,
+ /* 0x00D0, */ 0x000C04010000FFFFUL,
+ /* 0x00D8, */ 0x000C04030000FFFFUL,
+ /* 0x00E0, */ 0x000C100F0000FFFFUL,
+ /* 0x00E8, */ 0x0000000000000000UL,
+ /* 0x00F0, */ 0x001010080000FFFFUL,
+ /* 0x00F8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x001010080000FFFFUL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x00100C0A0000FFFFUL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x00100C0A0000FFFFUL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x00100C0A0000FFFFUL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x001008050000FFFFUL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x001028280000FFFFUL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01A0, */ 0x00100C0A0000FFFFUL,
+ /* 0x01A8, */ 0x0000000000000000UL,
+ /* 0x01B0, */ 0x0000000000000000UL,
+ /* 0x01B8, */ 0x0000000000000000UL,
+ /* 0x01C0, */ 0x0000000000000000UL,
+ /* 0x01C8, */ 0x0000000000000000UL,
+ /* 0x01D0, */ 0x0000000000000000UL,
+ /* 0x01D8, */ 0x0000000000000000UL,
+ /* 0x01E0, */ 0x0000000000000000UL,
+ /* 0x01E8, */ 0x0000000000000000UL,
+ /* 0x01F0, */ 0x0000000000000000UL,
+ /* 0x01F8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0000000000000000UL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x001408010000FFFFUL,
+ /* 0x0270, */ 0x001404010000FFFFUL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x001408010000FFFFUL,
+ /* 0x0298, */ 0x001404010000FFFFUL,
+ /* 0x02A0, */ 0x000C04010000FFFFUL,
+ /* 0x02A8, */ 0x000C04010000FFFFUL,
+ /* 0x02B0, */ 0x001404010000FFFFUL,
+ /* 0x02B8, */ 0x0000000000000000UL,
+ /* 0x02C0, */ 0x0000000000000000UL,
+ /* 0x02C8, */ 0x0000000000000000UL,
+ /* 0x02D0, */ 0x000C04010000FFFFUL,
+ /* 0x02D8, */ 0x000C04010000FFFFUL,
+ /* 0x02E0, */ 0x001404010000FFFFUL,
+ /* 0x02E8, */ 0x0000000000000000UL,
+ /* 0x02F0, */ 0x0000000000000000UL,
+ /* 0x02F8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+};
+
+static const uint64_t mstat_be[] = {
+ /* 0x0000, */ 0x001200100C89C401UL,
+ /* 0x0008, */ 0x001200100C89C401UL,
+ /* 0x0010, */ 0x001200100C89C401UL,
+ /* 0x0018, */ 0x001200100C89C401UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x001100100C803401UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00A0, */ 0x0000000000000000UL,
+ /* 0x00A8, */ 0x0000000000000000UL,
+ /* 0x00B0, */ 0x0000000000000000UL,
+ /* 0x00B8, */ 0x0000000000000000UL,
+ /* 0x00C0, */ 0x0000000000000000UL,
+ /* 0x00C8, */ 0x0000000000000000UL,
+ /* 0x00D0, */ 0x0000000000000000UL,
+ /* 0x00D8, */ 0x0000000000000000UL,
+ /* 0x00E0, */ 0x0000000000000000UL,
+ /* 0x00E8, */ 0x0000000000000000UL,
+ /* 0x00F0, */ 0x0000000000000000UL,
+ /* 0x00F8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01A0, */ 0x0000000000000000UL,
+ /* 0x01A8, */ 0x0000000000000000UL,
+ /* 0x01B0, */ 0x0000000000000000UL,
+ /* 0x01B8, */ 0x0000000000000000UL,
+ /* 0x01C0, */ 0x001100500C8FFC01UL,
+ /* 0x01C8, */ 0x001100500C8FFC01UL,
+ /* 0x01D0, */ 0x001100500C8FFC01UL,
+ /* 0x01D8, */ 0x001100500C8FFC01UL,
+ /* 0x01E0, */ 0x0000000000000000UL,
+ /* 0x01E8, */ 0x001200100C803401UL,
+ /* 0x01F0, */ 0x001100100C80FC01UL,
+ /* 0x01F8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x001200100C80FC01UL,
+ /* 0x0210, */ 0x001100100C80FC01UL,
+ /* 0x0218, */ 0x001100100C825801UL,
+ /* 0x0220, */ 0x001100100C825801UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x001100100C825801UL,
+ /* 0x0238, */ 0x001100100C825801UL,
+ /* 0x0240, */ 0x001200100C8BB801UL,
+ /* 0x0248, */ 0x001100100C8EA401UL,
+ /* 0x0250, */ 0x001200100C8BB801UL,
+ /* 0x0258, */ 0x001100100C8EA401UL,
+ /* 0x0260, */ 0x001100100C84E401UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x001100100C81F401UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02A0, */ 0x0000000000000000UL,
+ /* 0x02A8, */ 0x0000000000000000UL,
+ /* 0x02B0, */ 0x0000000000000000UL,
+ /* 0x02B8, */ 0x001100100C803401UL,
+ /* 0x02C0, */ 0x0000000000000000UL,
+ /* 0x02C8, */ 0x0000000000000000UL,
+ /* 0x02D0, */ 0x0000000000000000UL,
+ /* 0x02D8, */ 0x0000000000000000UL,
+ /* 0x02E0, */ 0x0000000000000000UL,
+ /* 0x02E8, */ 0x001100100C803401UL,
+ /* 0x02F0, */ 0x001100300C8FFC01UL,
+ /* 0x02F8, */ 0x001100500C8FFC01UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x001100300C8FFC01UL,
+ /* 0x0310, */ 0x001100500C8FFC01UL,
+ /* 0x0318, */ 0x001200100C803401UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+};
+#endif
diff --git a/drivers/renesas/rcar/qos/M3/qos_init_m3_v11.c b/drivers/renesas/rcar/qos/M3/qos_init_m3_v11.c
new file mode 100644
index 0000000..22fd83a
--- /dev/null
+++ b/drivers/renesas/rcar/qos/M3/qos_init_m3_v11.c
@@ -0,0 +1,223 @@
+/*
+ * Copyright (c) 2017-2019, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <stdint.h>
+
+#include <common/debug.h>
+
+#include "../qos_common.h"
+#include "../qos_reg.h"
+#include "qos_init_m3_v11.h"
+
+#define RCAR_QOS_VERSION "rev.0.19"
+
+#define QOSWT_TIME_BANK0 20000000U /* unit:ns */
+
+#define QOSWT_WTEN_ENABLE 0x1U
+
+#define QOSCTRL_REF_ARS_ARBSTOPCYCLE_M3_11 (SL_INIT_SSLOTCLK_M3_11 - 0x5U)
+
+#define OSWT_WTREF_SLOT0_EN_REQ1_SLOT 3U
+#define OSWT_WTREF_SLOT0_EN_REQ2_SLOT 9U
+#define QOSWT_WTREF_SLOT0_EN \
+ ((0x1U << OSWT_WTREF_SLOT0_EN_REQ1_SLOT) | \
+ (0x1U << OSWT_WTREF_SLOT0_EN_REQ2_SLOT))
+#define QOSWT_WTREF_SLOT1_EN \
+ ((0x1U << OSWT_WTREF_SLOT0_EN_REQ1_SLOT) | \
+ (0x1U << OSWT_WTREF_SLOT0_EN_REQ2_SLOT))
+
+#define QOSWT_WTSET0_REQ_SSLOT0 5U
+#define WT_BASE_SUB_SLOT_NUM0 12U
+#define QOSWT_WTSET0_PERIOD0_M3_11 \
+ ((QOSWT_TIME_BANK0 / QOSWT_WTSET0_CYCLE_M3_11) - 1U)
+#define QOSWT_WTSET0_SSLOT0 (QOSWT_WTSET0_REQ_SSLOT0 - 1U)
+#define QOSWT_WTSET0_SLOTSLOT0 (WT_BASE_SUB_SLOT_NUM0 - 1U)
+
+#define QOSWT_WTSET1_PERIOD1_M3_11 \
+ ((QOSWT_TIME_BANK0 / QOSWT_WTSET0_CYCLE_M3_11) - 1U)
+#define QOSWT_WTSET1_SSLOT1 (QOSWT_WTSET0_REQ_SSLOT0 - 1U)
+#define QOSWT_WTSET1_SLOTSLOT1 (WT_BASE_SUB_SLOT_NUM0 - 1U)
+
+#if RCAR_QOS_TYPE == RCAR_QOS_TYPE_DEFAULT
+
+#if RCAR_REF_INT == RCAR_REF_DEFAULT
+#include "qos_init_m3_v11_mstat195.h"
+#else
+#include "qos_init_m3_v11_mstat390.h"
+#endif
+
+#if RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE
+
+#if RCAR_REF_INT == RCAR_REF_DEFAULT
+#include "qos_init_m3_v11_qoswt195.h"
+#else
+#include "qos_init_m3_v11_qoswt390.h"
+#endif
+
+#endif /* RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE */
+#endif
+
+struct rcar_gen3_dbsc_qos_settings m3_v11_qos[] = {
+ /* BUFCAM settings */
+ { DBSC_DBCAM0CNF1, 0x00043218 },
+ { DBSC_DBCAM0CNF2, 0x000000F4 },
+ { DBSC_DBCAM0CNF3, 0x00000000 },
+ { DBSC_DBSCHCNT0, 0x000F0037 },
+ { DBSC_DBSCHSZ0, 0x00000001 },
+ { DBSC_DBSCHRW0, 0x22421111 },
+
+ /* DDR3 */
+ { DBSC_SCFCTST2, 0x012F1123 },
+
+ /* QoS Settings */
+ { DBSC_DBSCHQOS00, 0x00000F00 },
+ { DBSC_DBSCHQOS01, 0x00000B00 },
+ { DBSC_DBSCHQOS02, 0x00000000 },
+ { DBSC_DBSCHQOS03, 0x00000000 },
+ { DBSC_DBSCHQOS40, 0x00000300 },
+ { DBSC_DBSCHQOS41, 0x000002F0 },
+ { DBSC_DBSCHQOS42, 0x00000200 },
+ { DBSC_DBSCHQOS43, 0x00000100 },
+ { DBSC_DBSCHQOS90, 0x00000100 },
+ { DBSC_DBSCHQOS91, 0x000000F0 },
+ { DBSC_DBSCHQOS92, 0x000000A0 },
+ { DBSC_DBSCHQOS93, 0x00000040 },
+ { DBSC_DBSCHQOS120, 0x00000040 },
+ { DBSC_DBSCHQOS121, 0x00000030 },
+ { DBSC_DBSCHQOS122, 0x00000020 },
+ { DBSC_DBSCHQOS123, 0x00000010 },
+ { DBSC_DBSCHQOS130, 0x00000100 },
+ { DBSC_DBSCHQOS131, 0x000000F0 },
+ { DBSC_DBSCHQOS132, 0x000000A0 },
+ { DBSC_DBSCHQOS133, 0x00000040 },
+ { DBSC_DBSCHQOS140, 0x000000C0 },
+ { DBSC_DBSCHQOS141, 0x000000B0 },
+ { DBSC_DBSCHQOS142, 0x00000080 },
+ { DBSC_DBSCHQOS143, 0x00000040 },
+ { DBSC_DBSCHQOS150, 0x00000040 },
+ { DBSC_DBSCHQOS151, 0x00000030 },
+ { DBSC_DBSCHQOS152, 0x00000020 },
+ { DBSC_DBSCHQOS153, 0x00000010 },
+};
+
+void qos_init_m3_v11(void)
+{
+ rcar_qos_dbsc_setting(m3_v11_qos, ARRAY_SIZE(m3_v11_qos), false);
+
+ /* DRAM Split Address mapping */
+#if RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_4CH
+#if RCAR_LSI == RCAR_M3
+#error "Don't set DRAM Split 4ch(M3)"
+#else
+ ERROR("DRAM Split 4ch not supported.(M3)");
+ panic();
+#endif
+#elif (RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_2CH) || \
+ (RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_AUTO)
+ NOTICE("BL2: DRAM Split is 2ch\n");
+ io_write_32(AXI_ADSPLCR0, 0x00000000U);
+ io_write_32(AXI_ADSPLCR1, ADSPLCR0_ADRMODE_DEFAULT
+ | ADSPLCR0_SPLITSEL(0xFFU)
+ | ADSPLCR0_AREA(0x1CU)
+ | ADSPLCR0_SWP);
+ io_write_32(AXI_ADSPLCR2, 0x00001004U);
+ io_write_32(AXI_ADSPLCR3, 0x00000000U);
+#else
+ NOTICE("BL2: DRAM Split is OFF\n");
+#endif
+
+#if !(RCAR_QOS_TYPE == RCAR_QOS_NONE)
+#if RCAR_QOS_TYPE == RCAR_QOS_TYPE_DEFAULT
+ NOTICE("BL2: QoS is default setting(%s)\n", RCAR_QOS_VERSION);
+#endif
+
+#if RCAR_REF_INT == RCAR_REF_DEFAULT
+ NOTICE("BL2: DRAM refresh interval 1.95 usec\n");
+#else
+ NOTICE("BL2: DRAM refresh interval 3.9 usec\n");
+#endif
+
+#if RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE
+ NOTICE("BL2: Periodic Write DQ Training\n");
+#endif /* RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE */
+
+ io_write_32(QOSCTRL_RAS, 0x00000044U);
+ io_write_64(QOSCTRL_DANN, 0x0404020002020201UL);
+ io_write_32(QOSCTRL_DANT, 0x0020100AU);
+ io_write_32(QOSCTRL_INSFC, 0x06330001U);
+ io_write_32(QOSCTRL_RACNT0, 0x02010003U); /* GPU Boost Mode ON */
+
+ io_write_32(QOSCTRL_SL_INIT,
+ SL_INIT_REFFSSLOT | SL_INIT_SLOTSSLOT |
+ SL_INIT_SSLOTCLK_M3_11);
+#if RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE
+ io_write_32(QOSCTRL_REF_ARS,
+ ((QOSCTRL_REF_ARS_ARBSTOPCYCLE_M3_11 << 16)));
+#else
+ io_write_32(QOSCTRL_REF_ARS, 0x00330000U);
+#endif /* RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE */
+
+ uint32_t i;
+
+ for (i = 0U; i < ARRAY_SIZE(mstat_fix); i++) {
+ io_write_64(QOSBW_FIX_QOS_BANK0 + i * 8, mstat_fix[i]);
+ io_write_64(QOSBW_FIX_QOS_BANK1 + i * 8, mstat_fix[i]);
+ }
+ for (i = 0U; i < ARRAY_SIZE(mstat_be); i++) {
+ io_write_64(QOSBW_BE_QOS_BANK0 + i * 8, mstat_be[i]);
+ io_write_64(QOSBW_BE_QOS_BANK1 + i * 8, mstat_be[i]);
+ }
+#if RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE
+ for (i = 0U; i < ARRAY_SIZE(qoswt_fix); i++) {
+ io_write_64(QOSWT_FIX_WTQOS_BANK0 + i * 8, qoswt_fix[i]);
+ io_write_64(QOSWT_FIX_WTQOS_BANK1 + i * 8, qoswt_fix[i]);
+ }
+ for (i = 0U; i < ARRAY_SIZE(qoswt_be); i++) {
+ io_write_64(QOSWT_BE_WTQOS_BANK0 + i * 8, qoswt_be[i]);
+ io_write_64(QOSWT_BE_WTQOS_BANK1 + i * 8, qoswt_be[i]);
+ }
+#endif /* RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE */
+
+ /* 3DG bus Leaf setting */
+ io_write_32(GPU_ACT_GRD, 0x00001234U);
+ io_write_32(GPU_ACT0, 0x00000000U);
+ io_write_32(GPU_ACT1, 0x00000000U);
+ io_write_32(GPU_ACT2, 0x00000000U);
+ io_write_32(GPU_ACT3, 0x00000000U);
+
+ /* RT bus Leaf setting */
+ io_write_32(RT_ACT0, 0x00000000U);
+ io_write_32(RT_ACT1, 0x00000000U);
+
+ /* CCI bus Leaf setting */
+ io_write_32(CPU_ACT0, 0x00000003U);
+ io_write_32(CPU_ACT1, 0x00000003U);
+ io_write_32(CPU_ACT2, 0x00000003U);
+ io_write_32(CPU_ACT3, 0x00000003U);
+
+ io_write_32(QOSCTRL_RAEN, 0x00000001U);
+
+#if RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE
+ /* re-write training setting */
+ io_write_32(QOSWT_WTREF,
+ ((QOSWT_WTREF_SLOT1_EN << 16) | QOSWT_WTREF_SLOT0_EN));
+ io_write_32(QOSWT_WTSET0,
+ ((QOSWT_WTSET0_PERIOD0_M3_11 << 16) |
+ (QOSWT_WTSET0_SSLOT0 << 8) | QOSWT_WTSET0_SLOTSLOT0));
+ io_write_32(QOSWT_WTSET1,
+ ((QOSWT_WTSET1_PERIOD1_M3_11 << 16) |
+ (QOSWT_WTSET1_SSLOT1 << 8) | QOSWT_WTSET1_SLOTSLOT1));
+
+ io_write_32(QOSWT_WTEN, QOSWT_WTEN_ENABLE);
+#endif /* RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE */
+
+ io_write_32(QOSCTRL_STATQC, 0x00000001U);
+#else
+ NOTICE("BL2: QoS is None\n");
+
+ io_write_32(QOSCTRL_RAEN, 0x00000001U);
+#endif /* !(RCAR_QOS_TYPE == RCAR_QOS_NONE) */
+}
diff --git a/drivers/renesas/rcar/qos/M3/qos_init_m3_v11.h b/drivers/renesas/rcar/qos/M3/qos_init_m3_v11.h
new file mode 100644
index 0000000..1552fb6
--- /dev/null
+++ b/drivers/renesas/rcar/qos/M3/qos_init_m3_v11.h
@@ -0,0 +1,12 @@
+/*
+ * Copyright (c) 2017, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef QOS_INIT_M3_V11_H
+#define QOS_INIT_M3_V11_H
+
+void qos_init_m3_v11(void);
+
+#endif /* QOS_INIT_M3_V11_H */
diff --git a/drivers/renesas/rcar/qos/M3/qos_init_m3_v11_mstat195.h b/drivers/renesas/rcar/qos/M3/qos_init_m3_v11_mstat195.h
new file mode 100644
index 0000000..d7e7777
--- /dev/null
+++ b/drivers/renesas/rcar/qos/M3/qos_init_m3_v11_mstat195.h
@@ -0,0 +1,225 @@
+/*
+ * Copyright (c) 2018, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+static uint64_t mstat_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x001004040000FFFFUL,
+ /* 0x0038, */ 0x001004040000FFFFUL,
+ /* 0x0040, */ 0x001414090000FFFFUL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x001404010000FFFFUL,
+ /* 0x0058, */ 0x00140C0A0000FFFFUL,
+ /* 0x0060, */ 0x00140C0A0000FFFFUL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x001404010000FFFFUL,
+ /* 0x0078, */ 0x001004030000FFFFUL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x001414090000FFFFUL,
+ /* 0x0090, */ 0x001408070000FFFFUL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x000C04020000FFFFUL,
+ /* 0x00a8, */ 0x000C04010000FFFFUL,
+ /* 0x00b0, */ 0x000C04010000FFFFUL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x000C04020000FFFFUL,
+ /* 0x00c8, */ 0x000C04010000FFFFUL,
+ /* 0x00d0, */ 0x000C04010000FFFFUL,
+ /* 0x00d8, */ 0x000C08050000FFFFUL,
+ /* 0x00e0, */ 0x000C14120000FFFFUL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x001024090000FFFFUL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x00100C090000FFFFUL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x00100C0B0000FFFFUL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0010100D0000FFFFUL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x00100C0B0000FFFFUL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x001008060000FFFFUL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x00102C2C0000FFFFUL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x00100C0B0000FFFFUL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x000C04010000FFFFUL,
+ /* 0x01c8, */ 0x000C04010000FFFFUL,
+ /* 0x01d0, */ 0x000C04010000FFFFUL,
+ /* 0x01d8, */ 0x000C04010000FFFFUL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x000C04010000FFFFUL,
+ /* 0x01f0, */ 0x000C04010000FFFFUL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x000C04010000FFFFUL,
+ /* 0x0210, */ 0x000C04010000FFFFUL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x000C08020000FFFFUL,
+ /* 0x0268, */ 0x001408010000FFFFUL,
+ /* 0x0270, */ 0x001404010000FFFFUL,
+ /* 0x0278, */ 0x000C04010000FFFFUL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x001408010000FFFFUL,
+ /* 0x0298, */ 0x001404010000FFFFUL,
+ /* 0x02a0, */ 0x000C04010000FFFFUL,
+ /* 0x02a8, */ 0x000C04010000FFFFUL,
+ /* 0x02b0, */ 0x001408010000FFFFUL,
+ /* 0x02b8, */ 0x000C04010000FFFFUL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x000C04010000FFFFUL,
+ /* 0x02d8, */ 0x000C04010000FFFFUL,
+ /* 0x02e0, */ 0x001408010000FFFFUL,
+ /* 0x02e8, */ 0x000C04010000FFFFUL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+};
+
+static uint64_t mstat_be[] = {
+ /* 0x0000, */ 0x001200200BDFFC01UL,
+ /* 0x0008, */ 0x001200200BDFFC01UL,
+ /* 0x0010, */ 0x001200200BDFFC01UL,
+ /* 0x0018, */ 0x001200200BDFFC01UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x001200100BD03401UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x002100600BDFFC01UL,
+ /* 0x01c8, */ 0x002100600BDFFC01UL,
+ /* 0x01d0, */ 0x002100600BDFFC01UL,
+ /* 0x01d8, */ 0x002100600BDFFC01UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x002100200BDFFC01UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x002100200BDFFC01UL,
+ /* 0x0218, */ 0x001100200BDFFC01UL,
+ /* 0x0220, */ 0x001100200BDFFC01UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x001100200BDFFC01UL,
+ /* 0x0238, */ 0x001100200BDFFC01UL,
+ /* 0x0240, */ 0x001200200BDFFC01UL,
+ /* 0x0248, */ 0x001100200BDFFC01UL,
+ /* 0x0250, */ 0x001200200BDFFC01UL,
+ /* 0x0258, */ 0x001100200BDFFC01UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x001100400BDFFC01UL,
+ /* 0x02f8, */ 0x001100600BDFFC01UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x001100400BDFFC01UL,
+ /* 0x0310, */ 0x001100600BDFFC01UL,
+ /* 0x0318, */ 0x001200100BD03401UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+};
diff --git a/drivers/renesas/rcar/qos/M3/qos_init_m3_v11_mstat390.h b/drivers/renesas/rcar/qos/M3/qos_init_m3_v11_mstat390.h
new file mode 100644
index 0000000..a9520c3
--- /dev/null
+++ b/drivers/renesas/rcar/qos/M3/qos_init_m3_v11_mstat390.h
@@ -0,0 +1,225 @@
+/*
+ * Copyright (c) 2018, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+static uint64_t mstat_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x001008070000FFFFUL,
+ /* 0x0038, */ 0x001008070000FFFFUL,
+ /* 0x0040, */ 0x001424120000FFFFUL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x001404010000FFFFUL,
+ /* 0x0058, */ 0x001414130000FFFFUL,
+ /* 0x0060, */ 0x001414130000FFFFUL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x001404010000FFFFUL,
+ /* 0x0078, */ 0x001008050000FFFFUL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x001424120000FFFFUL,
+ /* 0x0090, */ 0x0014100D0000FFFFUL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x000C08040000FFFFUL,
+ /* 0x00a8, */ 0x000C04020000FFFFUL,
+ /* 0x00b0, */ 0x000C04020000FFFFUL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x000C08040000FFFFUL,
+ /* 0x00c8, */ 0x000C04020000FFFFUL,
+ /* 0x00d0, */ 0x000C04020000FFFFUL,
+ /* 0x00d8, */ 0x000C0C0A0000FFFFUL,
+ /* 0x00e0, */ 0x000C24230000FFFFUL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x001044110000FFFFUL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x001014110000FFFFUL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x001018150000FFFFUL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x00101C190000FFFFUL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x001018150000FFFFUL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x00100C0B0000FFFFUL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x001058570000FFFFUL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x001018150000FFFFUL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x000C04010000FFFFUL,
+ /* 0x01c8, */ 0x000C04010000FFFFUL,
+ /* 0x01d0, */ 0x000C04010000FFFFUL,
+ /* 0x01d8, */ 0x000C04010000FFFFUL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x000C04010000FFFFUL,
+ /* 0x01f0, */ 0x000C04010000FFFFUL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x000C04010000FFFFUL,
+ /* 0x0210, */ 0x000C04010000FFFFUL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x000C0C030000FFFFUL,
+ /* 0x0268, */ 0x001410010000FFFFUL,
+ /* 0x0270, */ 0x001404010000FFFFUL,
+ /* 0x0278, */ 0x000C08020000FFFFUL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x001410010000FFFFUL,
+ /* 0x0298, */ 0x001404010000FFFFUL,
+ /* 0x02a0, */ 0x000C04010000FFFFUL,
+ /* 0x02a8, */ 0x000C04010000FFFFUL,
+ /* 0x02b0, */ 0x00140C010000FFFFUL,
+ /* 0x02b8, */ 0x000C04010000FFFFUL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x000C04010000FFFFUL,
+ /* 0x02d8, */ 0x000C04010000FFFFUL,
+ /* 0x02e0, */ 0x00140C010000FFFFUL,
+ /* 0x02e8, */ 0x000C04010000FFFFUL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+};
+
+static uint64_t mstat_be[] = {
+ /* 0x0000, */ 0x0012003005EFFC01UL,
+ /* 0x0008, */ 0x0012003005EFFC01UL,
+ /* 0x0010, */ 0x0012003005EFFC01UL,
+ /* 0x0018, */ 0x0012003005EFFC01UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0012001005E03401UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x002100B005EFFC01UL,
+ /* 0x01c8, */ 0x002100B005EFFC01UL,
+ /* 0x01d0, */ 0x002100B005EFFC01UL,
+ /* 0x01d8, */ 0x002100B005EFFC01UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0021003005EFFC01UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0021003005EFFC01UL,
+ /* 0x0218, */ 0x0011003005EFFC01UL,
+ /* 0x0220, */ 0x0011003005EFFC01UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0011003005EFFC01UL,
+ /* 0x0238, */ 0x0011003005EFFC01UL,
+ /* 0x0240, */ 0x0012003005EFFC01UL,
+ /* 0x0248, */ 0x0011003005EFFC01UL,
+ /* 0x0250, */ 0x0012003005EFFC01UL,
+ /* 0x0258, */ 0x0011003005EFFC01UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0011007005EFFC01UL,
+ /* 0x02f8, */ 0x001100B005EFFC01UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0011007005EFFC01UL,
+ /* 0x0310, */ 0x001100B005EFFC01UL,
+ /* 0x0318, */ 0x0012001005E03401UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+};
diff --git a/drivers/renesas/rcar/qos/M3/qos_init_m3_v11_qoswt195.h b/drivers/renesas/rcar/qos/M3/qos_init_m3_v11_qoswt195.h
new file mode 100644
index 0000000..04c7efd
--- /dev/null
+++ b/drivers/renesas/rcar/qos/M3/qos_init_m3_v11_qoswt195.h
@@ -0,0 +1,225 @@
+/*
+ * Copyright (c) 2018, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+static uint64_t qoswt_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x001004040000C010UL,
+ /* 0x0038, */ 0x001004040000C010UL,
+ /* 0x0040, */ 0x001414090000FFF0UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x00140C0A0000C010UL,
+ /* 0x0060, */ 0x00140C0A0000C010UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x001004030000C010UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x001414090000FFF0UL,
+ /* 0x0090, */ 0x001408070000C010UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x0000000000000000UL,
+ /* 0x01c8, */ 0x0000000000000000UL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0000000000000000UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0000000000000000UL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x000C08020000FFF0UL,
+ /* 0x0268, */ 0x001408010000FFF0UL,
+ /* 0x0270, */ 0x001404010000FFF0UL,
+ /* 0x0278, */ 0x000C04010000FFF0UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x001408010000FFF0UL,
+ /* 0x0298, */ 0x001404010000FFF0UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+};
+
+static uint64_t qoswt_be[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x0000000000000000UL,
+ /* 0x01c8, */ 0x0000000000000000UL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0000000000000000UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0000000000000000UL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+};
diff --git a/drivers/renesas/rcar/qos/M3/qos_init_m3_v11_qoswt390.h b/drivers/renesas/rcar/qos/M3/qos_init_m3_v11_qoswt390.h
new file mode 100644
index 0000000..73f81f5
--- /dev/null
+++ b/drivers/renesas/rcar/qos/M3/qos_init_m3_v11_qoswt390.h
@@ -0,0 +1,225 @@
+/*
+ * Copyright (c) 2018, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+static uint64_t qoswt_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x001008070000C010UL,
+ /* 0x0038, */ 0x001008070000C010UL,
+ /* 0x0040, */ 0x001424120000FFF0UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x001414130000C010UL,
+ /* 0x0060, */ 0x001414130000C010UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x001008050000C010UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x001424120000FFF0UL,
+ /* 0x0090, */ 0x0014100D0000C010UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x0000000000000000UL,
+ /* 0x01c8, */ 0x0000000000000000UL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0000000000000000UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0000000000000000UL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x000C0C030000FFF0UL,
+ /* 0x0268, */ 0x001410010000FFF0UL,
+ /* 0x0270, */ 0x001404010000FFF0UL,
+ /* 0x0278, */ 0x000C08020000FFF0UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x001410010000FFF0UL,
+ /* 0x0298, */ 0x001404010000FFF0UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+};
+
+static uint64_t qoswt_be[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x0000000000000000UL,
+ /* 0x01c8, */ 0x0000000000000000UL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0000000000000000UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0000000000000000UL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+};
diff --git a/drivers/renesas/rcar/qos/M3/qos_init_m3_v30.c b/drivers/renesas/rcar/qos/M3/qos_init_m3_v30.c
new file mode 100644
index 0000000..43d21d7
--- /dev/null
+++ b/drivers/renesas/rcar/qos/M3/qos_init_m3_v30.c
@@ -0,0 +1,209 @@
+/*
+ * Copyright (c) 2019, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <stdint.h>
+
+#include <common/debug.h>
+
+#include "../qos_common.h"
+#include "../qos_reg.h"
+#include "qos_init_m3_v30.h"
+
+#define RCAR_QOS_VERSION "rev.0.04"
+
+#define QOSWT_TIME_BANK0 20000000U /* unit:ns */
+
+#define QOSWT_WTEN_ENABLE 0x1U
+
+#define QOSCTRL_REF_ARS_ARBSTOPCYCLE_M3_30 (SL_INIT_SSLOTCLK_M3_30 - 0x5U)
+
+#define OSWT_WTREF_SLOT0_EN_REQ1_SLOT 3U
+#define OSWT_WTREF_SLOT0_EN_REQ2_SLOT 9U
+#define QOSWT_WTREF_SLOT0_EN \
+ ((0x1U << OSWT_WTREF_SLOT0_EN_REQ1_SLOT) | \
+ (0x1U << OSWT_WTREF_SLOT0_EN_REQ2_SLOT))
+#define QOSWT_WTREF_SLOT1_EN \
+ ((0x1U << OSWT_WTREF_SLOT0_EN_REQ1_SLOT) | \
+ (0x1U << OSWT_WTREF_SLOT0_EN_REQ2_SLOT))
+
+#define QOSWT_WTSET0_REQ_SSLOT0 5U
+#define WT_BASE_SUB_SLOT_NUM0 12U
+#define QOSWT_WTSET0_PERIOD0_M3_30 \
+ ((QOSWT_TIME_BANK0 / QOSWT_WTSET0_CYCLE_M3_30) - 1U)
+#define QOSWT_WTSET0_SSLOT0 (QOSWT_WTSET0_REQ_SSLOT0 - 1U)
+#define QOSWT_WTSET0_SLOTSLOT0 (WT_BASE_SUB_SLOT_NUM0 - 1U)
+
+#define QOSWT_WTSET1_PERIOD1_M3_30 \
+ ((QOSWT_TIME_BANK0 / QOSWT_WTSET0_CYCLE_M3_30) - 1U)
+#define QOSWT_WTSET1_SSLOT1 (QOSWT_WTSET0_REQ_SSLOT0 - 1U)
+#define QOSWT_WTSET1_SLOTSLOT1 (WT_BASE_SUB_SLOT_NUM0 - 1U)
+
+#if RCAR_QOS_TYPE == RCAR_QOS_TYPE_DEFAULT
+
+#if RCAR_REF_INT == RCAR_REF_DEFAULT
+#include "qos_init_m3_v30_mstat195.h"
+#else
+#include "qos_init_m3_v30_mstat390.h"
+#endif
+
+#if RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE
+
+#if RCAR_REF_INT == RCAR_REF_DEFAULT
+#include "qos_init_m3_v30_qoswt195.h"
+#else
+#include "qos_init_m3_v30_qoswt390.h"
+#endif
+
+#endif /* RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE */
+#endif
+
+struct rcar_gen3_dbsc_qos_settings m3_v30_qos[] = {
+ /* BUFCAM settings */
+ { DBSC_DBCAM0CNF1, 0x00043218 },
+ { DBSC_DBCAM0CNF2, 0x000000F4 },
+ { DBSC_DBCAM0CNF3, 0x00000000 },
+ { DBSC_DBSCHCNT0, 0x000F0037 },
+ { DBSC_DBSCHSZ0, 0x00000001 },
+ { DBSC_DBSCHRW0, 0x22421111 },
+
+ /* DDR3 */
+ { DBSC_SCFCTST2, 0x012F1123 },
+
+ /* QoS Settings */
+ { DBSC_DBSCHQOS00, 0x00000F00 },
+ { DBSC_DBSCHQOS01, 0x00000B00 },
+ { DBSC_DBSCHQOS02, 0x00000000 },
+ { DBSC_DBSCHQOS03, 0x00000000 },
+ { DBSC_DBSCHQOS40, 0x00000300 },
+ { DBSC_DBSCHQOS41, 0x000002F0 },
+ { DBSC_DBSCHQOS42, 0x00000200 },
+ { DBSC_DBSCHQOS43, 0x00000100 },
+ { DBSC_DBSCHQOS90, 0x00000100 },
+ { DBSC_DBSCHQOS91, 0x000000F0 },
+ { DBSC_DBSCHQOS92, 0x000000A0 },
+ { DBSC_DBSCHQOS93, 0x00000040 },
+ { DBSC_DBSCHQOS120, 0x00000040 },
+ { DBSC_DBSCHQOS121, 0x00000030 },
+ { DBSC_DBSCHQOS122, 0x00000020 },
+ { DBSC_DBSCHQOS123, 0x00000010 },
+ { DBSC_DBSCHQOS130, 0x00000100 },
+ { DBSC_DBSCHQOS131, 0x000000F0 },
+ { DBSC_DBSCHQOS132, 0x000000A0 },
+ { DBSC_DBSCHQOS133, 0x00000040 },
+ { DBSC_DBSCHQOS140, 0x000000C0 },
+ { DBSC_DBSCHQOS141, 0x000000B0 },
+ { DBSC_DBSCHQOS142, 0x00000080 },
+ { DBSC_DBSCHQOS143, 0x00000040 },
+ { DBSC_DBSCHQOS150, 0x00000040 },
+ { DBSC_DBSCHQOS151, 0x00000030 },
+ { DBSC_DBSCHQOS152, 0x00000020 },
+ { DBSC_DBSCHQOS153, 0x00000010 },
+};
+
+void qos_init_m3_v30(void)
+{
+ rcar_qos_dbsc_setting(m3_v30_qos, ARRAY_SIZE(m3_v30_qos), true);
+
+ /* DRAM Split Address mapping */
+#if RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_4CH
+ #if RCAR_LSI == RCAR_M3
+ #error "Don't set DRAM Split 4ch(M3)"
+ #else
+ ERROR("DRAM Split 4ch not supported.(M3)");
+ panic();
+ #endif
+#elif (RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_2CH) || \
+ (RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_AUTO)
+ NOTICE("BL2: DRAM Split is 2ch\n");
+ io_write_32(AXI_ADSPLCR0, 0x00000000U);
+ io_write_32(AXI_ADSPLCR1, ADSPLCR0_ADRMODE_DEFAULT
+ | ADSPLCR0_SPLITSEL(0xFFU)
+ | ADSPLCR0_AREA(0x1DU)
+ | ADSPLCR0_SWP);
+ io_write_32(AXI_ADSPLCR2, 0x00001004U);
+ io_write_32(AXI_ADSPLCR3, 0x00000000U);
+#else
+ NOTICE("BL2: DRAM Split is OFF\n");
+#endif
+
+#if !(RCAR_QOS_TYPE == RCAR_QOS_NONE)
+#if RCAR_QOS_TYPE == RCAR_QOS_TYPE_DEFAULT
+ NOTICE("BL2: QoS is default setting(%s)\n", RCAR_QOS_VERSION);
+#endif
+
+#if RCAR_REF_INT == RCAR_REF_DEFAULT
+ NOTICE("BL2: DRAM refresh interval 1.95 usec\n");
+#else
+ NOTICE("BL2: DRAM refresh interval 3.9 usec\n");
+#endif
+
+#if RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE
+ NOTICE("BL2: Periodic Write DQ Training\n");
+#endif /* RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE */
+
+ io_write_32(QOSCTRL_RAS, 0x00000044U);
+ io_write_64(QOSCTRL_DANN, 0x0404020002020201UL);
+ io_write_32(QOSCTRL_DANT, 0x0020100AU);
+ io_write_32(QOSCTRL_FSS, 0x0000000AU);
+ io_write_32(QOSCTRL_INSFC, 0x06330001U);
+ io_write_32(QOSCTRL_EARLYR, 0x00000001U);
+ io_write_32(QOSCTRL_RACNT0, 0x02010003U); /* GPU Boost Mode ON */
+
+ /* GPU Boost Mode */
+ io_write_32(QOSCTRL_STATGEN0, 0x00000001U);
+
+ io_write_32(QOSCTRL_SL_INIT, SL_INIT_REFFSSLOT | SL_INIT_SLOTSSLOT | SL_INIT_SSLOTCLK_M3_30);
+ io_write_32(QOSCTRL_REF_ARS, ((QOSCTRL_REF_ARS_ARBSTOPCYCLE_M3_30 << 16)));
+
+ uint32_t i;
+
+ for (i = 0U; i < ARRAY_SIZE(mstat_fix); i++) {
+ io_write_64(QOSBW_FIX_QOS_BANK0 + i * 8, mstat_fix[i]);
+ io_write_64(QOSBW_FIX_QOS_BANK1 + i * 8, mstat_fix[i]);
+ }
+ for (i = 0U; i < ARRAY_SIZE(mstat_be); i++) {
+ io_write_64(QOSBW_BE_QOS_BANK0 + i * 8, mstat_be[i]);
+ io_write_64(QOSBW_BE_QOS_BANK1 + i * 8, mstat_be[i]);
+ }
+#if RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE
+ for (i = 0U; i < ARRAY_SIZE(qoswt_fix); i++) {
+ io_write_64(QOSWT_FIX_WTQOS_BANK0 + i * 8, qoswt_fix[i]);
+ io_write_64(QOSWT_FIX_WTQOS_BANK1 + i * 8, qoswt_fix[i]);
+ }
+ for (i = 0U; i < ARRAY_SIZE(qoswt_be); i++) {
+ io_write_64(QOSWT_BE_WTQOS_BANK0 + i * 8, qoswt_be[i]);
+ io_write_64(QOSWT_BE_WTQOS_BANK1 + i * 8, qoswt_be[i]);
+ }
+#endif /* RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE */
+
+ /* RT bus Leaf setting */
+ io_write_32(RT_ACT0, 0x00000000U);
+ io_write_32(RT_ACT1, 0x00000000U);
+
+ /* CCI bus Leaf setting */
+ io_write_32(CPU_ACT0, 0x00000003U);
+ io_write_32(CPU_ACT1, 0x00000003U);
+ io_write_32(CPU_ACT2, 0x00000003U);
+ io_write_32(CPU_ACT3, 0x00000003U);
+
+ io_write_32(QOSCTRL_RAEN, 0x00000001U);
+
+#if RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE
+ /* re-write training setting */
+ io_write_32(QOSWT_WTREF, ((QOSWT_WTREF_SLOT1_EN << 16) | QOSWT_WTREF_SLOT0_EN));
+ io_write_32(QOSWT_WTSET0, ((QOSWT_WTSET0_PERIOD0_M3_30 << 16) | (QOSWT_WTSET0_SSLOT0 << 8) | QOSWT_WTSET0_SLOTSLOT0));
+ io_write_32(QOSWT_WTSET1, ((QOSWT_WTSET1_PERIOD1_M3_30 << 16) | (QOSWT_WTSET1_SSLOT1 << 8) | QOSWT_WTSET1_SLOTSLOT1));
+
+ io_write_32(QOSWT_WTEN, QOSWT_WTEN_ENABLE);
+#endif /* RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE */
+
+ io_write_32(QOSCTRL_STATQC, 0x00000001U);
+#else
+ NOTICE("BL2: QoS is None\n");
+
+ io_write_32(QOSCTRL_RAEN, 0x00000001U);
+#endif /* !(RCAR_QOS_TYPE == RCAR_QOS_NONE) */
+}
diff --git a/drivers/renesas/rcar/qos/M3/qos_init_m3_v30.h b/drivers/renesas/rcar/qos/M3/qos_init_m3_v30.h
new file mode 100644
index 0000000..a89d512
--- /dev/null
+++ b/drivers/renesas/rcar/qos/M3/qos_init_m3_v30.h
@@ -0,0 +1,12 @@
+/*
+ * Copyright (c) 2019, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef QOS_INIT_H_M3_V30__
+#define QOS_INIT_H_M3_V30__
+
+void qos_init_m3_v30(void);
+
+#endif /* QOS_INIT_H_M3_V30__ */
diff --git a/drivers/renesas/rcar/qos/M3/qos_init_m3_v30_mstat195.h b/drivers/renesas/rcar/qos/M3/qos_init_m3_v30_mstat195.h
new file mode 100644
index 0000000..2ab14da
--- /dev/null
+++ b/drivers/renesas/rcar/qos/M3/qos_init_m3_v30_mstat195.h
@@ -0,0 +1,225 @@
+/*
+ * Copyright (c) 2019, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+static uint64_t mstat_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x001004040000FFFFUL,
+ /* 0x0038, */ 0x001004040000FFFFUL,
+ /* 0x0040, */ 0x001414090000FFFFUL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x001404010000FFFFUL,
+ /* 0x0058, */ 0x00140C0A0000FFFFUL,
+ /* 0x0060, */ 0x00140C0A0000FFFFUL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x001404010000FFFFUL,
+ /* 0x0078, */ 0x001004030000FFFFUL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x001414090000FFFFUL,
+ /* 0x0090, */ 0x001408070000FFFFUL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x000C04020000FFFFUL,
+ /* 0x00a8, */ 0x000C04010000FFFFUL,
+ /* 0x00b0, */ 0x000C04010000FFFFUL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x000C04020000FFFFUL,
+ /* 0x00c8, */ 0x000C04010000FFFFUL,
+ /* 0x00d0, */ 0x000C04010000FFFFUL,
+ /* 0x00d8, */ 0x000C08050000FFFFUL,
+ /* 0x00e0, */ 0x000C10100000FFFFUL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x001024090000FFFFUL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x00100C090000FFFFUL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x000C10100000FFFFUL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x00100C0B0000FFFFUL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0010100D0000FFFFUL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x00100C0B0000FFFFUL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x001008060000FFFFUL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x00102C2C0000FFFFUL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x00100C0B0000FFFFUL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x000C04010000FFFFUL,
+ /* 0x01c8, */ 0x000C04010000FFFFUL,
+ /* 0x01d0, */ 0x000C04010000FFFFUL,
+ /* 0x01d8, */ 0x000C04010000FFFFUL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x000C04010000FFFFUL,
+ /* 0x01f0, */ 0x000C04010000FFFFUL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x000C04010000FFFFUL,
+ /* 0x0210, */ 0x000C04010000FFFFUL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x000C08020000FFFFUL,
+ /* 0x0268, */ 0x001408010000FFFFUL,
+ /* 0x0270, */ 0x001404010000FFFFUL,
+ /* 0x0278, */ 0x000C04010000FFFFUL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x001408010000FFFFUL,
+ /* 0x0298, */ 0x001404010000FFFFUL,
+ /* 0x02a0, */ 0x000C04010000FFFFUL,
+ /* 0x02a8, */ 0x000C04010000FFFFUL,
+ /* 0x02b0, */ 0x001408010000FFFFUL,
+ /* 0x02b8, */ 0x000C04010000FFFFUL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x000C04010000FFFFUL,
+ /* 0x02d8, */ 0x000C04010000FFFFUL,
+ /* 0x02e0, */ 0x001408010000FFFFUL,
+ /* 0x02e8, */ 0x000C04010000FFFFUL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+};
+
+static uint64_t mstat_be[] = {
+ /* 0x0000, */ 0x001200200BDFFC01UL,
+ /* 0x0008, */ 0x001200200BDFFC01UL,
+ /* 0x0010, */ 0x001200200BDFFC01UL,
+ /* 0x0018, */ 0x001200200BDFFC01UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x001200100BD03401UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x002100600BDFFC01UL,
+ /* 0x01c8, */ 0x002100600BDFFC01UL,
+ /* 0x01d0, */ 0x002100600BDFFC01UL,
+ /* 0x01d8, */ 0x002100600BDFFC01UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x002100200BDFFC01UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x002100200BDFFC01UL,
+ /* 0x0218, */ 0x001100200BDFFC01UL,
+ /* 0x0220, */ 0x001100200BDFFC01UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x001100200BDFFC01UL,
+ /* 0x0238, */ 0x001100200BDFFC01UL,
+ /* 0x0240, */ 0x001200200BDFFC01UL,
+ /* 0x0248, */ 0x001100200BDFFC01UL,
+ /* 0x0250, */ 0x001200200BDFFC01UL,
+ /* 0x0258, */ 0x001100200BDFFC01UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x001100400BDFFC01UL,
+ /* 0x02f8, */ 0x001100600BDFFC01UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x001100400BDFFC01UL,
+ /* 0x0310, */ 0x001100600BDFFC01UL,
+ /* 0x0318, */ 0x001200100BD03401UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+};
diff --git a/drivers/renesas/rcar/qos/M3/qos_init_m3_v30_mstat390.h b/drivers/renesas/rcar/qos/M3/qos_init_m3_v30_mstat390.h
new file mode 100644
index 0000000..faac3d9
--- /dev/null
+++ b/drivers/renesas/rcar/qos/M3/qos_init_m3_v30_mstat390.h
@@ -0,0 +1,225 @@
+/*
+ * Copyright (c) 2019, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+static uint64_t mstat_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x001008070000FFFFUL,
+ /* 0x0038, */ 0x001008070000FFFFUL,
+ /* 0x0040, */ 0x001424120000FFFFUL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x001404010000FFFFUL,
+ /* 0x0058, */ 0x001414130000FFFFUL,
+ /* 0x0060, */ 0x001414130000FFFFUL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x001404010000FFFFUL,
+ /* 0x0078, */ 0x001008050000FFFFUL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x001424120000FFFFUL,
+ /* 0x0090, */ 0x0014100D0000FFFFUL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x000C08040000FFFFUL,
+ /* 0x00a8, */ 0x000C04020000FFFFUL,
+ /* 0x00b0, */ 0x000C04020000FFFFUL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x000C08040000FFFFUL,
+ /* 0x00c8, */ 0x000C04020000FFFFUL,
+ /* 0x00d0, */ 0x000C04020000FFFFUL,
+ /* 0x00d8, */ 0x000C0C0A0000FFFFUL,
+ /* 0x00e0, */ 0x000C201F0000FFFFUL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x001044110000FFFFUL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x001014110000FFFFUL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x000C201F0000FFFFUL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x001018150000FFFFUL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x00101C190000FFFFUL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x001018150000FFFFUL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x00100C0B0000FFFFUL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x001058570000FFFFUL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x001018150000FFFFUL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x000C04010000FFFFUL,
+ /* 0x01c8, */ 0x000C04010000FFFFUL,
+ /* 0x01d0, */ 0x000C04010000FFFFUL,
+ /* 0x01d8, */ 0x000C04010000FFFFUL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x000C04010000FFFFUL,
+ /* 0x01f0, */ 0x000C04010000FFFFUL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x000C04010000FFFFUL,
+ /* 0x0210, */ 0x000C04010000FFFFUL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x000C0C030000FFFFUL,
+ /* 0x0268, */ 0x001410010000FFFFUL,
+ /* 0x0270, */ 0x001404010000FFFFUL,
+ /* 0x0278, */ 0x000C08020000FFFFUL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x001410010000FFFFUL,
+ /* 0x0298, */ 0x001404010000FFFFUL,
+ /* 0x02a0, */ 0x000C04010000FFFFUL,
+ /* 0x02a8, */ 0x000C04010000FFFFUL,
+ /* 0x02b0, */ 0x00140C010000FFFFUL,
+ /* 0x02b8, */ 0x000C04010000FFFFUL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x000C04010000FFFFUL,
+ /* 0x02d8, */ 0x000C04010000FFFFUL,
+ /* 0x02e0, */ 0x00140C010000FFFFUL,
+ /* 0x02e8, */ 0x000C04010000FFFFUL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+};
+
+static uint64_t mstat_be[] = {
+ /* 0x0000, */ 0x0012003005EFFC01UL,
+ /* 0x0008, */ 0x0012003005EFFC01UL,
+ /* 0x0010, */ 0x0012003005EFFC01UL,
+ /* 0x0018, */ 0x0012003005EFFC01UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0012001005E03401UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x002100B005EFFC01UL,
+ /* 0x01c8, */ 0x002100B005EFFC01UL,
+ /* 0x01d0, */ 0x002100B005EFFC01UL,
+ /* 0x01d8, */ 0x002100B005EFFC01UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0021003005EFFC01UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0021003005EFFC01UL,
+ /* 0x0218, */ 0x0011003005EFFC01UL,
+ /* 0x0220, */ 0x0011003005EFFC01UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0011003005EFFC01UL,
+ /* 0x0238, */ 0x0011003005EFFC01UL,
+ /* 0x0240, */ 0x0012003005EFFC01UL,
+ /* 0x0248, */ 0x0011003005EFFC01UL,
+ /* 0x0250, */ 0x0012003005EFFC01UL,
+ /* 0x0258, */ 0x0011003005EFFC01UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0011007005EFFC01UL,
+ /* 0x02f8, */ 0x001100B005EFFC01UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0011007005EFFC01UL,
+ /* 0x0310, */ 0x001100B005EFFC01UL,
+ /* 0x0318, */ 0x0012001005E03401UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+};
diff --git a/drivers/renesas/rcar/qos/M3/qos_init_m3_v30_qoswt195.h b/drivers/renesas/rcar/qos/M3/qos_init_m3_v30_qoswt195.h
new file mode 100644
index 0000000..6761f5d
--- /dev/null
+++ b/drivers/renesas/rcar/qos/M3/qos_init_m3_v30_qoswt195.h
@@ -0,0 +1,225 @@
+/*
+ * Copyright (c) 2019, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+static uint64_t qoswt_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x001004040000C010UL,
+ /* 0x0038, */ 0x001004040000C010UL,
+ /* 0x0040, */ 0x001414090000FFF0UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x00140C0A0000C010UL,
+ /* 0x0060, */ 0x00140C0A0000C010UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x001004030000C010UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x001414090000FFF0UL,
+ /* 0x0090, */ 0x001408070000C010UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x0000000000000000UL,
+ /* 0x01c8, */ 0x0000000000000000UL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0000000000000000UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0000000000000000UL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x000C08020000FFF0UL,
+ /* 0x0268, */ 0x001408010000FFF0UL,
+ /* 0x0270, */ 0x001404010000FFF0UL,
+ /* 0x0278, */ 0x000C04010000FFF0UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x001408010000FFF0UL,
+ /* 0x0298, */ 0x001404010000FFF0UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+};
+
+static uint64_t qoswt_be[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x0000000000000000UL,
+ /* 0x01c8, */ 0x0000000000000000UL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0000000000000000UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0000000000000000UL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+};
diff --git a/drivers/renesas/rcar/qos/M3/qos_init_m3_v30_qoswt390.h b/drivers/renesas/rcar/qos/M3/qos_init_m3_v30_qoswt390.h
new file mode 100644
index 0000000..1deed59
--- /dev/null
+++ b/drivers/renesas/rcar/qos/M3/qos_init_m3_v30_qoswt390.h
@@ -0,0 +1,225 @@
+/*
+ * Copyright (c) 2019, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+static uint64_t qoswt_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x001008070000C010UL,
+ /* 0x0038, */ 0x001008070000C010UL,
+ /* 0x0040, */ 0x001424120000FFF0UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x001414130000C010UL,
+ /* 0x0060, */ 0x001414130000C010UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x001008050000C010UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x001424120000FFF0UL,
+ /* 0x0090, */ 0x0014100D0000C010UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x0000000000000000UL,
+ /* 0x01c8, */ 0x0000000000000000UL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0000000000000000UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0000000000000000UL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x000C0C030000FFF0UL,
+ /* 0x0268, */ 0x001410010000FFF0UL,
+ /* 0x0270, */ 0x001404010000FFF0UL,
+ /* 0x0278, */ 0x000C08020000FFF0UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x001410010000FFF0UL,
+ /* 0x0298, */ 0x001404010000FFF0UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+};
+
+static uint64_t qoswt_be[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x0000000000000000UL,
+ /* 0x01c8, */ 0x0000000000000000UL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0000000000000000UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0000000000000000UL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+};
diff --git a/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10.c b/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10.c
new file mode 100644
index 0000000..446340b
--- /dev/null
+++ b/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10.c
@@ -0,0 +1,203 @@
+/*
+ * Copyright (c) 2017-2019, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <stdint.h>
+
+#include <common/debug.h>
+
+#include "../qos_common.h"
+#include "../qos_reg.h"
+#include "qos_init_m3n_v10.h"
+
+#define RCAR_QOS_VERSION "rev.0.09"
+
+#define REF_ARS_ARBSTOPCYCLE_M3N \
+ (((SL_INIT_SSLOTCLK_M3N) - 5U) << 16U)
+
+#define QOSWT_TIME_BANK0 20000000U /* unit:ns */
+
+#define QOSWT_WTEN_ENABLE 0x1U
+
+#define OSWT_WTREF_SLOT0_EN_REQ1_SLOT 3U
+#define OSWT_WTREF_SLOT0_EN_REQ2_SLOT 9U
+#define QOSWT_WTREF_SLOT0_EN \
+ ((0x1U << OSWT_WTREF_SLOT0_EN_REQ1_SLOT) | \
+ (0x1U << OSWT_WTREF_SLOT0_EN_REQ2_SLOT))
+#define QOSWT_WTREF_SLOT1_EN QOSWT_WTREF_SLOT0_EN
+
+#define QOSWT_WTSET0_REQ_SSLOT0 5U
+#define WT_BASE_SUB_SLOT_NUM0 12U
+#define QOSWT_WTSET0_PERIOD0_M3N \
+ ((QOSWT_TIME_BANK0 / QOSWT_WTSET0_CYCLE_M3N) - 1U)
+#define QOSWT_WTSET0_SSLOT0 (QOSWT_WTSET0_REQ_SSLOT0 - 1U)
+#define QOSWT_WTSET0_SLOTSLOT0 (WT_BASE_SUB_SLOT_NUM0 - 1U)
+
+#define QOSWT_WTSET1_PERIOD1_M3N QOSWT_WTSET0_PERIOD0_M3N
+#define QOSWT_WTSET1_SSLOT1 QOSWT_WTSET0_SSLOT0
+#define QOSWT_WTSET1_SLOTSLOT1 QOSWT_WTSET0_SLOTSLOT0
+
+#if RCAR_QOS_TYPE == RCAR_QOS_TYPE_DEFAULT
+
+#if RCAR_REF_INT == RCAR_REF_DEFAULT
+#include "qos_init_m3n_v10_mstat195.h"
+#else
+#include "qos_init_m3n_v10_mstat390.h"
+#endif
+
+#if RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE
+
+#if RCAR_REF_INT == RCAR_REF_DEFAULT
+#include "qos_init_m3n_v10_qoswt195.h"
+#else
+#include "qos_init_m3n_v10_qoswt390.h"
+#endif
+
+#endif /* RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE */
+#endif
+
+struct rcar_gen3_dbsc_qos_settings m3n_v10_qos[] = {
+ /* BUFCAM settings */
+ { DBSC_DBCAM0CNF1, 0x00043218 },
+ { DBSC_DBCAM0CNF2, 0x000000F4 },
+ { DBSC_DBSCHCNT0, 0x000F0037 },
+ { DBSC_DBSCHSZ0, 0x00000001 },
+ { DBSC_DBSCHRW0, 0x22421111 },
+
+ /* DDR3 */
+ { DBSC_SCFCTST2, 0x012F1123 },
+
+ /* QoS Settings */
+ { DBSC_DBSCHQOS00, 0x00000F00 },
+ { DBSC_DBSCHQOS01, 0x00000B00 },
+ { DBSC_DBSCHQOS02, 0x00000000 },
+ { DBSC_DBSCHQOS03, 0x00000000 },
+ { DBSC_DBSCHQOS40, 0x00000300 },
+ { DBSC_DBSCHQOS41, 0x000002F0 },
+ { DBSC_DBSCHQOS42, 0x00000200 },
+ { DBSC_DBSCHQOS43, 0x00000100 },
+ { DBSC_DBSCHQOS90, 0x00000100 },
+ { DBSC_DBSCHQOS91, 0x000000F0 },
+ { DBSC_DBSCHQOS92, 0x000000A0 },
+ { DBSC_DBSCHQOS93, 0x00000040 },
+ { DBSC_DBSCHQOS130, 0x00000100 },
+ { DBSC_DBSCHQOS131, 0x000000F0 },
+ { DBSC_DBSCHQOS132, 0x000000A0 },
+ { DBSC_DBSCHQOS133, 0x00000040 },
+ { DBSC_DBSCHQOS140, 0x000000C0 },
+ { DBSC_DBSCHQOS141, 0x000000B0 },
+ { DBSC_DBSCHQOS142, 0x00000080 },
+ { DBSC_DBSCHQOS143, 0x00000040 },
+ { DBSC_DBSCHQOS150, 0x00000040 },
+ { DBSC_DBSCHQOS151, 0x00000030 },
+ { DBSC_DBSCHQOS152, 0x00000020 },
+ { DBSC_DBSCHQOS153, 0x00000010 },
+};
+
+void qos_init_m3n_v10(void)
+{
+ rcar_qos_dbsc_setting(m3n_v10_qos, ARRAY_SIZE(m3n_v10_qos), true);
+
+ /* DRAM Split Address mapping */
+#if RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_4CH
+#if RCAR_LSI == RCAR_M3N
+#error "Don't set DRAM Split 4ch(M3N)"
+#else
+ ERROR("DRAM Split 4ch not supported.(M3N)");
+ panic();
+#endif
+#elif (RCAR_DRAM_SPLIT == RCAR_DRAM_SPLIT_2CH)
+#if RCAR_LSI == RCAR_M3N
+#error "Don't set DRAM Split 2ch(M3N)"
+#else
+ ERROR("DRAM Split 2ch not supported.(M3N)");
+ panic();
+#endif
+#else
+ NOTICE("BL2: DRAM Split is OFF\n");
+#endif
+
+#if !(RCAR_QOS_TYPE == RCAR_QOS_NONE)
+#if RCAR_QOS_TYPE == RCAR_QOS_TYPE_DEFAULT
+ NOTICE("BL2: QoS is default setting(%s)\n", RCAR_QOS_VERSION);
+#endif
+
+#if RCAR_REF_INT == RCAR_REF_DEFAULT
+ NOTICE("BL2: DRAM refresh interval 1.95 usec\n");
+#else
+ NOTICE("BL2: DRAM refresh interval 3.9 usec\n");
+#endif
+
+#if RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE
+ NOTICE("BL2: Periodic Write DQ Training\n");
+#endif /* RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE */
+
+ io_write_32(QOSCTRL_RAS, 0x00000028U);
+ io_write_64(QOSCTRL_DANN, 0x0402000002020201UL);
+ io_write_32(QOSCTRL_DANT, 0x00100804U);
+ io_write_32(QOSCTRL_FSS, 0x0000000AU);
+ io_write_32(QOSCTRL_INSFC, 0x06330001U);
+ io_write_32(QOSCTRL_EARLYR, 0x00000001U);
+ io_write_32(QOSCTRL_RACNT0, 0x00010003U);
+
+ io_write_32(QOSCTRL_SL_INIT,
+ SL_INIT_REFFSSLOT | SL_INIT_SLOTSSLOT |
+ SL_INIT_SSLOTCLK_M3N);
+ io_write_32(QOSCTRL_REF_ARS, REF_ARS_ARBSTOPCYCLE_M3N);
+
+ uint32_t i;
+
+ for (i = 0U; i < ARRAY_SIZE(mstat_fix); i++) {
+ io_write_64(QOSBW_FIX_QOS_BANK0 + i * 8, mstat_fix[i]);
+ io_write_64(QOSBW_FIX_QOS_BANK1 + i * 8, mstat_fix[i]);
+ }
+ for (i = 0U; i < ARRAY_SIZE(mstat_be); i++) {
+ io_write_64(QOSBW_BE_QOS_BANK0 + i * 8, mstat_be[i]);
+ io_write_64(QOSBW_BE_QOS_BANK1 + i * 8, mstat_be[i]);
+ }
+#if RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE
+ for (i = 0U; i < ARRAY_SIZE(qoswt_fix); i++) {
+ io_write_64(QOSWT_FIX_WTQOS_BANK0 + i * 8,
+ qoswt_fix[i]);
+ io_write_64(QOSWT_FIX_WTQOS_BANK1 + i * 8,
+ qoswt_fix[i]);
+ }
+ for (i = 0U; i < ARRAY_SIZE(qoswt_be); i++) {
+ io_write_64(QOSWT_BE_WTQOS_BANK0 + i * 8, qoswt_be[i]);
+ io_write_64(QOSWT_BE_WTQOS_BANK1 + i * 8, qoswt_be[i]);
+ }
+#endif /* RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE */
+
+ /* RT bus Leaf setting */
+ io_write_32(RT_ACT0, 0x00000000U);
+ io_write_32(RT_ACT1, 0x00000000U);
+
+ /* CCI bus Leaf setting */
+ io_write_32(CPU_ACT0, 0x00000003U);
+ io_write_32(CPU_ACT1, 0x00000003U);
+
+ io_write_32(QOSCTRL_RAEN, 0x00000001U);
+
+#if RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE
+ /* re-write training setting */
+ io_write_32(QOSWT_WTREF,
+ ((QOSWT_WTREF_SLOT1_EN << 16) | QOSWT_WTREF_SLOT0_EN));
+ io_write_32(QOSWT_WTSET0,
+ ((QOSWT_WTSET0_PERIOD0_M3N << 16) |
+ (QOSWT_WTSET0_SSLOT0 << 8) | QOSWT_WTSET0_SLOTSLOT0));
+ io_write_32(QOSWT_WTSET1,
+ ((QOSWT_WTSET1_PERIOD1_M3N << 16) |
+ (QOSWT_WTSET1_SSLOT1 << 8) | QOSWT_WTSET1_SLOTSLOT1));
+
+ io_write_32(QOSWT_WTEN, QOSWT_WTEN_ENABLE);
+#endif /* RCAR_REWT_TRAINING != RCAR_REWT_TRAINING_DISABLE */
+
+ io_write_32(QOSCTRL_STATQC, 0x00000001U);
+#else
+ NOTICE("BL2: QoS is None\n");
+
+ io_write_32(QOSCTRL_RAEN, 0x00000001U);
+#endif /* !(RCAR_QOS_TYPE == RCAR_QOS_NONE) */
+}
diff --git a/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10.h b/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10.h
new file mode 100644
index 0000000..0cd0c85
--- /dev/null
+++ b/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10.h
@@ -0,0 +1,12 @@
+/*
+ * Copyright (c) 2017, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef QOS_INIT_M3N_V10_H
+#define QOS_INIT_M3N_V10_H
+
+void qos_init_m3n_v10(void);
+
+#endif /* QOS_INIT_M3N_V10_H */
diff --git a/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_mstat195.h b/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_mstat195.h
new file mode 100644
index 0000000..9b8b9e9
--- /dev/null
+++ b/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_mstat195.h
@@ -0,0 +1,241 @@
+/*
+ * Copyright (c) 2018, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+static uint64_t mstat_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x001004320000FFFFUL,
+ /* 0x0038, */ 0x001004320000FFFFUL,
+ /* 0x0040, */ 0x00140C5D0000FFFFUL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x001404040000FFFFUL,
+ /* 0x0058, */ 0x00140C940000FFFFUL,
+ /* 0x0060, */ 0x00140C940000FFFFUL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x001404040000FFFFUL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0014041F0000FFFFUL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x000C041D0000FFFFUL,
+ /* 0x00a8, */ 0x000C04090000FFFFUL,
+ /* 0x00b0, */ 0x000C040B0000FFFFUL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x000C041D0000FFFFUL,
+ /* 0x00c8, */ 0x000C04090000FFFFUL,
+ /* 0x00d0, */ 0x000C040B0000FFFFUL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x001024840000FFFFUL,
+ /* 0x00f8, */ 0x000C084F0000FFFFUL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x00100C840000FFFFUL,
+ /* 0x0118, */ 0x000C21E60000FFFFUL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x00100CA50000FFFFUL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x001010C90000FFFFUL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x00100CA50000FFFFUL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x001008530000FFFFUL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x00101D9D0000FFFFUL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x00100CA50000FFFFUL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x000C04010000FFFFUL,
+ /* 0x01c8, */ 0x000C04010000FFFFUL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x000C04010000FFFFUL,
+ /* 0x01f0, */ 0x000C04050000FFFFUL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x000C04050000FFFFUL,
+ /* 0x0210, */ 0x000C04050000FFFFUL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x000C08150000FFFFUL,
+ /* 0x0268, */ 0x001408020000FFFFUL,
+ /* 0x0270, */ 0x001404010000FFFFUL,
+ /* 0x0278, */ 0x000C04090000FFFFUL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x001408020000FFFFUL,
+ /* 0x0298, */ 0x001404010000FFFFUL,
+ /* 0x02a0, */ 0x000C04050000FFFFUL,
+ /* 0x02a8, */ 0x000C04050000FFFFUL,
+ /* 0x02b0, */ 0x001408050000FFFFUL,
+ /* 0x02b8, */ 0x000C04010000FFFFUL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x000C04050000FFFFUL,
+ /* 0x02d8, */ 0x000C04050000FFFFUL,
+ /* 0x02e0, */ 0x001408050000FFFFUL,
+ /* 0x02e8, */ 0x000C04010000FFFFUL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0000000000000000UL,
+ /* 0x0370, */ 0x000C04010000FFFFUL,
+ /* 0x0378, */ 0x000C04010000FFFFUL,
+ /* 0x0380, */ 0x000C04050000FFFFUL,
+ /* 0x0388, */ 0x000C04050000FFFFUL,
+ /* 0x0390, */ 0x0000000000000000UL,
+};
+
+static uint64_t mstat_be[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x001200100BD03401UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x002106000BDFFC01UL,
+ /* 0x01c8, */ 0x002106000BDFFC01UL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x002101000BDF2401UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x002101000BDF2401UL,
+ /* 0x0218, */ 0x001101000BDF2401UL,
+ /* 0x0220, */ 0x001101000BDF2401UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x001101000BDF2401UL,
+ /* 0x0238, */ 0x001101000BDF2401UL,
+ /* 0x0240, */ 0x001201000BDF2401UL,
+ /* 0x0248, */ 0x001101000BDF2401UL,
+ /* 0x0250, */ 0x001201000BDF2401UL,
+ /* 0x0258, */ 0x001101000BDF2401UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x001106000BDFFC01UL,
+ /* 0x02f8, */ 0x001106000BDFFC01UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x001200100BD03401UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x001206000BDFFC01UL,
+ /* 0x0360, */ 0x001206000BDFFC01UL,
+ /* 0x0368, */ 0x001200100BD03401UL,
+ /* 0x0370, */ 0x0000000000000000UL,
+ /* 0x0378, */ 0x0000000000000000UL,
+ /* 0x0380, */ 0x0000000000000000UL,
+ /* 0x0388, */ 0x0000000000000000UL,
+ /* 0x0390, */ 0x001200100BD03401UL,
+};
diff --git a/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_mstat390.h b/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_mstat390.h
new file mode 100644
index 0000000..19143ed
--- /dev/null
+++ b/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_mstat390.h
@@ -0,0 +1,241 @@
+/*
+ * Copyright (c) 2018, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+static uint64_t mstat_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x001008630000FFFFUL,
+ /* 0x0038, */ 0x001008630000FFFFUL,
+ /* 0x0040, */ 0x001418BA0000FFFFUL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x001404070000FFFFUL,
+ /* 0x0058, */ 0x001415270000FFFFUL,
+ /* 0x0060, */ 0x001415270000FFFFUL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x001404070000FFFFUL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0014083E0000FFFFUL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x000C08390000FFFFUL,
+ /* 0x00a8, */ 0x000C04110000FFFFUL,
+ /* 0x00b0, */ 0x000C04150000FFFFUL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x000C08390000FFFFUL,
+ /* 0x00c8, */ 0x000C04110000FFFFUL,
+ /* 0x00d0, */ 0x000C04150000FFFFUL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x001045080000FFFFUL,
+ /* 0x00f8, */ 0x000C0C9E0000FFFFUL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x001015080000FFFFUL,
+ /* 0x0118, */ 0x000C43CB0000FFFFUL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0010194A0000FFFFUL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x00101D910000FFFFUL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0010194A0000FFFFUL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x00100CA50000FFFFUL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x001037390000FFFFUL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0010194A0000FFFFUL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x000C04010000FFFFUL,
+ /* 0x01c8, */ 0x000C04010000FFFFUL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x000C04020000FFFFUL,
+ /* 0x01f0, */ 0x000C04090000FFFFUL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x000C04090000FFFFUL,
+ /* 0x0210, */ 0x000C04090000FFFFUL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x000C0C2A0000FFFFUL,
+ /* 0x0268, */ 0x001410040000FFFFUL,
+ /* 0x0270, */ 0x001404020000FFFFUL,
+ /* 0x0278, */ 0x000C08110000FFFFUL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x001410040000FFFFUL,
+ /* 0x0298, */ 0x001404020000FFFFUL,
+ /* 0x02a0, */ 0x000C04090000FFFFUL,
+ /* 0x02a8, */ 0x000C04090000FFFFUL,
+ /* 0x02b0, */ 0x00140C090000FFFFUL,
+ /* 0x02b8, */ 0x000C04020000FFFFUL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x000C04090000FFFFUL,
+ /* 0x02d8, */ 0x000C04090000FFFFUL,
+ /* 0x02e0, */ 0x00140C090000FFFFUL,
+ /* 0x02e8, */ 0x000C04020000FFFFUL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0000000000000000UL,
+ /* 0x0370, */ 0x000C04020000FFFFUL,
+ /* 0x0378, */ 0x000C04020000FFFFUL,
+ /* 0x0380, */ 0x000C04090000FFFFUL,
+ /* 0x0388, */ 0x000C04090000FFFFUL,
+ /* 0x0390, */ 0x0000000000000000UL,
+};
+
+static uint64_t mstat_be[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0012001005E03401UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x0021060005EFFC01UL,
+ /* 0x01c8, */ 0x0021060005EFFC01UL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0021010005E79401UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0021010005E79401UL,
+ /* 0x0218, */ 0x0011010005E79401UL,
+ /* 0x0220, */ 0x0011010005E79401UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0011010005E79401UL,
+ /* 0x0238, */ 0x0011010005E79401UL,
+ /* 0x0240, */ 0x0012010005E79401UL,
+ /* 0x0248, */ 0x0011010005E79401UL,
+ /* 0x0250, */ 0x0012010005E79401UL,
+ /* 0x0258, */ 0x0011010005E79401UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0011060005EFFC01UL,
+ /* 0x02f8, */ 0x0011060005EFFC01UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0012001005E03401UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0012060005EFFC01UL,
+ /* 0x0360, */ 0x0012060005EFFC01UL,
+ /* 0x0368, */ 0x0012001005E03401UL,
+ /* 0x0370, */ 0x0000000000000000UL,
+ /* 0x0378, */ 0x0000000000000000UL,
+ /* 0x0380, */ 0x0000000000000000UL,
+ /* 0x0388, */ 0x0000000000000000UL,
+ /* 0x0390, */ 0x0012001005E03401UL,
+};
diff --git a/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_qoswt195.h b/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_qoswt195.h
new file mode 100644
index 0000000..d2e8040
--- /dev/null
+++ b/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_qoswt195.h
@@ -0,0 +1,241 @@
+/*
+ * Copyright (c) 2018, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+static uint64_t qoswt_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x001004320000C010UL,
+ /* 0x0038, */ 0x001004320000C010UL,
+ /* 0x0040, */ 0x00140C5D0000FFF0UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x00140C940000C010UL,
+ /* 0x0060, */ 0x00140C940000C010UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0014041F0000FFF0UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x0000000000000000UL,
+ /* 0x01c8, */ 0x0000000000000000UL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0000000000000000UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0000000000000000UL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x000C08150000FFF0UL,
+ /* 0x0268, */ 0x001408020000FFF0UL,
+ /* 0x0270, */ 0x001404010000FFF0UL,
+ /* 0x0278, */ 0x000C04090000FFF0UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x001408020000FFF0UL,
+ /* 0x0298, */ 0x001404010000FFF0UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0000000000000000UL,
+ /* 0x0370, */ 0x0000000000000000UL,
+ /* 0x0378, */ 0x0000000000000000UL,
+ /* 0x0380, */ 0x0000000000000000UL,
+ /* 0x0388, */ 0x0000000000000000UL,
+ /* 0x0390, */ 0x0000000000000000UL,
+};
+
+static uint64_t qoswt_be[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x0000000000000000UL,
+ /* 0x01c8, */ 0x0000000000000000UL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0000000000000000UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0000000000000000UL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0000000000000000UL,
+ /* 0x0370, */ 0x0000000000000000UL,
+ /* 0x0378, */ 0x0000000000000000UL,
+ /* 0x0380, */ 0x0000000000000000UL,
+ /* 0x0388, */ 0x0000000000000000UL,
+ /* 0x0390, */ 0x0000000000000000UL,
+};
diff --git a/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_qoswt390.h b/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_qoswt390.h
new file mode 100644
index 0000000..84f657a
--- /dev/null
+++ b/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_qoswt390.h
@@ -0,0 +1,241 @@
+/*
+ * Copyright (c) 2018, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+static uint64_t qoswt_fix[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x001008630000C010UL,
+ /* 0x0038, */ 0x001008630000C010UL,
+ /* 0x0040, */ 0x001418BA0000FFF0UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x001415270000C010UL,
+ /* 0x0060, */ 0x001415270000C010UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0014083E0000FFF0UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x0000000000000000UL,
+ /* 0x01c8, */ 0x0000000000000000UL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0000000000000000UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0000000000000000UL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x000C0C2A0000FFF0UL,
+ /* 0x0268, */ 0x001410040000FFF0UL,
+ /* 0x0270, */ 0x001404020000FFF0UL,
+ /* 0x0278, */ 0x000C08110000FFF0UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x001410040000FFF0UL,
+ /* 0x0298, */ 0x001404020000FFF0UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0000000000000000UL,
+ /* 0x0370, */ 0x0000000000000000UL,
+ /* 0x0378, */ 0x0000000000000000UL,
+ /* 0x0380, */ 0x0000000000000000UL,
+ /* 0x0388, */ 0x0000000000000000UL,
+ /* 0x0390, */ 0x0000000000000000UL,
+};
+
+static uint64_t qoswt_be[] = {
+ /* 0x0000, */ 0x0000000000000000UL,
+ /* 0x0008, */ 0x0000000000000000UL,
+ /* 0x0010, */ 0x0000000000000000UL,
+ /* 0x0018, */ 0x0000000000000000UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00a0, */ 0x0000000000000000UL,
+ /* 0x00a8, */ 0x0000000000000000UL,
+ /* 0x00b0, */ 0x0000000000000000UL,
+ /* 0x00b8, */ 0x0000000000000000UL,
+ /* 0x00c0, */ 0x0000000000000000UL,
+ /* 0x00c8, */ 0x0000000000000000UL,
+ /* 0x00d0, */ 0x0000000000000000UL,
+ /* 0x00d8, */ 0x0000000000000000UL,
+ /* 0x00e0, */ 0x0000000000000000UL,
+ /* 0x00e8, */ 0x0000000000000000UL,
+ /* 0x00f0, */ 0x0000000000000000UL,
+ /* 0x00f8, */ 0x0000000000000000UL,
+ /* 0x0100, */ 0x0000000000000000UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x0000000000000000UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x0000000000000000UL,
+ /* 0x0128, */ 0x0000000000000000UL,
+ /* 0x0130, */ 0x0000000000000000UL,
+ /* 0x0138, */ 0x0000000000000000UL,
+ /* 0x0140, */ 0x0000000000000000UL,
+ /* 0x0148, */ 0x0000000000000000UL,
+ /* 0x0150, */ 0x0000000000000000UL,
+ /* 0x0158, */ 0x0000000000000000UL,
+ /* 0x0160, */ 0x0000000000000000UL,
+ /* 0x0168, */ 0x0000000000000000UL,
+ /* 0x0170, */ 0x0000000000000000UL,
+ /* 0x0178, */ 0x0000000000000000UL,
+ /* 0x0180, */ 0x0000000000000000UL,
+ /* 0x0188, */ 0x0000000000000000UL,
+ /* 0x0190, */ 0x0000000000000000UL,
+ /* 0x0198, */ 0x0000000000000000UL,
+ /* 0x01a0, */ 0x0000000000000000UL,
+ /* 0x01a8, */ 0x0000000000000000UL,
+ /* 0x01b0, */ 0x0000000000000000UL,
+ /* 0x01b8, */ 0x0000000000000000UL,
+ /* 0x01c0, */ 0x0000000000000000UL,
+ /* 0x01c8, */ 0x0000000000000000UL,
+ /* 0x01d0, */ 0x0000000000000000UL,
+ /* 0x01d8, */ 0x0000000000000000UL,
+ /* 0x01e0, */ 0x0000000000000000UL,
+ /* 0x01e8, */ 0x0000000000000000UL,
+ /* 0x01f0, */ 0x0000000000000000UL,
+ /* 0x01f8, */ 0x0000000000000000UL,
+ /* 0x0200, */ 0x0000000000000000UL,
+ /* 0x0208, */ 0x0000000000000000UL,
+ /* 0x0210, */ 0x0000000000000000UL,
+ /* 0x0218, */ 0x0000000000000000UL,
+ /* 0x0220, */ 0x0000000000000000UL,
+ /* 0x0228, */ 0x0000000000000000UL,
+ /* 0x0230, */ 0x0000000000000000UL,
+ /* 0x0238, */ 0x0000000000000000UL,
+ /* 0x0240, */ 0x0000000000000000UL,
+ /* 0x0248, */ 0x0000000000000000UL,
+ /* 0x0250, */ 0x0000000000000000UL,
+ /* 0x0258, */ 0x0000000000000000UL,
+ /* 0x0260, */ 0x0000000000000000UL,
+ /* 0x0268, */ 0x0000000000000000UL,
+ /* 0x0270, */ 0x0000000000000000UL,
+ /* 0x0278, */ 0x0000000000000000UL,
+ /* 0x0280, */ 0x0000000000000000UL,
+ /* 0x0288, */ 0x0000000000000000UL,
+ /* 0x0290, */ 0x0000000000000000UL,
+ /* 0x0298, */ 0x0000000000000000UL,
+ /* 0x02a0, */ 0x0000000000000000UL,
+ /* 0x02a8, */ 0x0000000000000000UL,
+ /* 0x02b0, */ 0x0000000000000000UL,
+ /* 0x02b8, */ 0x0000000000000000UL,
+ /* 0x02c0, */ 0x0000000000000000UL,
+ /* 0x02c8, */ 0x0000000000000000UL,
+ /* 0x02d0, */ 0x0000000000000000UL,
+ /* 0x02d8, */ 0x0000000000000000UL,
+ /* 0x02e0, */ 0x0000000000000000UL,
+ /* 0x02e8, */ 0x0000000000000000UL,
+ /* 0x02f0, */ 0x0000000000000000UL,
+ /* 0x02f8, */ 0x0000000000000000UL,
+ /* 0x0300, */ 0x0000000000000000UL,
+ /* 0x0308, */ 0x0000000000000000UL,
+ /* 0x0310, */ 0x0000000000000000UL,
+ /* 0x0318, */ 0x0000000000000000UL,
+ /* 0x0320, */ 0x0000000000000000UL,
+ /* 0x0328, */ 0x0000000000000000UL,
+ /* 0x0330, */ 0x0000000000000000UL,
+ /* 0x0338, */ 0x0000000000000000UL,
+ /* 0x0340, */ 0x0000000000000000UL,
+ /* 0x0348, */ 0x0000000000000000UL,
+ /* 0x0350, */ 0x0000000000000000UL,
+ /* 0x0358, */ 0x0000000000000000UL,
+ /* 0x0360, */ 0x0000000000000000UL,
+ /* 0x0368, */ 0x0000000000000000UL,
+ /* 0x0370, */ 0x0000000000000000UL,
+ /* 0x0378, */ 0x0000000000000000UL,
+ /* 0x0380, */ 0x0000000000000000UL,
+ /* 0x0388, */ 0x0000000000000000UL,
+ /* 0x0390, */ 0x0000000000000000UL,
+};
diff --git a/drivers/renesas/rcar/qos/V3M/qos_init_v3m.c b/drivers/renesas/rcar/qos/V3M/qos_init_v3m.c
new file mode 100644
index 0000000..076876c
--- /dev/null
+++ b/drivers/renesas/rcar/qos/V3M/qos_init_v3m.c
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2015-2019, Renesas Electronics Corporation
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <stdint.h>
+
+#include <common/debug.h>
+
+#include "../qos_common.h"
+#include "../qos_reg.h"
+#include "qos_init_v3m.h"
+
+#define RCAR_QOS_VERSION "rev.0.01"
+
+#include "qos_init_v3m_mstat.h"
+
+struct rcar_gen3_dbsc_qos_settings v3m_qos[] = {
+ /* BUFCAM settings */
+ { DBSC_DBCAM0CNF1, 0x00044218 },
+ { DBSC_DBCAM0CNF2, 0x000000F4 },
+ { DBSC_DBSCHCNT0, 0x080F003F },
+ { DBSC_DBSCHCNT1, 0x00001010 },
+
+ { DBSC_DBSCHSZ0, 0x00000001 },
+ { DBSC_DBSCHRW0, 0x22421111 },
+ { DBSC_DBSCHRW1, 0x00180034 },
+ { DBSC_SCFCTST0, 0x180B1708 },
+ { DBSC_SCFCTST1, 0x0808070C },
+ { DBSC_SCFCTST2, 0x012F1123 },
+
+ /* QoS Settings */
+ { DBSC_DBSCHQOS00, 0x0000F000 },
+ { DBSC_DBSCHQOS01, 0x0000E000 },
+ { DBSC_DBSCHQOS02, 0x00007000 },
+ { DBSC_DBSCHQOS03, 0x00000000 },
+ { DBSC_DBSCHQOS40, 0x0000F000 },
+ { DBSC_DBSCHQOS41, 0x0000EFFF },
+ { DBSC_DBSCHQOS42, 0x0000B000 },
+ { DBSC_DBSCHQOS43, 0x00000000 },
+ { DBSC_DBSCHQOS90, 0x0000F000 },
+ { DBSC_DBSCHQOS91, 0x0000EFFF },
+ { DBSC_DBSCHQOS92, 0x0000D000 },
+ { DBSC_DBSCHQOS93, 0x00000000 },
+ { DBSC_DBSCHQOS130, 0x0000F000 },
+ { DBSC_DBSCHQOS131, 0x0000EFFF },
+ { DBSC_DBSCHQOS132, 0x0000E800 },
+ { DBSC_DBSCHQOS133, 0x00007000 },
+ { DBSC_DBSCHQOS140, 0x0000F000 },
+ { DBSC_DBSCHQOS141, 0x0000EFFF },
+ { DBSC_DBSCHQOS142, 0x0000E800 },
+ { DBSC_DBSCHQOS143, 0x0000B000 },
+ { DBSC_DBSCHQOS150, 0x000007D0 },
+ { DBSC_DBSCHQOS151, 0x000007CF },
+ { DBSC_DBSCHQOS152, 0x000005D0 },
+ { DBSC_DBSCHQOS153, 0x000003D0 },
+};
+
+void qos_init_v3m(void)
+{
+return;
+
+ rcar_qos_dbsc_setting(v3m_qos, ARRAY_SIZE(v3m_qos), false);
+
+#if !(RCAR_QOS_TYPE == RCAR_QOS_NONE)
+#if RCAR_QOS_TYPE == RCAR_QOS_TYPE_DEFAULT
+ NOTICE("BL2: QoS is default setting(%s)\n", RCAR_QOS_VERSION);
+#endif
+
+ /* Resource Alloc setting */
+ io_write_32(QOSCTRL_RAS, 0x00000020U);
+ io_write_32(QOSCTRL_FIXTH, 0x000F0005U);
+ io_write_32(QOSCTRL_REGGD, 0x00000004U);
+ io_write_64(QOSCTRL_DANN, 0x0202020104040200U);
+ io_write_32(QOSCTRL_DANT, 0x00201008U);
+ io_write_32(QOSCTRL_EC, 0x00080001U); /* need for H3 ES1 */
+ io_write_64(QOSCTRL_EMS, 0x0000000000000000U);
+ io_write_32(QOSCTRL_INSFC, 0x63C20001U);
+ io_write_32(QOSCTRL_BERR, 0x00000000U);
+
+ /* QOSBW setting */
+ io_write_32(QOSCTRL_SL_INIT, 0x0305007DU);
+ io_write_32(QOSCTRL_REF_ARS, 0x00330000U);
+
+ /* QOSBW SRAM setting */
+ uint32_t i;
+
+ for (i = 0U; i < ARRAY_SIZE(mstat_fix); i++) {
+ io_write_64(QOSBW_FIX_QOS_BANK0 + i * 8, mstat_fix[i]);
+ io_write_64(QOSBW_FIX_QOS_BANK1 + i * 8, mstat_fix[i]);
+ }
+ for (i = 0U; i < ARRAY_SIZE(mstat_be); i++) {
+ io_write_64(QOSBW_BE_QOS_BANK0 + i * 8, mstat_be[i]);
+ io_write_64(QOSBW_BE_QOS_BANK1 + i * 8, mstat_be[i]);
+ }
+
+ /* AXI-IF arbitration setting */
+ io_write_32(DBSC_AXARB, 0x18010000U);
+
+ /* Resource Alloc start */
+ io_write_32(QOSCTRL_RAEN, 0x00000001U);
+
+ /* QOSBW start */
+ io_write_32(QOSCTRL_STATQC, 0x00000001U);
+
+#else
+ NOTICE("BL2: QoS is None\n");
+#endif /* !(RCAR_QOS_TYPE == RCAR_QOS_NONE) */
+}
diff --git a/drivers/renesas/rcar/qos/V3M/qos_init_v3m.h b/drivers/renesas/rcar/qos/V3M/qos_init_v3m.h
new file mode 100644
index 0000000..2c4278b
--- /dev/null
+++ b/drivers/renesas/rcar/qos/V3M/qos_init_v3m.h
@@ -0,0 +1,13 @@
+/*
+ * Copyright (c) 2015-2017, Renesas Electronics Corporation
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef QOS_INIT_H_V3M__
+#define QOS_INIT_H_V3M__
+
+void qos_init_v3m(void);
+
+#endif /* QOS_INIT_H_V3M__ */
diff --git a/drivers/renesas/rcar/qos/V3M/qos_init_v3m_mstat.h b/drivers/renesas/rcar/qos/V3M/qos_init_v3m_mstat.h
new file mode 100644
index 0000000..d0b7fc3
--- /dev/null
+++ b/drivers/renesas/rcar/qos/V3M/qos_init_v3m_mstat.h
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2015-2019, Renesas Electronics Corporation
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#if RCAR_QOS_TYPE == RCAR_QOS_TYPE_DEFAULT
+static const uint64_t mstat_fix[] = {
+ /* 0x0000, */ 0x000000000000FFFFUL,
+ /* 0x0008, */ 0x000000000000FFFFUL,
+ /* 0x0010, */ 0x000000000000FFFFUL,
+ /* 0x0018, */ 0x000000000000FFFFUL,
+ /* 0x0020, */ 0x001414090000FFFFUL,
+ /* 0x0028, */ 0x000C00000000FFFFUL,
+ /* 0x0030, */ 0x001008040000FFFFUL,
+ /* 0x0038, */ 0x001004040000FFFFUL,
+ /* 0x0040, */ 0x001004040000FFFFUL,
+ /* 0x0048, */ 0x000000000000FFFFUL,
+ /* 0x0050, */ 0x001004040000FFFFUL,
+ /* 0x0058, */ 0x001004040000FFFFUL,
+ /* 0x0060, */ 0x000000000000FFFFUL,
+ /* 0x0068, */ 0x001404040000FFFFUL,
+ /* 0x0070, */ 0x001008030000FFFFUL,
+ /* 0x0078, */ 0x001004030000FFFFUL,
+ /* 0x0080, */ 0x001004030000FFFFUL,
+ /* 0x0088, */ 0x000000000000FFFFUL,
+ /* 0x0090, */ 0x001004040000FFFFUL,
+ /* 0x0098, */ 0x001004040000FFFFUL,
+ /* 0x00A0, */ 0x000000000000FFFFUL,
+ /* 0x00A8, */ 0x000000000000FFFFUL,
+ /* 0x00B0, */ 0x000000000000FFFFUL,
+ /* 0x00B8, */ 0x000000000000FFFFUL,
+ /* 0x00C0, */ 0x000000000000FFFFUL,
+ /* 0x00C8, */ 0x000000000000FFFFUL,
+ /* 0x00D0, */ 0x000000000000FFFFUL,
+ /* 0x00D8, */ 0x000000000000FFFFUL,
+ /* 0x00E0, */ 0x001404020000FFFFUL,
+ /* 0x00E8, */ 0x000000000000FFFFUL,
+ /* 0x00F0, */ 0x000000000000FFFFUL,
+ /* 0x00F8, */ 0x000000000000FFFFUL,
+ /* 0x0100, */ 0x000000000000FFFFUL,
+ /* 0x0108, */ 0x000C04020000FFFFUL,
+ /* 0x0110, */ 0x000000000000FFFFUL,
+ /* 0x0118, */ 0x001404020000FFFFUL,
+ /* 0x0120, */ 0x000000000000FFFFUL,
+ /* 0x0128, */ 0x000000000000FFFFUL,
+ /* 0x0130, */ 0x000000000000FFFFUL,
+ /* 0x0138, */ 0x000000000000FFFFUL,
+ /* 0x0140, */ 0x000000000000FFFFUL,
+ /* 0x0148, */ 0x000000000000FFFFUL,
+};
+
+static const uint64_t mstat_be[] = {
+ /* 0x0000, */ 0x00100020447FFC01UL,
+ /* 0x0008, */ 0x00100020447FFC01UL,
+ /* 0x0010, */ 0x00100040447FFC01UL,
+ /* 0x0018, */ 0x00100040447FFC01UL,
+ /* 0x0020, */ 0x0000000000000000UL,
+ /* 0x0028, */ 0x0000000000000000UL,
+ /* 0x0030, */ 0x0000000000000000UL,
+ /* 0x0038, */ 0x0000000000000000UL,
+ /* 0x0040, */ 0x0000000000000000UL,
+ /* 0x0048, */ 0x0000000000000000UL,
+ /* 0x0050, */ 0x0000000000000000UL,
+ /* 0x0058, */ 0x0000000000000000UL,
+ /* 0x0060, */ 0x0000000000000000UL,
+ /* 0x0068, */ 0x0000000000000000UL,
+ /* 0x0070, */ 0x0000000000000000UL,
+ /* 0x0078, */ 0x0000000000000000UL,
+ /* 0x0080, */ 0x0000000000000000UL,
+ /* 0x0088, */ 0x0000000000000000UL,
+ /* 0x0090, */ 0x0000000000000000UL,
+ /* 0x0098, */ 0x0000000000000000UL,
+ /* 0x00A0, */ 0x00100010447FFC01UL,
+ /* 0x00A8, */ 0x00100010447FFC01UL,
+ /* 0x00B0, */ 0x00100010447FFC01UL,
+ /* 0x00B8, */ 0x00100010447FFC01UL,
+ /* 0x00C0, */ 0x00100010447FFC01UL,
+ /* 0x00C8, */ 0x00100010447FFC01UL,
+ /* 0x00D0, */ 0x0000000000000000UL,
+ /* 0x00D8, */ 0x00100010447FFC01UL,
+ /* 0x00E0, */ 0x0000000000000000UL,
+ /* 0x00E8, */ 0x00100010447FFC01UL,
+ /* 0x00F0, */ 0x00100010447FFC01UL,
+ /* 0x00F8, */ 0x00100010447FFC01UL,
+ /* 0x0100, */ 0x00100010447FFC01UL,
+ /* 0x0108, */ 0x0000000000000000UL,
+ /* 0x0110, */ 0x00100010447FFC01UL,
+ /* 0x0118, */ 0x0000000000000000UL,
+ /* 0x0120, */ 0x00100010447FFC01UL,
+ /* 0x0128, */ 0x00100010447FFC01UL,
+ /* 0x0130, */ 0x00100010447FFC01UL,
+ /* 0x0138, */ 0x00100010447FFC01UL,
+ /* 0x0140, */ 0x00100020447FFC01UL,
+ /* 0x0148, */ 0x00100020447FFC01UL,
+};
+#endif
diff --git a/drivers/renesas/rcar/qos/qos.mk b/drivers/renesas/rcar/qos/qos.mk
new file mode 100644
index 0000000..da10da2
--- /dev/null
+++ b/drivers/renesas/rcar/qos/qos.mk
@@ -0,0 +1,106 @@
+#
+# Copyright (c) 2015-2018, Renesas Electronics Corporation. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+ifeq (${RCAR_LSI},${RCAR_AUTO})
+# E3, H3N not available for LSI_AUTO
+ BL2_SOURCES += drivers/renesas/rcar/qos/H3/qos_init_h3_v10.c
+ BL2_SOURCES += drivers/renesas/rcar/qos/H3/qos_init_h3_v11.c
+ BL2_SOURCES += drivers/renesas/rcar/qos/H3/qos_init_h3_v20.c
+ BL2_SOURCES += drivers/renesas/rcar/qos/H3/qos_init_h3_v30.c
+ BL2_SOURCES += drivers/renesas/rcar/qos/M3/qos_init_m3_v10.c
+ BL2_SOURCES += drivers/renesas/rcar/qos/M3/qos_init_m3_v11.c
+ BL2_SOURCES += drivers/renesas/rcar/qos/M3/qos_init_m3_v30.c
+ BL2_SOURCES += drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10.c
+ BL2_SOURCES += drivers/renesas/rcar/qos/V3M/qos_init_v3m.c
+else ifdef RCAR_LSI_CUT_COMPAT
+ ifeq (${RCAR_LSI},${RCAR_H3})
+ BL2_SOURCES += drivers/renesas/rcar/qos/H3/qos_init_h3_v10.c
+ BL2_SOURCES += drivers/renesas/rcar/qos/H3/qos_init_h3_v11.c
+ BL2_SOURCES += drivers/renesas/rcar/qos/H3/qos_init_h3_v20.c
+ BL2_SOURCES += drivers/renesas/rcar/qos/H3/qos_init_h3_v30.c
+ endif
+ ifeq (${RCAR_LSI},${RCAR_H3N})
+ BL2_SOURCES += drivers/renesas/rcar/qos/H3/qos_init_h3n_v30.c
+ endif
+ ifeq (${RCAR_LSI},${RCAR_M3})
+ BL2_SOURCES += drivers/renesas/rcar/qos/M3/qos_init_m3_v10.c
+ BL2_SOURCES += drivers/renesas/rcar/qos/M3/qos_init_m3_v11.c
+ BL2_SOURCES += drivers/renesas/rcar/qos/M3/qos_init_m3_v30.c
+ endif
+ ifeq (${RCAR_LSI},${RCAR_M3N})
+ BL2_SOURCES += drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10.c
+ endif
+ ifeq (${RCAR_LSI},${RCAR_V3M})
+ BL2_SOURCES += drivers/renesas/rcar/qos/V3M/qos_init_v3m.c
+ endif
+ ifeq (${RCAR_LSI},${RCAR_E3})
+ BL2_SOURCES += drivers/renesas/rcar/qos/E3/qos_init_e3_v10.c
+ endif
+ ifeq (${RCAR_LSI},${RCAR_D3})
+ BL2_SOURCES += drivers/renesas/rcar/qos/D3/qos_init_d3.c
+ endif
+else
+ ifeq (${RCAR_LSI},${RCAR_H3})
+ ifeq (${LSI_CUT},10)
+ BL2_SOURCES += drivers/renesas/rcar/qos/H3/qos_init_h3_v10.c
+ else ifeq (${LSI_CUT},11)
+ BL2_SOURCES += drivers/renesas/rcar/qos/H3/qos_init_h3_v11.c
+ else ifeq (${LSI_CUT},20)
+ BL2_SOURCES += drivers/renesas/rcar/qos/H3/qos_init_h3_v20.c
+ else ifeq (${LSI_CUT},30)
+ BL2_SOURCES += drivers/renesas/rcar/qos/H3/qos_init_h3_v30.c
+ else
+# LSI_CUT 30 or later
+ BL2_SOURCES += drivers/renesas/rcar/qos/H3/qos_init_h3_v30.c
+ endif
+ endif
+ ifeq (${RCAR_LSI},${RCAR_H3N})
+ ifeq (${LSI_CUT},30)
+ BL2_SOURCES += drivers/renesas/rcar/qos/H3/qos_init_h3n_v30.c
+ else
+# LSI_CUT 30 or later
+ BL2_SOURCES += drivers/renesas/rcar/qos/H3/qos_init_h3n_v30.c
+ endif
+ endif
+ ifeq (${RCAR_LSI},${RCAR_M3})
+ ifeq (${LSI_CUT},10)
+ BL2_SOURCES += drivers/renesas/rcar/qos/M3/qos_init_m3_v10.c
+ else ifeq (${LSI_CUT},11)
+ BL2_SOURCES += drivers/renesas/rcar/qos/M3/qos_init_m3_v11.c
+ else ifeq (${LSI_CUT},13)
+ BL2_SOURCES += drivers/renesas/rcar/qos/M3/qos_init_m3_v11.c
+ else ifeq (${LSI_CUT},30)
+ BL2_SOURCES += drivers/renesas/rcar/qos/M3/qos_init_m3_v30.c
+ else
+# LSI_CUT 30 or later
+ BL2_SOURCES += drivers/renesas/rcar/qos/M3/qos_init_m3_v30.c
+ endif
+ endif
+ ifeq (${RCAR_LSI},${RCAR_M3N})
+ ifeq (${LSI_CUT},10)
+ BL2_SOURCES += drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10.c
+ else
+# LSI_CUT 10 or later
+ BL2_SOURCES += drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10.c
+ endif
+ endif
+ ifeq (${RCAR_LSI},${RCAR_V3M})
+ BL2_SOURCES += drivers/renesas/rcar/qos/V3M/qos_init_v3m.c
+ endif
+ ifeq (${RCAR_LSI},${RCAR_E3})
+ ifeq (${LSI_CUT},10)
+ BL2_SOURCES += drivers/renesas/rcar/qos/E3/qos_init_e3_v10.c
+ else
+# LSI_CUT 10 or later
+ BL2_SOURCES += drivers/renesas/rcar/qos/E3/qos_init_e3_v10.c
+ endif
+ endif
+ ifeq (${RCAR_LSI},${RCAR_D3})
+ BL2_SOURCES += drivers/renesas/rcar/qos/E3/qos_init_d3.c
+ endif
+endif
+
+BL2_SOURCES += drivers/renesas/rcar/qos/qos_init.c
diff --git a/drivers/renesas/rcar/qos/qos_common.h b/drivers/renesas/rcar/qos/qos_common.h
new file mode 100644
index 0000000..2c130ae
--- /dev/null
+++ b/drivers/renesas/rcar/qos/qos_common.h
@@ -0,0 +1,142 @@
+/*
+ * Copyright (c) 2017-2019, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef QOS_COMMON_H
+#define QOS_COMMON_H
+
+#define RCAR_REF_DEFAULT 0U
+
+/* define used for get_refperiod. */
+/* REFPERIOD_CYCLE need smaller than QOSWT_WTSET0_CYCLEs */
+/* refere to plat/renesas/rcar/ddr/ddr_a/ddr_init_e3.h for E3. */
+#if (RCAR_REF_INT == RCAR_REF_DEFAULT) /* REF default */
+#define REFPERIOD_CYCLE /* unit:ns */ \
+ ((126 * BASE_SUB_SLOT_NUM * 1000U) / 400)
+#else /* REF option */
+#define REFPERIOD_CYCLE /* unit:ns */ \
+ ((252 * BASE_SUB_SLOT_NUM * 1000U) / 400)
+#endif
+
+#if (RCAR_LSI == RCAR_E3)
+/* define used for E3 */
+#if (RCAR_REF_INT == RCAR_REF_DEFAULT) /* REF 3.9usec */
+#define SUB_SLOT_CYCLE_E3 0xAFU /* 175 */
+#else /* REF 7.8usec */
+#define SUB_SLOT_CYCLE_E3 0x15EU /* 350 */
+#endif /* (RCAR_REF_INT == RCAR_REF_DEFAULT) */
+
+#define OPERATING_FREQ_E3 266U /* MHz */
+#define SL_INIT_SSLOTCLK_E3 (SUB_SLOT_CYCLE_E3 - 1U)
+#endif
+
+#if (RCAR_LSI == RCAR_AUTO) || (RCAR_LSI == RCAR_M3N)
+/* define used for M3N */
+#if (RCAR_REF_INT == RCAR_REF_DEFAULT) /* REF 1.95usec */
+#define SUB_SLOT_CYCLE_M3N 0x7EU /* 126 */
+#else /* REF 3.9usec */
+#define SUB_SLOT_CYCLE_M3N 0xFCU /* 252 */
+#endif /* (RCAR_REF_INT == RCAR_REF_DEFAULT) */
+
+#define SL_INIT_SSLOTCLK_M3N (SUB_SLOT_CYCLE_M3N - 1U)
+#define QOSWT_WTSET0_CYCLE_M3N /* unit:ns */ \
+ ((SUB_SLOT_CYCLE_M3N * BASE_SUB_SLOT_NUM * 1000U) / OPERATING_FREQ)
+#endif
+
+#if (RCAR_LSI == RCAR_AUTO) || (RCAR_LSI == RCAR_H3)
+/* define used for H3 */
+#if (RCAR_REF_INT == RCAR_REF_DEFAULT) /* REF 1.95usec */
+#define SUB_SLOT_CYCLE_H3_20 0x7EU /* 126 */
+#else /* REF 3.9usec */
+#define SUB_SLOT_CYCLE_H3_20 0xFCU /* 252 */
+#endif /* (RCAR_REF_INT == RCAR_REF_DEFAULT) */
+
+#define SL_INIT_SSLOTCLK_H3_20 (SUB_SLOT_CYCLE_H3_20 - 1U)
+#define QOSWT_WTSET0_CYCLE_H3_20 /* unit:ns */ \
+ ((SUB_SLOT_CYCLE_H3_20 * BASE_SUB_SLOT_NUM * 1000U) / OPERATING_FREQ)
+
+/* define used for H3 Cut 30 */
+#define SUB_SLOT_CYCLE_H3_30 (SUB_SLOT_CYCLE_H3_20) /* same as H3 Cut 20 */
+#define SL_INIT_SSLOTCLK_H3_30 (SUB_SLOT_CYCLE_H3_30 - 1U)
+#define QOSWT_WTSET0_CYCLE_H3_30 /* unit:ns */ \
+ ((SUB_SLOT_CYCLE_H3_30 * BASE_SUB_SLOT_NUM * 1000U) / OPERATING_FREQ)
+
+#endif
+
+#if (RCAR_LSI == RCAR_H3N)
+/* define used for H3N */
+#if (RCAR_REF_INT == RCAR_REF_DEFAULT) /* REF 1.95usec */
+#define SUB_SLOT_CYCLE_H3N 0x7EU /* 126 */
+#else /* REF 3.9usec */
+#define SUB_SLOT_CYCLE_H3N 0xFCU /* 252 */
+#endif /* (RCAR_REF_INT == RCAR_REF_DEFAULT) */
+
+#define SL_INIT_SSLOTCLK_H3N (SUB_SLOT_CYCLE_H3N - 1U)
+#define QOSWT_WTSET0_CYCLE_H3N /* unit:ns */ \
+ ((SUB_SLOT_CYCLE_H3N * BASE_SUB_SLOT_NUM * 1000U) / OPERATING_FREQ)
+
+#endif
+
+#if (RCAR_LSI == RCAR_AUTO) || (RCAR_LSI == RCAR_M3)
+/* define used for M3 */
+#if (RCAR_REF_INT == RCAR_REF_DEFAULT) /* REF 1.95usec */
+#define SUB_SLOT_CYCLE_M3_11 0x7EU /* 126 */
+#define SUB_SLOT_CYCLE_M3_30 0x7EU /* 126 */
+#else /* REF 3.9usec */
+#define SUB_SLOT_CYCLE_M3_11 0xFCU /* 252 */
+#define SUB_SLOT_CYCLE_M3_30 0xFCU /* 252 */
+#endif /* (RCAR_REF_INT == RCAR_REF_DEFAULT) */
+
+#define SL_INIT_SSLOTCLK_M3_11 (SUB_SLOT_CYCLE_M3_11 - 1U)
+#define SL_INIT_SSLOTCLK_M3_30 (SUB_SLOT_CYCLE_M3_30 - 1U)
+#define QOSWT_WTSET0_CYCLE_M3_11 /* unit:ns */ \
+ ((SUB_SLOT_CYCLE_M3_11 * BASE_SUB_SLOT_NUM * 1000U) / OPERATING_FREQ)
+#define QOSWT_WTSET0_CYCLE_M3_30 /* unit:ns */ \
+ ((SUB_SLOT_CYCLE_M3_30 * BASE_SUB_SLOT_NUM * 1000U) / OPERATING_FREQ)
+#endif
+
+#define OPERATING_FREQ 400U /* MHz */
+#define BASE_SUB_SLOT_NUM 0x6U
+#define SUB_SLOT_CYCLE 0x7EU /* 126 */
+
+#define QOSWT_WTSET0_CYCLE /* unit:ns */ \
+ ((SUB_SLOT_CYCLE * BASE_SUB_SLOT_NUM * 1000U) / OPERATING_FREQ)
+
+#define SL_INIT_REFFSSLOT (0x3U << 24U)
+#define SL_INIT_SLOTSSLOT ((BASE_SUB_SLOT_NUM - 1U) << 16U)
+#define SL_INIT_SSLOTCLK (SUB_SLOT_CYCLE - 1U)
+
+static inline void io_write_32(uintptr_t addr, uint32_t value)
+{
+ *(volatile uint32_t *)addr = value;
+}
+
+static inline uint32_t io_read_32(uintptr_t addr)
+{
+ return *(volatile uint32_t *)addr;
+}
+
+static inline void io_write_64(uintptr_t addr, uint64_t value)
+{
+ *(volatile uint64_t *)addr = value;
+}
+
+typedef struct {
+ uintptr_t addr;
+ uint64_t value;
+} mstat_slot_t;
+
+struct rcar_gen3_dbsc_qos_settings {
+ uint32_t reg;
+ uint32_t val;
+};
+
+extern uint32_t qos_init_ddr_ch;
+extern uint8_t qos_init_ddr_phyvalid;
+
+void rcar_qos_dbsc_setting(struct rcar_gen3_dbsc_qos_settings *qos,
+ unsigned int qos_size, bool dbsc_wren);
+
+#endif /* QOS_COMMON_H */
diff --git a/drivers/renesas/rcar/qos/qos_init.c b/drivers/renesas/rcar/qos/qos_init.c
new file mode 100644
index 0000000..d0f1730
--- /dev/null
+++ b/drivers/renesas/rcar/qos/qos_init.c
@@ -0,0 +1,394 @@
+/*
+ * Copyright (c) 2015-2019, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <stdint.h>
+
+#include <common/debug.h>
+#include <lib/mmio.h>
+
+#include "qos_init.h"
+#include "qos_common.h"
+#include "qos_reg.h"
+#include "rcar_def.h"
+#if RCAR_LSI == RCAR_AUTO
+#include "H3/qos_init_h3_v10.h"
+#include "H3/qos_init_h3_v11.h"
+#include "H3/qos_init_h3_v20.h"
+#include "H3/qos_init_h3_v30.h"
+#include "M3/qos_init_m3_v10.h"
+#include "M3/qos_init_m3_v11.h"
+#include "M3/qos_init_m3_v30.h"
+#include "M3N/qos_init_m3n_v10.h"
+#include "V3M/qos_init_v3m.h"
+#endif
+#if RCAR_LSI == RCAR_H3 /* H3 */
+#include "H3/qos_init_h3_v10.h"
+#include "H3/qos_init_h3_v11.h"
+#include "H3/qos_init_h3_v20.h"
+#include "H3/qos_init_h3_v30.h"
+#endif
+#if RCAR_LSI == RCAR_H3N /* H3 */
+#include "H3/qos_init_h3n_v30.h"
+#endif
+#if RCAR_LSI == RCAR_M3 /* M3 */
+#include "M3/qos_init_m3_v10.h"
+#include "M3/qos_init_m3_v11.h"
+#include "M3/qos_init_m3_v30.h"
+#endif
+#if RCAR_LSI == RCAR_M3N /* M3N */
+#include "M3N/qos_init_m3n_v10.h"
+#endif
+#if RCAR_LSI == RCAR_V3M /* V3M */
+#include "V3M/qos_init_v3m.h"
+#endif
+#if RCAR_LSI == RCAR_E3 /* E3 */
+#include "E3/qos_init_e3_v10.h"
+#endif
+#if RCAR_LSI == RCAR_D3 /* D3 */
+#include "D3/qos_init_d3.h"
+#endif
+
+#if (RCAR_LSI != RCAR_E3) && (RCAR_LSI != RCAR_D3) && (RCAR_LSI != RCAR_V3M)
+
+#define DRAM_CH_CNT 0x04
+uint32_t qos_init_ddr_ch;
+uint8_t qos_init_ddr_phyvalid;
+#endif
+
+#define PRR_PRODUCT_ERR(reg) \
+ do { \
+ ERROR("LSI Product ID(PRR=0x%x) QoS " \
+ "initialize not supported.\n", reg); \
+ panic(); \
+ } while (0)
+
+#define PRR_CUT_ERR(reg) \
+ do { \
+ ERROR("LSI Cut ID(PRR=0x%x) QoS " \
+ "initialize not supported.\n", reg); \
+ panic(); \
+ } while (0)
+
+void rcar_qos_init(void)
+{
+ uint32_t reg;
+#if (RCAR_LSI != RCAR_E3) && (RCAR_LSI != RCAR_D3) && (RCAR_LSI != RCAR_V3M)
+ uint32_t i;
+
+ qos_init_ddr_ch = 0;
+ qos_init_ddr_phyvalid = get_boardcnf_phyvalid();
+ for (i = 0; i < DRAM_CH_CNT; i++) {
+ if ((qos_init_ddr_phyvalid & (1 << i))) {
+ qos_init_ddr_ch++;
+ }
+ }
+#endif
+
+ reg = mmio_read_32(PRR);
+#if (RCAR_LSI == RCAR_AUTO) || RCAR_LSI_CUT_COMPAT
+ switch (reg & PRR_PRODUCT_MASK) {
+ case PRR_PRODUCT_H3:
+#if (RCAR_LSI == RCAR_AUTO) || (RCAR_LSI == RCAR_H3)
+ switch (reg & PRR_CUT_MASK) {
+ case PRR_PRODUCT_10:
+ qos_init_h3_v10();
+ break;
+ case PRR_PRODUCT_11:
+ qos_init_h3_v11();
+ break;
+ case PRR_PRODUCT_20:
+ qos_init_h3_v20();
+ break;
+ case PRR_PRODUCT_30:
+ default:
+ qos_init_h3_v30();
+ break;
+ }
+#elif (RCAR_LSI == RCAR_H3N)
+ switch (reg & PRR_CUT_MASK) {
+ case PRR_PRODUCT_30:
+ default:
+ qos_init_h3n_v30();
+ break;
+ }
+#else
+ PRR_PRODUCT_ERR(reg);
+#endif
+ break;
+ case PRR_PRODUCT_M3:
+#if (RCAR_LSI == RCAR_AUTO) || (RCAR_LSI == RCAR_M3)
+ switch (reg & PRR_CUT_MASK) {
+ case PRR_PRODUCT_10:
+ qos_init_m3_v10();
+ break;
+ case PRR_PRODUCT_21: /* M3 Cut 13 */
+ qos_init_m3_v11();
+ break;
+ case PRR_PRODUCT_30: /* M3 Cut 30 */
+ default:
+ qos_init_m3_v30();
+ break;
+ }
+#else
+ PRR_PRODUCT_ERR(reg);
+#endif
+ break;
+ case PRR_PRODUCT_M3N:
+#if (RCAR_LSI == RCAR_AUTO) || (RCAR_LSI == RCAR_M3N)
+ switch (reg & PRR_CUT_MASK) {
+ case PRR_PRODUCT_10:
+ default:
+ qos_init_m3n_v10();
+ break;
+ }
+#else
+ PRR_PRODUCT_ERR(reg);
+#endif
+ break;
+ case PRR_PRODUCT_V3M:
+#if (RCAR_LSI == RCAR_AUTO) || (RCAR_LSI == RCAR_V3M)
+ switch (reg & PRR_CUT_MASK) {
+ case PRR_PRODUCT_10:
+ case PRR_PRODUCT_20:
+ default:
+ qos_init_v3m();
+ break;
+ }
+#else
+ PRR_PRODUCT_ERR(reg);
+#endif
+ break;
+ case PRR_PRODUCT_E3:
+#if (RCAR_LSI == RCAR_E3)
+ switch (reg & PRR_CUT_MASK) {
+ case PRR_PRODUCT_10:
+ default:
+ qos_init_e3_v10();
+ break;
+ }
+#else
+ PRR_PRODUCT_ERR(reg);
+#endif
+ break;
+ case PRR_PRODUCT_D3:
+#if (RCAR_LSI == RCAR_D3)
+ switch (reg & PRR_CUT_MASK) {
+ case PRR_PRODUCT_10:
+ default:
+ qos_init_d3();
+ break;
+ }
+#else
+ PRR_PRODUCT_ERR(reg);
+#endif
+ break;
+ default:
+ PRR_PRODUCT_ERR(reg);
+ break;
+ }
+#else
+#if RCAR_LSI == RCAR_H3 /* H3 */
+#if RCAR_LSI_CUT == RCAR_CUT_10
+ /* H3 Cut 10 */
+ if ((PRR_PRODUCT_H3 | PRR_PRODUCT_10)
+ != (reg & (PRR_PRODUCT_MASK | PRR_CUT_MASK))) {
+ PRR_PRODUCT_ERR(reg);
+ }
+ qos_init_h3_v10();
+#elif RCAR_LSI_CUT == RCAR_CUT_11
+ /* H3 Cut 11 */
+ if ((PRR_PRODUCT_H3 | PRR_PRODUCT_11)
+ != (reg & (PRR_PRODUCT_MASK | PRR_CUT_MASK))) {
+ PRR_PRODUCT_ERR(reg);
+ }
+ qos_init_h3_v11();
+#elif RCAR_LSI_CUT == RCAR_CUT_20
+ /* H3 Cut 20 */
+ if ((PRR_PRODUCT_H3 | PRR_PRODUCT_20)
+ != (reg & (PRR_PRODUCT_MASK | PRR_CUT_MASK))) {
+ PRR_PRODUCT_ERR(reg);
+ }
+ qos_init_h3_v20();
+#else
+ /* H3 Cut 30 or later */
+ if ((PRR_PRODUCT_H3)
+ != (reg & (PRR_PRODUCT_MASK))) {
+ PRR_PRODUCT_ERR(reg);
+ }
+ qos_init_h3_v30();
+#endif
+#elif RCAR_LSI == RCAR_H3N /* H3 */
+ /* H3N Cut 30 or later */
+ if ((PRR_PRODUCT_H3)
+ != (reg & (PRR_PRODUCT_MASK))) {
+ PRR_PRODUCT_ERR(reg);
+ }
+ qos_init_h3n_v30();
+#elif RCAR_LSI == RCAR_M3 /* M3 */
+#if RCAR_LSI_CUT == RCAR_CUT_10
+ /* M3 Cut 10 */
+ if ((PRR_PRODUCT_M3 | PRR_PRODUCT_10)
+ != (reg & (PRR_PRODUCT_MASK | PRR_CUT_MASK))) {
+ PRR_PRODUCT_ERR(reg);
+ }
+ qos_init_m3_v10();
+#elif RCAR_LSI_CUT == RCAR_CUT_11
+ /* M3 Cut 11 */
+ if ((PRR_PRODUCT_M3 | PRR_PRODUCT_20)
+ != (reg & (PRR_PRODUCT_MASK | PRR_CUT_MASK))) {
+ PRR_PRODUCT_ERR(reg);
+ }
+ qos_init_m3_v11();
+#elif RCAR_LSI_CUT == RCAR_CUT_13
+ /* M3 Cut 13 */
+ if ((PRR_PRODUCT_M3 | PRR_PRODUCT_21)
+ != (reg & (PRR_PRODUCT_MASK | PRR_CUT_MASK))) {
+ PRR_PRODUCT_ERR(reg);
+ }
+ qos_init_m3_v11();
+#else
+ /* M3 Cut 30 or later */
+ if ((PRR_PRODUCT_M3)
+ != (reg & (PRR_PRODUCT_MASK))) {
+ PRR_PRODUCT_ERR(reg);
+ }
+ qos_init_m3_v30();
+#endif
+#elif RCAR_LSI == RCAR_M3N /* M3N */
+ /* M3N Cut 10 or later */
+ if ((PRR_PRODUCT_M3N)
+ != (reg & (PRR_PRODUCT_MASK))) {
+ PRR_PRODUCT_ERR(reg);
+ }
+ qos_init_m3n_v10();
+#elif RCAR_LSI == RCAR_V3M /* V3M */
+ /* V3M Cut 10 or later */
+ if ((PRR_PRODUCT_V3M)
+ != (reg & (PRR_PRODUCT_MASK))) {
+ PRR_PRODUCT_ERR(reg);
+ }
+ qos_init_v3m();
+#elif RCAR_LSI == RCAR_D3 /* D3 */
+ /* D3 Cut 10 or later */
+ if ((PRR_PRODUCT_D3)
+ != (reg & (PRR_PRODUCT_MASK))) {
+ PRR_PRODUCT_ERR(reg);
+ }
+ qos_init_d3();
+#elif RCAR_LSI == RCAR_E3 /* E3 */
+ /* E3 Cut 10 or later */
+ if ((PRR_PRODUCT_E3)
+ != (reg & (PRR_PRODUCT_MASK))) {
+ PRR_PRODUCT_ERR(reg);
+ }
+ qos_init_e3_v10();
+#else
+#error "Don't have QoS initialize routine(Unknown chip)."
+#endif
+#endif
+}
+
+#if (RCAR_LSI != RCAR_E3) && (RCAR_LSI != RCAR_D3) && (RCAR_LSI != RCAR_V3M)
+uint32_t get_refperiod(void)
+{
+ uint32_t refperiod = QOSWT_WTSET0_CYCLE;
+
+#if (RCAR_LSI == RCAR_AUTO) || RCAR_LSI_CUT_COMPAT
+ uint32_t reg;
+
+ reg = mmio_read_32(PRR);
+ switch (reg & PRR_PRODUCT_MASK) {
+#if (RCAR_LSI == RCAR_AUTO) || (RCAR_LSI == RCAR_H3)
+ case PRR_PRODUCT_H3:
+ switch (reg & PRR_CUT_MASK) {
+ case PRR_PRODUCT_10:
+ case PRR_PRODUCT_11:
+ break;
+ case PRR_PRODUCT_20:
+ case PRR_PRODUCT_30:
+ default:
+ refperiod = REFPERIOD_CYCLE;
+ break;
+ }
+ break;
+#elif (RCAR_LSI == RCAR_H3N)
+ case PRR_PRODUCT_H3:
+ switch (reg & PRR_CUT_MASK) {
+ case PRR_PRODUCT_30:
+ default:
+ refperiod = REFPERIOD_CYCLE;
+ break;
+ }
+ break;
+#endif
+#if (RCAR_LSI == RCAR_AUTO) || (RCAR_LSI == RCAR_M3)
+ case PRR_PRODUCT_M3:
+ switch (reg & PRR_CUT_MASK) {
+ case PRR_PRODUCT_10:
+ break;
+ case PRR_PRODUCT_20: /* M3 Cut 11 */
+ case PRR_PRODUCT_21: /* M3 Cut 13 */
+ case PRR_PRODUCT_30: /* M3 Cut 30 */
+ default:
+ refperiod = REFPERIOD_CYCLE;
+ break;
+ }
+ break;
+#endif
+#if (RCAR_LSI == RCAR_AUTO) || (RCAR_LSI == RCAR_M3N)
+ case PRR_PRODUCT_M3N:
+ refperiod = REFPERIOD_CYCLE;
+ break;
+#endif
+ default:
+ break;
+ }
+#elif RCAR_LSI == RCAR_H3
+#if RCAR_LSI_CUT == RCAR_CUT_10
+ /* H3 Cut 10 */
+#elif RCAR_LSI_CUT == RCAR_CUT_11
+ /* H3 Cut 11 */
+#else
+ /* H3 Cut 20 */
+ /* H3 Cut 30 or later */
+ refperiod = REFPERIOD_CYCLE;
+#endif
+#elif RCAR_LSI == RCAR_H3N
+ /* H3N Cut 30 or later */
+ refperiod = REFPERIOD_CYCLE;
+#elif RCAR_LSI == RCAR_M3
+#if RCAR_LSI_CUT == RCAR_CUT_10
+ /* M3 Cut 10 */
+#else
+ /* M3 Cut 11 */
+ /* M3 Cut 13 */
+ /* M3 Cut 30 or later */
+ refperiod = REFPERIOD_CYCLE;
+#endif
+#elif RCAR_LSI == RCAR_M3N /* for M3N */
+ refperiod = REFPERIOD_CYCLE;
+#endif
+
+ return refperiod;
+}
+#endif
+
+void rcar_qos_dbsc_setting(struct rcar_gen3_dbsc_qos_settings *qos,
+ unsigned int qos_size, bool dbsc_wren)
+{
+ int i;
+
+ /* Register write enable */
+ if (dbsc_wren)
+ io_write_32(DBSC_DBSYSCNT0, 0x00001234U);
+
+ for (i = 0; i < qos_size; i++)
+ io_write_32(qos[i].reg, qos[i].val);
+
+ /* Register write protect */
+ if (dbsc_wren)
+ io_write_32(DBSC_DBSYSCNT0, 0x00000000U);
+}
diff --git a/drivers/renesas/rcar/qos/qos_init.h b/drivers/renesas/rcar/qos/qos_init.h
new file mode 100644
index 0000000..1b64992
--- /dev/null
+++ b/drivers/renesas/rcar/qos/qos_init.h
@@ -0,0 +1,13 @@
+/*
+ * Copyright (c) 2015-2018, Renesas Electronics Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef QOS_INIT_H
+#define QOS_INIT_H
+
+extern void rcar_qos_init(void);
+extern uint8_t get_boardcnf_phyvalid(void);
+
+#endif /* QOS_INIT_H */