public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tim Harvey <tharvey@gateworks.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/4] imx: ventana: gsc: remove dependence on env
Date: Mon, 23 May 2016 08:25:27 -0700	[thread overview]
Message-ID: <1464017129-24130-3-git-send-email-tharvey@gateworks.com> (raw)
In-Reply-To: <1464017129-24130-1-git-send-email-tharvey@gateworks.com>

remove dependence on getenv() by using global board info struct for model.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
 board/gateworks/gw_ventana/gsc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/board/gateworks/gw_ventana/gsc.c b/board/gateworks/gw_ventana/gsc.c
index 3febd12..4f26bfd 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;
-- 
1.9.1

  parent reply	other threads:[~2016-05-23 15:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-23 15:25 [U-Boot] [PATCH 0/4] Fix Gateworks Ventana build Tim Harvey
2016-05-23 15:25 ` [U-Boot] [PATCH 1/4] imx: ventana: config: remove redundant config Tim Harvey
2016-05-23 15:25 ` Tim Harvey [this message]
2016-05-23 15:25 ` [U-Boot] [PATCH 3/4] imx: ventana: use EEPROM register for falcon boot mode Tim Harvey
2016-05-23 15:25 ` [U-Boot] [PATCH 4/4] imx: ventana: remove SPL_EXT_SUPPORT Tim Harvey
2016-05-24 13:04 ` [U-Boot] [PATCH 0/4] Fix Gateworks Ventana build Stefano Babic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1464017129-24130-3-git-send-email-tharvey@gateworks.com \
    --to=tharvey@gateworks.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox