hw21: fix RTC trimming

- commit 7336361d5c broke PMIC RTC trim for hw21
- fixed hw type detection in init_bd_spl()
This commit is contained in:
Rene Straub 2020-08-17 11:24:56 +02:00
parent 9b04a8130e
commit 08e8a21515
1 changed files with 7 additions and 1 deletions

View File

@ -535,7 +535,13 @@ static void init_bd_spl(void)
hw_type = 21; /* Assume hw21, unless BD tells different */
if (read_eeprom() >= 0) {
bd_get_hw_type(&hw_type);
int hw_type_from_bd = -1;
/* If entry is found returns value, otherwise 0 */
bd_get_hw_type(&hw_type_from_bd);
if (hw_type_from_bd != 0) {
hw_type = hw_type_from_bd;
}
}
else {
puts("Could not get board ID.\n");