Index: common/cmd_i2c.c =================================================================== RCS file: /home/cvsroot/Projects/u-boot/common/cmd_i2c.c,v retrieving revision 1.1.1.4 diff -p -u -r1.1.1.4 cmd_i2c.c --- common/cmd_i2c.c 11 Dec 2006 17:17:33 -0000 1.1.1.4 +++ common/cmd_i2c.c 25 Feb 2007 01:04:55 -0000 @@ -901,13 +901,23 @@ int do_i2c_bus_speed(cmd_tbl_t * cmdtp, { int speed, ret=0; - if (argc == 1) + if (argc == 1) { /* querying current speed */ - printf("Current bus speed=%d\n", i2c_get_bus_speed()); - else { +#ifdef CONFIG_SOFT_I2C + speed = CFG_I2C_SPEED; +#else + speed = i2c_get_bus_speed(); +#endif + printf("Current bus speed=%d\n", speed); + } else { +#ifdef CONFIG_SOFT_I2C + printf("Setting bus speed is not supported for soft i2c\n"); + ret = 1; +#else speed = simple_strtoul(argv[1], NULL, 10); printf("Setting bus speed to %d Hz\n", speed); ret = i2c_set_bus_speed(speed); +#endif if (ret) printf("Failure changing bus speed (%d)\n", ret); }