ARC: HSDK-4xD: tweak memory map
[oweals/u-boot.git] / cmd / i2c.c
index 56df8eb3bca589e28c5bf23976a41a5652f342f7..43a76299b3c82ad197ea466909f25153fc469ce2 100644 (file)
--- a/cmd/i2c.c
+++ b/cmd/i2c.c
 #include <console.h>
 #include <dm.h>
 #include <edid.h>
-#include <environment.h>
 #include <errno.h>
 #include <i2c.h>
 #include <malloc.h>
 #include <asm/byteorder.h>
 #include <linux/compiler.h>
+#include <u-boot/crc.h>
 
 /* Display values from last command.
  * Memory modify remembered values are different from display memory.
@@ -769,7 +769,7 @@ static int do_i2c_crc (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]
 #endif
                if (ret)
                        err++;
-               crc = crc32 (crc, &byte, 1);
+               crc = crc32(crc, &byte, 1);
                addr++;
        }
        if (err > 0)
@@ -2023,6 +2023,7 @@ static int do_i2c(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
 static char i2c_help_text[] =
 #if defined(CONFIG_SYS_I2C) || defined(CONFIG_DM_I2C)
        "bus [muxtype:muxaddr:muxchannel] - show I2C bus info\n"
+       "i2c " /* That's the prefix for the crc32 command below. */
 #endif
        "crc32 chip address[.0, .1, .2] count - compute CRC32 checksum\n"
 #if defined(CONFIG_SYS_I2C) || \