summaryrefslogtreecommitdiff
path: root/src/mainboard/samsung/lumpy
diff options
context:
space:
mode:
authorVladimir Serbinenko <phcoder@gmail.com>2014-01-12 14:12:15 +0100
committerVladimir Serbinenko <phcoder@gmail.com>2014-01-12 17:41:58 +0100
commit128741682250e196ccc9ff0bf9e7a5db5dfcdbd3 (patch)
tree77f3adb8046d81cacd650ad77aa4aaf18cc6d3a7 /src/mainboard/samsung/lumpy
parent0af61b6c82d7ff02426a26bf435b7c6ee768a602 (diff)
CBFS: use cbfs_get_file_content whenever possible rather than cbfs_get_file
Number one reason to use cbfs_get_file was to get file length. With previous patch no more need for this. Change-Id: I330dda914d800c991757c5967b11963276ba9e00 Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/4674 Reviewed-by: Patrick Georgi <patrick@georgi-clan.de> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/mainboard/samsung/lumpy')
-rw-r--r--src/mainboard/samsung/lumpy/romstage.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mainboard/samsung/lumpy/romstage.c b/src/mainboard/samsung/lumpy/romstage.c
index 6c87f88fa2..a4f0c4291f 100644
--- a/src/mainboard/samsung/lumpy/romstage.c
+++ b/src/mainboard/samsung/lumpy/romstage.c
@@ -182,8 +182,8 @@ void main(unsigned long bist)
};
typedef const uint8_t spd_blob[256];
- struct cbfs_file *spd_file;
spd_blob *spd_data;
+ size_t spd_file_len;
timestamp_init(get_initial_timestamp());
@@ -289,12 +289,12 @@ void main(unsigned long bist)
break;
}
- spd_file = cbfs_get_file(CBFS_DEFAULT_MEDIA, "spd.bin");
- if (!spd_file)
+ spd_data = cbfs_get_file_content(CBFS_DEFAULT_MEDIA, "spd.bin", 0xab,
+ &spd_file_len);
+ if (!spd_data)
die("SPD data not found.");
- if (spd_file->len < (spd_index + 1) * 256)
+ if (spd_file_len < (spd_index + 1) * 256)
die("Missing SPD data.");
- spd_data = (spd_blob *)CBFS_SUBHEADER(spd_file);
// leave onboard dimm address at f0, and copy spd data there.
memcpy(pei_data.spd_data[0], spd_data[spd_index], 256);