mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-25 13:14:19 +08:00
tegra: Avoid using I2C prior to relocation
Tegra recently moved to the new I2C framework, which sets up I2C prior to relocation, and prior to calling i2c_init_board(). This causes a crash on Tegra boards. Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
df785a7ffb
commit
cdce889959
@ -453,6 +453,10 @@ void i2c_init_board(void)
|
||||
|
||||
static void tegra_i2c_init(struct i2c_adapter *adap, int speed, int slaveaddr)
|
||||
{
|
||||
/* No i2c support prior to relocation */
|
||||
if (!(gd->flags & GD_FLG_RELOC))
|
||||
return;
|
||||
|
||||
/* This will override the speed selected in the fdt for that port */
|
||||
debug("i2c_init(speed=%u, slaveaddr=0x%x)\n", speed, slaveaddr);
|
||||
i2c_set_bus_speed(speed);
|
||||
|
Loading…
Reference in New Issue
Block a user