projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rockchip: rk3188: add boot_devices mapping to support 'same-as-spl'
[oweals/u-boot.git]
/
arch
/
arm
/
mach-keystone
/
ddr3_spd.c
diff --git
a/arch/arm/mach-keystone/ddr3_spd.c
b/arch/arm/mach-keystone/ddr3_spd.c
index 261309255280b539c9e425f65ead6cc724bc8fff..6eee9ad13a0b30cad794674c017e753ea92bcae9 100644
(file)
--- a/
arch/arm/mach-keystone/ddr3_spd.c
+++ b/
arch/arm/mach-keystone/ddr3_spd.c
@@
-403,6
+403,7
@@
static void init_ddr3param(struct ddr3_spd_cb *spd_cb,
static int ddr3_read_spd(ddr3_spd_eeprom_t *spd_params)
{
int ret;
static int ddr3_read_spd(ddr3_spd_eeprom_t *spd_params)
{
int ret;
+#ifndef CONFIG_DM_I2C
int old_bus;
i2c_init(CONFIG_SYS_DAVINCI_I2C_SPEED, CONFIG_SYS_DAVINCI_I2C_SLAVE);
int old_bus;
i2c_init(CONFIG_SYS_DAVINCI_I2C_SPEED, CONFIG_SYS_DAVINCI_I2C_SLAVE);
@@
-413,7
+414,13
@@
static int ddr3_read_spd(ddr3_spd_eeprom_t *spd_params)
ret = i2c_read(0x53, 0, 1, (unsigned char *)spd_params, 256);
i2c_set_bus_num(old_bus);
ret = i2c_read(0x53, 0, 1, (unsigned char *)spd_params, 256);
i2c_set_bus_num(old_bus);
+#else
+ struct udevice *dev;
+ ret = i2c_get_chip_for_busnum(1, 0x53, 1, &dev);
+ if (!ret)
+ ret = dm_i2c_read(dev, 0, (unsigned char *)spd_params, 256);
+#endif
if (ret) {
printf("Cannot read DIMM params\n");
return 1;
if (ret) {
printf("Cannot read DIMM params\n");
return 1;