diff options
author | hailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2009-08-19 13:27:58 +0000 |
---|---|---|
committer | hailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2009-08-19 13:27:58 +0000 |
commit | 96fbb9d7a6c6c0d92dc01eb617ec8929f679294b (patch) | |
tree | 78525e6b9821679dbf87c69dc56c8af7182e04c2 /ft2232_spi.c | |
parent | 1c199d351e7f983fce1cc48c215594957a39b861 (diff) | |
download | flashrom-96fbb9d7a6c6c0d92dc01eb617ec8929f679294b.tar.gz |
If FT2232H SPI is not enabled, it should be compiled out completely. We
can't remove ft2232_spi.o from unconditional OBJS yet due to our
makefile structure (make features), but this patch adds #ifdefs around
all FT2232H code, so the net effect is the same.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@691 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'ft2232_spi.c')
-rw-r--r-- | ft2232_spi.c | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/ft2232_spi.c b/ft2232_spi.c index db4db17..00490fe 100644 --- a/ft2232_spi.c +++ b/ft2232_spi.c @@ -18,6 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#if FT2232_SPI_SUPPORT == 1 + #include <stdio.h> #include <stdint.h> #include <string.h> @@ -25,9 +27,6 @@ #include <ctype.h> #include "flash.h" #include "spi.h" - -#if FT2232_SPI_SUPPORT == 1 - #include <ftdi.h> /* the 'H' chips can run internally at either 12Mhz or 60Mhz. @@ -297,29 +296,4 @@ int ft2232_spi_write_256(struct flashchip *flash, uint8_t *buf) return 0; } -#else -int ft2232_spi_init(void) -{ - fprintf(stderr, "FT2232 SPI support was not compiled in\n"); - exit(1); -} - -int ft2232_spi_send_command(unsigned int writecnt, unsigned int readcnt, - const unsigned char *writearr, unsigned char *readarr) -{ - fprintf(stderr, "FT2232 SPI support was not compiled in\n"); - exit(1); -} - -int ft2232_spi_read(struct flashchip *flash, uint8_t *buf, int start, int len) -{ - fprintf(stderr, "FT2232 SPI support was not compiled in\n"); - exit(1); -} - -int ft2232_spi_write_256(struct flashchip *flash, uint8_t *buf) -{ - fprintf(stderr, "FT2232 SPI support was not compiled in\n"); - exit(1); -} #endif |