Skip to content

Commit

Permalink
lib,soc/intel/common/block/smbus: Use a SPD length of 512 bytes for DDR5
Browse files Browse the repository at this point in the history
Change-Id: I8bdc4c676a0f571fd8f34e078f6a1c73a2e90a87
Signed-off-by: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
  • Loading branch information
jackpot51 authored and crawfxrd committed Feb 20, 2024
1 parent f6ed868 commit 868c102
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/spd_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/soc/intel/common/block/smbus/smbuslib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 868c102

Please sign in to comment.