KM/IVM: remove ivm_read_eeprom(void)
authorValentin Longchamp <valentin.longchamp@keymile.com>
Tue, 10 Feb 2015 16:10:18 +0000 (17:10 +0100)
committerTom Rini <trini@ti.com>
Mon, 16 Feb 2015 20:48:36 +0000 (15:48 -0500)
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>
board/keymile/common/common.h
board/keymile/common/ivm.c
board/keymile/km82xx/km82xx.c
board/keymile/km83xx/km83xx.c
board/keymile/km_arm/km_arm.c
board/keymile/kmp204x/kmp204x.c

index 7e16d2570b56cfb6e976fd0cd944369e12384010..dcfefc46b3448ee3a4bb9b8ae09a1b659f2beaca 100644 (file)
@@ -126,8 +126,7 @@ struct bfticu_iomap {
 #endif
 
 int ethernet_present(void);
-int ivm_read_eeprom(void);
-int ivm_simple_read_eeprom(unsigned char *buf, int len);
+int ivm_read_eeprom(unsigned char *buf, int len);
 int ivm_analyze_eeprom(unsigned char *buf, int len);
 
 int trigger_fpga_config(void);
index 9abc09abc6be55b0874fb6f273ca6e9e50cb9812..42db54221bb34dc30966304cba6bdb822842fc47 100644 (file)
@@ -315,7 +315,7 @@ static int ivm_populate_env(unsigned char *buf, int len)
        return 0;
 }
 
-int ivm_simple_read_eeprom(unsigned char *buf, int len)
+int ivm_read_eeprom(unsigned char *buf, int len)
 {
        int ret;
 
@@ -331,22 +331,3 @@ int ivm_simple_read_eeprom(unsigned char *buf, int 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);
-}
index c3a113172c07fb9f43be2a2a9798aa6449890bd2..c599b409362603c2463e12c75427fec8c5b801dd 100644 (file)
@@ -397,7 +397,7 @@ int board_early_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;
 }
 
index fc68a2f41f06628186486d4db99f48ceadc4a2c5..89e9e1e57c384abf9205898ba438ad2e01d38ea9 100644 (file)
@@ -192,7 +192,7 @@ int board_early_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;
 }
 
index 6eb6712b39e4dd8ba65d95e8999b0083a2ac9172..2938861f368fc454e657485fe73372da89de2641 100644 (file)
@@ -212,7 +212,7 @@ int misc_init_r(void)
        }
 #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();
        set_km_env();
index 0f544fb979e1ab90abde59f04f5b5ff68e959ccc..eebb47fc21f1cfbcf6aff58e72154c9cc9f5388c 100644 (file)
@@ -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;
 }