dm: ppc: MPC8548CDS: add i2c DM support

This supports i2c DM for board MPC8548CDS

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
This commit is contained in:
Biwen Li
2020-05-01 20:56:37 +08:00
committed by Priyanka Jain
parent 70571f981b
commit 01d97d5f18
2 changed files with 10 additions and 2 deletions

View File

@@ -595,6 +595,7 @@ unsigned int get_cpu_board_revision(void)
(void *)&be, sizeof(be));
#else
struct udevice *dev;
int ret;
#ifdef CONFIG_SYS_EEPROM_BUS_NUM
ret = i2c_get_chip_for_busnum(CONFIG_SYS_EEPROM_BUS_NUM,
CONFIG_SYS_I2C_EEPROM_ADDR,
@@ -603,7 +604,7 @@ unsigned int get_cpu_board_revision(void)
#else
ret = i2c_get_chip_for_busnum(0, CONFIG_SYS_I2C_EEPROM_ADDR,
CONFIG_SYS_I2C_EEPROM_ADDR_LEN,
&dev)
&dev);
#endif
if (!ret)
dm_i2c_read(dev, 0, (void *)&be, sizeof(be));