Re: [PATCH 1/2] common: add prototype for populate_serial_number()
Hi Simon, thanks for the review. >Hi Artur, > >On Thu, 21 Sept 2023 at 09:44, Artur Rojek wrote: >> >> Provide function prototype for populate_serial_number(). >> This is useful for boards that wish to read their serial number from >> EEPROM at init. >> >> Signed-off-by: Artur Rojek >> --- >> include/init.h | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/include/init.h b/include/init.h >> index 3bf30476a2e0..e0b7fbc943ad 100644 >> --- a/include/init.h >> +++ b/include/init.h >> @@ -283,6 +283,7 @@ void board_init_r(struct global_data *id, ulong >> dest_addr) >> int cpu_init_r(void); >> int last_stage_init(void); >> int mac_read_from_eeprom(void); >> +int populate_serial_number(int devnum); > >Please can you add a comment for this function? You can move it from the C >file. > >I also suggest renaming it to something like eeprom_get_serial() or >something like that. I'll go with eeprom_read_serial(), as the one you suggested is apparently already taken by board/gateworks/venice/eeprom.c. > >> int set_cpu_clk_info(void); >> int update_flash_size(int flash_size); >> int arch_early_init_r(void); >> -- >> 2.42.0 >> > >BTW tlv_eeprom.c should really be converted to driver model. It should, but maybe at some other opportunity :) Cheers, Artur > >Regards, >Simon
Re: [PATCH 1/2] common: add prototype for populate_serial_number()
Hi Artur, On Thu, 21 Sept 2023 at 09:44, Artur Rojek wrote: > > Provide function prototype for populate_serial_number(). > This is useful for boards that wish to read their serial number from > EEPROM at init. > > Signed-off-by: Artur Rojek > --- > include/init.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/init.h b/include/init.h > index 3bf30476a2e0..e0b7fbc943ad 100644 > --- a/include/init.h > +++ b/include/init.h > @@ -283,6 +283,7 @@ void board_init_r(struct global_data *id, ulong dest_addr) > int cpu_init_r(void); > int last_stage_init(void); > int mac_read_from_eeprom(void); > +int populate_serial_number(int devnum); Please can you add a comment for this function? You can move it from the C file. I also suggest renaming it to something like eeprom_get_serial() or something like that. > int set_cpu_clk_info(void); > int update_flash_size(int flash_size); > int arch_early_init_r(void); > -- > 2.42.0 > BTW tlv_eeprom.c should really be converted to driver model. Regards, Simon
[PATCH 1/2] common: add prototype for populate_serial_number()
Provide function prototype for populate_serial_number(). This is useful for boards that wish to read their serial number from EEPROM at init. Signed-off-by: Artur Rojek --- include/init.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/init.h b/include/init.h index 3bf30476a2e0..e0b7fbc943ad 100644 --- a/include/init.h +++ b/include/init.h @@ -283,6 +283,7 @@ void board_init_r(struct global_data *id, ulong dest_addr) int cpu_init_r(void); int last_stage_init(void); int mac_read_from_eeprom(void); +int populate_serial_number(int devnum); int set_cpu_clk_info(void); int update_flash_size(int flash_size); int arch_early_init_r(void); -- 2.42.0