[coreboot-gerrit] Change in coreboot[master]: nb/intel/pineview: Use i2c block read to fetch SPD

Arthur Heymans (Code Review) gerrit at coreboot.org
Mon Aug 20 11:32:36 CEST 2018


Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/28229


Change subject: nb/intel/pineview: Use i2c block read to fetch SPD
......................................................................

nb/intel/pineview: Use i2c block read to fetch SPD

With this the time spend during the raminit decreases from ~480ms to ~126ms.

Change-Id: Ic23f39f1017010c89795e626f6a6f918f8bda17a
Signed-off-by: Arthur Heymans <arthur at aheymans.xyz>
---
M src/northbridge/intel/pineview/raminit.c
1 file changed, 5 insertions(+), 12 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/29/28229/1

diff --git a/src/northbridge/intel/pineview/raminit.c b/src/northbridge/intel/pineview/raminit.c
index 2a1e34c..f1e0767 100644
--- a/src/northbridge/intel/pineview/raminit.c
+++ b/src/northbridge/intel/pineview/raminit.c
@@ -271,20 +271,13 @@
 
 static void sdram_read_spds(struct sysinfo *s)
 {
-	u8 i, j, chan;
-	int status = 0;
+	u8 i, chan;
 	s->dt0mode = 0;
 	FOR_EACH_DIMM(i) {
-		for (j = 0; j < 64; j++) {
-			status = spd_read_byte(s->spd_map[i], j);
-			if (status < 0) {
-				s->dimms[i].card_type = 0;
-				break;
-			}
-			s->dimms[i].spd_data[j] = (u8) status;
-			if (j == 62)
-				s->dimms[i].card_type = ((u8) status) & 0x1f;
-		}
+		if (i2c_block_read(s->spd_map[i], 0, 64, s->dimms[i].spd_data) != 64)
+			s->dimms[i].card_type = 0;
+
+		s->dimms[i].card_type = s->dimms[i].spd_data[62] & 0x1f;
 		hexdump(s->dimms[i].spd_data, 64);
 	}
 

-- 
To view, visit https://review.coreboot.org/28229
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic23f39f1017010c89795e626f6a6f918f8bda17a
Gerrit-Change-Number: 28229
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur at aheymans.xyz>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180820/394cef88/attachment-0001.html>


More information about the coreboot-gerrit mailing list