[U-Boot] [PATCH 1/8] arm: rmobile: Merge functions to get the CPU information of R8A7790 and R8A7791

Functions to get the CPU information of R8A7790 and R8A7791 are common. This merges these as cpu_info-rcar.c.
Signed-off-by: Nobuhiro Iwamatsu nobuhiro.iwamatsu.yj@renesas.com --- arch/arm/cpu/armv7/rmobile/Makefile | 4 ++-- arch/arm/cpu/armv7/rmobile/cpu_info-r8a7790.c | 22 -------------------- arch/arm/cpu/armv7/rmobile/cpu_info-r8a7791.c | 29 --------------------------- arch/arm/cpu/armv7/rmobile/cpu_info-rcar.c | 21 +++++++++++++++++++ 4 files changed, 23 insertions(+), 53 deletions(-) delete mode 100644 arch/arm/cpu/armv7/rmobile/cpu_info-r8a7790.c delete mode 100644 arch/arm/cpu/armv7/rmobile/cpu_info-r8a7791.c create mode 100644 arch/arm/cpu/armv7/rmobile/cpu_info-rcar.c
diff --git a/arch/arm/cpu/armv7/rmobile/Makefile b/arch/arm/cpu/armv7/rmobile/Makefile index 2221999..fad004c 100644 --- a/arch/arm/cpu/armv7/rmobile/Makefile +++ b/arch/arm/cpu/armv7/rmobile/Makefile @@ -11,7 +11,7 @@ obj-y += emac.o obj-$(CONFIG_DISPLAY_BOARDINFO) += board.o obj-$(CONFIG_GLOBAL_TIMER) += timer.o obj-$(CONFIG_R8A7740) += lowlevel_init.o cpu_info-r8a7740.o pfc-r8a7740.o -obj-$(CONFIG_R8A7790) += lowlevel_init_ca15.o cpu_info-r8a7790.o pfc-r8a7790.o -obj-$(CONFIG_R8A7791) += lowlevel_init_ca15.o cpu_info-r8a7791.o pfc-r8a7791.o +obj-$(CONFIG_R8A7790) += lowlevel_init_ca15.o cpu_info-rcar.o pfc-r8a7790.o +obj-$(CONFIG_R8A7791) += lowlevel_init_ca15.o cpu_info-rcar.o pfc-r8a7791.o obj-$(CONFIG_SH73A0) += lowlevel_init.o cpu_info-sh73a0.o pfc-sh73a0.o obj-$(CONFIG_TMU_TIMER) += ../../../../sh/lib/time.o diff --git a/arch/arm/cpu/armv7/rmobile/cpu_info-r8a7790.c b/arch/arm/cpu/armv7/rmobile/cpu_info-r8a7790.c deleted file mode 100644 index 7232e23..0000000 --- a/arch/arm/cpu/armv7/rmobile/cpu_info-r8a7790.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * arch/arm/cpu/armv7/rmobile/cpu_info-r8a7790.c - * This file is r8a7790 processor support. - * - * Copyright (C) 2013 Renesas Electronics Corporation - * - * SPDX-License-Identifier: GPL-2.0 - */ -#include <common.h> -#include <asm/io.h> - -#define PRR 0xFF000044 - -u32 rmobile_get_cpu_type(void) -{ - return (readl(PRR) & 0x00007F00) >> 8; -} - -u32 rmobile_get_cpu_rev_integer(void) -{ - return (readl(PRR) & 0x000000F0) >> 4; -} diff --git a/arch/arm/cpu/armv7/rmobile/cpu_info-r8a7791.c b/arch/arm/cpu/armv7/rmobile/cpu_info-r8a7791.c deleted file mode 100644 index 2de58ed..0000000 --- a/arch/arm/cpu/armv7/rmobile/cpu_info-r8a7791.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * arch/arm/cpu/armv7/rmobile/cpu_info-r8a7791.c - * - * Copyright (C) 2013 Renesas Electronics Corporation - * - * SPDX-License-Identifier: GPL-2.0 - */ -#include <common.h> -#include <asm/io.h> - -#define PRR 0xFF000044 - -u32 rmobile_get_cpu_type(void) -{ - u32 product; - - product = readl(PRR); - - return (u32)((product & 0x00007F00) >> 8); -} - -u32 rmobile_get_cpu_rev_integer(void) -{ - u32 product; - - product = readl(PRR); - - return (u32)((product & 0x000000F0) >> 4); -} diff --git a/arch/arm/cpu/armv7/rmobile/cpu_info-rcar.c b/arch/arm/cpu/armv7/rmobile/cpu_info-rcar.c new file mode 100644 index 0000000..0289ece --- /dev/null +++ b/arch/arm/cpu/armv7/rmobile/cpu_info-rcar.c @@ -0,0 +1,21 @@ +/* + * arch/arm/cpu/armv7/rmobile/cpu_info-rcar.c + * + * Copyright (C) 2013,2014 Renesas Electronics Corporation + * + * SPDX-License-Identifier: GPL-2.0 + */ +#include <common.h> +#include <asm/io.h> + +#define PRR 0xFF000044 + +u32 rmobile_get_cpu_type(void) +{ + return (readl(PRR) & 0x00007F00) >> 8; +} + +u32 rmobile_get_cpu_rev_integer(void) +{ + return (readl(PRR) & 0x000000F0) >> 4; +}

