From 6be741114d95dcb9b8d783c114999b0e8b8b802d Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Wed, 12 Aug 2009 16:17:41 +0000 Subject: Allow to compile out serprog completely If CONFIG_SERPROG is not set, no stubs and no data of serprog will remain. Side benefit: This kills a few dozen lines of code. r678, r679 and r680 made this possible. Once "Only list available programers in usage()" is committed, even the usage message will be adjusted automatically. Corresponding to flashrom svn r681. Signed-off-by: Carl-Daniel Hailfinger Acked-by: Stefan Reinauer --- serprog.c | 42 ------------------------------------------ 1 file changed, 42 deletions(-) (limited to 'serprog.c') diff --git a/serprog.c b/serprog.c index d76cbe5..23e1a0c 100644 --- a/serprog.c +++ b/serprog.c @@ -23,9 +23,6 @@ #include #include #include "flash.h" - -#if SERPROG_SUPPORT == 1 - #include #include #include @@ -774,42 +771,3 @@ void serprog_delay(int delay) sp_opbuf_usage += 5; sp_prev_was_write = 0; } - -#else - -int serprog_init(void) -{ - fprintf(stderr, "Serial programmer support was not compiled in\n"); - exit(1); -} - -int serprog_shutdown(void) -{ - fprintf(stderr, "Serial programmer support was not compiled in\n"); - exit(1); -} - -void serprog_chip_writeb(uint8_t val, chipaddr addr) -{ - fprintf(stderr, "Serial programmer support was not compiled in\n"); - exit(1); -} - -uint8_t serprog_chip_readb(const chipaddr addr) -{ - fprintf(stderr, "Serial programmer support was not compiled in\n"); - exit(1); -} - -void serprog_chip_readn(uint8_t *buf, const chipaddr addr, size_t len) -{ - fprintf(stderr, "Serial programmer support was not compiled in\n"); - exit(1); -} - -void serprog_delay(int delay) -{ - fprintf(stderr, "Serial programmer support was not compiled in\n"); - exit(1); -} -#endif -- cgit v1.1