Commit 60c4ae00be11f07a9b60f95e76538785062f873b

Authored by Valentin Longchamp
Committed by Tom Rini
1 parent 2973b098ba

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>

Showing 6 changed files with 6 additions and 26 deletions Side-by-side Diff

board/keymile/common/common.h
... ... @@ -126,8 +126,7 @@
126 126 #endif
127 127  
128 128 int ethernet_present(void);
129   -int ivm_read_eeprom(void);
130   -int ivm_simple_read_eeprom(unsigned char *buf, int len);
  129 +int ivm_read_eeprom(unsigned char *buf, int len);
131 130 int ivm_analyze_eeprom(unsigned char *buf, int len);
132 131  
133 132 int trigger_fpga_config(void);
board/keymile/common/ivm.c
... ... @@ -315,7 +315,7 @@
315 315 return 0;
316 316 }
317 317  
318   -int ivm_simple_read_eeprom(unsigned char *buf, int len)
  318 +int ivm_read_eeprom(unsigned char *buf, int len)
319 319 {
320 320 int ret;
321 321  
... ... @@ -330,24 +330,5 @@
330 330 }
331 331  
332 332 return ivm_populate_env(buf, len);
333   -}
334   -
335   -int ivm_read_eeprom(void)
336   -{
337   - uchar i2c_buffer[CONFIG_SYS_IVM_EEPROM_MAX_LEN];
338   - int ret;
339   -
340   - i2c_set_bus_num(CONFIG_KM_IVM_BUS);
341   - /* add deblocking here */
342   - i2c_make_abort();
343   -
344   - ret = i2c_read(CONFIG_SYS_IVM_EEPROM_ADR, 0, 1, i2c_buffer,
345   - CONFIG_SYS_IVM_EEPROM_MAX_LEN);
346   - if (ret != 0) {
347   - printf("Error reading EEprom\n");
348   - return -2;
349   - }
350   -
351   - return ivm_analyze_eeprom(i2c_buffer, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
352 333 }
board/keymile/km82xx/km82xx.c
... ... @@ -397,7 +397,7 @@
397 397  
398 398 int misc_init_r(void)
399 399 {
400   - ivm_simple_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
  400 + ivm_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
401 401 return 0;
402 402 }
403 403  
board/keymile/km83xx/km83xx.c
... ... @@ -192,7 +192,7 @@
192 192  
193 193 int misc_init_r(void)
194 194 {
195   - ivm_simple_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
  195 + ivm_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
196 196 return 0;
197 197 }
198 198  
board/keymile/km_arm/km_arm.c
... ... @@ -212,7 +212,7 @@
212 212 }
213 213 #endif
214 214  
215   - ivm_simple_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
  215 + ivm_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
216 216  
217 217 initialize_unit_leds();
218 218 set_km_env();
board/keymile/kmp204x/kmp204x.c
... ... @@ -197,7 +197,7 @@
197 197 }
198 198 }
199 199  
200   - ivm_simple_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
  200 + ivm_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
201 201 return 0;
202 202 }
203 203