soc/intel/tigerlake/meminit.c: Fix clang static asserts

Clang does not like static asserts on integral constant expressions.

Change-Id: If5890a357ed95153d8ae2efa727c111b05bc6455
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63066
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Arthur Heymans 2022-03-24 01:04:25 +01:00
parent 3473d16640
commit 10c43d8c37
1 changed files with 4 additions and 2 deletions

View File

@ -121,7 +121,8 @@ static void mem_init_dq_upds(FSP_M_CONFIG *mem_cfg, const struct mem_channel_dat
const size_t upd_size = sizeof(mem_cfg->DqMapCpu2DramMc0Ch0); const size_t upd_size = sizeof(mem_cfg->DqMapCpu2DramMc0Ch0);
_Static_assert(upd_size == CONFIG_MRC_CHANNEL_WIDTH, "Incorrect DQ UPD size!"); _Static_assert(sizeof(mem_cfg->DqMapCpu2DramMc0Ch0) == CONFIG_MRC_CHANNEL_WIDTH,
"Incorrect DQ UPD size!");
mem_init_dq_dqs_upds(dq_upds, mb_cfg->dq_map, upd_size, data); mem_init_dq_dqs_upds(dq_upds, mb_cfg->dq_map, upd_size, data);
} }
@ -142,7 +143,8 @@ static void mem_init_dqs_upds(FSP_M_CONFIG *mem_cfg, const struct mem_channel_da
const size_t upd_size = sizeof(mem_cfg->DqsMapCpu2DramMc0Ch0); const size_t upd_size = sizeof(mem_cfg->DqsMapCpu2DramMc0Ch0);
_Static_assert(upd_size == CONFIG_MRC_CHANNEL_WIDTH / 8, "Incorrect DQS UPD size!"); _Static_assert(sizeof(mem_cfg->DqsMapCpu2DramMc0Ch0) == CONFIG_MRC_CHANNEL_WIDTH / 8,
"Incorrect DQS UPD size!");
mem_init_dq_dqs_upds(dqs_upds, mb_cfg->dqs_map, upd_size, data); mem_init_dq_dqs_upds(dqs_upds, mb_cfg->dqs_map, upd_size, data);
} }