From 3289a306e686673bcac26d9c02a0a2168e2baa69 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 16 May 2023 15:27:30 -0600 Subject: [PATCH] lib,soc/intel/common/block/smbus: Use a SPD length of 512 bytes for DDR5 Change-Id: I8bdc4c676a0f571fd8f34e078f6a1c73a2e90a87 Signed-off-by: Jeremy Soller Signed-off-by: Tim Crawford --- src/lib/spd_cache.c | 2 +- src/soc/intel/common/block/smbus/smbuslib.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/spd_cache.c b/src/lib/spd_cache.c index dff6ede860..123c1819ce 100644 --- a/src/lib/spd_cache.c +++ b/src/lib/spd_cache.c @@ -209,7 +209,7 @@ enum cb_err spd_fill_from_cache(uint8_t *spd_cache, struct spd_block *blk) dram_type = *(spd_cache + SC_SPD_OFFSET(i) + SPD_DRAM_TYPE); - if (dram_type == SPD_DRAM_DDR4) + if (dram_type == SPD_DRAM_DDR4 || dram_type == SPD_DRAM_DDR5) blk->len = SPD_PAGE_LEN_DDR4; else blk->len = SPD_PAGE_LEN; diff --git a/src/soc/intel/common/block/smbus/smbuslib.c b/src/soc/intel/common/block/smbus/smbuslib.c index 427b5091c9..dc254a98f0 100644 --- a/src/soc/intel/common/block/smbus/smbuslib.c +++ b/src/soc/intel/common/block/smbus/smbuslib.c @@ -24,8 +24,8 @@ static void update_spd_len(struct spd_block *blk) if (blk->spd_array[i] != NULL) j |= blk->spd_array[i][SPD_DRAM_TYPE]; - /* If spd used is DDR4, then its length is 512 byte. */ - if (j == SPD_DRAM_DDR4) + /* If spd used is DDR4/5, then its length is 512 byte. */ + if (j == SPD_DRAM_DDR4 || j == SPD_DRAM_DDR5) blk->len = SPD_PAGE_LEN_DDR4; else blk->len = SPD_PAGE_LEN;