diff options
author | Nico Huber <nico.huber@secunet.com> | 2017-06-19 12:18:33 +0200 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2017-06-20 13:27:13 +0200 |
commit | 8d494992176abe0877c88f06fdbc9c8d8826ae87 (patch) | |
tree | f1755cda3f7c271c5510b98d9a11785b715eb360 /ich_descriptors.c | |
parent | e8e7a80e6b876710bebaa9f5a0b6f5e083d47516 (diff) | |
download | flashrom-8d494992176abe0877c88f06fdbc9c8d8826ae87.tar.gz flashrom-8d494992176abe0877c88f06fdbc9c8d8826ae87.tar.bz2 flashrom-8d494992176abe0877c88f06fdbc9c8d8826ae87.zip |
fixup! Make read_ich_descriptors_from_dump() available in flashrom
Add a guard around read_ich_descriptors_via_fdo() which uses raw
hardware access and is only called from `ichspi`.
Fixes linking in case `NEED_RAW_ACCESS != 1`.
Change-Id: I5a35c607df44cdbcbacb960f8922c1bf9f1f2002
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/20265
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'ich_descriptors.c')
-rw-r--r-- | ich_descriptors.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ich_descriptors.c b/ich_descriptors.c index 34100cb5f..a12022c6c 100644 --- a/ich_descriptors.c +++ b/ich_descriptors.c @@ -847,6 +847,8 @@ int getFCBA_component_density(enum ich_chipset cs, const struct ich_descriptors return (1 << (19 + size_enc)); } +/* Only used by ichspi.c */ +#if CONFIG_INTERNAL == 1 && (defined(__i386__) || defined(__x86_64__)) static uint32_t read_descriptor_reg(uint8_t section, uint16_t offset, void *spibar) { uint32_t control = 0; @@ -918,6 +920,7 @@ int read_ich_descriptors_via_fdo(void *spibar, struct ich_descriptors *desc) msg_pdbg2(" done.\n"); return ICH_RET_OK; } +#endif /** * @brief Read a layout from the dump of an Intel ICH descriptor. |