summaryrefslogtreecommitdiffstats
path: root/board
diff options
context:
space:
mode:
authorTim Harvey <tharvey@gateworks.com>2016-05-23 08:25:27 -0700
committerStefano Babic <sbabic@denx.de>2016-05-24 15:01:43 +0200
commita419352daf7a3dd29306d458fd3924e394d3cdc0 (patch)
tree77f409261e499d0b180c0d453612e5a30a1bc7e8 /board
parent3061a5766ac34111929bec81b23e59ddf8a8b1e2 (diff)
downloadtalos-obmc-uboot-a419352daf7a3dd29306d458fd3924e394d3cdc0.tar.gz
talos-obmc-uboot-a419352daf7a3dd29306d458fd3924e394d3cdc0.zip
imx: ventana: gsc: remove dependence on env
remove dependence on getenv() by using global board info struct for model. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Diffstat (limited to 'board')
-rw-r--r--board/gateworks/gw_ventana/gsc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/board/gateworks/gw_ventana/gsc.c b/board/gateworks/gw_ventana/gsc.c
index 3febd1276e..4f26bfd914 100644
--- a/board/gateworks/gw_ventana/gsc.c
+++ b/board/gateworks/gw_ventana/gsc.c
@@ -11,6 +11,7 @@
#include <i2c.h>
#include <linux/ctype.h>
+#include "ventana_eeprom.h"
#include "gsc.h"
/*
@@ -79,7 +80,6 @@ static void read_hwmon(const char *name, uint reg, uint size)
int gsc_info(int verbose)
{
- const char *model = getenv("model");
unsigned char buf[16];
i2c_set_bus_num(0);
@@ -112,7 +112,7 @@ int gsc_info(int verbose)
read_hwmon("VDD_2P5", GSC_HWMON_VDD_2P5, 3);
read_hwmon("VDD_1P8", GSC_HWMON_VDD_1P8, 3);
read_hwmon("VDD_IO2", GSC_HWMON_VDD_IO2, 3);
- switch (model[3]) {
+ switch (ventana_info.model[3]) {
case '1': /* GW51xx */
read_hwmon("VDD_IO3", GSC_HWMON_VDD_IO4, 3); /* -C rev */
break;
OpenPOWER on IntegriCloud