summaryrefslogtreecommitdiff
path: root/board/gateworks
diff options
context:
space:
mode:
authorTim Harvey <tharvey@gateworks.com>2016-05-24 11:03:52 -0700
committerStefano Babic <sbabic@denx.de>2016-05-31 17:24:46 +0200
commitca628b74c97f3a6620e6f18aad5f917d51c2cdda (patch)
treee2035d7e106c120f104c05570fee44784c585c54 /board/gateworks
parent82a17e75da0d812c2e583e733efd1e67e7488933 (diff)
imx: ventana: gsc: show board temp on boot
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Diffstat (limited to 'board/gateworks')
-rw-r--r--board/gateworks/gw_ventana/gsc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/board/gateworks/gw_ventana/gsc.c b/board/gateworks/gw_ventana/gsc.c
index c626ba25e7..042f55ab73 100644
--- a/board/gateworks/gw_ventana/gsc.c
+++ b/board/gateworks/gw_ventana/gsc.c
@@ -98,6 +98,12 @@ int gsc_info(int verbose)
gsc_i2c_write(GSC_SC_ADDR, GSC_SC_STATUS, 1,
&buf[GSC_SC_STATUS], 1);
}
+ if (!gsc_i2c_read(GSC_HWMON_ADDR, GSC_HWMON_TEMP, 1, buf, 2)) {
+ int ui = buf[0] | buf[1]<<8;
+ if (ui > 0x8000)
+ ui -= 0xffff;
+ printf(" board temp at %dC", ui / 10);
+ }
puts("\n");
if (!verbose)
return CMD_RET_SUCCESS;