summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/dimm_info_util.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/lib/dimm_info_util.c b/src/lib/dimm_info_util.c
index 0e7cc12f18..3507366a3d 100644
--- a/src/lib/dimm_info_util.c
+++ b/src/lib/dimm_info_util.c
@@ -1,5 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
+#include <device/dram/spd.h>
#include <dimm_info_util.h>
#include <smbios.h>
#include <spd.h>
@@ -72,18 +73,8 @@ uint32_t smbios_memory_size_to_mib(uint16_t memory_size, uint32_t extended_size)
return memory_size;
}
-uint8_t
-smbios_form_factor_to_spd_mod_type(smbios_memory_form_factor form_factor)
+uint8_t smbios_form_factor_to_spd_mod_type(smbios_memory_type memory_type,
+ smbios_memory_form_factor form_factor)
{
- /* This switch reverses the switch in smbios.c */
- switch (form_factor) {
- case MEMORY_FORMFACTOR_DIMM:
- return SPD_UDIMM;
- case MEMORY_FORMFACTOR_RIMM:
- return SPD_RDIMM;
- case MEMORY_FORMFACTOR_SODIMM:
- return SPD_SODIMM;
- default:
- return SPD_UNDEFINED;
- }
+ return convert_form_factor_to_module_type(memory_type, form_factor);
}