X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=common%2Fcmd_spi.c;h=82cb673f5f97002826f16ad53c14d51c0ae63fda;hb=8bde7f776c77b343aca29b8c7b58464d915ac245;hp=d544b27018889ff2cad5e5bc3b4611a2dbb3e9f5;hpb=eb9401e3ebfa6a1550522be28895af461137f797;p=u-boot diff --git a/common/cmd_spi.c b/common/cmd_spi.c index d544b27018..82cb673f5f 100644 --- a/common/cmd_spi.c +++ b/common/cmd_spi.c @@ -28,7 +28,6 @@ #include #include #include -#include #if (CONFIG_COMMANDS & CFG_CMD_SPI) @@ -107,11 +106,11 @@ int do_spi (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) if ((device < 0) || (device >= spi_chipsel_cnt)) { printf("Invalid device %d, giving up.\n", device); return 1; - } + } if ((bitlen < 0) || (bitlen > (MAX_SPI_BYTES * 8))) { printf("Invalid bitlen %d, giving up.\n", bitlen); return 1; - } + } debug ("spi_chipsel[%d] = %08X\n", device, (uint)spi_chipsel[device]); @@ -130,4 +129,15 @@ int do_spi (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return rcode; } +/***************************************************/ + +cmd_tbl_t U_BOOT_CMD(SPI) = MK_CMD_ENTRY( + "sspi", 5, 1, do_spi, + "sspi - SPI utility commands\n", + " - Send bits from out the SPI\n" + " - Identifies the chip select of the device\n" + " - Number of bits to send (base 10)\n" + " - Hexadecimal string that gets sent\n" +); + #endif /* CFG_CMD_SPI */