]> git.sur5r.net Git - u-boot/blobdiff - common/cmd_spi.c
85xx: Use print_size to report amount of memory not mapped by TLBs
[u-boot] / common / cmd_spi.c
index 40ee7e7dd3c7daa08270fbfc72d0d7967d92077c..746d14f21ac3bb31b08d34d8cbe7dac2a0e98b15 100644 (file)
@@ -123,9 +123,8 @@ int do_spi (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                printf("Error with the SPI transaction.\n");
                rcode = 1;
        } else {
-               cp = (char *)din;
                for(j = 0; j < ((bitlen + 7) / 8); j++) {
-                       printf("%02X", *cp++);
+                       printf("%02X", din[j]);
                }
                printf("\n");
        }
@@ -139,7 +138,7 @@ 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",
+       "SPI utility commands",
        "<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"