summaryrefslogtreecommitdiff
path: root/src/device/dram/ddr4.c
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2024-05-06 05:19:20 +0200
committerElyes Haouas <ehaouas@noos.fr>2024-05-07 10:52:58 +0000
commit239347a90934deb77443869b6544c31f9b261733 (patch)
treeb302d513ef5d65883b6f4e384828e19ccc767b4a /src/device/dram/ddr4.c
parent78ba7a7865ed1f60c7f55bfcced305bc8fbdc9c6 (diff)
spd.h: Move enum ddr4_module_type to ddr4.h
Move specific enum ddr4_module_type to <device/dram/ddr4.h>. Change-Id: Ia538d2c73affa6560fa1533a40c02b3677588f5a Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82122 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jakub Czapiga <czapiga@google.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/device/dram/ddr4.c')
-rw-r--r--src/device/dram/ddr4.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/device/dram/ddr4.c b/src/device/dram/ddr4.c
index 14b5dd3f1a..6ccef7274f 100644
--- a/src/device/dram/ddr4.c
+++ b/src/device/dram/ddr4.c
@@ -272,25 +272,7 @@ enum cb_err spd_add_smbios17_ddr4(const u8 channel, const u8 slot, const u16 sel
dimm->dimm_num = slot;
memcpy(dimm->module_part_number, info->part_number, SPD_DDR4_PART_LEN);
dimm->mod_id = info->manufacturer_id;
-
- switch (info->dimm_type) {
- case SPD_DDR4_DIMM_TYPE_SO_DIMM:
- dimm->mod_type = DDR4_SPD_SODIMM;
- break;
- case SPD_DDR4_DIMM_TYPE_72B_SO_RDIMM:
- dimm->mod_type = DDR4_SPD_72B_SO_RDIMM;
- break;
- case SPD_DDR4_DIMM_TYPE_UDIMM:
- dimm->mod_type = DDR4_SPD_UDIMM;
- break;
- case SPD_DDR4_DIMM_TYPE_RDIMM:
- dimm->mod_type = DDR4_SPD_RDIMM;
- break;
- default:
- dimm->mod_type = SPD_UNDEFINED;
- break;
- }
-
+ dimm->mod_type = info->dimm_type;
dimm->bus_width = info->bus_width;
memcpy(dimm->serial, info->serial_number,
MIN(sizeof(dimm->serial), sizeof(info->serial_number)));