]> git.sur5r.net Git - u-boot/commitdiff
MIPS: INCA-IP: rename inca-swap-bytes host tool
authorDaniel Schwierzeck <daniel.schwierzeck@googlemail.com>
Wed, 27 Jul 2011 11:22:36 +0000 (13:22 +0200)
committerShinya Kuribayashi <skuribay@pobox.com>
Sun, 31 Jul 2011 14:25:41 +0000 (23:25 +0900)
The INCA-IP SoC belongs to the Lantiq XWAY SoC product portfolio.
For the upcoming support of other Lantiq SoC devices this tool should
not solely depend on the INCA-IP board.

Rename the tool to xway-swap-bytes and add an config option
to enable compilation optionally.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
Acked-by: Thomas Langer <thomas.langer@lantiq.com>
Signed-off-by: Shinya Kuribayashi <skuribay@pobox.com>
include/configs/incaip.h
tools/Makefile
tools/inca-swap-bytes.c [deleted file]
tools/xway-swap-bytes.c [new file with mode: 0644]

index f2950e8d5bc96603ff348bce09696f396af5bdf1..57eb2fa6ad451a4e37a605778838b0bd3910c4ee 100644 (file)
@@ -31,6 +31,8 @@
 #define CONFIG_MIPS32          1       /* MIPS 4Kc CPU core    */
 #define CONFIG_INCA_IP         1       /* on a INCA-IP Board   */
 
+#define CONFIG_XWAY_SWAP_BYTES
+
 /*
  * Clock for the MIPS core (MHz)
  * allowed values: 100000000, 133000000, and 150000000 (default)
index 9733db42e39004c3d0953f96871ff8743054a3a5..e813e1dd56b8b782c86303cf2223afb4af1403a0 100644 (file)
@@ -43,7 +43,7 @@ ifneq ($(HOST_TOOLS_ALL),)
 CONFIG_LCD_LOGO = y
 CONFIG_CMD_LOADS = y
 CONFIG_CMD_NET = y
-CONFIG_INCA_IP = y
+CONFIG_XWAY_SWAP_BYTES = y
 CONFIG_NETCONSOLE = y
 CONFIG_SHA1_CHECK_UB_IMG = y
 endif
@@ -65,7 +65,7 @@ BIN_FILES-$(CONFIG_VIDEO_LOGO) += bmp_logo$(SFX)
 BIN_FILES-$(CONFIG_BUILD_ENVCRC) += envcrc$(SFX)
 BIN_FILES-$(CONFIG_CMD_NET) += gen_eth_addr$(SFX)
 BIN_FILES-$(CONFIG_CMD_LOADS) += img2srec$(SFX)
-BIN_FILES-$(CONFIG_INCA_IP) += inca-swap-bytes$(SFX)
+BIN_FILES-$(CONFIG_XWAY_SWAP_BYTES) += xway-swap-bytes$(SFX)
 BIN_FILES-y += mkimage$(SFX)
 BIN_FILES-$(CONFIG_NETCONSOLE) += ncb$(SFX)
 BIN_FILES-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1$(SFX)
@@ -85,7 +85,7 @@ OBJ_FILES-$(CONFIG_BUILD_ENVCRC) += envcrc.o
 NOPED_OBJ_FILES-y += fit_image.o
 OBJ_FILES-$(CONFIG_CMD_NET) += gen_eth_addr.o
 OBJ_FILES-$(CONFIG_CMD_LOADS) += img2srec.o
-OBJ_FILES-$(CONFIG_INCA_IP) += inca-swap-bytes.o
+OBJ_FILES-$(CONFIG_XWAY_SWAP_BYTES) += xway-swap-bytes.o
 NOPED_OBJ_FILES-y += kwbimage.o
 NOPED_OBJ_FILES-y += imximage.o
 NOPED_OBJ_FILES-y += mkimage.o
@@ -179,7 +179,7 @@ $(obj)img2srec$(SFX):       $(obj)img2srec.o
        $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
        $(HOSTSTRIP) $@
 
-$(obj)inca-swap-bytes$(SFX):   $(obj)inca-swap-bytes.o
+$(obj)xway-swap-bytes$(SFX):   $(obj)xway-swap-bytes.o
        $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
        $(HOSTSTRIP) $@
 
diff --git a/tools/inca-swap-bytes.c b/tools/inca-swap-bytes.c
deleted file mode 100644 (file)
index 3a6d82d..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#ifndef BUFSIZ
-# define BUFSIZ 4096
-#endif
-
-#undef BUFSIZ
-# define BUFSIZ 64
-int main (void)
-{
-       short ibuff[BUFSIZ], obuff[BUFSIZ];
-       int rc, i, len;
-
-       while ((rc = read (0, ibuff, sizeof (ibuff))) > 0) {
-               memset (obuff, 0, sizeof (obuff));
-               for (i = 0; i < (rc + 1) / 2; i++) {
-                       obuff[i] = ibuff[i ^ 1];
-               }
-
-               len = (rc + 1) & ~1;
-
-               if (write (1, obuff, len) != len) {
-                       perror ("read error");
-                       return (EXIT_FAILURE);
-               }
-
-               memset (ibuff, 0, sizeof (ibuff));
-       }
-
-       if (rc < 0) {
-               perror ("read error");
-               return (EXIT_FAILURE);
-       }
-       return (EXIT_SUCCESS);
-}
diff --git a/tools/xway-swap-bytes.c b/tools/xway-swap-bytes.c
new file mode 100644 (file)
index 0000000..3a6d82d
--- /dev/null
@@ -0,0 +1,38 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#ifndef BUFSIZ
+# define BUFSIZ 4096
+#endif
+
+#undef BUFSIZ
+# define BUFSIZ 64
+int main (void)
+{
+       short ibuff[BUFSIZ], obuff[BUFSIZ];
+       int rc, i, len;
+
+       while ((rc = read (0, ibuff, sizeof (ibuff))) > 0) {
+               memset (obuff, 0, sizeof (obuff));
+               for (i = 0; i < (rc + 1) / 2; i++) {
+                       obuff[i] = ibuff[i ^ 1];
+               }
+
+               len = (rc + 1) & ~1;
+
+               if (write (1, obuff, len) != len) {
+                       perror ("read error");
+                       return (EXIT_FAILURE);
+               }
+
+               memset (ibuff, 0, sizeof (ibuff));
+       }
+
+       if (rc < 0) {
+               perror ("read error");
+               return (EXIT_FAILURE);
+       }
+       return (EXIT_SUCCESS);
+}