Value that can be obtained in the rmobile_get_cpu_rev_integer() starts at 0. However, revisions to start from 1, which adds 1.
Signed-off-by: Nobuhiro Iwamatsu nobuhiro.iwamatsu.yj@renesas.com --- arch/arm/cpu/armv7/rmobile/cpu_info-rcar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/cpu/armv7/rmobile/cpu_info-rcar.c b/arch/arm/cpu/armv7/rmobile/cpu_info-rcar.c index 0289ece..65e89aa 100644 --- a/arch/arm/cpu/armv7/rmobile/cpu_info-rcar.c +++ b/arch/arm/cpu/armv7/rmobile/cpu_info-rcar.c @@ -17,5 +17,5 @@ u32 rmobile_get_cpu_type(void)
u32 rmobile_get_cpu_rev_integer(void) { - return (readl(PRR) & 0x000000F0) >> 4; + return ((readl(PRR) & 0x000000F0) >> 4) + 1; }

This adds rmobile_get_cpu_rev_fraction to get fraction revision for R-Car SoCs.
Signed-off-by: Nobuhiro Iwamatsu nobuhiro.iwamatsu.yj@renesas.com --- arch/arm/cpu/armv7/rmobile/cpu_info-rcar.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/arch/arm/cpu/armv7/rmobile/cpu_info-rcar.c b/arch/arm/cpu/armv7/rmobile/cpu_info-rcar.c index 65e89aa..42ee30f 100644 --- a/arch/arm/cpu/armv7/rmobile/cpu_info-rcar.c +++ b/arch/arm/cpu/armv7/rmobile/cpu_info-rcar.c @@ -19,3 +19,8 @@ u32 rmobile_get_cpu_rev_integer(void) { return ((readl(PRR) & 0x000000F0) >> 4) + 1; } + +u32 rmobile_get_cpu_rev_fraction(void) +{ + return readl(PRR) & 0x0000000F; +}

These functions are defined but has no prototype declaration. Add them.
Signed-off-by: Nobuhiro Iwamatsu nobuhiro.iwamatsu.yj@renesas.com --- arch/arm/include/asm/arch-rmobile/rmobile.h | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/arch/arm/include/asm/arch-rmobile/rmobile.h b/arch/arm/include/asm/arch-rmobile/rmobile.h index 2382565..ebddd7a 100644 --- a/arch/arm/include/asm/arch-rmobile/rmobile.h +++ b/arch/arm/include/asm/arch-rmobile/rmobile.h @@ -15,4 +15,10 @@ #endif #endif /* CONFIG_RMOBILE */
+#ifndef __ASSEMBLY__ +u32 rmobile_get_cpu_type(void); +u32 rmobile_get_cpu_rev_integer(void); +u32 rmobile_get_cpu_rev_fraction(void); +#endif /* __ASSEMBLY__ */ + #endif /* __ASM_ARCH_RMOBILE_H */

