Hi Marek, On Sun, Jan 8, 2012 at 9:06 AM, Marek Vasut <marek.va...@gmail.com> wrote: >> Hi Marek, [snip] >> >> + >> >> +int i2c_set_bus_num(unsigned int bus) >> >> +{ >> >> + if (bus >= CONFIG_SYS_MAX_I2C_BUS) >> >> + return -1; >> >> + i2c_bus_num = bus; >> >> + >> >> + return 0; >> >> +} >> >> +#endif >> > >> > get/set_speed missing ? >> >> This was done during init, so hoping we don't have to do it every time? > > No, but you can use those functions to adjust the speed on the fly (there's > i2c > speed ... command in uboot)
OK I see. I will take a look at implementing i2c_set_bus_speed() and i2c_get_bus_speed(). Regards, Simon >> >> >> diff --git a/include/fdtdec.h b/include/fdtdec.h >> >> index a8911b5..5547676 100644 >> >> --- a/include/fdtdec.h >> >> +++ b/include/fdtdec.h >> >> @@ -58,6 +58,7 @@ struct fdt_memory { >> >> enum fdt_compat_id { >> >> COMPAT_UNKNOWN, >> >> COMPAT_NVIDIA_TEGRA20_USB, /* Tegra2 USB port */ >> >> + COMPAT_NVIDIA_TEGRA20_I2C, /* Tegra2 i2c */ >> >> >> >> COMPAT_COUNT, >> >> }; >> >> diff --git a/lib/fdtdec.c b/lib/fdtdec.c >> >> index 931b4ce..fb3d79d 100644 >> >> --- a/lib/fdtdec.c >> >> +++ b/lib/fdtdec.c >> >> @@ -38,6 +38,7 @@ DECLARE_GLOBAL_DATA_PTR; >> >> static const char * const compat_names[COMPAT_COUNT] = { >> >> COMPAT(UNKNOWN, "<none>"), >> >> COMPAT(NVIDIA_TEGRA20_USB, "nvidia,tegra20-ehci"), >> >> + COMPAT(NVIDIA_TEGRA20_I2C, "nvidia,tegra20-i2c"), >> >> }; >> >> >> >> /** >> > >> > M >> >> Regards, >> Simon _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot