mpc8xxx: call i2c_set_bus_num in __get_spd
This is necessary with the new I2C subystem that was introduced lately.
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/main.c b/arch/powerpc/cpu/mpc8xxx/ddr/main.c
index b9ae950..34d8bc3a 100644
--- a/arch/powerpc/cpu/mpc8xxx/ddr/main.c
+++ b/arch/powerpc/cpu/mpc8xxx/ddr/main.c
@@ -69,7 +69,11 @@
static void __get_spd(generic_spd_eeprom_t *spd, u8 i2c_address)
{
- int ret = i2c_read(i2c_address, 0, 1, (uchar *)spd,
+ int ret;
+
+ i2c_set_bus_num(CONFIG_SYS_SPD_BUS_NUM);
+
+ ret = i2c_read(i2c_address, 0, 1, (uchar *)spd,
sizeof(generic_spd_eeprom_t));
if (ret) {