google/cyan variants: fix single/dual channel reporting

Fix typos in determining single/dual channel in cyan variants
which resulted in all boards being reported as 4GB/dual channel
in the cbmem console log.
These typos were found and fixed in yet-to-be-merged variants;
this patch applies the same fixes to already-merged boards.

Change-Id: I615463668e77bd817d5270f0f04d4d01f74e3b47
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/21917
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
Matt DeVillier 2017-10-07 17:01:04 -05:00 committed by Martin Roth
parent 8a02727f50
commit a34cf52469
6 changed files with 10 additions and 10 deletions

View File

@ -36,10 +36,10 @@ int get_variant_spd_index(int ram_id, int *dual)
/* 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");

View File

@ -49,10 +49,10 @@ int get_variant_spd_index(int ram_id, int *dual)
/* 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");

View File

@ -33,7 +33,7 @@ int get_variant_spd_index(int ram_id, int *dual)
{
/* 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) {

View File

@ -32,7 +32,7 @@ int get_variant_spd_index(int ram_id, int *dual)
{
/* 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) {

View File

@ -40,10 +40,10 @@ int get_variant_spd_index(int ram_id, int *dual)
/* 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");

View File

@ -37,10 +37,10 @@ int get_variant_spd_index(int ram_id, int *dual)
/* 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");