rcar_gen3: plat: Factor out PRR_ macros into rcar_def.h
Pull out the PRR_* macros into rcar_def.h and remove multiple copies of
it. Now that there are still RCAR_* macros in rcar_def.h too and they
have the exact same meaning as the PRR_* macros, but that's for another
patch.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: Icb7f61b971b1a23102bd1b9f58cda580660a55fc
diff --git a/drivers/renesas/rcar/pfc/pfc_init.c b/drivers/renesas/rcar/pfc/pfc_init.c
index e9455af..aedc7d9 100644
--- a/drivers/renesas/rcar/pfc/pfc_init.c
+++ b/drivers/renesas/rcar/pfc/pfc_init.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
*/
@@ -37,20 +37,6 @@
#include "D3/pfc_init_d3.h"
#endif
- /* Product Register */
-#define PRR (0xFFF00044U)
-#define PRR_PRODUCT_MASK (0x00007F00U)
-#define PRR_CUT_MASK (0x000000FFU)
-#define PRR_PRODUCT_H3 (0x00004F00U) /* R-Car H3 */
-#define PRR_PRODUCT_M3 (0x00005200U) /* R-Car M3 */
-#define PRR_PRODUCT_V3M (0x00005400U) /* R-Car V3M */
-#define PRR_PRODUCT_M3N (0x00005500U) /* R-Car M3N */
-#define PRR_PRODUCT_E3 (0x00005700U) /* R-Car E3 */
-#define PRR_PRODUCT_D3 (0x00005800U) /* R-Car D3 */
-#define PRR_PRODUCT_10 (0x00U)
-#define PRR_PRODUCT_11 (0x01U)
-#define PRR_PRODUCT_20 (0x10U)
-
#define PRR_PRODUCT_ERR(reg) \
do { \
ERROR("LSI Product ID(PRR=0x%x) PFC initialize not supported.\n", \
diff --git a/drivers/renesas/rcar/pfc/pfc_regs.h b/drivers/renesas/rcar/pfc/pfc_regs.h
index e7dd543..4187733 100644
--- a/drivers/renesas/rcar/pfc/pfc_regs.h
+++ b/drivers/renesas/rcar/pfc/pfc_regs.h
@@ -115,7 +115,6 @@
#define GPIO_IOINTSEL6 (GPIO_BASE + 0x5400U)
#define GPIO_INOUTSEL6 (GPIO_BASE + 0x5404U)
#define GPIO_OUTDT6 (GPIO_BASE + 0x5408U)
-#define GPIO_INDT6 (GPIO_BASE + 0x540CU)
#define GPIO_INTDT6 (GPIO_BASE + 0x5410U)
#define GPIO_INTCLR6 (GPIO_BASE + 0x5414U)
#define GPIO_INTMSK6 (GPIO_BASE + 0x5418U)
diff --git a/drivers/renesas/rcar/qos/qos_init.c b/drivers/renesas/rcar/qos/qos_init.c
index 884e031..d0f1730 100644
--- a/drivers/renesas/rcar/qos/qos_init.c
+++ b/drivers/renesas/rcar/qos/qos_init.c
@@ -12,6 +12,7 @@
#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"
@@ -50,22 +51,6 @@
#include "D3/qos_init_d3.h"
#endif
- /* Product Register */
-#define PRR 0xFFF00044U
-#define PRR_PRODUCT_MASK 0x00007F00U
-#define PRR_CUT_MASK 0x000000FFU
-#define PRR_PRODUCT_H3 0x00004F00U /* R-Car H3 */
-#define PRR_PRODUCT_M3 0x00005200U /* R-Car M3 */
-#define PRR_PRODUCT_V3M 0x00005400U /* R-Car V3M */
-#define PRR_PRODUCT_M3N 0x00005500U /* R-Car M3N */
-#define PRR_PRODUCT_E3 0x00005700U /* R-Car E3 */
-#define PRR_PRODUCT_D3 0x00005800U /* R-Car D3 */
-#define PRR_PRODUCT_10 0x00U
-#define PRR_PRODUCT_11 0x01U
-#define PRR_PRODUCT_20 0x10U
-#define PRR_PRODUCT_21 0x11U
-#define PRR_PRODUCT_30 0x20U
-
#if (RCAR_LSI != RCAR_E3) && (RCAR_LSI != RCAR_D3) && (RCAR_LSI != RCAR_V3M)
#define DRAM_CH_CNT 0x04