/* The SDRAM command is separately configured because many (most?) embedded boards don't use SDRAM DIMMs.  */
int do_i2c_bus_speed(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
/* The SDRAM command is separately configured because many (most?) embedded boards don't use SDRAM DIMMs.  */
int do_i2c_bus_speed(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
	int speed, ret=0;
	if (argc == 1)
		printf("Current bus speed=%d\n", i2c_get_bus_speed());
	else {
		speed = simple_strtoul(argv[1], NULL, 10);
		printf("Setting bus speed to %d Hz\n", speed);
		ret = i2c_set_bus_speed(speed);
		if (ret)
			printf("Failure changing bus speed (%d)\n", ret);
	}
	return ret;
}