On 7/5/19 12:46 PM, Ludwig Zenz wrote: [...] > static int setup_dhcom_mac_from_fuse(void) > { > + struct udevice *dev; > unsigned char enetaddr[6]; > int ret; > > @@ -228,13 +142,13 @@ static int setup_dhcom_mac_from_fuse(void) > return 0; > } > > - ret = i2c_set_bus_num(2); > + ret = uclass_first_device_err(UCLASS_I2C_EEPROM, &dev);
What about uclass_find_device_by_of_node() ? Then you can specify a stable fixed hardware path to the EEPROM, and no matter how many EEPROMs someone connects to the board, this code won't be affected. [...] _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot