+ struct udevice *dev;
+ int read_len = min(256, (int)sizeof(generic_spd_eeprom_t) - 256);
+
+ ret = i2c_get_chip_for_busnum(0, SPD_SPA0_ADDRESS, 1, &dev);
+ if (!ret)
+ dm_i2c_write(dev, 0, &dummy, 1);
+ ret = i2c_get_chip_for_busnum(0, i2c_address, 1, &dev);
+ if (!ret) {
+ if (!dm_i2c_read(dev, 0, (uchar *)spd, 256)) {
+ if (!i2c_get_chip_for_busnum(0, SPD_SPA1_ADDRESS,
+ 1, &dev))
+ dm_i2c_write(dev, 0, &dummy, 1);
+ if (!i2c_get_chip_for_busnum(0, i2c_address, 1, &dev))
+ ret = dm_i2c_read(dev, 0,
+ (uchar *)((ulong)spd + 256),
+ read_len);
+ }
+ }
+#endif
+
+#else
+
+#ifndef CONFIG_DM_I2C