ti: common: board_detect: Add function to determine if EEPROM was read
[oweals/u-boot.git] / board / ti / common / board_detect.c
index bf594cb1ab31ea1327c9df73e175779e5efb65c6..1da5ace9236d7d8d17e0d2c67d99ad9ad7a8ef5f 100644 (file)
@@ -457,3 +457,13 @@ void board_ti_set_ethaddr(int index)
                }
        }
 }
+
+bool __maybe_unused board_ti_was_eeprom_read(void)
+{
+       struct ti_common_eeprom *ep = TI_EEPROM_DATA;
+
+       if (ep->header == TI_EEPROM_HEADER_MAGIC)
+               return true;
+       else
+               return false;
+}