[PATCH 1/2] omap3-usb-loader: Fix compilation

Sascha Hauer s.hauer at pengutronix.de
Wed Jan 10 06:17:11 PST 2024


Since a4a04ec768e ("scripts: common: fix read_file_2 for windows")
common.c includes compiler.h which defines cpu_to_le32 and friends
which are also defined in omap3-usb-loader.c. Drop the duplicated
definitions from omap3-usb-loader.c to make it compile again.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 scripts/omap3-usb-loader.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/scripts/omap3-usb-loader.c b/scripts/omap3-usb-loader.c
index 31a03be8e7..d9422a0916 100644
--- a/scripts/omap3-usb-loader.c
+++ b/scripts/omap3-usb-loader.c
@@ -19,10 +19,6 @@
 #define PROG_NAME "OMAP Loader"
 #define VERSION "1.0.0"
 
-#if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
-#define OMAP_IS_BIG_ENDIAN
-#endif
-
 #include <unistd.h>		/* for usleep and friends */
 #include <getopt.h>
 #include <errno.h>
@@ -46,15 +42,6 @@
 #define OMAP_USB_BULK_OUT 0x01
 #define OMAP_ASIC_ID_LEN 69
 
-#ifdef OMAP_IS_BIG_ENDIAN
-#define cpu_to_le32(v) (((v & 0xff) << 24) | ((v & 0xff00) << 8) | \
-    ((v & 0xff0000) >> 8) | ((v & 0xff000000) >> 24))
-#define le32_to_cpu(v) cpu_to_le32(v)
-#else
-#define cpu_to_le32(v) (v)
-#define le32_to_cpu(v) (v)
-#endif
-
 /*
  * taken from x-loader/drivers/usb/usb.c
  * All credit to Martin Mueller

-- 
2.39.2




More information about the barebox mailing list