Commit b645d22b authored by Marek Vasut's avatar Marek Vasut
Browse files

rcar_gen3: drivers: pfc: Add D3 PFC tables



Add PFC tables for R-Car D3 SoC.
Signed-off-by: default avatarMarek Vasut <marek.vasut+renesas@gmail.com>
parent b60b9b5a
This diff is collapsed.
/*
* Copyright (c) 2017, Renesas Electronics Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef PFC_INIT_D3_H__
#define PFC_INIT_D3_H__
void pfc_init_d3(void);
#endif /* PFC_INIT_D3_H__ */
...@@ -28,6 +28,9 @@ else ifdef RCAR_LSI_CUT_COMPAT ...@@ -28,6 +28,9 @@ else ifdef RCAR_LSI_CUT_COMPAT
ifeq (${RCAR_LSI},${RCAR_E3}) ifeq (${RCAR_LSI},${RCAR_E3})
BL2_SOURCES += drivers/staging/renesas/rcar/pfc/E3/pfc_init_e3.c BL2_SOURCES += drivers/staging/renesas/rcar/pfc/E3/pfc_init_e3.c
endif endif
ifeq (${RCAR_LSI},${RCAR_D3})
BL2_SOURCES += drivers/staging/renesas/rcar/pfc/D3/pfc_init_d3.c
endif
else else
ifeq (${RCAR_LSI},${RCAR_H3}) ifeq (${RCAR_LSI},${RCAR_H3})
ifeq (${LSI_CUT},10) ifeq (${LSI_CUT},10)
...@@ -51,6 +54,9 @@ else ...@@ -51,6 +54,9 @@ else
ifeq (${RCAR_LSI},${RCAR_E3}) ifeq (${RCAR_LSI},${RCAR_E3})
BL2_SOURCES += drivers/staging/renesas/rcar/pfc/E3/pfc_init_e3.c BL2_SOURCES += drivers/staging/renesas/rcar/pfc/E3/pfc_init_e3.c
endif endif
ifeq (${RCAR_LSI},${RCAR_D3})
BL2_SOURCES += drivers/staging/renesas/rcar/pfc/D3/pfc_init_d3.c
endif
endif endif
BL2_SOURCES += drivers/staging/renesas/rcar/pfc/pfc_init.c BL2_SOURCES += drivers/staging/renesas/rcar/pfc/pfc_init.c
...@@ -28,6 +28,9 @@ ...@@ -28,6 +28,9 @@
#endif #endif
#if RCAR_LSI == RCAR_E3 /* E3 */ #if RCAR_LSI == RCAR_E3 /* E3 */
#include "E3/pfc_init_e3.h" #include "E3/pfc_init_e3.h"
#endif
#if RCAR_LSI == RCAR_D3 /* D3 */
#include "D3/pfc_init_d3.h"
#endif #endif
/* Product Register */ /* Product Register */
...@@ -38,6 +41,7 @@ ...@@ -38,6 +41,7 @@
#define PRR_PRODUCT_M3 (0x00005200U) /* R-Car M3 */ #define PRR_PRODUCT_M3 (0x00005200U) /* R-Car M3 */
#define PRR_PRODUCT_M3N (0x00005500U) /* R-Car M3N */ #define PRR_PRODUCT_M3N (0x00005500U) /* R-Car M3N */
#define PRR_PRODUCT_E3 (0x00005700U) /* R-Car E3 */ #define PRR_PRODUCT_E3 (0x00005700U) /* R-Car E3 */
#define PRR_PRODUCT_D3 (0x00005800U) /* R-Car D3 */
#define PRR_PRODUCT_10 (0x00U) #define PRR_PRODUCT_10 (0x00U)
#define PRR_PRODUCT_11 (0x01U) #define PRR_PRODUCT_11 (0x01U)
#define PRR_PRODUCT_20 (0x10U) #define PRR_PRODUCT_20 (0x10U)
...@@ -122,6 +126,13 @@ void rcar_pfc_init(void) ...@@ -122,6 +126,13 @@ void rcar_pfc_init(void)
PRR_PRODUCT_ERR(reg); PRR_PRODUCT_ERR(reg);
#else #else
pfc_init_e3(); pfc_init_e3();
#endif
break;
case PRR_PRODUCT_D3:
#if RCAR_LSI != RCAR_D3
PRR_PRODUCT_ERR(reg);
#else
pfc_init_d3();
#endif #endif
break; break;
default: default:
...@@ -167,6 +178,11 @@ void rcar_pfc_init(void) ...@@ -167,6 +178,11 @@ void rcar_pfc_init(void)
PRR_PRODUCT_ERR(reg); PRR_PRODUCT_ERR(reg);
} }
pfc_init_e3(); pfc_init_e3();
#elif RCAR_LSI == RCAR_D3 /* D3 */
if ((PRR_PRODUCT_D3) != (reg & PRR_PRODUCT_MASK)) {
PRR_PRODUCT_ERR(reg);
}
pfc_init_d3();
#else #else
#error "Don't have PFC initialize routine(unknown)." #error "Don't have PFC initialize routine(unknown)."
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment