KM/IVM: remove ivm_read_eeprom(void)
This is not used anymore since the procedure was split into a simple read function and a later alaysis. The ivm_read_eeprom name is now used for the previous ivm_simple_read_eeprom function. Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
This commit is contained in:
parent
2973b098ba
commit
60c4ae00be
|
|
@ -126,8 +126,7 @@ struct bfticu_iomap {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int ethernet_present(void);
|
int ethernet_present(void);
|
||||||
int ivm_read_eeprom(void);
|
int ivm_read_eeprom(unsigned char *buf, int len);
|
||||||
int ivm_simple_read_eeprom(unsigned char *buf, int len);
|
|
||||||
int ivm_analyze_eeprom(unsigned char *buf, int len);
|
int ivm_analyze_eeprom(unsigned char *buf, int len);
|
||||||
|
|
||||||
int trigger_fpga_config(void);
|
int trigger_fpga_config(void);
|
||||||
|
|
|
||||||
|
|
@ -315,7 +315,7 @@ static int ivm_populate_env(unsigned char *buf, int len)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ivm_simple_read_eeprom(unsigned char *buf, int len)
|
int ivm_read_eeprom(unsigned char *buf, int len)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
|
@ -331,22 +331,3 @@ int ivm_simple_read_eeprom(unsigned char *buf, int len)
|
||||||
|
|
||||||
return ivm_populate_env(buf, len);
|
return ivm_populate_env(buf, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ivm_read_eeprom(void)
|
|
||||||
{
|
|
||||||
uchar i2c_buffer[CONFIG_SYS_IVM_EEPROM_MAX_LEN];
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
i2c_set_bus_num(CONFIG_KM_IVM_BUS);
|
|
||||||
/* add deblocking here */
|
|
||||||
i2c_make_abort();
|
|
||||||
|
|
||||||
ret = i2c_read(CONFIG_SYS_IVM_EEPROM_ADR, 0, 1, i2c_buffer,
|
|
||||||
CONFIG_SYS_IVM_EEPROM_MAX_LEN);
|
|
||||||
if (ret != 0) {
|
|
||||||
printf("Error reading EEprom\n");
|
|
||||||
return -2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ivm_analyze_eeprom(i2c_buffer, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -397,7 +397,7 @@ int board_early_init_r(void)
|
||||||
|
|
||||||
int misc_init_r(void)
|
int misc_init_r(void)
|
||||||
{
|
{
|
||||||
ivm_simple_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
|
ivm_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -192,7 +192,7 @@ int board_early_init_r(void)
|
||||||
|
|
||||||
int misc_init_r(void)
|
int misc_init_r(void)
|
||||||
{
|
{
|
||||||
ivm_simple_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
|
ivm_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -212,7 +212,7 @@ int misc_init_r(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ivm_simple_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
|
ivm_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
|
||||||
|
|
||||||
initialize_unit_leds();
|
initialize_unit_leds();
|
||||||
set_km_env();
|
set_km_env();
|
||||||
|
|
|
||||||
|
|
@ -197,7 +197,7 @@ int misc_init_r(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ivm_simple_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
|
ivm_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue