summaryrefslogtreecommitdiffstats
path: root/board/corscience
diff options
context:
space:
mode:
authorAndreas Bießmann <andreas.biessmann@corscience.de>2014-04-10 12:52:50 +0200
committerTom Rini <trini@ti.com>2014-04-11 10:08:42 -0400
commit1ea2301fcfbfc85e38eb51e1144c5ac190c4c320 (patch)
tree541ae549ce88747b937d80ea52b3e049e1abcaa3 /board/corscience
parent24542528fe5832a11b553c5c408a3c41bc4fec21 (diff)
downloadblackbird-obmc-uboot-1ea2301fcfbfc85e38eb51e1144c5ac190c4c320.tar.gz
blackbird-obmc-uboot-1ea2301fcfbfc85e38eb51e1144c5ac190c4c320.zip
board:tricorder: always work with valid eeprom data
Commit 890880583d84607e36b52a785a96b167728bbf73 introduced EEPROM parsing and board detection but faild to return a valid tricorder_eeprom struct for backup case. When pressing S200 while reading EEPROM we ignore the value. We returned falsely a tricorder_eeprom struct with uninitialized data which is just garbage. Initialize it by zeroing the whole structure. Signed-off-by: Andreas Bießmann <andreas.biessmann@corscience.de> Cc: Thomas Weber <thomas.weber@corscience.de> Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Diffstat (limited to 'board/corscience')
-rw-r--r--board/corscience/tricorder/tricorder.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/board/corscience/tricorder/tricorder.c b/board/corscience/tricorder/tricorder.c
index 2dfcb271d3..9e81bf3f3f 100644
--- a/board/corscience/tricorder/tricorder.c
+++ b/board/corscience/tricorder/tricorder.c
@@ -79,6 +79,8 @@ static void get_eeprom(struct tricorder_eeprom *eeprom)
} else {
panic("Could not get board revision\n");
}
+ } else {
+ memset(eeprom, 0, TRICORDER_EEPROM_SIZE);
}
}
OpenPOWER on IntegriCloud