rcar_gen3: plat: Rename RCAR_PRODUCT_* to PRR_PRODUCT_*
Rename RCAR_PRODUCT_* to PRR_PRODUCT_* and drop the duplicate
RCAR_PRODUCT_* macro.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I6b2789790b85edb79c026f0860d70f323d113d96
diff --git a/plat/renesas/rcar/bl2_plat_setup.c b/plat/renesas/rcar/bl2_plat_setup.c
index 3c9b56f..ebe6ddd 100644
--- a/plat/renesas/rcar/bl2_plat_setup.c
+++ b/plat/renesas/rcar/bl2_plat_setup.c
@@ -65,22 +65,22 @@
/* R-Car Gen3 product check */
#if (RCAR_LSI == RCAR_H3) || (RCAR_LSI == RCAR_H3N)
-#define TARGET_PRODUCT RCAR_PRODUCT_H3
+#define TARGET_PRODUCT PRR_PRODUCT_H3
#define TARGET_NAME "R-Car H3"
#elif RCAR_LSI == RCAR_M3
-#define TARGET_PRODUCT RCAR_PRODUCT_M3
+#define TARGET_PRODUCT PRR_PRODUCT_M3
#define TARGET_NAME "R-Car M3"
#elif RCAR_LSI == RCAR_M3N
-#define TARGET_PRODUCT RCAR_PRODUCT_M3N
+#define TARGET_PRODUCT PRR_PRODUCT_M3N
#define TARGET_NAME "R-Car M3N"
#elif RCAR_LSI == RCAR_V3M
-#define TARGET_PRODUCT RCAR_PRODUCT_V3M
+#define TARGET_PRODUCT PRR_PRODUCT_V3M
#define TARGET_NAME "R-Car V3M"
#elif RCAR_LSI == RCAR_E3
-#define TARGET_PRODUCT RCAR_PRODUCT_E3
+#define TARGET_PRODUCT PRR_PRODUCT_E3
#define TARGET_NAME "R-Car E3"
#elif RCAR_LSI == RCAR_D3
-#define TARGET_PRODUCT RCAR_PRODUCT_D3
+#define TARGET_PRODUCT PRR_PRODUCT_D3
#define TARGET_NAME "R-Car D3"
#elif RCAR_LSI == RCAR_AUTO
#define TARGET_NAME "R-Car H3/M3/M3N/V3M"
@@ -238,17 +238,17 @@
bl2_secure_setting();
reg = mmio_read_32(RCAR_PRR);
- product_cut = reg & (RCAR_PRODUCT_MASK | RCAR_CUT_MASK);
- product = reg & RCAR_PRODUCT_MASK;
- cut = reg & RCAR_CUT_MASK;
+ product_cut = reg & (PRR_PRODUCT_MASK | PRR_CUT_MASK);
+ product = reg & PRR_PRODUCT_MASK;
+ cut = reg & PRR_CUT_MASK;
- if (product == RCAR_PRODUCT_M3 && RCAR_CUT_VER30 > cut)
+ if (product == PRR_PRODUCT_M3 && PRR_PRODUCT_30 > cut)
goto tlb;
- if (product == RCAR_PRODUCT_H3 && RCAR_CUT_VER20 > cut)
+ if (product == PRR_PRODUCT_H3 && PRR_PRODUCT_20 > cut)
goto tlb;
- if (product == RCAR_PRODUCT_D3)
+ if (product == PRR_PRODUCT_D3)
goto tlb;
/* Disable MFIS write protection */
@@ -261,28 +261,28 @@
boot_cpu != MODEMR_BOOT_CPU_CA53)
goto mmu;
- if (product_cut == RCAR_PRODUCT_H3_CUT20) {
+ if (product_cut == PRR_PRODUCT_H3_CUT20) {
mmio_write_32(IPMMUVI0_IMSCTLR, IMSCTLR_DISCACHE);
mmio_write_32(IPMMUVI1_IMSCTLR, IMSCTLR_DISCACHE);
mmio_write_32(IPMMUPV0_IMSCTLR, IMSCTLR_DISCACHE);
mmio_write_32(IPMMUPV1_IMSCTLR, IMSCTLR_DISCACHE);
mmio_write_32(IPMMUPV2_IMSCTLR, IMSCTLR_DISCACHE);
mmio_write_32(IPMMUPV3_IMSCTLR, IMSCTLR_DISCACHE);
- } else if (product_cut == (RCAR_PRODUCT_M3N | RCAR_CUT_VER10) ||
- product_cut == (RCAR_PRODUCT_M3N | RCAR_CUT_VER11)) {
+ } else if (product_cut == (PRR_PRODUCT_M3N | PRR_PRODUCT_10) ||
+ product_cut == (PRR_PRODUCT_M3N | PRR_PRODUCT_11)) {
mmio_write_32(IPMMUVI0_IMSCTLR, IMSCTLR_DISCACHE);
mmio_write_32(IPMMUPV0_IMSCTLR, IMSCTLR_DISCACHE);
- } else if ((product_cut == (RCAR_PRODUCT_E3 | RCAR_CUT_VER10)) ||
- (product_cut == (RCAR_PRODUCT_E3 | RCAR_CUT_VER11))) {
+ } else if ((product_cut == (PRR_PRODUCT_E3 | PRR_PRODUCT_10)) ||
+ (product_cut == (PRR_PRODUCT_E3 | PRR_PRODUCT_11))) {
mmio_write_32(IPMMUVI0_IMSCTLR, IMSCTLR_DISCACHE);
mmio_write_32(IPMMUVP0_IMSCTLR, IMSCTLR_DISCACHE);
mmio_write_32(IPMMUPV0_IMSCTLR, IMSCTLR_DISCACHE);
}
- if (product_cut == (RCAR_PRODUCT_H3_CUT20) ||
- product_cut == (RCAR_PRODUCT_M3N | RCAR_CUT_VER10) ||
- product_cut == (RCAR_PRODUCT_M3N | RCAR_CUT_VER11) ||
- product_cut == (RCAR_PRODUCT_E3 | RCAR_CUT_VER10)) {
+ if (product_cut == (PRR_PRODUCT_H3_CUT20) ||
+ product_cut == (PRR_PRODUCT_M3N | PRR_PRODUCT_10) ||
+ product_cut == (PRR_PRODUCT_M3N | PRR_PRODUCT_11) ||
+ product_cut == (PRR_PRODUCT_E3 | PRR_PRODUCT_10)) {
mmio_write_32(IPMMUHC_IMSCTLR, IMSCTLR_DISCACHE);
mmio_write_32(IPMMURT_IMSCTLR, IMSCTLR_DISCACHE);
mmio_write_32(IPMMUMP_IMSCTLR, IMSCTLR_DISCACHE);
@@ -458,28 +458,28 @@
}
reg = mmio_read_32(RCAR_PRR);
- switch (reg & RCAR_PRODUCT_MASK) {
- case RCAR_PRODUCT_H3:
+ switch (reg & PRR_PRODUCT_MASK) {
+ case PRR_PRODUCT_H3:
ret = fdt_appendprop_string(fdt, 0, "compatible",
"renesas,r8a7795");
break;
- case RCAR_PRODUCT_M3:
+ case PRR_PRODUCT_M3:
ret = fdt_appendprop_string(fdt, 0, "compatible",
"renesas,r8a7796");
break;
- case RCAR_PRODUCT_M3N:
+ case PRR_PRODUCT_M3N:
ret = fdt_appendprop_string(fdt, 0, "compatible",
"renesas,r8a77965");
break;
- case RCAR_PRODUCT_V3M:
+ case PRR_PRODUCT_V3M:
ret = fdt_appendprop_string(fdt, 0, "compatible",
"renesas,r8a77970");
break;
- case RCAR_PRODUCT_E3:
+ case PRR_PRODUCT_E3:
ret = fdt_appendprop_string(fdt, 0, "compatible",
"renesas,r8a77990");
break;
- case RCAR_PRODUCT_D3:
+ case PRR_PRODUCT_D3:
ret = fdt_appendprop_string(fdt, 0, "compatible",
"renesas,r8a77995");
break;
@@ -572,7 +572,7 @@
};
switch (product) {
- case RCAR_PRODUCT_H3:
+ case PRR_PRODUCT_H3:
#if (RCAR_DRAM_LPDDR4_MEMCONF == 0)
/* 4GB(1GBx4) */
dram_config[1] = 0x40000000ULL;
@@ -594,7 +594,7 @@
#endif /* RCAR_DRAM_LPDDR4_MEMCONF == 0 */
break;
- case RCAR_PRODUCT_M3:
+ case PRR_PRODUCT_M3:
#if (RCAR_GEN3_ULCB == 1)
/* 2GB(1GBx2 2ch split) */
dram_config[1] = 0x40000000ULL;
@@ -606,17 +606,17 @@
#endif
break;
- case RCAR_PRODUCT_M3N:
+ case PRR_PRODUCT_M3N:
/* 2GB(1GBx2) */
dram_config[1] = 0x80000000ULL;
break;
- case RCAR_PRODUCT_V3M:
+ case PRR_PRODUCT_V3M:
/* 1GB(512MBx2) */
dram_config[1] = 0x40000000ULL;
break;
- case RCAR_PRODUCT_E3:
+ case PRR_PRODUCT_E3:
#if (RCAR_DRAM_DDR3L_MEMCONF == 0)
/* 1GB(512MBx2) */
dram_config[1] = 0x40000000ULL;
@@ -629,7 +629,7 @@
#endif /* RCAR_DRAM_DDR3L_MEMCONF == 0 */
break;
- case RCAR_PRODUCT_D3:
+ case PRR_PRODUCT_D3:
/* 512MB */
dram_config[1] = 0x20000000ULL;
break;
@@ -716,26 +716,26 @@
version_of_renesas);
reg = mmio_read_32(RCAR_PRR);
- product_cut = reg & (RCAR_PRODUCT_MASK | RCAR_CUT_MASK);
- product = reg & RCAR_PRODUCT_MASK;
+ product_cut = reg & (PRR_PRODUCT_MASK | PRR_CUT_MASK);
+ product = reg & PRR_PRODUCT_MASK;
switch (product) {
- case RCAR_PRODUCT_H3:
+ case PRR_PRODUCT_H3:
str = product_h3;
break;
- case RCAR_PRODUCT_M3:
+ case PRR_PRODUCT_M3:
str = product_m3;
break;
- case RCAR_PRODUCT_M3N:
+ case PRR_PRODUCT_M3N:
str = product_m3n;
break;
- case RCAR_PRODUCT_V3M:
+ case PRR_PRODUCT_V3M:
str = product_v3m;
break;
- case RCAR_PRODUCT_E3:
+ case PRR_PRODUCT_E3:
str = product_e3;
break;
- case RCAR_PRODUCT_D3:
+ case PRR_PRODUCT_D3:
str = product_d3;
break;
default:
@@ -743,9 +743,9 @@
break;
}
- if ((RCAR_PRODUCT_M3 == product) &&
- (RCAR_CUT_VER20 == (reg & RCAR_MAJOR_MASK))) {
- if (RCAR_M3_CUT_VER11 == (reg & RCAR_CUT_MASK)) {
+ if ((PRR_PRODUCT_M3 == product) &&
+ (PRR_PRODUCT_20 == (reg & RCAR_MAJOR_MASK))) {
+ if (RCAR_M3_CUT_VER11 == (reg & PRR_CUT_MASK)) {
/* M3 Ver.1.1 or Ver.1.2 */
NOTICE("BL2: PRR is R-Car %s Ver.1.1 / Ver.1.2\n",
str);
@@ -761,7 +761,7 @@
NOTICE("BL2: PRR is R-Car %s Ver.%d.%d\n", str, major, minor);
}
- if (product == RCAR_PRODUCT_E3) {
+ if (product == PRR_PRODUCT_E3) {
reg = mmio_read_32(RCAR_MODEMR);
sscg = reg & RCAR_SSCG_MASK;
str = sscg == RCAR_SSCG_ENABLE ? sscg_on : sscg_off;
@@ -930,7 +930,7 @@
mmio_write_32(CPG_CA53DBGRCR,
DBGCPUPREN | mmio_read_32(CPG_CA53DBGRCR));
- if (product_cut == RCAR_PRODUCT_H3_CUT10) {
+ if (product_cut == PRR_PRODUCT_H3_CUT10) {
reg = mmio_read_32(CPG_PLL2CR);
reg &= ~((uint32_t) 1 << 5);
mmio_write_32(CPG_PLL2CR, reg);
@@ -1016,7 +1016,7 @@
/* Set frequency data in CNTFID0 */
reg_cntfid = pll_table[modemr_pll >> MODEMR_BOOT_PLL_SHIFT];
- reg = mmio_read_32(RCAR_PRR) & (RCAR_PRODUCT_MASK | RCAR_CUT_MASK);
+ reg = mmio_read_32(RCAR_PRR) & (PRR_PRODUCT_MASK | PRR_CUT_MASK);
switch (modemr_pll) {
case MD14_MD13_TYPE_0:
rcar_get_board_type(&board_type, &board_rev);
@@ -1025,7 +1025,7 @@
}
break;
case MD14_MD13_TYPE_3:
- if (RCAR_PRODUCT_H3_CUT10 == reg) {
+ if (PRR_PRODUCT_H3_CUT10 == reg) {
reg_cntfid = reg_cntfid >> 1U;
}
break;