The print_cpuinfo fucntion has same code. It has a code of many common. This adds a table of CPU information, duplicate using for-loop.
Signed-off-by: Nobuhiro Iwamatsu nobuhiro.iwamatsu.yj@renesas.com --- arch/arm/cpu/armv7/rmobile/cpu_info.c | 49 ++++++++++++++++------------------- 1 file changed, 22 insertions(+), 27 deletions(-)
diff --git a/arch/arm/cpu/armv7/rmobile/cpu_info.c b/arch/arm/cpu/armv7/rmobile/cpu_info.c index 83d5282..7a7c97d 100644 --- a/arch/arm/cpu/armv7/rmobile/cpu_info.c +++ b/arch/arm/cpu/armv7/rmobile/cpu_info.c @@ -44,35 +44,30 @@ static u32 __rmobile_get_cpu_rev_fraction(void) u32 rmobile_get_cpu_rev_fraction(void) __attribute__((weak, alias("__rmobile_get_cpu_rev_fraction")));
+/* CPU infomation table */ +static const struct { + u16 cpu_type; + u8 cpu_name[10]; +} rmobile_cpuinfo[] = { + { 0x37, "SH73A0" }, + { 0x40, "R8A7740" }, + { 0x45, "R8A7790" }, + { 0x47, "R8A7791" }, + { 0x0, "CPU" }, +}; + int print_cpuinfo(void) { - switch (rmobile_get_cpu_type()) { - case 0x37: - printf("CPU: Renesas Electronics SH73A0 rev %d.%d\n", - rmobile_get_cpu_rev_integer(), - rmobile_get_cpu_rev_fraction()); - break; - case 0x40: - printf("CPU: Renesas Electronics R8A7740 rev %d.%d\n", - rmobile_get_cpu_rev_integer(), - rmobile_get_cpu_rev_fraction()); - break; - - case 0x45: - printf("CPU: Renesas Electronics R8A7790 rev %d\n", - rmobile_get_cpu_rev_integer()); - break; - - case 0x47: - printf("CPU: Renesas Electronics R8A7791 rev %d\n", - rmobile_get_cpu_rev_integer()); - break; - - default: - printf("CPU: Renesas Electronics CPU rev %d.%d\n", - rmobile_get_cpu_rev_integer(), - rmobile_get_cpu_rev_fraction()); - break; + int i = 0; + u32 cpu_type = rmobile_get_cpu_type(); + for (; i < ARRAY_SIZE(rmobile_cpuinfo); i++) { + if (rmobile_cpuinfo[i].cpu_type == cpu_type) { + printf("CPU: Renesas Electronics %s rev %d.%d\n", + rmobile_cpuinfo[i].cpu_name, + rmobile_get_cpu_rev_integer(), + rmobile_get_cpu_rev_fraction()); + break; + } } return 0; }

There is ES2 is a new revision to R8A7790. This adds support this revision.
Signed-off-by: Nobuhiro Iwamatsu nobuhiro.iwamatsu.yj@renesas.com --- arch/arm/include/asm/arch-rmobile/r8a7790.h | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/arch/arm/include/asm/arch-rmobile/r8a7790.h b/arch/arm/include/asm/arch-rmobile/r8a7790.h index bd210d0..6ef665d 100644 --- a/arch/arm/include/asm/arch-rmobile/r8a7790.h +++ b/arch/arm/include/asm/arch-rmobile/r8a7790.h @@ -11,4 +11,8 @@
#include "rcar-base.h"
+#define R8A7790_CUT_ES2X 2 +#define IS_R8A7790_ES2() \ + (rmobile_get_cpu_rev_integer() == R8A7790_CUT_ES2X) + #endif /* __ASM_ARCH_R8A7790_H */

There is ES2 is a new revision to R8A7791. This adds support this revision.
Signed-off-by: Nobuhiro Iwamatsu nobuhiro.iwamatsu.yj@renesas.com --- arch/arm/include/asm/arch-rmobile/r8a7791.h | 4 ++++ arch/arm/include/asm/arch-rmobile/rcar-base.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/arm/include/asm/arch-rmobile/r8a7791.h b/arch/arm/include/asm/arch-rmobile/r8a7791.h index 7c8f19c..4791825 100644 --- a/arch/arm/include/asm/arch-rmobile/r8a7791.h +++ b/arch/arm/include/asm/arch-rmobile/r8a7791.h @@ -46,4 +46,8 @@ #define DBSC3_1_QOS_W14_BASE 0xE67A2E00 #define DBSC3_1_QOS_W15_BASE 0xE67A2F00
+#define R8A7791_CUT_ES2X 2 +#define IS_R8A7791_ES2() \ + (rmobile_get_cpu_rev_integer() == R8A7791_CUT_ES2X) + #endif /* __ASM_ARCH_R8A7791_H */ diff --git a/arch/arm/include/asm/arch-rmobile/rcar-base.h b/arch/arm/include/asm/arch-rmobile/rcar-base.h index 67f227b..371f0ed 100644 --- a/arch/arm/include/asm/arch-rmobile/rcar-base.h +++ b/arch/arm/include/asm/arch-rmobile/rcar-base.h @@ -552,7 +552,7 @@ struct rcar_s3c { u32 s3cexclidmsk; u32 s3cadsplcr; u32 s3cmaar; - u32 s3carcr11; /* R8a7790 only */ + u32 s3carcr11; u32 s3crorr; u32 s3cworr; u32 s3carcr22;

There is koelsch where ES2 revision of R8A7791 was put on. This is different in Qos setting. This adds Qos setting for ES2 revision of R8A7791.
Signed-off-by: Nobuhiro Iwamatsu nobuhiro.iwamatsu.yj@renesas.com --- board/renesas/koelsch/qos.c | 169 +++++++++++++++++++++++++++++++++----------- 1 file changed, 129 insertions(+), 40 deletions(-)
diff --git a/board/renesas/koelsch/qos.c b/board/renesas/koelsch/qos.c index 1c64c36..d82bf8b 100644 --- a/board/renesas/koelsch/qos.c +++ b/board/renesas/koelsch/qos.c @@ -13,7 +13,7 @@ #include <asm/io.h> #include <asm/arch/rmobile.h>
-/* QoS version 0.23 */ +/* QoS version 0.23 for ES1 and version 0.303 for ES2 */
enum { DBSC3_00, DBSC3_01, DBSC3_02, DBSC3_03, DBSC3_04, @@ -114,10 +114,16 @@ void qos_init(void)
/* S3C -QoS */ s3c = (struct rcar_s3c *)S3C_BASE; - writel(0x00FF1B1D, &s3c->s3cadsplcr); - writel(0x1F0D0C0C, &s3c->s3crorr); - writel(0x1F0D0C0A, &s3c->s3cworr); - + if (IS_R8A7791_ES2()) { + writel(0x00FF1B0D, &s3c->s3cadsplcr); + writel(0x1F0D0B0A, &s3c->s3crorr); + writel(0x1F0D0B09, &s3c->s3cworr); + writel(0x00200808, &s3c->s3carcr11); + } else { + writel(0x00FF1B1D, &s3c->s3cadsplcr); + writel(0x1F0D0C0C, &s3c->s3crorr); + writel(0x1F0D0C0A, &s3c->s3cworr); + } /* QoS Control Registers */ s3c_qos = (struct rcar_s3c_qos *)S3C_QOS_CCI0_BASE; writel(0x00890089, &s3c_qos->s3cqos0); @@ -142,7 +148,10 @@ void qos_init(void) writel(0x00002032, &s3c_qos->s3cqos8);
s3c_qos = (struct rcar_s3c_qos *)S3C_QOS_MXI_BASE; - writel(0x00820082, &s3c_qos->s3cqos0); + if (IS_R8A7791_ES2()) + writel(0x80928092, &s3c_qos->s3cqos0); + else + writel(0x00820082, &s3c_qos->s3cqos0); writel(0x20960020, &s3c_qos->s3cqos1); writel(0x20302030, &s3c_qos->s3cqos2); writel(0x20AA20DC, &s3c_qos->s3cqos3); @@ -224,11 +233,13 @@ void qos_init(void) writel(0x00000001, &qos_addr->dblgqon); }
- /* CCI-400 -QoS */ - writel(0x20001000, CCI_400_MAXOT_1); - writel(0x20001000, CCI_400_MAXOT_2); - writel(0x0000000C, CCI_400_QOSCNTL_1); - writel(0x0000000C, CCI_400_QOSCNTL_2); + if (!IS_R8A7791_ES2()) { + /* CCI-400 -QoS */ + writel(0x20001000, CCI_400_MAXOT_1); + writel(0x20001000, CCI_400_MAXOT_2); + writel(0x0000000C, CCI_400_QOSCNTL_1); + writel(0x0000000C, CCI_400_QOSCNTL_2); + }
/* MXI -QoS */ /* Transaction Control (MXI) */ @@ -768,7 +779,10 @@ void qos_init(void) /* QoS Register (SYS-AXI256) */ axi_qos = (struct rcar_axi_qos *)SYS_AXI256_AXI128TO256_BASE; writel(0x00000002, &axi_qos->qosconf); - writel(0x00002245, &axi_qos->qosctset0); + if (IS_R8A7791_ES2()) + writel(0x000020EB, &axi_qos->qosctset0); + else + writel(0x00002245, &axi_qos->qosctset0); writel(0x00002096, &axi_qos->qosctset1); writel(0x00002030, &axi_qos->qosctset2); writel(0x00002030, &axi_qos->qosctset3); @@ -780,7 +794,10 @@ void qos_init(void)
axi_qos = (struct rcar_axi_qos *)SYS_AXI256_SYX_BASE; writel(0x00000002, &axi_qos->qosconf); - writel(0x00002245, &axi_qos->qosctset0); + if (IS_R8A7791_ES2()) + writel(0x000020EB, &axi_qos->qosctset0); + else + writel(0x00002245, &axi_qos->qosctset0); writel(0x00002096, &axi_qos->qosctset1); writel(0x00002030, &axi_qos->qosctset2); writel(0x00002030, &axi_qos->qosctset3); @@ -792,7 +809,10 @@ void qos_init(void)
axi_qos = (struct rcar_axi_qos *)SYS_AXI256_MPX_BASE; writel(0x00000002, &axi_qos->qosconf); - writel(0x00002245, &axi_qos->qosctset0); + if (IS_R8A7791_ES2()) + writel(0x000020EB, &axi_qos->qosctset0); + else + writel(0x00002245, &axi_qos->qosctset0); writel(0x00002096, &axi_qos->qosctset1); writel(0x00002030, &axi_qos->qosctset2); writel(0x00002030, &axi_qos->qosctset3); @@ -947,8 +967,13 @@ void qos_init(void) writel(0x00000001, &axi_qos->qosconf); writel(0x00002190, &axi_qos->qosctset0); writel(0x00000020, &axi_qos->qosreqctr); - writel(0x00002064, &axi_qos->qosthres0); - writel(0x00002004, &axi_qos->qosthres1); + if (IS_R8A7791_ES2()) { + writel(0x00000001, &axi_qos->qosthres0); + writel(0x00000001, &axi_qos->qosthres1); + } else { + writel(0x00002064, &axi_qos->qosthres0); + writel(0x00002004, &axi_qos->qosthres1); + } writel(0x00000001, &axi_qos->qosthres2); writel(0x00000001, &axi_qos->qosqon);
@@ -983,8 +1008,13 @@ void qos_init(void) writel(0x00000001, &axi_qos->qosconf); writel(0x00002190, &axi_qos->qosctset0); writel(0x00000020, &axi_qos->qosreqctr); - writel(0x00002064, &axi_qos->qosthres0); - writel(0x00002004, &axi_qos->qosthres1); + if (IS_R8A7791_ES2()) { + writel(0x00000001, &axi_qos->qosthres0); + writel(0x00000001, &axi_qos->qosthres1); + } else { + writel(0x00002064, &axi_qos->qosthres0); + writel(0x00002004, &axi_qos->qosthres1); + } writel(0x00000001, &axi_qos->qosthres2); writel(0x00000001, &axi_qos->qosqon);
@@ -1001,8 +1031,13 @@ void qos_init(void) writel(0x00000001, &axi_qos->qosconf); writel(0x00002190, &axi_qos->qosctset0); writel(0x00000020, &axi_qos->qosreqctr); - writel(0x00002064, &axi_qos->qosthres0); - writel(0x00002004, &axi_qos->qosthres1); + if (IS_R8A7791_ES2()) { + writel(0x00000001, &axi_qos->qosthres0); + writel(0x00000001, &axi_qos->qosthres1); + } else { + writel(0x00002064, &axi_qos->qosthres0); + writel(0x00002004, &axi_qos->qosthres1); + } writel(0x00000001, &axi_qos->qosthres2); writel(0x00000001, &axi_qos->qosqon);
@@ -1019,18 +1054,29 @@ void qos_init(void) writel(0x00000001, &axi_qos->qosconf); writel(0x00002190, &axi_qos->qosctset0); writel(0x00000020, &axi_qos->qosreqctr); - writel(0x00002064, &axi_qos->qosthres0); - writel(0x00002004, &axi_qos->qosthres1); + if (IS_R8A7791_ES2()) { + writel(0x00000001, &axi_qos->qosthres0); + writel(0x00000001, &axi_qos->qosthres1); + } else { + writel(0x00002064, &axi_qos->qosthres0); + writel(0x00002004, &axi_qos->qosthres1); + } writel(0x00000001, &axi_qos->qosthres2); writel(0x00000001, &axi_qos->qosqon);
axi_qos = (struct rcar_axi_qos *)MEDIA_AXI_VIN0W_BASE; writel(0x00000001, &axi_qos->qosconf); - writel(0x000020C8, &axi_qos->qosctset0); + if (IS_R8A7791_ES2()) + writel(0x00001FF0, &axi_qos->qosctset0); + else + writel(0x000020C8, &axi_qos->qosctset0); writel(0x00000020, &axi_qos->qosreqctr); writel(0x00002064, &axi_qos->qosthres0); writel(0x00002004, &axi_qos->qosthres1); - writel(0x00000001, &axi_qos->qosthres2); + if (IS_R8A7791_ES2()) + writel(0x00002001, &axi_qos->qosthres2); + else + writel(0x00000001, &axi_qos->qosthres2); writel(0x00000001, &axi_qos->qosqon);
axi_qos = (struct rcar_axi_qos *)MEDIA_AXI_FDP0R_BASE; @@ -1046,8 +1092,13 @@ void qos_init(void) writel(0x00000001, &axi_qos->qosconf); writel(0x000020C8, &axi_qos->qosctset0); writel(0x00000020, &axi_qos->qosreqctr); - writel(0x00002064, &axi_qos->qosthres0); - writel(0x00002004, &axi_qos->qosthres1); + if (IS_R8A7791_ES2()) { + writel(0x00000001, &axi_qos->qosthres0); + writel(0x00000001, &axi_qos->qosthres1); + } else { + writel(0x00002064, &axi_qos->qosthres0); + writel(0x00002004, &axi_qos->qosthres1); + } writel(0x00000001, &axi_qos->qosthres2); writel(0x00000001, &axi_qos->qosqon);
@@ -1082,8 +1133,13 @@ void qos_init(void) writel(0x00000001, &axi_qos->qosconf); writel(0x000020C8, &axi_qos->qosctset0); writel(0x00000020, &axi_qos->qosreqctr); - writel(0x00002064, &axi_qos->qosthres0); - writel(0x00002004, &axi_qos->qosthres1); + if (IS_R8A7791_ES2()) { + writel(0x00000001, &axi_qos->qosthres0); + writel(0x00000001, &axi_qos->qosthres1); + } else { + writel(0x00002064, &axi_qos->qosthres0); + writel(0x00002004, &axi_qos->qosthres1); + } writel(0x00000001, &axi_qos->qosthres2); writel(0x00000001, &axi_qos->qosqon);
@@ -1100,8 +1156,13 @@ void qos_init(void) writel(0x00000001, &axi_qos->qosconf); writel(0x000020C8, &axi_qos->qosctset0); writel(0x00000020, &axi_qos->qosreqctr); - writel(0x00002064, &axi_qos->qosthres0); - writel(0x00002004, &axi_qos->qosthres1); + if (IS_R8A7791_ES2()) { + writel(0x00000001, &axi_qos->qosthres0); + writel(0x00000001, &axi_qos->qosthres1); + } else { + writel(0x00002064, &axi_qos->qosthres0); + writel(0x00002004, &axi_qos->qosthres1); + } writel(0x00000001, &axi_qos->qosthres2); writel(0x00000001, &axi_qos->qosqon);
@@ -1124,7 +1185,10 @@ void qos_init(void) writel(0x00000001, &axi_qos->qosqon);
axi_qos = (struct rcar_axi_qos *)MEDIA_AXI_VSPD0R_BASE; - writel(0x00000000, &axi_qos->qosconf); + if (IS_R8A7791_ES2()) + writel(0x00000003, &axi_qos->qosconf); + else + writel(0x00000000, &axi_qos->qosconf); writel(0x000020C8, &axi_qos->qosctset0); writel(0x00002064, &axi_qos->qosthres0); writel(0x00002004, &axi_qos->qosthres1); @@ -1132,7 +1196,10 @@ void qos_init(void) writel(0x00000001, &axi_qos->qosqon);
axi_qos = (struct rcar_axi_qos *)MEDIA_AXI_VSPD0W_BASE; - writel(0x00000000, &axi_qos->qosconf); + if (IS_R8A7791_ES2()) + writel(0x00000003, &axi_qos->qosconf); + else + writel(0x00000000, &axi_qos->qosconf); writel(0x000020C8, &axi_qos->qosctset0); writel(0x00002064, &axi_qos->qosthres0); writel(0x00002004, &axi_qos->qosthres1); @@ -1140,7 +1207,10 @@ void qos_init(void) writel(0x00000001, &axi_qos->qosqon);
axi_qos = (struct rcar_axi_qos *)MEDIA_AXI_VSPD1R_BASE; - writel(0x00000000, &axi_qos->qosconf); + if (IS_R8A7791_ES2()) + writel(0x00000003, &axi_qos->qosconf); + else + writel(0x00000000, &axi_qos->qosconf); writel(0x000020C8, &axi_qos->qosctset0); writel(0x00002064, &axi_qos->qosthres0); writel(0x00002004, &axi_qos->qosthres1); @@ -1148,7 +1218,10 @@ void qos_init(void) writel(0x00000001, &axi_qos->qosqon);
axi_qos = (struct rcar_axi_qos *)MEDIA_AXI_VSPD1W_BASE; - writel(0x00000000, &axi_qos->qosconf); + if (IS_R8A7791_ES2()) + writel(0x00000003, &axi_qos->qosconf); + else + writel(0x00000000, &axi_qos->qosconf); writel(0x000020C8, &axi_qos->qosctset0); writel(0x00002064, &axi_qos->qosthres0); writel(0x00002004, &axi_qos->qosthres1); @@ -1156,7 +1229,10 @@ void qos_init(void) writel(0x00000001, &axi_qos->qosqon);
axi_qos = (struct rcar_axi_qos *)MEDIA_AXI_DU0R_BASE; - writel(0x00000000, &axi_qos->qosconf); + if (IS_R8A7791_ES2()) + writel(0x00000003, &axi_qos->qosconf); + else + writel(0x00000000, &axi_qos->qosconf); writel(0x00002063, &axi_qos->qosctset0); writel(0x00000001, &axi_qos->qosreqctr); writel(0x00002064, &axi_qos->qosthres0); @@ -1165,7 +1241,10 @@ void qos_init(void) writel(0x00000001, &axi_qos->qosqon);
axi_qos = (struct rcar_axi_qos *)MEDIA_AXI_DU0W_BASE; - writel(0x00000000, &axi_qos->qosconf); + if (IS_R8A7791_ES2()) + writel(0x00000000, &axi_qos->qosconf); + else + writel(0x00000000, &axi_qos->qosconf); writel(0x00002063, &axi_qos->qosctset0); writel(0x00000001, &axi_qos->qosreqctr); writel(0x00002064, &axi_qos->qosthres0); @@ -1186,8 +1265,13 @@ void qos_init(void) writel(0x00000001, &axi_qos->qosconf); writel(0x00002073, &axi_qos->qosctset0); writel(0x00000020, &axi_qos->qosreqctr); - writel(0x00002064, &axi_qos->qosthres0); - writel(0x00002004, &axi_qos->qosthres1); + if (IS_R8A7791_ES2()) { + writel(0x00000001, &axi_qos->qosthres0); + writel(0x00000001, &axi_qos->qosthres1); + } else { + writel(0x00002064, &axi_qos->qosthres0); + writel(0x00002004, &axi_qos->qosthres1); + } writel(0x00000001, &axi_qos->qosthres2); writel(0x00000001, &axi_qos->qosqon);
@@ -1204,8 +1288,13 @@ void qos_init(void) writel(0x00000001, &axi_qos->qosconf); writel(0x00002073, &axi_qos->qosctset0); writel(0x00000020, &axi_qos->qosreqctr); - writel(0x00002064, &axi_qos->qosthres0); - writel(0x00002004, &axi_qos->qosthres1); + if (IS_R8A7791_ES2()) { + writel(0x00000001, &axi_qos->qosthres0); + writel(0x00000001, &axi_qos->qosthres1); + } else { + writel(0x00002064, &axi_qos->qosthres0); + writel(0x00002004, &axi_qos->qosthres1); + } writel(0x00000001, &axi_qos->qosthres2); writel(0x00000001, &axi_qos->qosqon);
participants (1)
-
Nobuhiro Iwamatsu