summaryrefslogtreecommitdiff
path: root/board/gateworks/gw_ventana/gw_ventana.c
diff options
context:
space:
mode:
authorTim Harvey <tharvey@gateworks.com>2015-04-08 12:54:59 -0700
committerStefano Babic <sbabic@denx.de>2015-04-22 14:39:11 +0200
commitee5931d488122f1d4510bf03d37183fabd35fc0d (patch)
tree687dd1e35c883486390cc290c87be8009c5bfb53 /board/gateworks/gw_ventana/gw_ventana.c
parent4569cd561d0df3b5f9221a9517bc4c399ce8a25b (diff)
downloadu-boot-imx-ee5931d488122f1d4510bf03d37183fabd35fc0d.zip
u-boot-imx-ee5931d488122f1d4510bf03d37183fabd35fc0d.tar.gz
u-boot-imx-ee5931d488122f1d4510bf03d37183fabd35fc0d.tar.bz2
imx: ventana: add 'gsc wd' command for enabling and disabling GSC watchdog
This adds information about the Gateworks System Controller to the gsc command such as the firmware version, firmware CRC and status of the GSC watchdog (if its enabled and if its tripped). Additionally the 'gsc wd' command can be used to enable or disable the watchdog with the following usage: gsc wd enable [30|60] gsc wd disable Note that the GSC registers are battery-backed by the GSC coincell so once eanbled, they remain enabled across power-cycles or until either the GSC firmware has been updated or FLASH has been re-programmed by the Gateworks JTAG adapter. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Diffstat (limited to 'board/gateworks/gw_ventana/gw_ventana.c')
-rw-r--r--board/gateworks/gw_ventana/gw_ventana.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c
index 871af09..b7199f1 100644
--- a/board/gateworks/gw_ventana/gw_ventana.c
+++ b/board/gateworks/gw_ventana/gw_ventana.c
@@ -1430,15 +1430,8 @@ int checkboard(void)
return 0;
/* Display GSC firmware revision/CRC/status */
- i2c_set_bus_num(CONFIG_I2C_GSC);
- if (!gsc_i2c_read(GSC_SC_ADDR, GSC_SC_FWVER, 1, buf, 1)) {
- printf("GSC: v%d", buf[0]);
- if (!gsc_i2c_read(GSC_SC_ADDR, GSC_SC_STATUS, 1, buf, 4)) {
- printf(" 0x%04x", buf[2] | buf[3]<<8); /* CRC */
- printf(" 0x%02x", buf[0]); /* irq status */
- }
- puts("\n");
- }
+ gsc_info(0);
+
/* Display RTC */
if (!gsc_i2c_read(GSC_RTC_ADDR, 0x00, 1, buf, 4)) {
printf("RTC: %d\n",
@@ -1575,13 +1568,6 @@ int misc_init_r(void)
} else {
puts("Error: could not disable GSC Watchdog\n");
}
- if (!gsc_i2c_read(GSC_SC_ADDR, GSC_SC_STATUS, 1, &reg, 1)) {
- if (reg & (1 << GSC_SC_IRQ_WATCHDOG)) { /* watchdog timeout */
- puts("GSC boot watchdog timeout detected\n");
- reg &= ~(1 << GSC_SC_IRQ_WATCHDOG); /* clear flag */
- gsc_i2c_write(GSC_SC_ADDR, GSC_SC_STATUS, 1, &reg, 1);
- }
- }
return 0;
}