]> git.sur5r.net Git - u-boot/blobdiff - common/cmd_spi.c
ColdFire 54455: Fix correct boot location for atmel and intel
[u-boot] / common / cmd_spi.c
index 3335a1406777846291392f8a19eb3dcce20f63c5..3118d279b97dcea25658f561b06d6b1bfde7ff29 100644 (file)
@@ -29,7 +29,7 @@
 #include <command.h>
 #include <spi.h>
 
-#if (CONFIG_COMMANDS & CFG_CMD_SPI)
+#if defined(CONFIG_CMD_SPI)
 
 /*-----------------------------------------------------------------------
  * Definitions
@@ -119,7 +119,7 @@ int do_spi (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                printf("Error with the SPI transaction.\n");
                rcode = 1;
        } else {
-               cp = din;
+               cp = (char *)din;
                for(j = 0; j < ((bitlen + 7) / 8); j++) {
                        printf("%02X", *cp++);
                }
@@ -133,11 +133,11 @@ int do_spi (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 
 U_BOOT_CMD(
        sspi,   5,      1,      do_spi,
-       "sspi     - SPI utility commands\n",
+       "sspi    - SPI utility commands\n",
        "<device> <bit_len> <dout> - Send <bit_len> bits from <dout> out the SPI\n"
        "<device>  - Identifies the chip select of the device\n"
        "<bit_len> - Number of bits to send (base 10)\n"
        "<dout>    - Hexadecimal string that gets sent\n"
 );
 
-#endif /* CFG_CMD_SPI */
+#endif