Mike Banon has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/44498 )
Change subject: nb/amd/agesa: define DDR3_SPD_SIZE as a common value ......................................................................
nb/amd/agesa: define DDR3_SPD_SIZE as a common value
Move a size of DDR3 SPD memory (always 256 bytes) to a common define.
Signed-off-by: Mike Banon mikebdp2@gmail.com Change-Id: I80c89ff6e44526e1d75b0e933b21801ed17c98c0 --- M src/northbridge/amd/agesa/dimmSpd.h M src/northbridge/amd/agesa/family14/dimmSpd.c M src/northbridge/amd/agesa/family15tn/dimmSpd.c M src/northbridge/amd/agesa/family16kb/dimmSpd.c 4 files changed, 5 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/98/44498/1
diff --git a/src/northbridge/amd/agesa/dimmSpd.h b/src/northbridge/amd/agesa/dimmSpd.h index dbcb106..c627bb4 100644 --- a/src/northbridge/amd/agesa/dimmSpd.h +++ b/src/northbridge/amd/agesa/dimmSpd.h @@ -3,6 +3,8 @@ #ifndef _DIMMSPD_H_ #define _DIMMSPD_H_
+#define DDR3_SPD_SIZE 256 + AGESA_STATUS AmdMemoryReadSPD (IN UINT32 Func, IN UINTN Data, IN OUT AGESA_READ_SPD_PARAMS *SpdData);
diff --git a/src/northbridge/amd/agesa/family14/dimmSpd.c b/src/northbridge/amd/agesa/family14/dimmSpd.c index e4d1eab..3ce84a4 100644 --- a/src/northbridge/amd/agesa/family14/dimmSpd.c +++ b/src/northbridge/amd/agesa/family14/dimmSpd.c @@ -40,7 +40,7 @@ if (spdAddress == 0) return AGESA_ERROR;
- int err = smbus_readSpd(spdAddress, (void *) info->Buffer, 256); + int err = smbus_readSpd(spdAddress, (void *) info->Buffer, DDR3_SPD_SIZE); if (err) return AGESA_ERROR; return AGESA_SUCCESS; diff --git a/src/northbridge/amd/agesa/family15tn/dimmSpd.c b/src/northbridge/amd/agesa/family15tn/dimmSpd.c index 6504d14..70a7b92 100644 --- a/src/northbridge/amd/agesa/family15tn/dimmSpd.c +++ b/src/northbridge/amd/agesa/family15tn/dimmSpd.c @@ -39,7 +39,7 @@ if (spdAddress == 0) return AGESA_ERROR;
- int err = hudson_readSpd(spdAddress, (void *) info->Buffer, 256); + int err = hudson_readSpd(spdAddress, (void *) info->Buffer, DDR3_SPD_SIZE); if (err) return AGESA_ERROR; return AGESA_SUCCESS; diff --git a/src/northbridge/amd/agesa/family16kb/dimmSpd.c b/src/northbridge/amd/agesa/family16kb/dimmSpd.c index b20216f..58b35e0 100644 --- a/src/northbridge/amd/agesa/family16kb/dimmSpd.c +++ b/src/northbridge/amd/agesa/family16kb/dimmSpd.c @@ -39,7 +39,7 @@ if (spdAddress == 0) return AGESA_ERROR;
- int err = hudson_readSpd(spdAddress, (void *) info->Buffer, 256); + int err = hudson_readSpd(spdAddress, (void *) info->Buffer, DDR3_SPD_SIZE); if (err) return AGESA_ERROR; return AGESA_SUCCESS;