diff options
Diffstat (limited to 'board/freescale/ls1088a/ls1088a.c')
-rw-r--r-- | board/freescale/ls1088a/ls1088a.c | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/board/freescale/ls1088a/ls1088a.c b/board/freescale/ls1088a/ls1088a.c index 2ba6a3990d..e76ea01914 100644 --- a/board/freescale/ls1088a/ls1088a.c +++ b/board/freescale/ls1088a/ls1088a.c @@ -379,7 +379,7 @@ int select_i2c_ch_pca9547(u8 ch) { int ret; -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) ret = i2c_write(I2C_MUX_PCA_ADDR_PRI, 0, 1, &ch, 1); #else struct udevice *dev; @@ -406,7 +406,7 @@ void board_retimer_init(void) /* Access to Control/Shared register */ reg = 0x0; -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) i2c_write(I2C_RETIMER_ADDR, 0xff, 1, ®, 1); #else struct udevice *dev; @@ -416,7 +416,7 @@ void board_retimer_init(void) #endif /* Read device revision and ID */ -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) i2c_read(I2C_RETIMER_ADDR, 1, 1, ®, 1); #else dm_i2c_read(dev, 1, ®, 1); @@ -425,20 +425,20 @@ void board_retimer_init(void) /* Enable Broadcast. All writes target all channel register sets */ reg = 0x0c; -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) i2c_write(I2C_RETIMER_ADDR, 0xff, 1, ®, 1); #else dm_i2c_write(dev, 0xff, ®, 1); #endif /* Reset Channel Registers */ -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) i2c_read(I2C_RETIMER_ADDR, 0, 1, ®, 1); #else dm_i2c_read(dev, 0, ®, 1); #endif reg |= 0x4; -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) i2c_write(I2C_RETIMER_ADDR, 0, 1, ®, 1); #else dm_i2c_write(dev, 0, ®, 1); @@ -446,45 +446,45 @@ void board_retimer_init(void) /* Set data rate as 10.3125 Gbps */ reg = 0x90; -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) i2c_write(I2C_RETIMER_ADDR, 0x60, 1, ®, 1); #else dm_i2c_write(dev, 0x60, ®, 1); #endif reg = 0xb3; -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) i2c_write(I2C_RETIMER_ADDR, 0x61, 1, ®, 1); #else dm_i2c_write(dev, 0x61, ®, 1); #endif reg = 0x90; -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) i2c_write(I2C_RETIMER_ADDR, 0x62, 1, ®, 1); #else dm_i2c_write(dev, 0x62, ®, 1); #endif reg = 0xb3; -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) i2c_write(I2C_RETIMER_ADDR, 0x63, 1, ®, 1); #else dm_i2c_write(dev, 0x63, ®, 1); #endif reg = 0xcd; -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) i2c_write(I2C_RETIMER_ADDR, 0x64, 1, ®, 1); #else dm_i2c_write(dev, 0x64, ®, 1); #endif /* Select VCO Divider to full rate (000) */ -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) i2c_read(I2C_RETIMER_ADDR, 0x2F, 1, ®, 1); #else dm_i2c_read(dev, 0x2F, ®, 1); #endif reg &= 0x0f; reg |= 0x70; -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) i2c_write(I2C_RETIMER_ADDR, 0x2F, 1, ®, 1); #else dm_i2c_write(dev, 0x2F, ®, 1); @@ -496,7 +496,7 @@ void board_retimer_init(void) /* Access to Control/Shared register */ reg = 0x0; -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) i2c_write(I2C_RETIMER_ADDR2, 0xff, 1, ®, 1); #else i2c_get_chip_for_busnum(0, I2C_RETIMER_ADDR2, 1, &dev); @@ -504,7 +504,7 @@ void board_retimer_init(void) #endif /* Read device revision and ID */ -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) i2c_read(I2C_RETIMER_ADDR2, 1, 1, ®, 1); #else dm_i2c_read(dev, 1, ®, 1); @@ -513,20 +513,20 @@ void board_retimer_init(void) /* Enable Broadcast. All writes target all channel register sets */ reg = 0x0c; -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) i2c_write(I2C_RETIMER_ADDR2, 0xff, 1, ®, 1); #else dm_i2c_write(dev, 0xff, ®, 1); #endif /* Reset Channel Registers */ -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) i2c_read(I2C_RETIMER_ADDR2, 0, 1, ®, 1); #else dm_i2c_read(dev, 0, ®, 1); #endif reg |= 0x4; -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) i2c_write(I2C_RETIMER_ADDR2, 0, 1, ®, 1); #else dm_i2c_write(dev, 0, ®, 1); @@ -534,45 +534,45 @@ void board_retimer_init(void) /* Set data rate as 10.3125 Gbps */ reg = 0x90; -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) i2c_write(I2C_RETIMER_ADDR2, 0x60, 1, ®, 1); #else dm_i2c_write(dev, 0x60, ®, 1); #endif reg = 0xb3; -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) i2c_write(I2C_RETIMER_ADDR2, 0x61, 1, ®, 1); #else dm_i2c_write(dev, 0x61, ®, 1); #endif reg = 0x90; -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) i2c_write(I2C_RETIMER_ADDR2, 0x62, 1, ®, 1); #else dm_i2c_write(dev, 0x62, ®, 1); #endif reg = 0xb3; -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) i2c_write(I2C_RETIMER_ADDR2, 0x63, 1, ®, 1); #else dm_i2c_write(dev, 0x63, ®, 1); #endif reg = 0xcd; -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) i2c_write(I2C_RETIMER_ADDR2, 0x64, 1, ®, 1); #else dm_i2c_write(dev, 0x64, ®, 1); #endif /* Select VCO Divider to full rate (000) */ -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) i2c_read(I2C_RETIMER_ADDR2, 0x2F, 1, ®, 1); #else dm_i2c_read(dev, 0x2F, ®, 1); #endif reg &= 0x0f; reg |= 0x70; -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) i2c_write(I2C_RETIMER_ADDR2, 0x2F, 1, ®, 1); #else dm_i2c_write(dev, 0x2F, ®, 1); @@ -640,7 +640,7 @@ int get_serdes_volt(void) u8 chan = PWM_CHANNEL0; /* Select the PAGE 0 using PMBus commands PAGE for VDD */ -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) ret = i2c_write(I2C_SVDD_MONITOR_ADDR, PMBUS_CMD_PAGE, 1, &chan, 1); #else @@ -658,7 +658,7 @@ int get_serdes_volt(void) } /* Read the output voltage using PMBus command READ_VOUT */ -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) ret = i2c_read(I2C_SVDD_MONITOR_ADDR, PMBUS_CMD_READ_VOUT, 1, (void *)&vcode, 2); #else @@ -679,7 +679,7 @@ int set_serdes_volt(int svdd) svdd & 0xFF, (svdd & 0xFF00) >> 8}; /* Write the desired voltage code to the SVDD regulator */ -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) ret = i2c_write(I2C_SVDD_MONITOR_ADDR, PMBUS_CMD_PAGE_PLUS_WRITE, 1, (void *)&buff, 5); #else @@ -720,7 +720,7 @@ int set_serdes_volt(int svdd) printf("SVDD changing of RDB\n"); /* Read the BRDCFG54 via CLPD */ -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) ret = i2c_read(CONFIG_SYS_I2C_FPGA_ADDR, QIXIS_BRDCFG4_OFFSET, 1, (void *)&brdcfg4, 1); #else @@ -740,7 +740,7 @@ int set_serdes_volt(int svdd) brdcfg4 = brdcfg4 | 0x08; /* Write to the BRDCFG4 */ -#ifndef CONFIG_DM_I2C +#if !CONFIG_IS_ENABLED(DM_I2C) ret = i2c_write(CONFIG_SYS_I2C_FPGA_ADDR, QIXIS_BRDCFG4_OFFSET, 1, (void *)&brdcfg4, 1); #else |