diff options
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/google/lars/boardid.h | 27 | ||||
-rw-r--r-- | src/mainboard/google/lars/spd/Makefile.inc | 8 | ||||
-rw-r--r-- | src/mainboard/google/lars/spd/spd.c | 27 | ||||
-rw-r--r-- | src/mainboard/google/lars/spd/spd.h | 1 |
4 files changed, 13 insertions, 50 deletions
diff --git a/src/mainboard/google/lars/boardid.h b/src/mainboard/google/lars/boardid.h deleted file mode 100644 index 0c6de8b9bf..0000000000 --- a/src/mainboard/google/lars/boardid.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This file is part of the coreboot project. - * - * Copyright (C) 2013 Google Inc. - * Copyright (C) 2015 Intel Corporation - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the - * GNU General Public License for more details. - */ - -#ifndef _BOARDID_H_ -#define _BOARDID_H_ - -#define SCRD_SKU1 0x3 -#define SCRD_SKU2 0x4 -#define SCRD_SKU3 0x1 -#define SCRD_SKU4 0x2 -#define SCRD_SKU5 0x5 -#define SCRD_SKU6 0x6 - -#endif diff --git a/src/mainboard/google/lars/spd/Makefile.inc b/src/mainboard/google/lars/spd/Makefile.inc index cbe1c3d7c6..4b9c376758 100644 --- a/src/mainboard/google/lars/spd/Makefile.inc +++ b/src/mainboard/google/lars/spd/Makefile.inc @@ -18,10 +18,10 @@ romstage-y += spd.c SPD_BIN = $(obj)/spd.bin -SPD_SOURCES = hynix_dimm_H9CCNNN8JTBLAR-NUD-1G-1866 # 0b0000 -SPD_SOURCES += hynix_dimm_H9CCNNNBLTBLAR-NUD-2G-1866 # 0b0001 -SPD_SOURCES += samsung_dimm_K4E8E324EB-EGCF-1G-1866 # 0b0010 -SPD_SOURCES += samsung_dimm_K4E6E304EB-EGCF-2G-1866 # 0b0011 +SPD_SOURCES = hynix_dimm_H9CCNNN8JTBLAR-NUD-1G-1866 # 0b0000 Single Channel 2GB +SPD_SOURCES += hynix_dimm_H9CCNNNBLTBLAR-NUD-2G-1866 # 0b0001 Dual Channel 8GB +SPD_SOURCES += samsung_dimm_K4E8E324EB-EGCF-1G-1866 # 0b0010 Dual Channel 4GB +SPD_SOURCES += empty # 0b0011 SPD_SOURCES += empty # 0b0100 SPD_SOURCES += empty # 0b0101 SPD_SOURCES += empty # 0b0110 diff --git a/src/mainboard/google/lars/spd/spd.c b/src/mainboard/google/lars/spd/spd.c index d352969fa9..b8d8cd0d0c 100644 --- a/src/mainboard/google/lars/spd/spd.c +++ b/src/mainboard/google/lars/spd/spd.c @@ -15,14 +15,12 @@ */ #include <arch/byteorder.h> -#include <boardid.h> #include <cbfs.h> #include <console/console.h> #include <soc/pei_data.h> #include <soc/romstage.h> #include <string.h> -#include "../boardid.h" #include "spd.h" static void mainboard_print_spd_info(uint8_t spd[]) @@ -81,17 +79,11 @@ void mainboard_fill_spd_data(struct pei_data *pei_data) { char *spd_file; size_t spd_file_len; - int spd_index, sku_id; + int spd_index, spd_span; spd_index = pei_data->mem_cfg_id; - /* - * XXX: This is incorrect usage.The Board ID should be the revision ID - * and not SKU ID but on SCRD it indicates SKU. - */ - sku_id = board_id(); printk(BIOS_INFO, "SPD index %d\n", spd_index); - printk(BIOS_INFO, "Board ID %d\n", sku_id); /* Load SPD data from CBFS */ spd_file = cbfs_boot_map_with_leak("spd.bin", CBFS_TYPE_SPD, @@ -110,16 +102,13 @@ void mainboard_fill_spd_data(struct pei_data *pei_data) } /* Assume same memory in both channels */ - spd_index *= SPD_LEN; - memcpy(pei_data->spd_data[0][0], spd_file + spd_index, SPD_LEN); - /* - * XXX: This is incorrect usage. mem_cfg should be used here instead of - * SKU ID. The current implementation of mem_config does not - * support channel population. - */ - - if (sku_id != SCRD_SKU1) - memcpy(pei_data->spd_data[1][0], spd_file + spd_index, SPD_LEN); + spd_span = spd_index * SPD_LEN; + memcpy(pei_data->spd_data[0][0], spd_file + spd_span, SPD_LEN); + + if (spd_index != HYNIX_SINGLE_CHAN) { + memcpy(pei_data->spd_data[1][0], spd_file + spd_span, SPD_LEN); + printk(BIOS_INFO, "Dual channel SPD detected writing second channel\n"); + } /* Make sure a valid SPD was found */ if (pei_data->spd_data[0][0][0] == 0) diff --git a/src/mainboard/google/lars/spd/spd.h b/src/mainboard/google/lars/spd/spd.h index babadd2c9f..c4b2b56f20 100644 --- a/src/mainboard/google/lars/spd/spd.h +++ b/src/mainboard/google/lars/spd/spd.h @@ -30,4 +30,5 @@ #define SPD_PART_LEN 18 #define SPD_MANU_OFF 148 +#define HYNIX_SINGLE_CHAN 0x0 #endif |