aboutsummaryrefslogtreecommitdiff
path: root/drivers/renesas
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/renesas')
-rw-r--r--drivers/renesas/rcar/emmc/emmc_interrupt.c14
-rw-r--r--drivers/renesas/rcar/emmc/emmc_mount.c14
-rw-r--r--drivers/renesas/rcar/iic_dvfs/iic_dvfs.c6
-rw-r--r--drivers/renesas/rcar/pfc/M3/pfc_init_m3.c10
-rw-r--r--drivers/renesas/rcar/pfc/pfc_init.c10
-rw-r--r--drivers/renesas/rcar/pwrc/pwrc.c32
-rw-r--r--drivers/renesas/rcar/rom/rom_api.c22
-rw-r--r--drivers/renesas/rcar/rpc/rpc_driver.c6
-rw-r--r--drivers/renesas/rcar/watchdog/swdt.c6
9 files changed, 60 insertions, 60 deletions
diff --git a/drivers/renesas/rcar/emmc/emmc_interrupt.c b/drivers/renesas/rcar/emmc/emmc_interrupt.c
index 37a3cf9d43..2557280cf6 100644
--- a/drivers/renesas/rcar/emmc/emmc_interrupt.c
+++ b/drivers/renesas/rcar/emmc/emmc_interrupt.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015-2018, Renesas Electronics Corporation. All rights
+ * Copyright (c) 2015-2019, Renesas Electronics Corporation. All rights
* reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
@@ -26,17 +26,17 @@ uint32_t emmc_interrupt(void)
uint32_t end_bit;
prr_data = mmio_read_32((uintptr_t) RCAR_PRR);
- cut_ver = prr_data & RCAR_CUT_MASK;
- if ((prr_data & RCAR_PRODUCT_MASK) == RCAR_PRODUCT_H3) {
- if (cut_ver == RCAR_CUT_VER10) {
+ cut_ver = prr_data & PRR_CUT_MASK;
+ if ((prr_data & PRR_PRODUCT_MASK) == PRR_PRODUCT_H3) {
+ if (cut_ver == PRR_PRODUCT_10) {
end_bit = BIT17;
- } else if (cut_ver == RCAR_CUT_VER11) {
+ } else if (cut_ver == PRR_PRODUCT_11) {
end_bit = BIT17;
} else {
end_bit = BIT20;
}
- } else if ((prr_data & RCAR_PRODUCT_MASK) == RCAR_PRODUCT_M3) {
- if (cut_ver == RCAR_CUT_VER10) {
+ } else if ((prr_data & PRR_PRODUCT_MASK) == PRR_PRODUCT_M3) {
+ if (cut_ver == PRR_PRODUCT_10) {
end_bit = BIT17;
} else {
end_bit = BIT20;
diff --git a/drivers/renesas/rcar/emmc/emmc_mount.c b/drivers/renesas/rcar/emmc/emmc_mount.c
index dd57b0c249..df8203ea82 100644
--- a/drivers/renesas/rcar/emmc/emmc_mount.c
+++ b/drivers/renesas/rcar/emmc/emmc_mount.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015-2017, Renesas Electronics Corporation. All rights reserved.
+ * Copyright (c) 2015-2019, Renesas Electronics Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -29,14 +29,14 @@ static void emmc_set_bootpartition(void)
{
uint32_t reg;
- reg = mmio_read_32(RCAR_PRR) & (RCAR_PRODUCT_MASK | RCAR_CUT_MASK);
- if (reg == RCAR_PRODUCT_M3_CUT10) {
+ reg = mmio_read_32(RCAR_PRR) & (PRR_PRODUCT_MASK | PRR_CUT_MASK);
+ if (reg == PRR_PRODUCT_M3_CUT10) {
mmc_drv_obj.boot_partition_en =
(EMMC_PARTITION_ID) ((mmc_drv_obj.ext_csd_data[179] &
EMMC_BOOT_PARTITION_EN_MASK) >>
EMMC_BOOT_PARTITION_EN_SHIFT);
- } else if ((reg == RCAR_PRODUCT_H3_CUT20)
- || (reg == RCAR_PRODUCT_M3_CUT11)) {
+ } else if ((reg == PRR_PRODUCT_H3_CUT20)
+ || (reg == PRR_PRODUCT_M3_CUT11)) {
mmc_drv_obj.boot_partition_en = mmc_drv_obj.partition_access;
} else {
if ((mmio_read_32(MFISBTSTSR) & MFISBTSTSR_BOOT_PARTITION) !=
@@ -460,8 +460,8 @@ static void emmc_get_partition_access(void)
uint32_t reg;
EMMC_ERROR_CODE result;
- reg = mmio_read_32(RCAR_PRR) & (RCAR_PRODUCT_MASK | RCAR_CUT_MASK);
- if ((reg == RCAR_PRODUCT_H3_CUT20) || (reg == RCAR_PRODUCT_M3_CUT11)) {
+ reg = mmio_read_32(RCAR_PRR) & (PRR_PRODUCT_MASK | PRR_CUT_MASK);
+ if ((reg == PRR_PRODUCT_H3_CUT20) || (reg == PRR_PRODUCT_M3_CUT11)) {
SETR_32(SD_OPTION, 0x000060EEU); /* 8 bits width */
/* CMD8 (EXT_CSD) */
emmc_make_trans_cmd(CMD8_SEND_EXT_CSD, 0x00000000U,
diff --git a/drivers/renesas/rcar/iic_dvfs/iic_dvfs.c b/drivers/renesas/rcar/iic_dvfs/iic_dvfs.c
index 39b9bb4e3c..28b56c10ec 100644
--- a/drivers/renesas/rcar/iic_dvfs/iic_dvfs.c
+++ b/drivers/renesas/rcar/iic_dvfs/iic_dvfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015-2018, Renesas Electronics Corporation. All rights reserved.
+ * Copyright (c) 2015-2019, Renesas Electronics Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -189,8 +189,8 @@ IIC_DVFS_FUNC(start, DVFS_STATE_T * state)
mode = mmio_read_8(IIC_DVFS_REG_ICCR) | IIC_DVFS_BIT_ICCR_ENABLE;
mmio_write_8(IIC_DVFS_REG_ICCR, mode);
- lsi_product = mmio_read_32(RCAR_PRR) & RCAR_PRODUCT_MASK;
- if (lsi_product == RCAR_PRODUCT_E3)
+ lsi_product = mmio_read_32(RCAR_PRR) & PRR_PRODUCT_MASK;
+ if (lsi_product == PRR_PRODUCT_E3)
goto start;
reg = mmio_read_32(RCAR_MODEMR) & CHECK_MD13_MD14;
diff --git a/drivers/renesas/rcar/pfc/M3/pfc_init_m3.c b/drivers/renesas/rcar/pfc/M3/pfc_init_m3.c
index 0aa3bffce0..7684c624a9 100644
--- a/drivers/renesas/rcar/pfc/M3/pfc_init_m3.c
+++ b/drivers/renesas/rcar/pfc/M3/pfc_init_m3.c
@@ -615,8 +615,8 @@ static void start_rtdma0_descriptor(void)
uint32_t reg;
reg = mmio_read_32(RCAR_PRR);
- reg &= (RCAR_PRODUCT_MASK | RCAR_CUT_MASK);
- if (reg == (RCAR_PRODUCT_M3_CUT10)) {
+ reg &= (PRR_PRODUCT_MASK | PRR_CUT_MASK);
+ if (reg == (PRR_PRODUCT_M3_CUT10)) {
/* Enable clock supply to RTDMAC. */
mstpcr_write(CPG_SCMSTPCR0, CPG_MSTPSR0, SCMSTPCR0_RTDMAC);
@@ -654,14 +654,14 @@ static void pfc_reg_write(uint32_t addr, uint32_t data)
uint32_t prr;
prr = mmio_read_32(RCAR_PRR);
- prr &= (RCAR_PRODUCT_MASK | RCAR_CUT_MASK);
+ prr &= (PRR_PRODUCT_MASK | PRR_CUT_MASK);
mmio_write_32(PFC_PMMR, ~data);
- if (prr == (RCAR_PRODUCT_M3_CUT10)) {
+ if (prr == (PRR_PRODUCT_M3_CUT10)) {
mmio_write_16(SCIF3_SCFCR, SCFCR_DATA); /* Dummy write */
}
mmio_write_32((uintptr_t)addr, data);
- if (prr == (RCAR_PRODUCT_M3_CUT10)) {
+ if (prr == (PRR_PRODUCT_M3_CUT10)) {
mmio_write_16(SCIF3_SCFCR, SCFCR_DATA); /* Dummy write */
}
}
diff --git a/drivers/renesas/rcar/pfc/pfc_init.c b/drivers/renesas/rcar/pfc/pfc_init.c
index aedc7d9805..88106676a3 100644
--- a/drivers/renesas/rcar/pfc/pfc_init.c
+++ b/drivers/renesas/rcar/pfc/pfc_init.c
@@ -57,8 +57,8 @@ void rcar_pfc_init(void)
reg = mmio_read_32(RCAR_PRR);
#if RCAR_LSI == RCAR_AUTO
- switch (reg & RCAR_PRODUCT_MASK) {
- case RCAR_PRODUCT_H3:
+ switch (reg & PRR_PRODUCT_MASK) {
+ case PRR_PRODUCT_H3:
switch (reg & PRR_CUT_MASK) {
case PRR_PRODUCT_10: /* H3 Ver.1.0 */
pfc_init_h3_v1();
@@ -71,13 +71,13 @@ void rcar_pfc_init(void)
break;
}
break;
- case RCAR_PRODUCT_M3:
+ case PRR_PRODUCT_M3:
pfc_init_m3();
break;
- case RCAR_PRODUCT_M3N:
+ case PRR_PRODUCT_M3N:
pfc_init_m3n();
break;
- case RCAR_PRODUCT_V3M:
+ case PRR_PRODUCT_V3M:
pfc_init_v3m();
break;
default:
diff --git a/drivers/renesas/rcar/pwrc/pwrc.c b/drivers/renesas/rcar/pwrc/pwrc.c
index 32e04a73a7..2ce6b61392 100644
--- a/drivers/renesas/rcar/pwrc/pwrc.c
+++ b/drivers/renesas/rcar/pwrc/pwrc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015-2018, Renesas Electronics Corporation. All rights reserved.
+ * Copyright (c) 2015-2019, Renesas Electronics Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -314,16 +314,16 @@ void rcar_pwrc_clusteroff(uint64_t mpidr)
rcar_lock_get();
reg = mmio_read_32(RCAR_PRR);
- product = reg & RCAR_PRODUCT_MASK;
- cut = reg & RCAR_CUT_MASK;
+ product = reg & PRR_PRODUCT_MASK;
+ cut = reg & PRR_CUT_MASK;
c = rcar_pwrc_get_mpidr_cluster(mpidr);
dst = IS_CA53(c) ? RCAR_CA53CPUCMCR : RCAR_CA57CPUCMCR;
- if (RCAR_PRODUCT_M3 == product && cut < RCAR_CUT_VER30)
+ if (PRR_PRODUCT_M3 == product && cut < PRR_PRODUCT_30)
goto done;
- if (RCAR_PRODUCT_H3 == product && cut <= RCAR_CUT_VER20)
+ if (PRR_PRODUCT_H3 == product && cut <= PRR_PRODUCT_20)
goto done;
/* all of the CPUs in the cluster is in the CoreStandby mode */
@@ -424,13 +424,13 @@ static void __attribute__ ((section(".system_ram")))
uint32_t reg = mmio_read_32(RCAR_PRR);
uint32_t cut, product;
- product = reg & RCAR_PRODUCT_MASK;
- cut = reg & RCAR_CUT_MASK;
+ product = reg & PRR_PRODUCT_MASK;
+ cut = reg & PRR_CUT_MASK;
- if (product == RCAR_PRODUCT_M3 && cut < RCAR_CUT_VER30)
+ if (product == PRR_PRODUCT_M3 && cut < PRR_PRODUCT_30)
goto self_refresh;
- if (product == RCAR_PRODUCT_H3 && cut < RCAR_CUT_VER20)
+ if (product == PRR_PRODUCT_H3 && cut < PRR_PRODUCT_20)
goto self_refresh;
mmio_write_32(DBSC4_REG_DBSYSCNT0, DBSC4_SET_DBSYSCNT0_WRITE_ENABLE);
@@ -445,16 +445,16 @@ self_refresh:
/* Set the Self-Refresh mode */
mmio_write_32(DBSC4_REG_DBACEN, 0);
- if (product == RCAR_PRODUCT_H3 && cut < RCAR_CUT_VER20)
+ if (product == PRR_PRODUCT_H3 && cut < PRR_PRODUCT_20)
rcar_micro_delay(100);
- else if (product == RCAR_PRODUCT_H3) {
+ else if (product == PRR_PRODUCT_H3) {
mmio_write_32(DBSC4_REG_DBCAM0CTRL0, 1);
DBCAM_FLUSH(0);
DBCAM_FLUSH(1);
DBCAM_FLUSH(2);
DBCAM_FLUSH(3);
mmio_write_32(DBSC4_REG_DBCAM0CTRL0, 0);
- } else if (product == RCAR_PRODUCT_M3) {
+ } else if (product == PRR_PRODUCT_M3) {
mmio_write_32(DBSC4_REG_DBCAM0CTRL0, 1);
DBCAM_FLUSH(0);
DBCAM_FLUSH(1);
@@ -499,10 +499,10 @@ self_refresh:
mmio_write_32(DBSC4_REG_DBRFEN, 0U);
rcar_micro_delay(1U);
- if (product == RCAR_PRODUCT_M3 && cut < RCAR_CUT_VER30)
+ if (product == PRR_PRODUCT_M3 && cut < PRR_PRODUCT_30)
return;
- if (product == RCAR_PRODUCT_H3 && cut < RCAR_CUT_VER20)
+ if (product == PRR_PRODUCT_H3 && cut < PRR_PRODUCT_20)
return;
mmio_write_32(DBSC4_REG_DBSYSCNT0, DBSC4_SET_DBSYSCNT0_WRITE_DISABLE);
@@ -648,9 +648,9 @@ void __attribute__ ((section(".system_ram"))) __attribute__ ((noinline))
uint32_t reg, product;
reg = mmio_read_32(RCAR_PRR);
- product = reg & RCAR_PRODUCT_MASK;
+ product = reg & PRR_PRODUCT_MASK;
- if (product != RCAR_PRODUCT_E3)
+ if (product != PRR_PRODUCT_E3)
rcar_pwrc_set_self_refresh();
else
rcar_pwrc_set_self_refresh_e3();
diff --git a/drivers/renesas/rcar/rom/rom_api.c b/drivers/renesas/rcar/rom/rom_api.c
index c9f8f5fe8c..fda28150e9 100644
--- a/drivers/renesas/rcar/rom/rom_api.c
+++ b/drivers/renesas/rcar/rom/rom_api.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015-2018, Renesas Electronics Corporation. All rights reserved.
+ * Copyright (c) 2015-2019, Renesas Electronics Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -30,30 +30,30 @@ static uint32_t get_table_index(void)
uint32_t cut_ver;
uint32_t index;
- product = mmio_read_32(RCAR_PRR) & RCAR_PRODUCT_MASK;
- cut_ver = mmio_read_32(RCAR_PRR) & RCAR_CUT_MASK;
+ product = mmio_read_32(RCAR_PRR) & PRR_PRODUCT_MASK;
+ cut_ver = mmio_read_32(RCAR_PRR) & PRR_CUT_MASK;
switch (product) {
- case RCAR_PRODUCT_H3:
- if (cut_ver == RCAR_CUT_VER10)
+ case PRR_PRODUCT_H3:
+ if (cut_ver == PRR_PRODUCT_10)
index = OLD_API_TABLE1;
- else if (cut_ver == RCAR_CUT_VER11)
+ else if (cut_ver == PRR_PRODUCT_11)
index = OLD_API_TABLE1;
- else if (cut_ver == RCAR_CUT_VER20)
+ else if (cut_ver == PRR_PRODUCT_20)
index = OLD_API_TABLE2;
else
/* Later than H3 Ver.2.0 */
index = NEW_API_TABLE;
break;
- case RCAR_PRODUCT_M3:
- if (cut_ver == RCAR_CUT_VER10)
+ case PRR_PRODUCT_M3:
+ if (cut_ver == PRR_PRODUCT_10)
index = OLD_API_TABLE3;
else
/* M3 Ver.1.1 or later */
index = NEW_API_TABLE;
break;
- case RCAR_PRODUCT_V3M:
- if (cut_ver == RCAR_CUT_VER10)
+ case PRR_PRODUCT_V3M:
+ if (cut_ver == PRR_PRODUCT_10)
/* V3M WS1.0 */
index = NEW_API_TABLE2;
else
diff --git a/drivers/renesas/rcar/rpc/rpc_driver.c b/drivers/renesas/rcar/rpc/rpc_driver.c
index 5c11b62de6..63de5b851a 100644
--- a/drivers/renesas/rcar/rpc/rpc_driver.c
+++ b/drivers/renesas/rcar/rpc/rpc_driver.c
@@ -34,10 +34,10 @@ static void rpc_setup(void)
if (mmio_read_32(RPC_CMNCR) & RPC_CMNCR_MD_BIT)
mmio_clrbits_32(RPC_CMNCR, RPC_CMNCR_MD_BIT);
- product = mmio_read_32(RCAR_PRR) & RCAR_PRODUCT_MASK;
- cut = mmio_read_32(RCAR_PRR) & RCAR_CUT_MASK;
+ product = mmio_read_32(RCAR_PRR) & PRR_PRODUCT_MASK;
+ cut = mmio_read_32(RCAR_PRR) & PRR_CUT_MASK;
- if ((product == RCAR_PRODUCT_M3) && (cut < RCAR_CUT_VER30))
+ if ((product == PRR_PRODUCT_M3) && (cut < PRR_PRODUCT_30))
phy_strtim = RPC_PHYCNT_STRTIM_M3V1;
else
phy_strtim = RPC_PHYCNT_STRTIM;
diff --git a/drivers/renesas/rcar/watchdog/swdt.c b/drivers/renesas/rcar/watchdog/swdt.c
index 8b2943cc64..111e651741 100644
--- a/drivers/renesas/rcar/watchdog/swdt.c
+++ b/drivers/renesas/rcar/watchdog/swdt.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015-2018, Renesas Electronics Corporation. All rights reserved.
+ * Copyright (c) 2015-2019, Renesas Electronics Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -82,7 +82,7 @@ void rcar_swdt_init(void)
uint32_t reg, val, product_cut, chk_data;
reg = mmio_read_32(RCAR_PRR);
- product_cut = reg & (RCAR_PRODUCT_MASK | RCAR_CUT_MASK);
+ product_cut = reg & (PRR_PRODUCT_MASK | PRR_CUT_MASK);
reg = mmio_read_32(RCAR_MODEMR);
chk_data = reg & CHECK_MD13_MD14;
@@ -108,7 +108,7 @@ void rcar_swdt_init(void)
val |= WTCNT_COUNT_8p22k;
break;
case MD14_MD13_TYPE_3:
- val |= product_cut == (RCAR_PRODUCT_H3 | RCAR_CUT_VER10) ?
+ val |= product_cut == (PRR_PRODUCT_H3 | PRR_PRODUCT_10) ?
WTCNT_COUNT_8p13k_H3VER10 : WTCNT_COUNT_8p13k;
break;
default: