aboutsummaryrefslogtreecommitdiff
path: root/drivers/ddr/fsl
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-02-21 11:17:07 -0500
committerTom Rini <trini@konsulko.com>2021-02-21 11:17:07 -0500
commitb732c8780c3f7b47b00bd59e5f6ad7d6ec099d68 (patch)
tree2e4d72720d9254f7ba8be5a981368d77d92f91dc /drivers/ddr/fsl
parent72993e8e03845f82c3ccf7c72f205c9afd8da6d6 (diff)
parent2147a16983d17bcb0438607aa7760494afc27014 (diff)
Merge tag 'for-v2021.04' of https://gitlab.denx.de/u-boot/custodians/u-boot-i2c
i2c changes for v2021.04 new feature: - Allow disabling driver model for I2C in SPL fixes: - i2c-gpio: Fix GPIO output - at91: fix crash when using 'i2c probe'
Diffstat (limited to 'drivers/ddr/fsl')
-rw-r--r--drivers/ddr/fsl/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ddr/fsl/main.c b/drivers/ddr/fsl/main.c
index c02badd4a8..8e147160b9 100644
--- a/drivers/ddr/fsl/main.c
+++ b/drivers/ddr/fsl/main.c
@@ -86,7 +86,7 @@ u8 spd_i2c_addr[CONFIG_SYS_NUM_DDR_CTLRS][CONFIG_DIMM_SLOTS_PER_CTLR] = {
#endif
-#if defined(CONFIG_DM_I2C)
+#if CONFIG_IS_ENABLED(DM_I2C)
#define DEV_TYPE struct udevice
#else
/* Local udevice */
@@ -106,7 +106,7 @@ static int ddr_i2c_read(DEV_TYPE *dev, unsigned int addr,
{
int ret;
-#ifdef CONFIG_DM_I2C
+#if CONFIG_IS_ENABLED(DM_I2C)
ret = dm_i2c_read(dev, 0, buf, len);
#else
ret = i2c_read(dev->chip, addr, alen, buf, len);
@@ -120,7 +120,7 @@ static int ddr_i2c_dummy_write(unsigned int chip_addr)
{
uint8_t buf = 0;
-#ifdef CONFIG_DM_I2C
+#if CONFIG_IS_ENABLED(DM_I2C)
struct udevice *dev;
int ret;
@@ -146,7 +146,7 @@ static void __get_spd(generic_spd_eeprom_t *spd, u8 i2c_address)
int ret;
DEV_TYPE *dev;
-#if defined(CONFIG_DM_I2C)
+#if CONFIG_IS_ENABLED(DM_I2C)
ret = i2c_get_chip_for_busnum(CONFIG_SYS_SPD_BUS_NUM, i2c_address,
1, &dev);
if (ret) {