Elyes Haouas has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/82122?usp=email )
Change subject: device/dram/ddr4: Use 'info->dimm_type' ......................................................................
device/dram/ddr4: Use 'info->dimm_type'
Just use 'info->dimm_type' instead of using 'switch'.
Change-Id: Ia538d2c73affa6560fa1533a40c02b3677588f5a Signed-off-by: Elyes Haouas ehaouas@noos.fr --- M src/device/dram/ddr4.c 1 file changed, 1 insertion(+), 19 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/22/82122/1
diff --git a/src/device/dram/ddr4.c b/src/device/dram/ddr4.c index 37bd4e2..9a8c5eb 100644 --- a/src/device/dram/ddr4.c +++ b/src/device/dram/ddr4.c @@ -272,25 +272,7 @@ 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)));