From 5a04746714ddf1fdf4c0e1c9ed8cea4aa7fea511 Mon Sep 17 00:00:00 2001 From: Elyes Haouas Date: Wed, 28 Dec 2022 11:43:49 +0100 Subject: spd.h: Move enum ddr2_module_type to ddr2.h Move specific enum ddr2_module_type to . Change-Id: I748658f9b349bff9b1ebe2c0a6acf71bf2a221ce Signed-off-by: Elyes Haouas Reviewed-on: https://review.coreboot.org/c/coreboot/+/71546 Reviewed-by: Paul Menzel Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- src/device/dram/spd.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/device/dram') diff --git a/src/device/dram/spd.c b/src/device/dram/spd.c index deff6744ad..738c05b113 100644 --- a/src/device/dram/spd.c +++ b/src/device/dram/spd.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ +#include #include #include #include @@ -47,25 +48,25 @@ static void convert_default_module_type_to_spd_info(struct spd_info *info) info->type_detail = MEMORY_TYPE_DETAIL_UNKNOWN; } -static void convert_ddr2_module_type_to_spd_info(enum ddr2_module_type module_type, +static void convert_ddr2_module_type_to_spd_info(enum spd_dimm_type_ddr2 module_type, struct spd_info *info) { switch (module_type) { - case DDR2_SPD_RDIMM: - case DDR2_SPD_MINI_RDIMM: + case SPD_DDR2_DIMM_TYPE_RDIMM: + case SPD_DDR2_DIMM_TYPE_MINI_RDIMM: info->form_factor = MEMORY_FORMFACTOR_RIMM; info->type_detail = MEMORY_TYPE_DETAIL_REGISTERED; break; - case DDR2_SPD_UDIMM: - case DDR2_SPD_MINI_UDIMM: + case SPD_DDR2_DIMM_TYPE_UDIMM: + case SPD_DDR2_DIMM_TYPE_MINI_UDIMM: info->form_factor = MEMORY_FORMFACTOR_DIMM; info->type_detail = MEMORY_TYPE_DETAIL_UNBUFFERED; break; - case DDR2_SPD_MICRO_DIMM: + case SPD_DDR2_DIMM_TYPE_MICRO_DIMM: info->form_factor = MEMORY_FORMFACTOR_DIMM; info->type_detail = MEMORY_TYPE_DETAIL_UNKNOWN; break; - case DDR2_SPD_SODIMM: + case SPD_DDR2_DIMM_TYPE_SO_DIMM: info->form_factor = MEMORY_FORMFACTOR_SODIMM; info->type_detail = MEMORY_TYPE_DETAIL_UNKNOWN; break; @@ -210,11 +211,11 @@ static uint8_t convert_ddrx_form_factor_to_module_type(smbios_memory_type memory switch (form_factor) { case MEMORY_FORMFACTOR_DIMM: - return DDR2_SPD_UDIMM; + return SPD_DDR2_DIMM_TYPE_UDIMM; case MEMORY_FORMFACTOR_RIMM: - return DDR2_SPD_RDIMM; + return SPD_DDR2_DIMM_TYPE_RDIMM; case MEMORY_FORMFACTOR_SODIMM: - module_type = (memory_type == MEMORY_TYPE_DDR2) ? DDR2_SPD_SODIMM : + module_type = (memory_type == MEMORY_TYPE_DDR2) ? SPD_DDR2_DIMM_TYPE_SO_DIMM : DDR3_SPD_SODIMM; return module_type; default: -- cgit v1.2.3