aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/renesas/rcar/pfc/pfc_init.c
diff options
context:
space:
mode:
authorValentine Barshak <valentine.barshak@cogentembedded.com>2018-10-30 02:06:17 +0300
committerMarek Vasut <marek.vasut+renesas@gmail.com>2019-04-02 15:37:00 +0200
commitb709fe9c432efb43c1285f52f16d19f92c8d5d40 (patch)
tree64e057bcbf39da10c8415814a80faf1282c87ff6 /drivers/staging/renesas/rcar/pfc/pfc_init.c
parent0a4bf763f3e5b2f67b0d5798a40fb9d0caefd554 (diff)
downloadtrusted-firmware-a-b709fe9c432efb43c1285f52f16d19f92c8d5d40.tar.gz
rcar_gen3: plat: Add R-Car V3M support
Add R-Car V3M support. This is based on the original V3M support patch for Yocto v2.23.1 by Vladimir Barinov. Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com> Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> --- Marek: Update on top of mainline ATF/master
Diffstat (limited to 'drivers/staging/renesas/rcar/pfc/pfc_init.c')
-rw-r--r--drivers/staging/renesas/rcar/pfc/pfc_init.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/staging/renesas/rcar/pfc/pfc_init.c b/drivers/staging/renesas/rcar/pfc/pfc_init.c
index cec5624095..3cf32d43ba 100644
--- a/drivers/staging/renesas/rcar/pfc/pfc_init.c
+++ b/drivers/staging/renesas/rcar/pfc/pfc_init.c
@@ -15,6 +15,7 @@
#include "H3/pfc_init_h3_v2.h"
#include "M3/pfc_init_m3.h"
#include "M3N/pfc_init_m3n.h"
+#include "V3M/pfc_init_v3m.h"
#endif
#if (RCAR_LSI == RCAR_H3) || (RCAR_LSI == RCAR_H3N) /* H3 */
#include "H3/pfc_init_h3_v1.h"
@@ -26,6 +27,9 @@
#if RCAR_LSI == RCAR_M3N /* M3N */
#include "M3N/pfc_init_m3n.h"
#endif
+#if RCAR_LSI == RCAR_V3M /* V3M */
+#include "V3M/pfc_init_v3m.h"
+#endif
#if RCAR_LSI == RCAR_E3 /* E3 */
#include "E3/pfc_init_e3.h"
#endif
@@ -39,6 +43,7 @@
#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 */
@@ -83,6 +88,9 @@ void rcar_pfc_init(void)
case RCAR_PRODUCT_M3N:
pfc_init_m3n();
break;
+ case RCAR_PRODUCT_V3M:
+ pfc_init_v3m();
+ break;
default:
PRR_PRODUCT_ERR(reg);
break;
@@ -121,6 +129,13 @@ void rcar_pfc_init(void)
pfc_init_m3n();
#endif
break;
+ case PRR_PRODUCT_V3M:
+#if RCAR_LSI != RCAR_V3M
+ PRR_PRODUCT_ERR(reg);
+#else
+ pfc_init_v3m();
+#endif
+ break;
case PRR_PRODUCT_E3:
#if RCAR_LSI != RCAR_E3
PRR_PRODUCT_ERR(reg);
@@ -173,6 +188,11 @@ void rcar_pfc_init(void)
PRR_PRODUCT_ERR(reg);
}
pfc_init_m3n();
+#elif RCAR_LSI == RCAR_V3M /* V3M */
+ if ((PRR_PRODUCT_V3M) != (reg & PRR_PRODUCT_MASK)) {
+ PRR_PRODUCT_ERR(reg);
+ }
+ pfc_init_v3m();
#elif RCAR_LSI == RCAR_E3 /* E3 */
if ((PRR_PRODUCT_E3) != (reg & PRR_PRODUCT_MASK)) {
PRR_PRODUCT_ERR(reg);