mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-16 09:54:35 +00:00
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>
This commit is contained in:
parent
9a3a58396b
commit
cd3dbb5687
2 changed files with 15 additions and 13 deletions
|
@ -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;
|
||||
|
|
|
@ -271,6 +271,20 @@ void board_init_r(struct global_data *id, ulong dest_addr)
|
|||
|
||||
int cpu_init_r(void);
|
||||
int mac_read_from_eeprom(void);
|
||||
|
||||
/**
|
||||
* serial_read_from_eeprom - 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 serial_read_from_eeprom(int devnum);
|
||||
int set_cpu_clk_info(void);
|
||||
int update_flash_size(int flash_size);
|
||||
int arch_early_init_r(void);
|
||||
|
|
Loading…
Add table
Reference in a new issue