summaryrefslogtreecommitdiff
path: root/board/freescale/common/vid.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2016-03-22 12:14:27 -0400
committerTom Rini <trini@konsulko.com>2016-03-22 12:14:27 -0400
commit55926ddd189546742a4496e6690c2b62958cd7cd (patch)
tree737b2eb33d373333dafdcaa6d8a55c14e13f7667 /board/freescale/common/vid.c
parenta119357c43a4d4bd0e488a701255bcfea8f8bf6c (diff)
parent6dedcedd6442295428ea7f02b0d30739499858a2 (diff)
Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq
Diffstat (limited to 'board/freescale/common/vid.c')
-rw-r--r--board/freescale/common/vid.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/board/freescale/common/vid.c b/board/freescale/common/vid.c
index 1bd65a8e55..a6a132ab19 100644
--- a/board/freescale/common/vid.c
+++ b/board/freescale/common/vid.c
@@ -454,6 +454,9 @@ int adjust_vdd(ulong vdd_override)
exit:
if (re_enable)
enable_interrupts();
+
+ i2c_multiplexer_select_vid_channel(I2C_MUX_CH_DEFAULT);
+
return ret;
}
@@ -469,7 +472,7 @@ static int print_vdd(void)
ret = find_ir_chip_on_i2c();
if (ret < 0) {
printf("VID: Could not find voltage regulator on I2C.\n");
- return -1;
+ goto exit;
} else {
i2caddress = ret;
debug("VID: IR Chip found on I2C address 0x%02x\n", i2caddress);
@@ -481,11 +484,14 @@ static int print_vdd(void)
vdd_last = read_voltage(i2caddress);
if (vdd_last < 0) {
printf("VID: Couldn't read sensor abort VID adjustment\n");
- return -1;
+ goto exit;
}
printf("VID: Core voltage is at %d mV\n", vdd_last);
+exit:
+ i2c_multiplexer_select_vid_channel(I2C_MUX_CH_DEFAULT);
+
+ return ret < 0 ? -1 : 0;
- return 0;
}
static int do_vdd_override(cmd_tbl_t *cmdtp,