aboutsummaryrefslogtreecommitdiff
path: root/cmd/tlv_eeprom.c
diff options
context:
space:
mode:
authorArtur Rojek2023-10-18 16:00:56 +0200
committerEugen Hristev2023-10-23 17:07:06 +0300
commitcd3dbb56874dbf0f85c4c36958e29c2515374a6b (patch)
treef3e4592ab103aa35904aaeacbcc1e1f60fb886eb /cmd/tlv_eeprom.c
parent9a3a58396b78b1f9d0c14580dc03f81d29207dd2 (diff)
common: add prototype & rename populate_serial_number()
Rename populate_serial_number() to a more descriptive serial_read_from_eeprom() and provide the missing function prototype. This is useful for boards that wish to read their serial number from EEPROM at init. Signed-off-by: Artur Rojek <artur@conclusive.pl> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd/tlv_eeprom.c')
-rw-r--r--cmd/tlv_eeprom.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/cmd/tlv_eeprom.c b/cmd/tlv_eeprom.c
index 79796394c5c..57cfd355df1 100644
--- a/cmd/tlv_eeprom.c
+++ b/cmd/tlv_eeprom.c
@@ -1088,19 +1088,7 @@ int mac_read_from_eeprom(void)
return 0;
}
-/**
- * populate_serial_number - read the serial number from EEPROM
- *
- * This function reads the serial number from the EEPROM and sets the
- * appropriate environment variable.
- *
- * The environment variable is only set if it has not been set
- * already. This ensures that any user-saved variables are never
- * overwritten.
- *
- * This function must be called after relocation.
- */
-int populate_serial_number(int devnum)
+int serial_read_from_eeprom(int devnum)
{
char serialstr[257];
int eeprom_index;