From 3db7110857524cf1b7d0a374c1ebcde8a2680de0 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 14 Nov 2019 12:57:16 -0700 Subject: crc32: Use the crc.h header for crc functions Drop inclusion of crc.h in common.h and use the correct header directly instead. With this we can drop the conflicting definition in fw_env.h and rely on the crc.h header, which is already included. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- tools/default_image.c | 1 + tools/env/fw_env.c | 1 + tools/env/fw_env.h | 2 -- tools/envcrc.c | 1 + tools/mkenvimage.c | 1 + tools/mxsimage.c | 1 + tools/pbl_crc32.c | 1 + tools/pblimage.c | 1 + tools/socfpgaimage.c | 1 + 9 files changed, 8 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/default_image.c b/tools/default_image.c index f7990e28c0..e164c0c27d 100644 --- a/tools/default_image.c +++ b/tools/default_image.c @@ -15,6 +15,7 @@ #include "imagetool.h" #include "mkimage.h" +#include #include #include diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c index e2801f595f..30b5a190ab 100644 --- a/tools/env/fw_env.c +++ b/tools/env/fw_env.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h index 3d2b457b31..b60fbfc8f8 100644 --- a/tools/env/fw_env.h +++ b/tools/env/fw_env.h @@ -160,5 +160,3 @@ int fw_env_close(struct env_opts *opts); * version string of the library */ char *fw_env_version(void); - -unsigned long crc32(unsigned long, const unsigned char *, unsigned); diff --git a/tools/envcrc.c b/tools/envcrc.c index 6e43608027..bce7790247 100644 --- a/tools/envcrc.c +++ b/tools/envcrc.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include diff --git a/tools/mkenvimage.c b/tools/mkenvimage.c index a8eebab6c3..b05f83415f 100644 --- a/tools/mkenvimage.c +++ b/tools/mkenvimage.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/tools/mxsimage.c b/tools/mxsimage.c index 0bb5c6aa6b..002f4b525a 100644 --- a/tools/mxsimage.c +++ b/tools/mxsimage.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include diff --git a/tools/pbl_crc32.c b/tools/pbl_crc32.c index 06da1d92ff..9b1ca55348 100644 --- a/tools/pbl_crc32.c +++ b/tools/pbl_crc32.c @@ -5,6 +5,7 @@ * Cleaned up and refactored by Charles Manning. */ #include "pblimage.h" +#include static uint32_t crc_table[256]; static int crc_table_valid; diff --git a/tools/pblimage.c b/tools/pblimage.c index d11f9afe24..3c823e96cf 100644 --- a/tools/pblimage.c +++ b/tools/pblimage.c @@ -6,6 +6,7 @@ #include #include "pblimage.h" #include "pbl_crc32.h" +#include #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) #define PBL_ACS_CONT_CMD 0x81000000 diff --git a/tools/socfpgaimage.c b/tools/socfpgaimage.c index 72d8b96f54..8fa098338b 100644 --- a/tools/socfpgaimage.c +++ b/tools/socfpgaimage.c @@ -55,6 +55,7 @@ #include "pbl_crc32.h" #include "imagetool.h" #include "mkimage.h" +#include #include -- cgit v1.2.3