diff options
Diffstat (limited to 'drivers/staging/renesas/rcar/ddr/ddr_b/boot_init_dram_config.c')
-rw-r--r-- | drivers/staging/renesas/rcar/ddr/ddr_b/boot_init_dram_config.c | 511 |
1 files changed, 261 insertions, 250 deletions
diff --git a/drivers/staging/renesas/rcar/ddr/ddr_b/boot_init_dram_config.c b/drivers/staging/renesas/rcar/ddr/ddr_b/boot_init_dram_config.c index aaa5f008b5..f8caade273 100644 --- a/drivers/staging/renesas/rcar/ddr/ddr_b/boot_init_dram_config.c +++ b/drivers/staging/renesas/rcar/ddr/ddr_b/boot_init_dram_config.c @@ -1,5 +1,6 @@ /* - * Copyright (c) 2015-2019, Renesas Electronics Corporation. All rights reserved. + * Copyright (c) 2015-2019, Renesas Electronics Corporation. + * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -17,7 +18,7 @@ static uint32_t boardcnf_get_brd_type(void) #else static uint32_t boardcnf_get_brd_type(void) { - return (1); + return 1; } #endif @@ -115,7 +116,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} - } + } } }, /* boardcnf[1] RENESAS KRIEK board with M3-W/SoC */ @@ -126,8 +127,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0x300, 0x0a0, - { - { + { + { {0x02, 0x02}, 0x00345201, 0x3201, @@ -147,7 +148,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, - { + { {0x02, 0x02}, 0x00302154, 0x2310, @@ -166,8 +167,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} - } - } + } + } }, /* boardcnf[2] RENESAS SALVATOR-X board with H3 Ver.1.x/SIP(8Gbit 1rank) */ { @@ -177,8 +178,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { -320, 0x300, 0x0a0, - { - { + { + { {0x02, 0xff}, 0x00543210, 0x3210, @@ -198,7 +199,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, - { + { {0x02, 0xff}, 0x00543210, 0x3102, @@ -218,7 +219,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, - { + { {0x02, 0xff}, 0x00543210, 0x0213, @@ -238,7 +239,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, - { + { {0x02, 0xff}, 0x00543210, 0x0213, @@ -257,8 +258,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} - } - } + } + } }, /* boardcnf[3] RENESAS Starter Kit board with M3-W/SIP(8Gbit 1rank) */ { @@ -268,8 +269,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0x0300, 0x00a0, - { - { + { + { {0x02, 0xFF}, 0x00543210U, 0x3201, @@ -289,7 +290,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, - { + { {0x02, 0xFF}, 0x00543210, 0x2310, @@ -308,8 +309,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} - } - } + } + } }, /* boardcnf[4] RENESAS SALVATOR-M(1rank) board with H3 Ver.1.x/SoC */ { @@ -319,8 +320,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { -320, 0x300, 0x0a0, - { - { + { + { {0x02, 0xff}, 0x00315024, 0x3120, @@ -340,7 +341,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, - { + { {0x02, 0xff}, 0x00025143, 0x3210, @@ -360,7 +361,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, - { + { {0x02, 0xff}, 0x00523104, 0x2301, @@ -380,7 +381,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, - { + { {0x02, 0xff}, 0x00153402, 0x2031, @@ -399,8 +400,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} - } - } + } + } }, /* boardcnf[5] RENESAS KRIEK-1rank board with M3-W/SoC */ { @@ -410,8 +411,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0x300, 0x0a0, - { - { + { + { {0x02, 0xff}, 0x00345201, 0x3201, @@ -431,7 +432,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, - { + { {0x02, 0xff}, 0x00302154, 0x2310, @@ -450,8 +451,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} - } - } + } + } }, /* boardcnf[6] RENESAS SALVATOR-X board with H3 Ver.1.x/SIP(8Gbit 2rank) */ { @@ -461,8 +462,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { -320, 0x300, 0x0a0, - { - { + { + { {0x02, 0x02}, 0x00543210, 0x3210, @@ -482,7 +483,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, - { + { {0x02, 0x02}, 0x00543210, 0x3102, @@ -502,7 +503,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, - { + { {0x02, 0x02}, 0x00543210, 0x0213, @@ -522,7 +523,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, - { + { {0x02, 0x02}, 0x00543210, 0x0213, @@ -541,10 +542,13 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} - } - } + } + } }, -/* boardcnf[7] RENESAS SALVATOR-X board with H3 Ver.2.0 or later/SIP(8Gbit 1rank) */ +/* + * boardcnf[7] RENESAS SALVATOR-X board with + * H3 Ver.2.0 or later/SIP(8Gbit 1rank) + */ { 0x0f, 0x01, @@ -552,8 +556,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0x300, 0x0a0, - { - { + { + { {0x02, 0xff}, 0x00543210, 0x2310, @@ -573,7 +577,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, - { + { {0x02, 0xff}, 0x00105432, 0x3210, @@ -593,7 +597,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, - { + { {0x02, 0xff}, 0x00543210, 0x2301, @@ -613,7 +617,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, - { + { {0x02, 0xff}, 0x00543210, 0x2301, @@ -632,10 +636,13 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} - } - } + } + } }, -/* boardcnf[8] RENESAS SALVATOR-X board with H3 Ver.2.0 or later/SIP(8Gbit 2rank) */ +/* + * boardcnf[8] RENESAS SALVATOR-X board with + * H3 Ver.2.0 or later/SIP(8Gbit 2rank) + */ { #if RCAR_DRAM_CHANNEL == 5 0x05, @@ -647,8 +654,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0x300, 0x0a0, - { - { + { + { {0x02, 0x02}, 0x00543210, 0x2310, @@ -669,7 +676,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0} }, #if ((RCAR_DRAM_CHANNEL == 5) && (RCAR_DRAM_SPLIT == 2)) - { + { {0x02, 0x02}, 0x00543210, 0x2301, @@ -690,7 +697,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0} }, #else - { + { {0x02, 0x02}, 0x00105432, 0x3210, @@ -711,7 +718,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0} }, #endif - { + { {0x02, 0x02}, 0x00543210, 0x2301, @@ -731,7 +738,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, - { + { {0x02, 0x02}, 0x00543210, 0x2301, @@ -750,8 +757,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} - } - } + } + } }, /* boardcnf[9] RENESAS SALVATOR-MS(1rank) board with H3 Ver.2.0 or later/SoC */ { @@ -761,8 +768,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0x300, 0x0a0, - { - { + { + { {0x02, 0xff}, 0x00543210, 0x3210, @@ -782,7 +789,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, - { + { {0x02, 0xff}, 0x00543210, 0x2301, @@ -802,7 +809,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, - { + { {0x02, 0xff}, 0x00452103, 0x3210, @@ -822,7 +829,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, - { + { {0x02, 0xff}, 0x00520413, 0x2301, @@ -841,8 +848,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} - } - } + } + } }, /* boardcnf[10] RENESAS Kriek(2rank) board with M3-N/SoC */ { @@ -852,8 +859,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0x300, 0x0a0, - { - { + { + { {0x02, 0x02}, 0x00345201, 0x3201, @@ -872,8 +879,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} - } - } + } + } }, /* boardcnf[11] RENESAS SALVATOR-X board with M3-N/SIP(8Gbit 2rank) */ { @@ -883,8 +890,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0x300, 0x0a0, - { - { + { + { #if (RCAR_DRAM_LPDDR4_MEMCONF == 2) {0x04, 0x04}, #else @@ -907,8 +914,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} - } - } + } + } }, /* boardcnf[12] RENESAS CONDOR board with V3H/SoC */ { @@ -918,8 +925,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0x300, 0x0a0, - { - { + { + { {0x02, 0x02}, 0x00501342, 0x3201, @@ -938,8 +945,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} - } - } + } + } }, /* boardcnf[13] RENESAS KRIEK board with PM3/SoC */ { @@ -949,8 +956,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { -320, 0x300, 0x0a0, - { - { + { + { {0x02, 0x02}, 0x00345201, 0x3201, @@ -970,7 +977,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, - { + { {0x02, 0x02}, 0x00302154, 0x2310, @@ -990,7 +997,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, - { + { {0x02, 0x02}, 0x00302154, 0x2310, @@ -1010,7 +1017,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, - { + { {0xff, 0xff}, 0, 0, @@ -1029,8 +1036,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} - } - } + } + } }, /* boardcnf[14] SALVATOR-X board with H3 Ver.2.0 or later/SIP(16Gbit 1rank) */ { @@ -1044,8 +1051,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0x300, 0x0a0, - { - { + { + { {0x04, 0xff}, 0x00543210, 0x2310, @@ -1066,7 +1073,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0} }, #if ((RCAR_DRAM_CHANNEL == 5) && (RCAR_DRAM_SPLIT == 2)) - { + { {0x04, 0xff}, 0x00543210, 0x2301, @@ -1087,7 +1094,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0} }, #else - { + { {0x04, 0xff}, 0x00105432, 0x3210, @@ -1108,7 +1115,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0} }, #endif - { + { {0x04, 0xff}, 0x00543210, 0x2301, @@ -1128,7 +1135,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, - { + { {0x04, 0xff}, 0x00543210, 0x2301, @@ -1147,8 +1154,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} - } - } + } + } }, /* boardcnf[15] RENESAS KRIEK board with H3N */ { @@ -1158,8 +1165,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0x300, 0x0a0, - { - { + { + { {0x02, 0x02}, 0x00345201, 0x3201, @@ -1179,7 +1186,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, - { + { {0x02, 0x02}, 0x00302154, 0x2310, @@ -1199,7 +1206,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, - { + { {0x02, 0x02}, 0x00302154, 0x2310, @@ -1219,7 +1226,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, - { + { {0xff, 0xff}, 0, 0, @@ -1238,8 +1245,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} - } - } + } + } }, /* boardcnf[16] RENESAS KRIEK-P2P board with M3-W/SoC */ { @@ -1249,8 +1256,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0x0300, 0x00a0, - { - { + { + { {0x04, 0x04}, 0x520314FFFF523041, 0x3201, @@ -1270,7 +1277,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, - { + { {0x04, 0x04}, 0x314250FFFF312405, 0x2310, @@ -1289,8 +1296,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} - } - } + } + } }, /* boardcnf[17] RENESAS KRIEK-P2P board with M3-N/SoC */ { @@ -1300,8 +1307,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0x0300, 0x00a0, - { - { + { + { {0x04, 0x04}, 0x520314FFFF523041, 0x3201, @@ -1320,8 +1327,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} - } - } + } + } }, /* boardcnf[18] RENESAS SALVATOR-X board with M3-W/SIP(16Gbit 2rank) */ { @@ -1331,8 +1338,8 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0x0300, 0x00a0, - { - { + { + { {0x04, 0x04}, 0x00543210, 0x3201, @@ -1352,7 +1359,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, - { + { {0x04, 0x04}, 0x00543210, 0x2310, @@ -1371,19 +1378,19 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} - } - } + } + } }, /* boardcnf[19] RENESAS SALVATOR-X board with M3-W/SIP(16Gbit 1rank) */ - { - 0x03, - 0x01, - 0x02c0, - 0, - 0x0300, - 0x00a0, - { - { + { + 0x03, + 0x01, + 0x02c0, + 0, + 0x0300, + 0x00a0, + { + { {0x04, 0xff}, 0x00543210, 0x3201, @@ -1403,7 +1410,7 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, - { + { {0x04, 0xff}, 0x00543210, 0x2310, @@ -1422,118 +1429,118 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} - } - } + } + } }, /* boardcnf[20] RENESAS KRIEK 16Gbit/2rank/2ch board with M3-W/SoC */ - { - 0x03, - 0x01, - 0x02c0, - 0, - 0x0300, - 0x00a0, - { - { - {0x04, 0x04}, - 0x00345201, - 0x3201, - {0x01672543, 0x45361207, 0x45632107, 0x60715234}, - {0x08, 0x08, 0x08, 0x08}, - WDQLVL_PAT, - {0, 0, 0, 0, 0, 0, 0, 0, + { + 0x03, + 0x01, + 0x02c0, + 0, + 0x0300, + 0x00a0, + { + { + {0x04, 0x04}, + 0x00345201, + 0x3201, + {0x01672543, 0x45361207, 0x45632107, 0x60715234}, + {0x08, 0x08, 0x08, 0x08}, + WDQLVL_PAT, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0} - }, - { + {0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0} + }, + { {0x04, 0x04}, - 0x00302154, - 0x2310, - {0x01672543, 0x45361207, 0x45632107, 0x60715234}, - {0x08, 0x08, 0x08, 0x08}, - WDQLVL_PAT, - {0, 0, 0, 0, 0, 0, 0, 0, - 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0} - } - } - }, + 0x00302154, + 0x2310, + {0x01672543, 0x45361207, 0x45632107, 0x60715234}, + {0x08, 0x08, 0x08, 0x08}, + WDQLVL_PAT, + {0, 0, 0, 0, 0, 0, 0, 0, + 0, 0}, + {0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0} + } + } + }, /* boardcnf[21] RENESAS KRIEK 16Gbit/1rank/2ch board with M3-W/SoC */ - { - 0x03, - 0x01, - 0x02c0, - 0, - 0x0300, - 0x00a0, - { - { - {0x04, 0xff}, - 0x00345201, - 0x3201, - {0x01672543, 0x45361207, 0x45632107, 0x60715234}, - {0x08, 0x08, 0x08, 0x08}, - WDQLVL_PAT, - {0, 0, 0, 0, 0, 0, 0, 0, - 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0} - }, - { - {0x04, 0xff}, - 0x00302154, - 0x2310, - {0x01672543, 0x45361207, 0x45632107, 0x60715234}, - {0x08, 0x08, 0x08, 0x08}, - WDQLVL_PAT, - {0, 0, 0, 0, 0, 0, 0, 0, - 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0} - } - } - } + { + 0x03, + 0x01, + 0x02c0, + 0, + 0x0300, + 0x00a0, + { + { + {0x04, 0xff}, + 0x00345201, + 0x3201, + {0x01672543, 0x45361207, 0x45632107, 0x60715234}, + {0x08, 0x08, 0x08, 0x08}, + WDQLVL_PAT, + {0, 0, 0, 0, 0, 0, 0, 0, + 0, 0}, + {0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0} + }, + { + {0x04, 0xff}, + 0x00302154, + 0x2310, + {0x01672543, 0x45361207, 0x45632107, 0x60715234}, + {0x08, 0x08, 0x08, 0x08}, + WDQLVL_PAT, + {0, 0, 0, 0, 0, 0, 0, 0, + 0, 0}, + {0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0} + } + } + } }; -void boardcnf_get_brd_clk(uint32_t brd, uint32_t * clk, uint32_t * div) +void boardcnf_get_brd_clk(uint32_t brd, uint32_t *clk, uint32_t *div) { uint32_t md; - if ((Prr_Product == PRR_PRODUCT_H3) && (Prr_Cut == PRR_PRODUCT_10)) { + if ((prr_product == PRR_PRODUCT_H3) && (prr_cut == PRR_PRODUCT_10)) { *clk = 50; *div = 3; } else { @@ -1560,7 +1567,7 @@ void boardcnf_get_brd_clk(uint32_t brd, uint32_t * clk, uint32_t * div) (void)brd; } -void boardcnf_get_ddr_mbps(uint32_t brd, uint32_t * mbps, uint32_t * div) +void boardcnf_get_ddr_mbps(uint32_t brd, uint32_t *mbps, uint32_t *div) { uint32_t md; @@ -1599,7 +1606,7 @@ void boardcnf_get_ddr_mbps(uint32_t brd, uint32_t * mbps, uint32_t * div) #define M3_SAMPLE_SS_E28 0xB866CC10, 0x3C231421 #define M3_SAMPLE_SS_E32 0xB866CC10, 0x3C241421 -static const uint32_t TermcodeBySample[20][3] = { +static const uint32_t termcode_by_sample[20][3] = { {M3_SAMPLE_TT_A84, 0x000158D5}, {M3_SAMPLE_TT_A85, 0x00015955}, {M3_SAMPLE_TT_A86, 0x00015955}, @@ -1616,13 +1623,13 @@ static const uint32_t TermcodeBySample[20][3] = { /* * SAMPLE board detect function */ -#define PFC_PMMR 0xE6060000U +#define PFC_PMMR 0xE6060000U #define PFC_PUEN5 0xE6060414U #define PFC_PUEN6 0xE6060418U #define PFC_PUD5 0xE6060454U #define PFC_PUD6 0xE6060458U #define GPIO_INDT5 0xE605500CU -#define GPIO_GPSR6 0xE6060118U +#define GPIO_GPSR6 0xE6060118U #if (RCAR_GEN3_ULCB == 0) static void pfc_write_and_poll(uint32_t a, uint32_t v) @@ -1630,7 +1637,8 @@ static void pfc_write_and_poll(uint32_t a, uint32_t v) mmio_write_32(PFC_PMMR, ~v); v = ~mmio_read_32(PFC_PMMR); mmio_write_32(a, v); - while (v != mmio_read_32(a)) ; + while (v != mmio_read_32(a)) + ; dsb_sev(); } #endif @@ -1688,10 +1696,10 @@ static uint32_t opencheck_SSI_WS6(void) if (down == up) { /* Same = Connect */ return 0; - } else { - /* Diff = Open */ - return 1; } + + /* Diff = Open */ + return 1; } #endif @@ -1699,10 +1707,10 @@ static uint32_t opencheck_SSI_WS6(void) static uint32_t _board_judge(void) { uint32_t brd; -#if (RCAR_GEN3_ULCB==1) +#if (RCAR_GEN3_ULCB == 1) /* Starter Kit */ - if (Prr_Product == PRR_PRODUCT_H3) { - if (Prr_Cut <= PRR_PRODUCT_11) { + if (prr_product == PRR_PRODUCT_H3) { + if (prr_cut <= PRR_PRODUCT_11) { /* RENESAS Starter Kit(H3 Ver.1.x/SIP) board */ brd = 2; } else { @@ -1713,7 +1721,7 @@ static uint32_t _board_judge(void) brd = 8; #endif } - } else if (Prr_Product == PRR_PRODUCT_M3) { + } else if (prr_product == PRR_PRODUCT_M3) { /* RENESAS Starter Kit(M3-W/SIP 8Gbit 1rank) board */ brd = 3; } else { @@ -1725,33 +1733,33 @@ static uint32_t _board_judge(void) usb2_ovc_open = opencheck_SSI_WS6(); - /* RENESAS Eva-borad */ + /* RENESAS Eva-board */ brd = 99; - if (Prr_Product == PRR_PRODUCT_V3H) { + if (prr_product == PRR_PRODUCT_V3H) { /* RENESAS Condor board */ brd = 12; } else if (usb2_ovc_open) { - if (Prr_Product == PRR_PRODUCT_M3N) { + if (prr_product == PRR_PRODUCT_M3N) { /* RENESAS Kriek board with M3-N */ brd = 10; - } else if (Prr_Product == PRR_PRODUCT_M3) { + } else if (prr_product == PRR_PRODUCT_M3) { /* RENESAS Kriek board with M3-W */ brd = 1; - } else if ((Prr_Product == PRR_PRODUCT_H3) - && (Prr_Cut<=PRR_PRODUCT_11)) { + } else if ((prr_product == PRR_PRODUCT_H3) && + (prr_cut <= PRR_PRODUCT_11)) { /* RENESAS Kriek board with PM3 */ brd = 13; - } else if ((Prr_Product == PRR_PRODUCT_H3) - && (Prr_Cut > PRR_PRODUCT_20)) { + } else if ((prr_product == PRR_PRODUCT_H3) && + (prr_cut > PRR_PRODUCT_20)) { /* RENESAS Kriek board with H3N */ brd = 15; } } else { - if (Prr_Product == PRR_PRODUCT_H3) { - if (Prr_Cut <= PRR_PRODUCT_11) { + if (prr_product == PRR_PRODUCT_H3) { + if (prr_cut <= PRR_PRODUCT_11) { /* RENESAS SALVATOR-X (H3 Ver.1.x/SIP) */ brd = 2; - } else if (Prr_Cut < PRR_PRODUCT_30) { + } else if (prr_cut < PRR_PRODUCT_30) { /* RENESAS SALVATOR-X (H3 Ver.2.0/SIP) */ brd = 7; // 8Gbit/1rank } else { @@ -1762,16 +1770,19 @@ static uint32_t _board_judge(void) brd = 8; #endif } - } else if (Prr_Product == PRR_PRODUCT_M3N) { + } else if (prr_product == PRR_PRODUCT_M3N) { /* RENESAS SALVATOR-X (M3-N/SIP) */ brd = 11; - } else if ((Prr_Product == PRR_PRODUCT_M3) && (Prr_Cut <= PRR_PRODUCT_20)) { + } else if ((prr_product == PRR_PRODUCT_M3) && + (prr_cut <= PRR_PRODUCT_20)) { /* RENESAS SALVATOR-X (M3-W/SIP) */ brd = 0; - } else if ((Prr_Product == PRR_PRODUCT_M3) && (Prr_Cut < PRR_PRODUCT_30)) { + } else if ((prr_product == PRR_PRODUCT_M3) && + (prr_cut < PRR_PRODUCT_30)) { /* RENESAS SALVATOR-X (M3-W Ver.1.x/SIP) */ brd = 19; - } else if ((Prr_Product == PRR_PRODUCT_M3) && (Prr_Cut >= PRR_PRODUCT_30)) { + } else if ((prr_product == PRR_PRODUCT_M3) && + (prr_cut >= PRR_PRODUCT_30)) { /* RENESAS SALVATOR-X (M3-W ver.3.0/SIP) */ brd = 18; } |