Skip to content
Snippets Groups Projects
cmd_i2c.c 27.8 KiB
Newer Older
  • Learn to ignore specific revisions
  • }
    #endif  /* CONFIG_I2C_CMD_TREE */
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    
    /***************************************************/
    
    
    U_BOOT_CMD(
    	imd,	4,	1,	do_i2c_md,		\
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    	"imd     - i2c memory display\n",				\
    	"chip address[.0, .1, .2] [# of objects]\n    - i2c memory display\n" \
    );
    
    
    U_BOOT_CMD(
     	imm,	3,	1,	do_i2c_mm,
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    	"imm     - i2c memory modify (auto-incrementing)\n",
    	"chip address[.0, .1, .2]\n"
    	"    - memory modify, auto increment address\n"
    );
    
    U_BOOT_CMD(
    	inm,	3,	1,	do_i2c_nm,
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    	"inm     - memory modify (constant address)\n",
    	"chip address[.0, .1, .2]\n    - memory modify, read and keep address\n"
    );
    
    
    U_BOOT_CMD(
    	imw,	5,	1,	do_i2c_mw,
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    	"imw     - memory write (fill)\n",
    	"chip address[.0, .1, .2] value [count]\n    - memory write (fill)\n"
    );
    
    
    U_BOOT_CMD(
    	icrc32,	5,	1,	do_i2c_crc,
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    	"icrc32  - checksum calculation\n",
    	"chip address[.0, .1, .2] count\n    - compute CRC32 checksum\n"
    );
    
    
    U_BOOT_CMD(
    	iprobe,	1,	1,	do_i2c_probe,
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    	"iprobe  - probe to discover valid I2C chip addresses\n",
    	"\n    -discover valid I2C chip addresses\n"
    );
    
    /*
     * Require full name for "iloop" because it is an infinite loop!
     */
    
    U_BOOT_CMD(
    	iloop,	5,	1,	do_i2c_loop,
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    	"iloop   - infinite loop on address range\n",
    	"chip address[.0, .1, .2] [# of objects]\n"
    	"    - loop, reading a set of addresses\n"
    );
    
    #if (CONFIG_COMMANDS & CFG_CMD_SDRAM)
    
    U_BOOT_CMD(
    	isdram,	2,	1,	do_sdram,
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    	"isdram  - print SDRAM configuration information\n",
    	"chip\n    - print SDRAM configuration information\n"
    	"      (valid chip values 50..57)\n"
    );
    #endif
    
    
    #if defined(CONFIG_I2C_CMD_TREE)
    U_BOOT_CMD(
    	i2c, 6, 1, do_i2c,
     	"i2c     - I2C sub-system\n",
    #if defined(CONFIG_I2C_MULTI_BUS)
    	"dev [dev] - show or set current I2C bus\n"
    #endif  /* CONFIG_I2C_MULTI_BUS */
    	"i2c speed [speed] - show or set I2C bus speed\n"
    	"i2c md chip address[.0, .1, .2] [# of objects] - read from I2C device\n"
    	"i2c mm chip address[.0, .1, .2] - write to I2C device (auto-incrementing)\n"
    	"i2c mw chip address[.0, .1, .2] value [count] - write to I2C device (fill)\n"
    	"i2c nm chip address[.0, .1, .2] - write to I2C device (constant address)\n"
    	"i2c crc32 chip address[.0, .1, .2] count - compute CRC32 checksum\n"
    	"i2c probe - show devices on the I2C bus\n"
    	"i2c loop chip address[.0, .1, .2] [# of objects] - looping read of device\n"
    #if (CONFIG_COMMANDS & CFG_CMD_SDRAM)
    	"i2c sdram chip - print SDRAM configuration information\n"
    #endif  /* CFG_CMD_SDRAM */
    );
    #endif  /* CONFIG_I2C_CMD_TREE */
    
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    #endif	/* CFG_CMD_I2C */