summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-11-14 12:57:16 -0700
committerTom Rini <trini@konsulko.com>2019-12-02 18:23:08 -0500
commit3db7110857524cf1b7d0a374c1ebcde8a2680de0 (patch)
tree050b7a36ff3a6fe08b1a5d30e00daf88c4ca5094 /tools
parentb2ea91ba57a2c3d57ec3d681b4058b115a0d3e51 (diff)
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 <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/default_image.c1
-rw-r--r--tools/env/fw_env.c1
-rw-r--r--tools/env/fw_env.h2
-rw-r--r--tools/envcrc.c1
-rw-r--r--tools/mkenvimage.c1
-rw-r--r--tools/mxsimage.c1
-rw-r--r--tools/pbl_crc32.c1
-rw-r--r--tools/pblimage.c1
-rw-r--r--tools/socfpgaimage.c1
9 files changed, 8 insertions, 2 deletions
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 <u-boot/crc.h>
#include <image.h>
#include <tee/optee.h>
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 <sys/types.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
+#include <u-boot/crc.h>
#include <unistd.h>
#include <dirent.h>
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 <stdint.h>
#include <stdlib.h>
#include <string.h>
+#include <u-boot/crc.h>
#include <unistd.h>
#include <linux/kconfig.h>
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 <stdlib.h>
#include <stdint.h>
#include <string.h>
+#include <u-boot/crc.h>
#include <unistd.h>
#include <libgen.h>
#include <sys/types.h>
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 <fcntl.h>
#include <stdio.h>
#include <string.h>
+#include <u-boot/crc.h>
#include <unistd.h>
#include <limits.h>
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 <u-boot/crc.h>
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 <image.h>
#include "pblimage.h"
#include "pbl_crc32.h"
+#include <u-boot/crc.h>
#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 <u-boot/crc.h>
#include <image.h>