diff options
author | Duncan Laurie <dlaurie@chromium.org> | 2014-05-22 08:22:51 -0700 |
---|---|---|
committer | Marc Jones <marc.jones@se-eng.com> | 2015-01-04 00:03:40 +0100 |
commit | fe8b788a12b225ae45ecb26625cfd2588d193ff3 (patch) | |
tree | 854386c61b6d07e368f51bf2b7610574667040f6 /src | |
parent | 0aa06cbf18145eaf7ecd5a377f09e9d946aa36da (diff) |
samus: Move SPD related information to spd directory
Put all the SPD related information in one place including
the onboard SPD sources and the board specific parsing.
BUG=chrome-os-partner:28234
TEST=Build and boot on samus
Original-Change-Id: If5cd826ecc9cc856008b7c29aa3cfade5ae7f685
Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/201082
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
(cherry picked from commit f40e447cee84ebd04ab8a57250d0f56f508d52f2)
Signed-off-by: Marc Jones <marc.jones@se-eng.com>
Change-Id: I9c10b08c3e640642e3c75696a233051bb34a2123
Reviewed-on: http://review.coreboot.org/8006
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/google/samus/Makefile.inc | 31 | ||||
-rw-r--r-- | src/mainboard/google/samus/romstage.c | 2 | ||||
-rw-r--r-- | src/mainboard/google/samus/spd/Makefile.inc | 46 | ||||
-rw-r--r-- | src/mainboard/google/samus/spd/elpida_4Gb.spd.hex (renamed from src/mainboard/google/samus/elpida_4Gb.spd.hex) | 0 | ||||
-rw-r--r-- | src/mainboard/google/samus/spd/elpida_8Gb.spd.hex (renamed from src/mainboard/google/samus/elpida_8Gb.spd.hex) | 0 | ||||
-rw-r--r-- | src/mainboard/google/samus/spd/empty.spd.hex (renamed from src/mainboard/google/samus/empty.spd.hex) | 0 | ||||
-rw-r--r-- | src/mainboard/google/samus/spd/samsung_4Gb.spd.hex (renamed from src/mainboard/google/samus/samsung_4Gb.spd.hex) | 0 | ||||
-rw-r--r-- | src/mainboard/google/samus/spd/samsung_8Gb.spd.hex (renamed from src/mainboard/google/samus/samsung_8Gb.spd.hex) | 0 | ||||
-rw-r--r-- | src/mainboard/google/samus/spd/spd.c (renamed from src/mainboard/google/samus/spd.c) | 4 | ||||
-rw-r--r-- | src/mainboard/google/samus/spd/spd.h (renamed from src/mainboard/google/samus/spd.h) | 0 |
10 files changed, 51 insertions, 32 deletions
diff --git a/src/mainboard/google/samus/Makefile.inc b/src/mainboard/google/samus/Makefile.inc index f23352f471..502204e990 100644 --- a/src/mainboard/google/samus/Makefile.inc +++ b/src/mainboard/google/samus/Makefile.inc @@ -17,6 +17,8 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## +subdirs-y += spd + ramstage-$(CONFIG_EC_GOOGLE_CHROMEEC) += ec.c romstage-y += chromeos.c @@ -26,32 +28,3 @@ smm-$(CONFIG_HAVE_SMI_HANDLER) += smihandler.c romstage-y += pei_data.c ramstage-y += pei_data.c - -## DIMM SPD for on-board memory -romstage-y += spd.c -SPD_BIN = $(obj)/spd.bin - -# Order of names in SPD_SOURCES is important! -# { GPIO69, GPIO68, GPIO67 } -SPD_SOURCES = empty # 0: { 0, 0, 0 } -SPD_SOURCES += elpida_4Gb # 1: { 0, 0, 1 } -SPD_SOURCES += empty # 2: { 0, 1, 0 } -SPD_SOURCES += elpida_8Gb # 3: { 0, 1, 1 } -SPD_SOURCES += empty # 4: { 1, 0, 0 } -SPD_SOURCES += samsung_8Gb # 5: { 1, 0, 1 } -SPD_SOURCES += samsung_4Gb # 6: { 1, 1, 0 } -SPD_SOURCES += empty # 7: { 1, 1, 1 } - -SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/$(f).spd.hex) - -# Include spd rom data -$(SPD_BIN): $(SPD_DEPS) - for f in $+; \ - do for c in $$(cat $$f | grep -v ^#); \ - do echo -e -n "\\x$$c"; \ - done; \ - done > $@ - -cbfs-files-y += spd.bin -spd.bin-file := $(SPD_BIN) -spd.bin-type := 0xab diff --git a/src/mainboard/google/samus/romstage.c b/src/mainboard/google/samus/romstage.c index f0609c84a7..9af4ffbc5c 100644 --- a/src/mainboard/google/samus/romstage.c +++ b/src/mainboard/google/samus/romstage.c @@ -26,7 +26,7 @@ #include <broadwell/pei_data.h> #include <broadwell/pei_wrapper.h> #include <broadwell/romstage.h> -#include "spd.h" +#include <mainboard/google/samus/spd/spd.h> #include "gpio.h" void mainboard_romstage_entry(struct romstage_params *rp) diff --git a/src/mainboard/google/samus/spd/Makefile.inc b/src/mainboard/google/samus/spd/Makefile.inc new file mode 100644 index 0000000000..657a09d01e --- /dev/null +++ b/src/mainboard/google/samus/spd/Makefile.inc @@ -0,0 +1,46 @@ +## +## This file is part of the coreboot project. +## +## Copyright (C) 2014 Google Inc. +## +## 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. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## + +romstage-y += spd.c + +SPD_BIN = $(obj)/spd.bin + +# { GPIO69, GPIO68, GPIO67 } +SPD_SOURCES = empty # 0: { 0, 0, 0 } +SPD_SOURCES += elpida_4Gb # 1: { 0, 0, 1 } +SPD_SOURCES += empty # 2: { 0, 1, 0 } +SPD_SOURCES += elpida_8Gb # 3: { 0, 1, 1 } +SPD_SOURCES += empty # 4: { 1, 0, 0 } +SPD_SOURCES += samsung_8Gb # 5: { 1, 0, 1 } +SPD_SOURCES += samsung_4Gb # 6: { 1, 1, 0 } +SPD_SOURCES += empty # 7: { 1, 1, 1 } + +SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex) + +# Include spd rom data +$(SPD_BIN): $(SPD_DEPS) + for f in $+; \ + do for c in $$(cat $$f | grep -v ^#); \ + do echo -e -n "\\x$$c"; \ + done; \ + done > $@ + +cbfs-files-y += spd.bin +spd.bin-file := $(SPD_BIN) +spd.bin-type := 0xab diff --git a/src/mainboard/google/samus/elpida_4Gb.spd.hex b/src/mainboard/google/samus/spd/elpida_4Gb.spd.hex index e73ba6201c..e73ba6201c 100644 --- a/src/mainboard/google/samus/elpida_4Gb.spd.hex +++ b/src/mainboard/google/samus/spd/elpida_4Gb.spd.hex diff --git a/src/mainboard/google/samus/elpida_8Gb.spd.hex b/src/mainboard/google/samus/spd/elpida_8Gb.spd.hex index b790943fdc..b790943fdc 100644 --- a/src/mainboard/google/samus/elpida_8Gb.spd.hex +++ b/src/mainboard/google/samus/spd/elpida_8Gb.spd.hex diff --git a/src/mainboard/google/samus/empty.spd.hex b/src/mainboard/google/samus/spd/empty.spd.hex index 9ec39f1ba4..9ec39f1ba4 100644 --- a/src/mainboard/google/samus/empty.spd.hex +++ b/src/mainboard/google/samus/spd/empty.spd.hex diff --git a/src/mainboard/google/samus/samsung_4Gb.spd.hex b/src/mainboard/google/samus/spd/samsung_4Gb.spd.hex index 882105097a..882105097a 100644 --- a/src/mainboard/google/samus/samsung_4Gb.spd.hex +++ b/src/mainboard/google/samus/spd/samsung_4Gb.spd.hex diff --git a/src/mainboard/google/samus/samsung_8Gb.spd.hex b/src/mainboard/google/samus/spd/samsung_8Gb.spd.hex index a7a14093e7..a7a14093e7 100644 --- a/src/mainboard/google/samus/samsung_8Gb.spd.hex +++ b/src/mainboard/google/samus/spd/samsung_8Gb.spd.hex diff --git a/src/mainboard/google/samus/spd.c b/src/mainboard/google/samus/spd/spd.c index 4371da9bd8..331fc6dc0f 100644 --- a/src/mainboard/google/samus/spd.c +++ b/src/mainboard/google/samus/spd/spd.c @@ -24,8 +24,8 @@ #include <broadwell/gpio.h> #include <broadwell/pei_data.h> #include <broadwell/romstage.h> -#include "gpio.h" -#include "spd.h" +#include <mainboard/google/samus/gpio.h> +#include <mainboard/google/samus/spd/spd.h> static void mainboard_print_spd_info(uint8_t spd[]) { diff --git a/src/mainboard/google/samus/spd.h b/src/mainboard/google/samus/spd/spd.h index 98180fa72c..98180fa72c 100644 --- a/src/mainboard/google/samus/spd.h +++ b/src/mainboard/google/samus/spd/spd.h |