Commit c19a28bc65aa27fe143e3c784d4f2e19e08810bf

Authored by Alex G
Committed by Tom Rini
1 parent 4fa72bd3fc

board: am335x/mux: Do not hang when encountering a bad EEPROM

In most cases, the SPL and u-boot.img will be on the same boot media.
Since the SPL was loaded by the boot rom, the pinmux will already have
been configured for this media. This, the board will still be able to
boot successfully, or at least reach the u-boot console, where more
recovery options are available.

I've encountered this on a beaglebone black with a corrupted EEPROM.
Removing this check allowed the board to boot successfully. I've also
seen this on EVM-based boards with an unprogrammed EEPROM. On those
boards, for some reason there were no UART messages. This made it look
as if the SOC was dead.

Remove the hang(), as it is not a fatal error. Also reformat the error
message to be clearer as to the cause. The original message made it
appear as if the wrong binary was being loaded.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

board/ti/am335x/mux.c
... ... @@ -397,8 +397,8 @@
397 397 configure_module_pin_mux(rmii1_pin_mux);
398 398 configure_module_pin_mux(spi0_pin_mux);
399 399 } else {
400   - puts("Unknown board, cannot configure pinmux.");
401   - hang();
  400 + /* Unknown board. We might still be able to boot. */
  401 + puts("Bad EEPROM or unknown board, cannot configure pinmux.");
402 402 }
403 403 }