Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/60799 )
Change subject: [TESTONLY] spd_bin.h: Drop `len` field ......................................................................
[TESTONLY] spd_bin.h: Drop `len` field
Change-Id: Ia3b4b70d73a0462f4d8c028978a03be798d0ceea Signed-off-by: Angel Pons th3fanbus@gmail.com --- M src/include/spd_bin.h M src/soc/intel/common/block/memory/meminit.c M src/soc/intel/common/block/smbus/smbuslib.c 3 files changed, 1 insertion(+), 19 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/99/60799/1
diff --git a/src/include/spd_bin.h b/src/include/spd_bin.h index 973eb49..a72f831 100644 --- a/src/include/spd_bin.h +++ b/src/include/spd_bin.h @@ -38,8 +38,6 @@ struct spd_block { u8 addr_map[CONFIG_DIMM_MAX]; /* 7 bit I2C addresses */ u8 *spd_array[CONFIG_DIMM_MAX]; - /* Length of each dimm */ - u16 len; };
void print_spd_info(uint8_t spd[]); diff --git a/src/soc/intel/common/block/memory/meminit.c b/src/soc/intel/common/block/memory/meminit.c index 50c8b40..9b1f326 100644 --- a/src/soc/intel/common/block/memory/meminit.c +++ b/src/soc/intel/common/block/memory/meminit.c @@ -119,7 +119,7 @@ }
get_spd_smbus(&blk); - *spd_len = blk.len; + *spd_len = CONFIG_DIMM_SPD_SIZE;
for (ch = 0; ch < num_phys_ch; ch++) { size_t mrc_ch = soc_mem_cfg->phys_to_mrc_map[ch]; diff --git a/src/soc/intel/common/block/smbus/smbuslib.c b/src/soc/intel/common/block/smbus/smbuslib.c index 17b6377..30d014d 100644 --- a/src/soc/intel/common/block/smbus/smbuslib.c +++ b/src/soc/intel/common/block/smbus/smbuslib.c @@ -6,20 +6,6 @@ #include <device/smbus_host.h> #include "smbuslib.h"
-static void update_spd_len(struct spd_block *blk) -{ - u8 i, j = 0; - for (i = 0 ; i < CONFIG_DIMM_MAX; i++) - 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) - blk->len = SPD_PAGE_LEN_DDR4; - else - blk->len = SPD_PAGE_LEN; -} - static void smbus_read_spd(u8 *spd, u8 addr) { u16 i; @@ -83,8 +69,6 @@ else blk->spd_array[i] = NULL; } - - update_spd_len(blk); }
/*