blob: 23d0b4e0c3035d7af831c4f82c9c2ea42bbd5d07 [file] [log] [blame]
Marc Jonesd8621212015-06-09 21:18:38 -06001##
2## This file is part of the coreboot project.
3##
Matt DeVillier45e11aa2016-12-18 11:59:58 -06004## Copyright (C) 2015 Google Inc.
Marc Jonesd8621212015-06-09 21:18:38 -06005##
6## This program is free software; you can redistribute it and/or modify
7## it under the terms of the GNU General Public License as published by
8## the Free Software Foundation; version 2 of the License.
9##
10## This program is distributed in the hope that it will be useful,
11## but WITHOUT ANY WARRANTY; without even the implied warranty of
12## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13## GNU General Public License for more details.
14##
Marc Jonesd8621212015-06-09 21:18:38 -060015
16romstage-y += spd.c
17
18SPD_BIN = $(obj)/spd.bin
19
20# { GPIO47, GPIO9, GPIO13 }
Matt DeVillier45e11aa2016-12-18 11:59:58 -060021SPD_SOURCES = Samsung_M471B5674EB0-YK0 # 0b0000
22SPD_SOURCES += Hynix_HMT425S6CFR6A_H5TC4G63CFR # 0b0001
23SPD_SOURCES += empty # 0b0010
24SPD_SOURCES += empty # 0b0011
25SPD_SOURCES += Samsung_M471B5674EB0-YK0 # 0b0100
26SPD_SOURCES += Hynix_HMT425S6CFR6A_H5TC4G63CFR # 0b0101
27SPD_SOURCES += empty # 0b0110
28SPD_SOURCES += empty # 0b0111
Marc Jonesd8621212015-06-09 21:18:38 -060029
Matt DeVillier45e11aa2016-12-18 11:59:58 -060030SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/spd/$(f).spd.hex)
Marc Jonesd8621212015-06-09 21:18:38 -060031
Matt DeVillier45e11aa2016-12-18 11:59:58 -060032# Include spd rom data
Marc Jonesd8621212015-06-09 21:18:38 -060033$(SPD_BIN): $(SPD_DEPS)
34 for f in $+; \
35 do for c in $$(cat $$f | grep -v ^#); \
Greg V84c491a2019-10-07 23:56:05 +030036 do printf $$(printf '\\%o' 0x$$c); \
Marc Jonesd8621212015-06-09 21:18:38 -060037 done; \
38 done > $@
39
40cbfs-files-y += spd.bin
41spd.bin-file := $(SPD_BIN)
Martin Rothb4560cd2017-07-22 21:45:28 -060042spd.bin-type := spd