diff options
author | Rajesh Bhagat <rajesh.bhagat@nxp.com> | 2017-09-04 13:11:28 (GMT) |
---|---|---|
committer | Alison Wang <b18965@freescale.com> | 2017-09-07 06:22:48 (GMT) |
commit | bb85ef33612b0dcd508a32e0580490add31f91a1 (patch) | |
tree | c6965e67ba9ac7cb5156580213e0ef3afa36b589 | |
parent | 806bca8b1312ce9277e937152363bc6d6df24223 (diff) | |
download | u-boot-bb85ef33612b0dcd508a32e0580490add31f91a1.tar.xz |
board: common: vid: Move IR chip specific code in flag
Moves IR chip (IR36021) specific code in flag to resolve
compilation issue where it is not present. For example,
LS1088A is having a new LTC3882 voltage chip.
Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
-rw-r--r-- | board/freescale/common/vid.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/board/freescale/common/vid.c b/board/freescale/common/vid.c index 24bdb66..810de17 100644 --- a/board/freescale/common/vid.c +++ b/board/freescale/common/vid.c @@ -41,6 +41,8 @@ int __weak board_adjust_vdd(int vdd) return 0; } +#if defined(CONFIG_VOL_MONITOR_IR36021_SET) || \ + defined(CONFIG_VOL_MONITOR_IR36021_READ) /* * Get the i2c address configuration for the IR regulator chip * @@ -73,6 +75,7 @@ static int find_ir_chip_on_i2c(void) } return -1; } +#endif /* Maximum loop count waiting for new voltage to take effect */ #define MAX_LOOP_WAIT_NEW_VOL 100 @@ -616,6 +619,8 @@ int adjust_vdd(ulong vdd_override) ret = -1; goto exit; } +#if defined(CONFIG_VOL_MONITOR_IR36021_SET) || \ + defined(CONFIG_VOL_MONITOR_IR36021_READ) ret = find_ir_chip_on_i2c(); if (ret < 0) { printf("VID: Could not find voltage regulator on I2C.\n"); @@ -640,6 +645,7 @@ int adjust_vdd(ulong vdd_override) ret = -1; goto exit; } +#endif /* get the voltage ID from fuse status register */ fusesr = in_be32(&gur->dcfg_fusesr); @@ -750,6 +756,8 @@ static int print_vdd(void) debug("VID : I2c failed to switch channel\n"); return -1; } +#if defined(CONFIG_VOL_MONITOR_IR36021_SET) || \ + defined(CONFIG_VOL_MONITOR_IR36021_READ) ret = find_ir_chip_on_i2c(); if (ret < 0) { printf("VID: Could not find voltage regulator on I2C.\n"); @@ -758,6 +766,7 @@ static int print_vdd(void) i2caddress = ret; debug("VID: IR Chip found on I2C address 0x%02x\n", i2caddress); } +#endif /* * Read voltage monitor to check real voltage. |