[coreboot-gerrit] Change in coreboot[master]: google/cyan variants: fix typos in spd_util.c

Matt DeVillier (Code Review) gerrit at coreboot.org
Sun Oct 8 00:05:27 CEST 2017


Matt DeVillier has uploaded this change for review. ( https://review.coreboot.org/21917


Change subject: google/cyan variants: fix typos in spd_util.c
......................................................................

google/cyan variants: fix typos in spd_util.c

Fix typos in determining single/dual channel in cyan variants.
These typos were found and fixed in yet-to-be-merged variants;
applying the same fixes to already-merged boards.

Change-Id: I615463668e77bd817d5270f0f04d4d01f74e3b47
Signed-off-by: Matt DeVillier <matt.devillier at gmail.com>
---
M src/mainboard/google/cyan/variants/banon/spd_util.c
M src/mainboard/google/cyan/variants/celes/spd_util.c
M src/mainboard/google/cyan/variants/cyan/spd_util.c
M src/mainboard/google/cyan/variants/edgar/spd_util.c
M src/mainboard/google/cyan/variants/reks/spd_util.c
M src/mainboard/google/cyan/variants/terra/spd_util.c
6 files changed, 10 insertions(+), 10 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/17/21917/1

diff --git a/src/mainboard/google/cyan/variants/banon/spd_util.c b/src/mainboard/google/cyan/variants/banon/spd_util.c
index 7b0433d..2c9181e 100644
--- a/src/mainboard/google/cyan/variants/banon/spd_util.c
+++ b/src/mainboard/google/cyan/variants/banon/spd_util.c
@@ -36,10 +36,10 @@
 
 	/* Determine if single or dual channel memory system */
 	/* RAMID3 is deterministic for banon */
-	*dual = ((ram_id > 3) & 0x1) ? 0 : 1;
+	*dual = ((ram_id >> 3) & 0x1) ? 0 : 1;
 
 	/* Display the RAM type */
-	printk(BIOS_DEBUG, dual ? "4GiB " : "2GiB ");
+	printk(BIOS_DEBUG, *dual ? "4GiB " : "2GiB ");
 	switch (spd_index) {
 	case 0:
 		printk(BIOS_DEBUG, "Samsung K4E8E304EE-EGCE\n");
diff --git a/src/mainboard/google/cyan/variants/celes/spd_util.c b/src/mainboard/google/cyan/variants/celes/spd_util.c
index d625336..baf6705 100644
--- a/src/mainboard/google/cyan/variants/celes/spd_util.c
+++ b/src/mainboard/google/cyan/variants/celes/spd_util.c
@@ -49,10 +49,10 @@
 
 	/* Determine if single or dual channel memory system */
 	/* RAMID3 is deterministic for celes */
-	*dual = ((ram_id > 3) & 0x1) ? 0 : 1;
+	*dual = ((ram_id >> 3) & 0x1) ? 0 : 1;
 
 	/* Display the RAM type */
-	printk(BIOS_DEBUG, dual ? "4GiB " : "2GiB ");
+	printk(BIOS_DEBUG, *dual ? "4GiB " : "2GiB ");
 	switch (spd_index) {
 	case 0:
 		printk(BIOS_DEBUG, "Samsung K4E8E304EE-EGCE\n");
diff --git a/src/mainboard/google/cyan/variants/cyan/spd_util.c b/src/mainboard/google/cyan/variants/cyan/spd_util.c
index 63a1df3..75d7509 100644
--- a/src/mainboard/google/cyan/variants/cyan/spd_util.c
+++ b/src/mainboard/google/cyan/variants/cyan/spd_util.c
@@ -33,7 +33,7 @@
 {
 	/* Determine if single or dual channel memory system */
 	/* RAMID1 is deterministic for cyan */
-	*dual = ((ram_id > 1) & 0x1) ? 0 : 1;
+	*dual = ((ram_id >> 1) & 0x1) ? 0 : 1;
 
 	/* Display the RAM type */
 	switch (ram_id) {
diff --git a/src/mainboard/google/cyan/variants/edgar/spd_util.c b/src/mainboard/google/cyan/variants/edgar/spd_util.c
index 61aa9a7..9651c27 100644
--- a/src/mainboard/google/cyan/variants/edgar/spd_util.c
+++ b/src/mainboard/google/cyan/variants/edgar/spd_util.c
@@ -32,7 +32,7 @@
 {
 	/* Determine if single or dual channel memory system */
 	/* RAMID1 is deterministic for edgar */
-	*dual = ((ram_id > 1) & 0x1) ? 0 : 1;
+	*dual = ((ram_id >> 1) & 0x1) ? 0 : 1;
 
 	/* Display the RAM type */
 	switch (ram_id) {
diff --git a/src/mainboard/google/cyan/variants/reks/spd_util.c b/src/mainboard/google/cyan/variants/reks/spd_util.c
index 303857f..d2a130f 100644
--- a/src/mainboard/google/cyan/variants/reks/spd_util.c
+++ b/src/mainboard/google/cyan/variants/reks/spd_util.c
@@ -40,10 +40,10 @@
 
 	/* Determine if single or dual channel memory system */
 	/* RAMID3 is deterministic for reks */
-	*dual = ((ram_id > 3) & 0x1) ? 1 : 0;
+	*dual = ((ram_id >> 3) & 0x1) ? 1 : 0;
 
 	/* Display the RAM type */
-	printk(BIOS_DEBUG, dual ? "4GiB " : "2GiB ");
+	printk(BIOS_DEBUG, *dual ? "4GiB " : "2GiB ");
 	switch (spd_index) {
 	case 0:
 		printk(BIOS_DEBUG, "Samsung K4E8E304EE-EGCF\n");
diff --git a/src/mainboard/google/cyan/variants/terra/spd_util.c b/src/mainboard/google/cyan/variants/terra/spd_util.c
index 7b4629d..72d17d5 100644
--- a/src/mainboard/google/cyan/variants/terra/spd_util.c
+++ b/src/mainboard/google/cyan/variants/terra/spd_util.c
@@ -37,10 +37,10 @@
 
 	/* Determine if single or dual channel memory system */
 	/* RAMID3 is deterministic for terra */
-	*dual = ((ram_id > 3) & 0x1) ? 1 : 0;
+	*dual = ((ram_id >> 3) & 0x1) ? 1 : 0;
 
 	/* Display the RAM type */
-	printk(BIOS_DEBUG, dual ? "4GiB " : "2GiB ");
+	printk(BIOS_DEBUG, *dual ? "4GiB " : "2GiB ");
 	switch (spd_index) {
 	case 0:
 		printk(BIOS_DEBUG, "Samsung K4E8E304EE-EGCE 1600MHz\n");

-- 
To view, visit https://review.coreboot.org/21917
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I615463668e77bd817d5270f0f04d4d01f74e3b47
Gerrit-Change-Number: 21917
Gerrit-PatchSet: 1
Gerrit-Owner: Matt DeVillier <matt.devillier at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20171007/7b94e34f/attachment-0001.html>


More information about the coreboot-gerrit mailing list