UPSTREAM: lib/spd_bin: make SMBus SPD addresses an input

Instead of assuming the mapping of dimm number to SPD SMBus address,
allow the mainboard to provide its own mapping. That way, global
resources of empty SPD contents aren't wasted in order to address
a dimm on a mainboard that doesn't meet the current assumption.

BUG=none
BRANCH=none
TEST=none

Change-Id: I1ef87d18b30192be730805238df62ff81f130339
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: dd82edc388
Original-Change-Id: Id0e79231dc2303373badaae003038a1ac06a5635
Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/19915
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Original-Reviewed-by: Naresh Solanki <naresh.solanki@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/517936
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
This commit is contained in:
Aaron Durbin 2017-05-25 09:36:06 -05:00 committed by chrome-bot
commit 33c3dd80e8
4 changed files with 8 additions and 3 deletions

View file

@ -43,6 +43,7 @@
#define LPDDR4_SPD_PART_LEN 20
struct spd_block {
u8 addr_map[CONFIG_DIMM_MAX];
u8 *spd_array[CONFIG_DIMM_MAX];
/* Length of each dimm */
u16 len;