2 ## This file is part of the coreboot project.
4 ## Copyright (C) 2014 Google Inc.
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.
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.
18 SPD_BIN = $(obj)/spd.bin
20 # { GPIO65, GPIO67, GPIO68, GPIO69 }
21 SPD_SOURCES = empty # 0b0000
22 SPD_SOURCES += empty # 0b0001
23 SPD_SOURCES += empty # 0b0010
24 SPD_SOURCES += empty # 0b0011
25 SPD_SOURCES += empty # 0b0100
26 SPD_SOURCES += empty # 0b0101
27 SPD_SOURCES += samsung_4 # 0b0110
28 SPD_SOURCES += empty # 0b0111
29 SPD_SOURCES += hynix_4 # 0b1000
30 SPD_SOURCES += empty # 0b1001
31 SPD_SOURCES += samsung_8 # 0b1010
32 SPD_SOURCES += empty # 0b1011
33 SPD_SOURCES += hynix_8 # 0b1100
34 SPD_SOURCES += hynix_16 # 0b1101
35 SPD_SOURCES += empty # 0b1110
36 SPD_SOURCES += elpida_16 # 0b1111
38 SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
40 # Include spd rom data
41 $(SPD_BIN): $(SPD_DEPS)
43 do for c in $$(cat $$f | grep -v ^#); \
44 do printf $$(printf '\%o' 0x$$c); \
48 cbfs-files-y += spd.bin
49 spd.bin-file := $(SPD_BIN)